xf86-video-ati-7.3.0/0000775000175000017500000000000012270504207011175 500000000000000xf86-video-ati-7.3.0/configure0000755000175000017500000233310512270503570013033 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for xf86-video-ati 7.3.0. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 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 -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 as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. 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 # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # 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 test -z "$as_dir" && as_dir=. 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 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # 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'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_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 -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 " 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 exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || 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 as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else 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 test -z "$as_dir" && as_dir=. 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_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS 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'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg $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 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=`$as_echo "$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 || $as_echo 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 as_fn_append () { eval $1=\$$1\$2 } 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 as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } 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 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$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 || $as_echo 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 ' 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" || { $as_echo "$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 } 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 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_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 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-ati' PACKAGE_TARNAME='xf86-video-ati' PACKAGE_VERSION='7.3.0' PACKAGE_STRING='xf86-video-ati 7.3.0' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' PACKAGE_URL='' ac_unique_file="Makefile.am" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS DRIVER_NAME moduledir PCIACCESS_LIBS PCIACCESS_CFLAGS LIBGLAMOR_EGL_LIBS LIBGLAMOR_EGL_CFLAGS LIBGLAMOR_LIBS LIBGLAMOR_CFLAGS GLAMOR_FALSE GLAMOR_TRUE LIBUDEV_FALSE LIBUDEV_TRUE LIBUDEV_LIBS LIBUDEV_CFLAGS HAVE_XEXTPROTO_71_FALSE HAVE_XEXTPROTO_71_TRUE XEXT_LIBS XEXT_CFLAGS XORG_LIBS XORG_CFLAGS LIBDRM_RADEON_LIBS LIBDRM_RADEON_CFLAGS LIBDRM_LIBS LIBDRM_CFLAGS OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP 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 EGREP GREP CPP MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V 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 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' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_largefile enable_dependency_tracking enable_maintainer_mode enable_selective_werror enable_strict_compilation enable_static enable_shared with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock with_xorg_module_dir enable_udev enable_glamor ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR LIBDRM_CFLAGS LIBDRM_LIBS LIBDRM_RADEON_CFLAGS LIBDRM_RADEON_LIBS XORG_CFLAGS XORG_LIBS XEXT_CFLAGS XEXT_LIBS LIBUDEV_CFLAGS LIBUDEV_LIBS LIBGLAMOR_CFLAGS LIBGLAMOR_LIBS LIBGLAMOR_EGL_CFLAGS LIBGLAMOR_EGL_LIBS PCIACCESS_CFLAGS PCIACCESS_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' 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 # Accept the important Cygnus configure options, so we can diagnose typos. 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=`$as_echo "$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=`$as_echo "$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 ;; -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=`$as_echo "$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=`$as_echo "$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. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$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" ;; *) $as_echo "$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 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 || $as_echo 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-ati 7.3.0 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] --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-ati] --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-ati 7.3.0:";; 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") --disable-largefile omit support for large files --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --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) --disable-udev Disable libudev support [default=auto] --disable-glamor Disable glamor, a new GL-based acceleration [default=enabled] 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-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 CPP C preprocessor 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 LIBDRM_CFLAGS C compiler flags for LIBDRM, overriding pkg-config LIBDRM_LIBS linker flags for LIBDRM, overriding pkg-config LIBDRM_RADEON_CFLAGS C compiler flags for LIBDRM_RADEON, overriding pkg-config LIBDRM_RADEON_LIBS linker flags for LIBDRM_RADEON, 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 LIBUDEV_CFLAGS C compiler flags for LIBUDEV, overriding pkg-config LIBUDEV_LIBS linker flags for LIBUDEV, overriding pkg-config LIBGLAMOR_CFLAGS C compiler flags for LIBGLAMOR, overriding pkg-config LIBGLAMOR_LIBS linker flags for LIBGLAMOR, overriding pkg-config LIBGLAMOR_EGL_CFLAGS C compiler flags for LIBGLAMOR_EGL, overriding pkg-config LIBGLAMOR_EGL_LIBS linker flags for LIBGLAMOR_EGL, overriding pkg-config PCIACCESS_CFLAGS C compiler flags for PCIACCESS, overriding pkg-config PCIACCESS_LIBS linker flags for PCIACCESS, 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=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$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 guested configure. 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 $as_echo "$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-ati configure 7.3.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 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 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\"" $as_echo "$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 $as_echo "$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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES # --------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #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 eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" 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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 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 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi 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_run # 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else 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 eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$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$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\"" $as_echo "$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 $as_echo "$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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else 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 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #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 (); /* 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 () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ---------------------------------------------------------------------- ## ## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## ## ---------------------------------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel 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-ati $as_me 7.3.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _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 test -z "$as_dir" && as_dir=. $as_echo "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=`$as_echo "$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=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## 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_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$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 $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$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 $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file 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,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$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=`$as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`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 ac_config_headers="$ac_config_headers config.h" ac_aux_dir= for ac_dir in . "$srcdir"/.; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in . \"$srcdir\"/." "$LINENO" 5 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. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Initialize Automake am__api_version='1.13' # 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. 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 fi if test "${ac_cv_path_install+set}" = set; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$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' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "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=`$as_echo "$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 case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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 (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ '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 fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P 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. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else 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 fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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+set}" = set; 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} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else 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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$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-ati' VERSION='7.3.0' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # 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. 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 -' DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$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 fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$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. $as_echo "$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; 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\"" $as_echo "$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 $as_echo "$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 () { ; 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$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+set}" = set && 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 ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$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 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$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; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$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 () { FILE *f = fopen ("conftest.out", "w"); 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$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 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; 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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$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 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$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; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else 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 () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; 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.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) 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; } /* 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 don't provoke an error unfortunately, instead are silently treated as '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's necessary to write '\x00'==0 to get something that's 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 **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _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 test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : 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= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else 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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$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 # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 $as_echo_n "checking for special C compiler options needed for large files... " >&6; } if ${ac_cv_sys_largefile_CC+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : break fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 $as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } if ${ac_cv_sys_file_offset_bits+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 $as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } if ${ac_cv_sys_large_files+:} false; then : $as_echo_n "(cached) " >&6 else while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 $as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -rf conftest* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE # Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } if ${ac_cv_prog_cc_c99+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include // Check varargs macros. These examples are taken from C99 6.10.3.5. #define debug(...) fprintf (stderr, __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 your preprocessor is broken; #endif #if BIG_OK #else 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) { // See if C++-style comments work. // 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 void 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; float fnumber; 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); } int main () { // Check bool. _Bool success = false; // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. 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; // 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[ni.number - 1] = 543; // work around unused variable warnings return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' || dynamic_array[ni.number - 1] != 543); ; return 0; } _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 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 test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c99" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c99" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; esac if test "x$ac_cv_prog_cc_c99" != xno; then : 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_decl "$LINENO" "__clang__" "ac_cv_have_decl___clang__" "$ac_includes_default" if test "x$ac_cv_have_decl___clang__" = xyes; then : CLANGCC="yes" else CLANGCC="no" fi ac_fn_c_check_decl "$LINENO" "__INTEL_COMPILER" "ac_cv_have_decl___INTEL_COMPILER" "$ac_includes_default" if test "x$ac_cv_have_decl___INTEL_COMPILER" = xyes; then : INTELCC="yes" else INTELCC="no" fi ac_fn_c_check_decl "$LINENO" "__SUNPRO_C" "ac_cv_have_decl___SUNPRO_C" "$ac_includes_default" if test "x$ac_cv_have_decl___SUNPRO_C" = xyes; then : SUNCC="yes" else SUNCC="no" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else 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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else 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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$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+set}" = set; then : enableval=$enable_selective_werror; SELECTIVE_WERROR=$enableval else SELECTIVE_WERROR=yes 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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wall" >&5 $as_echo_n "checking if $CC supports -Wall... " >&6; } cacheid=xorg_cv_cc_flag__Wall if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-arith" >&5 $as_echo_n "checking if $CC supports -Wpointer-arith... " >&6; } cacheid=xorg_cv_cc_flag__Wpointer_arith if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-declarations" >&5 $as_echo_n "checking if $CC supports -Wmissing-declarations... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_declarations if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat=2" >&5 $as_echo_n "checking if $CC supports -Wformat=2... " >&6; } cacheid=xorg_cv_cc_flag__Wformat_2 if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat" >&5 $as_echo_n "checking if $CC supports -Wformat... " >&6; } cacheid=xorg_cv_cc_flag__Wformat if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wstrict-prototypes" >&5 $as_echo_n "checking if $CC supports -Wstrict-prototypes... " >&6; } cacheid=xorg_cv_cc_flag__Wstrict_prototypes if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-prototypes" >&5 $as_echo_n "checking if $CC supports -Wmissing-prototypes... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_prototypes if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnested-externs" >&5 $as_echo_n "checking if $CC supports -Wnested-externs... " >&6; } cacheid=xorg_cv_cc_flag__Wnested_externs if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wbad-function-cast" >&5 $as_echo_n "checking if $CC supports -Wbad-function-cast... " >&6; } cacheid=xorg_cv_cc_flag__Wbad_function_cast if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wold-style-definition" >&5 $as_echo_n "checking if $CC supports -Wold-style-definition... " >&6; } cacheid=xorg_cv_cc_flag__Wold_style_definition if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -fd" >&5 $as_echo_n "checking if $CC supports -fd... " >&6; } cacheid=xorg_cv_cc_flag__fd if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wdeclaration-after-statement" >&5 $as_echo_n "checking if $CC supports -Wdeclaration-after-statement... " >&6; } cacheid=xorg_cv_cc_flag__Wdeclaration_after_statement if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wunused" >&5 $as_echo_n "checking if $CC supports -Wunused... " >&6; } cacheid=xorg_cv_cc_flag__Wunused if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wuninitialized" >&5 $as_echo_n "checking if $CC supports -Wuninitialized... " >&6; } cacheid=xorg_cv_cc_flag__Wuninitialized if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wshadow" >&5 $as_echo_n "checking if $CC supports -Wshadow... " >&6; } cacheid=xorg_cv_cc_flag__Wshadow if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-noreturn" >&5 $as_echo_n "checking if $CC supports -Wmissing-noreturn... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_noreturn if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-format-attribute" >&5 $as_echo_n "checking if $CC supports -Wmissing-format-attribute... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_format_attribute if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wredundant-decls" >&5 $as_echo_n "checking if $CC supports -Wredundant-decls... " >&6; } cacheid=xorg_cv_cc_flag__Wredundant_decls if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wlogical-op" >&5 $as_echo_n "checking if $CC supports -Wlogical-op... " >&6; } cacheid=xorg_cv_cc_flag__Wlogical_op if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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 accidently 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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=implicit" >&5 $as_echo_n "checking if $CC supports -Werror=implicit... " >&6; } cacheid=xorg_cv_cc_flag__Werror_implicit if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED" >&5 $as_echo_n "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 \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=nonnull" >&5 $as_echo_n "checking if $CC supports -Werror=nonnull... " >&6; } cacheid=xorg_cv_cc_flag__Werror_nonnull if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=init-self" >&5 $as_echo_n "checking if $CC supports -Werror=init-self... " >&6; } cacheid=xorg_cv_cc_flag__Werror_init_self if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=main" >&5 $as_echo_n "checking if $CC supports -Werror=main... " >&6; } cacheid=xorg_cv_cc_flag__Werror_main if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=missing-braces" >&5 $as_echo_n "checking if $CC supports -Werror=missing-braces... " >&6; } cacheid=xorg_cv_cc_flag__Werror_missing_braces if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=sequence-point" >&5 $as_echo_n "checking if $CC supports -Werror=sequence-point... " >&6; } cacheid=xorg_cv_cc_flag__Werror_sequence_point if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=return-type" >&5 $as_echo_n "checking if $CC supports -Werror=return-type... " >&6; } cacheid=xorg_cv_cc_flag__Werror_return_type if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_FUNC_HAS_NO_RETURN_STMT" >&5 $as_echo_n "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 \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=trigraphs" >&5 $as_echo_n "checking if $CC supports -Werror=trigraphs... " >&6; } cacheid=xorg_cv_cc_flag__Werror_trigraphs if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=array-bounds" >&5 $as_echo_n "checking if $CC supports -Werror=array-bounds... " >&6; } cacheid=xorg_cv_cc_flag__Werror_array_bounds if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=write-strings" >&5 $as_echo_n "checking if $CC supports -Werror=write-strings... " >&6; } cacheid=xorg_cv_cc_flag__Werror_write_strings if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=address" >&5 $as_echo_n "checking if $CC supports -Werror=address... " >&6; } cacheid=xorg_cv_cc_flag__Werror_address if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=int-to-pointer-cast" >&5 $as_echo_n "checking if $CC supports -Werror=int-to-pointer-cast... " >&6; } cacheid=xorg_cv_cc_flag__Werror_int_to_pointer_cast if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION" >&5 $as_echo_n "checking if $CC supports -errwarn=E_BAD_PTR_INT_COMBINATION... " >&6; } cacheid=xorg_cv_cc_flag__errwarn_E_BAD_PTR_INT_COMBINATION if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=pointer-to-int-cast" >&5 $as_echo_n "checking if $CC supports -Werror=pointer-to-int-cast... " >&6; } cacheid=xorg_cv_cc_flag__Werror_pointer_to_int_cast if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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 { $as_echo "$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 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wimplicit" >&5 $as_echo_n "checking if $CC supports -Wimplicit... " >&6; } cacheid=xorg_cv_cc_flag__Wimplicit if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wnonnull" >&5 $as_echo_n "checking if $CC supports -Wnonnull... " >&6; } cacheid=xorg_cv_cc_flag__Wnonnull if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Winit-self" >&5 $as_echo_n "checking if $CC supports -Winit-self... " >&6; } cacheid=xorg_cv_cc_flag__Winit_self if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmain" >&5 $as_echo_n "checking if $CC supports -Wmain... " >&6; } cacheid=xorg_cv_cc_flag__Wmain if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wmissing-braces" >&5 $as_echo_n "checking if $CC supports -Wmissing-braces... " >&6; } cacheid=xorg_cv_cc_flag__Wmissing_braces if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wsequence-point" >&5 $as_echo_n "checking if $CC supports -Wsequence-point... " >&6; } cacheid=xorg_cv_cc_flag__Wsequence_point if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wreturn-type" >&5 $as_echo_n "checking if $CC supports -Wreturn-type... " >&6; } cacheid=xorg_cv_cc_flag__Wreturn_type if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wtrigraphs" >&5 $as_echo_n "checking if $CC supports -Wtrigraphs... " >&6; } cacheid=xorg_cv_cc_flag__Wtrigraphs if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Warray-bounds" >&5 $as_echo_n "checking if $CC supports -Warray-bounds... " >&6; } cacheid=xorg_cv_cc_flag__Warray_bounds if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wwrite-strings" >&5 $as_echo_n "checking if $CC supports -Wwrite-strings... " >&6; } cacheid=xorg_cv_cc_flag__Wwrite_strings if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Waddress" >&5 $as_echo_n "checking if $CC supports -Waddress... " >&6; } cacheid=xorg_cv_cc_flag__Waddress if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wint-to-pointer-cast" >&5 $as_echo_n "checking if $CC supports -Wint-to-pointer-cast... " >&6; } cacheid=xorg_cv_cc_flag__Wint_to_pointer_cast if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-to-int-cast" >&5 $as_echo_n "checking if $CC supports -Wpointer-to-int-cast... " >&6; } cacheid=xorg_cv_cc_flag__Wpointer_to_int_cast if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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+set}" = set; then : enableval=$enable_strict_compilation; STRICT_COMPILE=$enableval else STRICT_COMPILE=no 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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -pedantic" >&5 $as_echo_n "checking if $CC supports -pedantic... " >&6; } cacheid=xorg_cv_cc_flag__pedantic if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror" >&5 $as_echo_n "checking if $CC supports -Werror... " >&6; } cacheid=xorg_cv_cc_flag__Werror if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -errwarn" >&5 $as_echo_n "checking if $CC supports -errwarn... " >&6; } cacheid=xorg_cv_cc_flag__errwarn if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unknown-warning-option" >&5 $as_echo_n "checking if $CC supports -Werror=unknown-warning-option... " >&6; } if ${xorg_cv_cc_flag_unknown_warning_option+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unknown_warning_option=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unknown_warning_option" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=unused-command-line-argument" >&5 $as_echo_n "checking if $CC supports -Werror=unused-command-line-argument... " >&6; } if ${xorg_cv_cc_flag_unused_command_line_argument+:} false; then : $as_echo_n "(cached) " >&6 else 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 xorg_cv_cc_flag_unused_command_line_argument=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xorg_cv_cc_flag_unused_command_line_argument" >&5 $as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror=attributes" >&5 $as_echo_n "checking if $CC supports -Werror=attributes... " >&6; } cacheid=xorg_cv_cc_flag__Werror_attributes if eval \${$cacheid+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int i; int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval $cacheid=yes else eval $cacheid=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CFLAGS="$xorg_testset_save_CFLAGS" eval supported=\$$cacheid { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5 $as_echo "$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 cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION_MINOR $PVM _ACEOF PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` if test "x$PVP" = "x"; then PVP="0" fi cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION_PATCHLEVEL $PVP _ACEOF CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ || (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ echo 'git directory not found: installing possibly 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; touch \$(top_srcdir)/INSTALL; \ echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 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 $host_os in solaris*) 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 $host_os in solaris*) 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 $host_os in solaris*) 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 $host_os in solaris*) 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+set}" = set; 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} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else 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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$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='\' # Initialize libtool # Check whether --enable-static was given. if test "${enable_static+set}" = set; 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 enable_static=no fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.2' macro_revision='1.3337' 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "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*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$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+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "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 "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else 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 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else 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 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) 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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$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 /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else 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* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else 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; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # 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"; 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 $i != 17 # 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 fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else 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 fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #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 fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$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 "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; 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}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else 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 # which 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='/usr/bin/file -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. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && 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*) 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=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file 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) 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=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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 ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else 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 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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$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} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; 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=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; 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=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$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 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # 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 "$host_cpu" = ia64; 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 # 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 -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$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 -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/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 # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # 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};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print 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=$? $as_echo "$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=$? $as_echo "$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 con'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* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$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=$? $as_echo "$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 "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && 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 which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. 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=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file 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* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|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" ;; ppc*-*linux*|powerpc*-*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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else 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 () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ 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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else 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* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else 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 test -z "$as_dir" && as_dir=. 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" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else 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 $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else 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 () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else 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 cru libconftest.a conftest.o" >&5 $AR cru 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 $_lt_result -eq 0 && $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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$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*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; 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 "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac for ac_header in dlfcn.h do : 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 : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; 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 enable_shared=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; 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 pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; 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 enable_fast_install=yes fi # 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else 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 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF 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 "X${COLLECT_NAMES+set}" != Xset; 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, # which needs '.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 for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else 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 fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else 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 fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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* if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else 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" # 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* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; 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 "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; 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' ;; 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 "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; 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' ;; 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) 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' ;; 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 which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else 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" # 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* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; 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\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else 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" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else 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* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else 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* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "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++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) 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 "$with_gnu_ld" = yes; 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 "$lt_use_gnu_ld_interface" = yes; 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 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 "$host_cpu" != ia64; 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 (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; 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 ;; 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 "$host_os" = linux-dietlibc; 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 "$tmp_diet" = no 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' ;; 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 "x$supports_anon_versioning" = xyes; 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 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 "x$supports_anon_versioning" = xyes; 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 can not *** 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 "$ld_shlibs" = no; 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 "$GCC" = yes && 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 "$host_cpu" = ia64; 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 AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". 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) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | 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 # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; 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,' if test "$GCC" = yes; 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 "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; 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 "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi 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_use_runtimelinking" = yes; 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 "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; 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$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi 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 "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; 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 "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; 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$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi 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 "$with_gnu_ld" = yes; 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 # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 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++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC 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~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $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 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 "$lt_cv_ld_force_load" = "yes"; 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*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; 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*) 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 "$GCC" = yes; 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 $output_objdir/$soname = $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 $output_objdir/$soname = $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 "$GCC" = yes && test "$with_gnu_ld" = no; 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 "$with_gnu_ld" = no; 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 "$GCC" = yes && test "$with_gnu_ld" = no; 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) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else 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" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; 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 "$with_gnu_ld" = no; 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 "$GCC" = yes; 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else 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 lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; 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 ;; 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*) 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__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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 case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; 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 "$GCC" = yes; 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 "$GCC" = yes; 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 "$GCC" = yes; 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 "x$host_vendor" = xsequent; 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 "$GCC" = yes; 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 can NOT 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 "$GCC" = yes; 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 x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && 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 "$enable_shared" = yes && test "$GCC" = yes; 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $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=$? $as_echo "$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=$? $as_echo "$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* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; 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` 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" else 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 "$host_cpu" = ia64; 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 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # 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}' else # 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' fi 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%'\''`; test $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*) # Native MSVC 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 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}${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 .so || 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*) # 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 version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; 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 ;; 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' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; 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=yes 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 "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; 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 "$lt_cv_prog_gnu_ld" = yes; 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 ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-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 ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else 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 () { ; 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$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir 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 # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents 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="$sys_lib_dlsearch_path_spec $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*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac 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 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; 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 "$with_gnu_ld" = yes; 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=freebsd-elf 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 "$with_gnu_ld" = yes; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # 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 "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$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 lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$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 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else 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. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$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 fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && 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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; 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 -fvisbility=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=$? $as_echo "$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* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; 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 -fvisbility=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=$? $as_echo "$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* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$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= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && 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 "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$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: # Checks for programs. if test "x$CC" != xcc; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { 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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { 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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. if { ac_try='cc -c conftest.$ac_ext >&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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { 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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { 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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h fi # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != 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 if test "x$GCC" = "xyes"; then CPPFLAGS="$CPPFLAGS -Wall" fi # Define a configure option for an alternate module directory # Check whether --with-xorg-module-dir was given. if test "${with_xorg_module_dir+set}" = set; then : withval=$with_xorg_module_dir; moduledir="$withval" else moduledir="$libdir/xorg/modules" fi # Store the list of server defined optional extensions in REQUIRED_MODULES SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir 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 () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : _EXT_CHECK=yes else _EXT_CHECK=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$SAVE_CFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RANDR is defined" >&5 $as_echo_n "checking if RANDR is defined... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_EXT_CHECK" >&5 $as_echo "$_EXT_CHECK" >&6; } if test "$_EXT_CHECK" != no; then REQUIRED_MODULES="$REQUIRED_MODULES randrproto" fi SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir 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 () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : _EXT_CHECK=yes else _EXT_CHECK=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$SAVE_CFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RENDER is defined" >&5 $as_echo_n "checking if RENDER is defined... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_EXT_CHECK" >&5 $as_echo "$_EXT_CHECK" >&6; } if test "$_EXT_CHECK" != no; then REQUIRED_MODULES="$REQUIRED_MODULES renderproto" fi SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir 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 () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : _EXT_CHECK=yes else _EXT_CHECK=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$SAVE_CFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XV is defined" >&5 $as_echo_n "checking if XV is defined... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_EXT_CHECK" >&5 $as_echo "$_EXT_CHECK" >&6; } if test "$_EXT_CHECK" != no; then REQUIRED_MODULES="$REQUIRED_MODULES videoproto" fi SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir 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 () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : _EXT_CHECK=yes else _EXT_CHECK=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$SAVE_CFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if DPMSExtension is defined" >&5 $as_echo_n "checking if DPMSExtension is defined... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_EXT_CHECK" >&5 $as_echo "$_EXT_CHECK" >&6; } if test "$_EXT_CHECK" != no; then REQUIRED_MODULES="$REQUIRED_MODULES xextproto" fi # Checks for libraries. pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBDRM" >&5 $as_echo_n "checking for LIBDRM... " >&6; } if test -n "$LIBDRM_CFLAGS"; then pkg_cv_LIBDRM_CFLAGS="$LIBDRM_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.4.46\""; } >&5 ($PKG_CONFIG --exists --print-errors "libdrm >= 2.4.46") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBDRM_CFLAGS=`$PKG_CONFIG --cflags "libdrm >= 2.4.46" 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" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.4.46\""; } >&5 ($PKG_CONFIG --exists --print-errors "libdrm >= 2.4.46") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBDRM_LIBS=`$PKG_CONFIG --libs "libdrm >= 2.4.46" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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.46" 2>&1` else LIBDRM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdrm >= 2.4.46" 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.46) 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBDRM_RADEON" >&5 $as_echo_n "checking for LIBDRM_RADEON... " >&6; } if test -n "$LIBDRM_RADEON_CFLAGS"; then pkg_cv_LIBDRM_RADEON_CFLAGS="$LIBDRM_RADEON_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm_radeon\""; } >&5 ($PKG_CONFIG --exists --print-errors "libdrm_radeon") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBDRM_RADEON_CFLAGS=`$PKG_CONFIG --cflags "libdrm_radeon" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBDRM_RADEON_LIBS"; then pkg_cv_LIBDRM_RADEON_LIBS="$LIBDRM_RADEON_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm_radeon\""; } >&5 ($PKG_CONFIG --exists --print-errors "libdrm_radeon") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBDRM_RADEON_LIBS=`$PKG_CONFIG --libs "libdrm_radeon" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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_RADEON_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdrm_radeon" 2>&1` else LIBDRM_RADEON_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdrm_radeon" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBDRM_RADEON_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (libdrm_radeon) were not met: $LIBDRM_RADEON_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_RADEON_CFLAGS and LIBDRM_RADEON_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBDRM_RADEON_CFLAGS and LIBDRM_RADEON_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_RADEON_CFLAGS=$pkg_cv_LIBDRM_RADEON_CFLAGS LIBDRM_RADEON_LIBS=$pkg_cv_LIBDRM_RADEON_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi # Obtain compiler/linker options for the driver dependencies pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XORG" >&5 $as_echo_n "checking for XORG... " >&6; } if test -n "$XORG_CFLAGS"; then pkg_cv_XORG_CFLAGS="$XORG_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xorg-server >= 1.7 xproto fontsproto xf86driproto \$REQUIRED_MODULES\""; } >&5 ($PKG_CONFIG --exists --print-errors "xorg-server >= 1.7 xproto fontsproto xf86driproto $REQUIRED_MODULES") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XORG_CFLAGS=`$PKG_CONFIG --cflags "xorg-server >= 1.7 xproto fontsproto xf86driproto $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" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"xorg-server >= 1.7 xproto fontsproto xf86driproto \$REQUIRED_MODULES\""; } >&5 ($PKG_CONFIG --exists --print-errors "xorg-server >= 1.7 xproto fontsproto xf86driproto $REQUIRED_MODULES") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_XORG_LIBS=`$PKG_CONFIG --libs "xorg-server >= 1.7 xproto fontsproto xf86driproto $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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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.7 xproto fontsproto xf86driproto $REQUIRED_MODULES" 2>&1` else XORG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "xorg-server >= 1.7 xproto fontsproto xf86driproto $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.7 xproto fontsproto xf86driproto $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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XEXT" >&5 $as_echo_n "checking for XEXT... " >&6; } if test -n "$XEXT_CFLAGS"; then pkg_cv_XEXT_CFLAGS="$XEXT_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$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=$? $as_echo "$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" && \ { { $as_echo "$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=$? $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } HAVE_XEXTPROTO_71="no" else XEXT_CFLAGS=$pkg_cv_XEXT_CFLAGS XEXT_LIBS=$pkg_cv_XEXT_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_XEXTPROTO_71="yes"; $as_echo "#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 # Check whether --enable-udev was given. if test "${enable_udev+set}" = set; then : enableval=$enable_udev; enable_udev="$enableval" else enable_udev=auto fi if test "x$enable_udev" != "xno"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBUDEV" >&5 $as_echo_n "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" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libudev\""; } >&5 ($PKG_CONFIG --exists --print-errors "libudev") 2>&5 ac_status=$? $as_echo "$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" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libudev\""; } >&5 ($PKG_CONFIG --exists --print-errors "libudev") 2>&5 ac_status=$? $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } LIBUDEV=no else LIBUDEV_CFLAGS=$pkg_cv_LIBUDEV_CFLAGS LIBUDEV_LIBS=$pkg_cv_LIBUDEV_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } LIBUDEV=yes fi if test "x$LIBUDEV" = xyes; then $as_echo "#define HAVE_LIBUDEV 1" >>confdefs.h elif test "x$enable_udev" != "xauto"; then as_fn_error $? "Building with udev requested but libudev not found" "$LINENO" 5 fi fi if test x$LIBUDEV = xyes; then LIBUDEV_TRUE= LIBUDEV_FALSE='#' else LIBUDEV_TRUE='#' LIBUDEV_FALSE= fi SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $XORG_CFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include GLAMOR support" >&5 $as_echo_n "checking whether to include GLAMOR support... " >&6; } # Check whether --enable-glamor was given. if test "${enable_glamor+set}" = set; then : enableval=$enable_glamor; GLAMOR="$enableval" else GLAMOR=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GLAMOR" >&5 $as_echo "$GLAMOR" >&6; } if test x$GLAMOR != xno; then GLAMOR_TRUE= GLAMOR_FALSE='#' else GLAMOR_TRUE='#' GLAMOR_FALSE= fi if test "x$GLAMOR" != "xno"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBGLAMOR" >&5 $as_echo_n "checking for LIBGLAMOR... " >&6; } if test -n "$LIBGLAMOR_CFLAGS"; then pkg_cv_LIBGLAMOR_CFLAGS="$LIBGLAMOR_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glamor >= 0.6.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glamor >= 0.6.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBGLAMOR_CFLAGS=`$PKG_CONFIG --cflags "glamor >= 0.6.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBGLAMOR_LIBS"; then pkg_cv_LIBGLAMOR_LIBS="$LIBGLAMOR_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glamor >= 0.6.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "glamor >= 0.6.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBGLAMOR_LIBS=`$PKG_CONFIG --libs "glamor >= 0.6.0" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 LIBGLAMOR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glamor >= 0.6.0" 2>&1` else LIBGLAMOR_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glamor >= 0.6.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBGLAMOR_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (glamor >= 0.6.0) were not met: $LIBGLAMOR_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 LIBGLAMOR_CFLAGS and LIBGLAMOR_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBGLAMOR_CFLAGS and LIBGLAMOR_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 LIBGLAMOR_CFLAGS=$pkg_cv_LIBGLAMOR_CFLAGS LIBGLAMOR_LIBS=$pkg_cv_LIBGLAMOR_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBGLAMOR_EGL" >&5 $as_echo_n "checking for LIBGLAMOR_EGL... " >&6; } if test -n "$LIBGLAMOR_EGL_CFLAGS"; then pkg_cv_LIBGLAMOR_EGL_CFLAGS="$LIBGLAMOR_EGL_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glamor-egl\""; } >&5 ($PKG_CONFIG --exists --print-errors "glamor-egl") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBGLAMOR_EGL_CFLAGS=`$PKG_CONFIG --cflags "glamor-egl" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBGLAMOR_EGL_LIBS"; then pkg_cv_LIBGLAMOR_EGL_LIBS="$LIBGLAMOR_EGL_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glamor-egl\""; } >&5 ($PKG_CONFIG --exists --print-errors "glamor-egl") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBGLAMOR_EGL_LIBS=`$PKG_CONFIG --libs "glamor-egl" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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 LIBGLAMOR_EGL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glamor-egl" 2>&1` else LIBGLAMOR_EGL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glamor-egl" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBGLAMOR_EGL_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (glamor-egl) were not met: $LIBGLAMOR_EGL_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 LIBGLAMOR_EGL_CFLAGS and LIBGLAMOR_EGL_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables LIBGLAMOR_EGL_CFLAGS and LIBGLAMOR_EGL_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 LIBGLAMOR_EGL_CFLAGS=$pkg_cv_LIBGLAMOR_EGL_CFLAGS LIBGLAMOR_EGL_LIBS=$pkg_cv_LIBGLAMOR_EGL_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi $as_echo "#define USE_GLAMOR 1" >>confdefs.h fi for ac_header in list.h do : ac_fn_c_check_header_compile "$LINENO" "list.h" "ac_cv_header_list_h" "#include #include \"xorg-server.h\" " if test "x$ac_cv_header_list_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIST_H 1 _ACEOF have_list_h="yes" else have_list_h="no" fi done if test "x$have_list_h" = xyes; then ac_fn_c_check_decl "$LINENO" "xorg_list_init" "ac_cv_have_decl_xorg_list_init" "#include #include \"xorg-server.h\" #include \"list.h\" " if test "x$ac_cv_have_decl_xorg_list_init" = xyes; then : $as_echo "#define HAVE_XORG_LIST 1" >>confdefs.h fi fi CPPFLAGS="$SAVE_CPPFLAGS" pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PCIACCESS" >&5 $as_echo_n "checking for PCIACCESS... " >&6; } if test -n "$PCIACCESS_CFLAGS"; then pkg_cv_PCIACCESS_CFLAGS="$PCIACCESS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pciaccess >= 0.8.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "pciaccess >= 0.8.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PCIACCESS_CFLAGS=`$PKG_CONFIG --cflags "pciaccess >= 0.8.0" 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" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"pciaccess >= 0.8.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "pciaccess >= 0.8.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PCIACCESS_LIBS=`$PKG_CONFIG --libs "pciaccess >= 0.8.0" 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "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.8.0" 2>&1` else PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "pciaccess >= 0.8.0" 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.8.0) 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables 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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS" # Checks for headers/macros for byte swapping # Known variants: # bswap_16, bswap_32, bswap_64 (glibc) # __swap16, __swap32, __swap64 (OpenBSD) # bswap16, bswap32, bswap64 (other BSD's) # and a fallback to local macros if none of the above are found # if is found, assume it's the correct version for ac_header in byteswap.h do : ac_fn_c_check_header_mongrel "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default" if test "x$ac_cv_header_byteswap_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BYTESWAP_H 1 _ACEOF fi done # if is found, have to check which version ac_fn_c_check_header_mongrel "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default" if test "x$ac_cv_header_sys_endian_h" = xyes; then : HAVE_SYS_ENDIAN_H="yes" else HAVE_SYS_ENDIAN_H="no" fi if test "x$HAVE_SYS_ENDIAN_H" = "xyes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __swap16 variant of byteswapping macros" >&5 $as_echo_n "checking for __swap16 variant of byteswapping macros... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { int a = 1, b; b = __swap16(a); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : SYS_ENDIAN__SWAP='yes' else SYS_ENDIAN__SWAP='no' fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYS_ENDIAN__SWAP" >&5 $as_echo "$SYS_ENDIAN__SWAP" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bswap16 variant of byteswapping macros" >&5 $as_echo_n "checking for bswap16 variant of byteswapping macros... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { int a = 1, b; b = bswap16(a); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : SYS_ENDIAN_BSWAP='yes' else SYS_ENDIAN_BSWAP='no' fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYS_ENDIAN_BSWAP" >&5 $as_echo "$SYS_ENDIAN_BSWAP" >&6; } if test "$SYS_ENDIAN_BSWAP" = "yes" ; then USE_SYS_ENDIAN_H=yes BSWAP=bswap else if test "$SYS_ENDIAN__SWAP" = "yes" ; then USE_SYS_ENDIAN_H=yes BSWAP=__swap else USE_SYS_ENDIAN_H=no fi fi if test "$USE_SYS_ENDIAN_H" = "yes" ; then $as_echo "#define USE_SYS_ENDIAN_H 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define bswap_16 ${BSWAP}16 _ACEOF cat >>confdefs.h <<_ACEOF #define bswap_32 ${BSWAP}32 _ACEOF cat >>confdefs.h <<_ACEOF #define bswap_64 ${BSWAP}64 _ACEOF fi fi DRIVER_NAME=ati { $as_echo "$as_me:${as_lineno-$LINENO}: The atimisc sub-driver has been split out to xf86-video-mach64: git://anongit.freedesktop.org/git/xorg/driver/xf86-video-mach64 Please install that driver as well for mach64-based cards. " >&5 $as_echo "$as_me: The atimisc sub-driver has been split out to xf86-video-mach64: git://anongit.freedesktop.org/git/xorg/driver/xf86-video-mach64 Please install that driver as well for mach64-based cards. " >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: The r128 sub-driver has been split out to xf86-video-r128: git://anongit.freedesktop.org/git/xorg/driver/xf86-video-r128 Please install that driver as well for rage128-based cards. " >&5 $as_echo "$as_me: The r128 sub-driver has been split out to xf86-video-r128: git://anongit.freedesktop.org/git/xorg/driver/xf86-video-r128 Please install that driver as well for rage128-based cards. " >&6;} 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_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$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+set}" = set || &/ 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 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$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=`$as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "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 "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" 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 if test -z "${GLAMOR_TRUE}" && test -z "${GLAMOR_FALSE}"; then as_fn_error $? "conditional \"GLAMOR\" 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" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$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 -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 as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. 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 # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # 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 test -z "$as_dir" && as_dir=. 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 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # 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 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$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 as_fn_append () { eval $1=\$$1\$2 } 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 as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } 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 || $as_echo 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 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 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=`$as_echo "$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 || $as_echo 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_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 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-ati $as_me 7.3.0, which was generated by GNU Autoconf 2.69. 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 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ xf86-video-ati config.status 7.3.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 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 ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$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=`$as_echo "$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 ) $as_echo "$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 \$as_echo "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 $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # 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' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $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"`' 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"`' 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"`' 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_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"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $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"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $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 \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ 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_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ 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\\"\\\`\\\\\\"" ;; *) 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 \ sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which 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' TIMESTAMP='$TIMESTAMP' 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+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || 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=`$as_echo "$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 '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$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 || $as_echo 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=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$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@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$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"; } && { $as_echo "$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 $as_echo "$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 { $as_echo "/* $configure_input */" \ && 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 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$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 $as_echo "/* $configure_input */" \ && 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 || $as_echo 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) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$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. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which 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 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $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. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="" # ### BEGIN LIBTOOL CONFIG # Whether or not to build static libraries. build_old_libs=$enable_static # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # 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 # 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 # 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. AR_FLAGS=$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 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 # 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 in which our libraries should be installed. lt_sysroot=$lt_sysroot # 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 # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # 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 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 "X${COLLECT_NAMES+set}" != Xset; 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) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$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-ati" echo "" xf86-video-ati-7.3.0/config.h.in0000664000175000017500000000544012270503604013143 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ #include "xorg-server.h" /* Define to 1 if you have the header file. */ #undef HAVE_BYTESWAP_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_LIST_H /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_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 xorg_list API */ #undef HAVE_XORG_LIST /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O /* 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 you have the ANSI C header files. */ #undef STDC_HEADERS /* Enable glamor acceleration */ #undef USE_GLAMOR /* Define to use byteswap macros from */ #undef USE_SYS_ENDIAN_H /* Version number of package */ #undef VERSION /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE # define _DARWIN_USE_64_BIT_INODE 1 #endif /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* Define to 16-bit byteswap macro */ #undef bswap_16 /* Define to 32-bit byteswap macro */ #undef bswap_32 /* Define to 64-bit byteswap macro */ #undef bswap_64 xf86-video-ati-7.3.0/src/0000775000175000017500000000000012270504207011764 500000000000000xf86-video-ati-7.3.0/src/evergreen_exa.c0000664000175000017500000020170512262541357014704 00000000000000/* * Copyright 2010 Advanced Micro Devices, 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: Alex Deucher * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "xf86.h" #include "exa.h" #include "radeon.h" #include "radeon_reg.h" #include "evergreen_shader.h" #include "evergreen_reg.h" #include "evergreen_state.h" #include "radeon_exa_shared.h" #include "radeon_vbo.h" extern int cayman_solid_vs(RADEONChipFamily ChipSet, uint32_t* vs); extern int cayman_solid_ps(RADEONChipFamily ChipSet, uint32_t* ps); extern int cayman_copy_vs(RADEONChipFamily ChipSet, uint32_t* vs); extern int cayman_copy_ps(RADEONChipFamily ChipSet, uint32_t* ps); extern int cayman_xv_vs(RADEONChipFamily ChipSet, uint32_t* shader); extern int cayman_xv_ps(RADEONChipFamily ChipSet, uint32_t* shader); extern int cayman_comp_vs(RADEONChipFamily ChipSet, uint32_t* vs); extern int cayman_comp_ps(RADEONChipFamily ChipSet, uint32_t* ps); static Bool EVERGREENPrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; cb_config_t cb_conf; shader_config_t vs_conf, ps_conf; uint32_t a, r, g, b; float *ps_alu_consts; const_config_t ps_const_conf; struct r600_accel_object dst; if (!RADEONCheckBPP(pPix->drawable.bitsPerPixel)) RADEON_FALLBACK(("EVERGREENCheckDatatype failed\n")); if (!RADEONValidPM(pm, pPix->drawable.bitsPerPixel)) RADEON_FALLBACK(("invalid planemask\n")); dst.bo = radeon_get_pixmap_bo(pPix); dst.tiling_flags = radeon_get_pixmap_tiling(pPix); dst.surface = radeon_get_pixmap_surface(pPix); dst.pitch = exaGetPixmapPitch(pPix) / (pPix->drawable.bitsPerPixel / 8); dst.width = pPix->drawable.width; dst.height = pPix->drawable.height; dst.bpp = pPix->drawable.bitsPerPixel; dst.domain = RADEON_GEM_DOMAIN_VRAM; if (!R600SetAccelState(pScrn, NULL, NULL, &dst, accel_state->solid_vs_offset, accel_state->solid_ps_offset, alu, pm)) return FALSE; CLEAR (cb_conf); CLEAR (vs_conf); CLEAR (ps_conf); CLEAR (ps_const_conf); radeon_vbo_check(pScrn, &accel_state->vbo, 16); radeon_vbo_check(pScrn, &accel_state->cbuf, 256); radeon_cp_start(pScrn); evergreen_set_default_state(pScrn); evergreen_set_generic_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); evergreen_set_screen_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); evergreen_set_window_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); /* Shader */ vs_conf.shader_addr = accel_state->vs_mc_addr; vs_conf.shader_size = accel_state->vs_size; vs_conf.num_gprs = 2; vs_conf.stack_size = 0; vs_conf.bo = accel_state->shaders_bo; evergreen_vs_setup(pScrn, &vs_conf, RADEON_GEM_DOMAIN_VRAM); ps_conf.shader_addr = accel_state->ps_mc_addr; ps_conf.shader_size = accel_state->ps_size; ps_conf.num_gprs = 1; ps_conf.stack_size = 0; ps_conf.clamp_consts = 0; ps_conf.export_mode = 2; ps_conf.bo = accel_state->shaders_bo; evergreen_ps_setup(pScrn, &ps_conf, RADEON_GEM_DOMAIN_VRAM); cb_conf.id = 0; cb_conf.w = accel_state->dst_obj.pitch; cb_conf.h = accel_state->dst_obj.height; cb_conf.base = 0; cb_conf.bo = accel_state->dst_obj.bo; cb_conf.surface = accel_state->dst_obj.surface; if (accel_state->dst_obj.bpp == 8) { cb_conf.format = COLOR_8; cb_conf.comp_swap = 3; /* A */ } else if (accel_state->dst_obj.bpp == 16) { cb_conf.format = COLOR_5_6_5; cb_conf.comp_swap = 2; /* RGB */ #if X_BYTE_ORDER == X_BIG_ENDIAN cb_conf.endian = ENDIAN_8IN16; #endif } else { cb_conf.format = COLOR_8_8_8_8; cb_conf.comp_swap = 1; /* ARGB */ #if X_BYTE_ORDER == X_BIG_ENDIAN cb_conf.endian = ENDIAN_8IN32; #endif } cb_conf.source_format = EXPORT_4C_16BPC; cb_conf.blend_clamp = 1; /* Render setup */ if (accel_state->planemask & 0x000000ff) cb_conf.pmask |= 4; /* B */ if (accel_state->planemask & 0x0000ff00) cb_conf.pmask |= 2; /* G */ if (accel_state->planemask & 0x00ff0000) cb_conf.pmask |= 1; /* R */ if (accel_state->planemask & 0xff000000) cb_conf.pmask |= 8; /* A */ cb_conf.rop = accel_state->rop; if ((accel_state->dst_obj.tiling_flags & RADEON_TILING_MASK) == RADEON_TILING_LINEAR) { cb_conf.array_mode = 0; cb_conf.non_disp_tiling = 1; } evergreen_set_render_target(pScrn, &cb_conf, accel_state->dst_obj.domain); evergreen_set_spi(pScrn, 0, 0); /* PS alu constants */ ps_const_conf.size_bytes = 256; ps_const_conf.type = SHADER_TYPE_PS; ps_alu_consts = radeon_vbo_space(pScrn, &accel_state->cbuf, 256); ps_const_conf.bo = accel_state->cbuf.vb_bo; ps_const_conf.const_addr = accel_state->cbuf.vb_offset; ps_const_conf.cpu_ptr = (uint32_t *)(char *)ps_alu_consts; if (accel_state->dst_obj.bpp == 16) { r = (fg >> 11) & 0x1f; g = (fg >> 5) & 0x3f; b = (fg >> 0) & 0x1f; ps_alu_consts[0] = (float)r / 31; /* R */ ps_alu_consts[1] = (float)g / 63; /* G */ ps_alu_consts[2] = (float)b / 31; /* B */ ps_alu_consts[3] = 1.0; /* A */ } else if (accel_state->dst_obj.bpp == 8) { a = (fg >> 0) & 0xff; ps_alu_consts[0] = 0.0; /* R */ ps_alu_consts[1] = 0.0; /* G */ ps_alu_consts[2] = 0.0; /* B */ ps_alu_consts[3] = (float)a / 255; /* A */ } else { a = (fg >> 24) & 0xff; r = (fg >> 16) & 0xff; g = (fg >> 8) & 0xff; b = (fg >> 0) & 0xff; ps_alu_consts[0] = (float)r / 255; /* R */ ps_alu_consts[1] = (float)g / 255; /* G */ ps_alu_consts[2] = (float)b / 255; /* B */ ps_alu_consts[3] = (float)a / 255; /* A */ } radeon_vbo_commit(pScrn, &accel_state->cbuf); evergreen_set_alu_consts(pScrn, &ps_const_conf, RADEON_GEM_DOMAIN_GTT); if (accel_state->vsync) RADEONVlineHelperClear(pScrn); accel_state->dst_pix = pPix; accel_state->fg = fg; return TRUE; } static void EVERGREENDoneSolid(PixmapPtr pPix) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; if (accel_state->vsync) evergreen_cp_wait_vline_sync(pScrn, pPix, accel_state->vline_crtc, accel_state->vline_y1, accel_state->vline_y2); evergreen_finish_op(pScrn, 8); } static void EVERGREENSolid(PixmapPtr pPix, int x1, int y1, int x2, int y2) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; float *vb; if (CS_FULL(info->cs)) { EVERGREENDoneSolid(info->accel_state->dst_pix); radeon_cs_flush_indirect(pScrn); EVERGREENPrepareSolid(accel_state->dst_pix, accel_state->rop, accel_state->planemask, accel_state->fg); } if (accel_state->vsync) RADEONVlineHelperSet(pScrn, x1, y1, x2, y2); vb = radeon_vbo_space(pScrn, &accel_state->vbo, 8); vb[0] = (float)x1; vb[1] = (float)y1; vb[2] = (float)x1; vb[3] = (float)y2; vb[4] = (float)x2; vb[5] = (float)y2; radeon_vbo_commit(pScrn, &accel_state->vbo); } static void EVERGREENDoPrepareCopy(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; cb_config_t cb_conf; tex_resource_t tex_res; tex_sampler_t tex_samp; shader_config_t vs_conf, ps_conf; CLEAR (cb_conf); CLEAR (tex_res); CLEAR (tex_samp); CLEAR (vs_conf); CLEAR (ps_conf); radeon_vbo_check(pScrn, &accel_state->vbo, 16); radeon_cp_start(pScrn); evergreen_set_default_state(pScrn); evergreen_set_generic_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); evergreen_set_screen_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); evergreen_set_window_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); /* Shader */ vs_conf.shader_addr = accel_state->vs_mc_addr; vs_conf.shader_size = accel_state->vs_size; vs_conf.num_gprs = 2; vs_conf.stack_size = 0; vs_conf.bo = accel_state->shaders_bo; evergreen_vs_setup(pScrn, &vs_conf, RADEON_GEM_DOMAIN_VRAM); ps_conf.shader_addr = accel_state->ps_mc_addr; ps_conf.shader_size = accel_state->ps_size; ps_conf.num_gprs = 1; ps_conf.stack_size = 0; ps_conf.clamp_consts = 0; ps_conf.export_mode = 2; ps_conf.bo = accel_state->shaders_bo; evergreen_ps_setup(pScrn, &ps_conf, RADEON_GEM_DOMAIN_VRAM); /* Texture */ tex_res.id = 0; tex_res.w = accel_state->src_obj[0].width; tex_res.h = accel_state->src_obj[0].height; tex_res.pitch = accel_state->src_obj[0].pitch; tex_res.depth = 0; tex_res.dim = SQ_TEX_DIM_2D; tex_res.base = 0; tex_res.mip_base = 0; tex_res.size = accel_state->src_size[0]; tex_res.bo = accel_state->src_obj[0].bo; tex_res.mip_bo = accel_state->src_obj[0].bo; tex_res.surface = accel_state->src_obj[0].surface; if (accel_state->src_obj[0].bpp == 8) { tex_res.format = FMT_8; tex_res.dst_sel_x = SQ_SEL_1; /* R */ tex_res.dst_sel_y = SQ_SEL_1; /* G */ tex_res.dst_sel_z = SQ_SEL_1; /* B */ tex_res.dst_sel_w = SQ_SEL_X; /* A */ } else if (accel_state->src_obj[0].bpp == 16) { tex_res.format = FMT_5_6_5; tex_res.dst_sel_x = SQ_SEL_Z; /* R */ tex_res.dst_sel_y = SQ_SEL_Y; /* G */ tex_res.dst_sel_z = SQ_SEL_X; /* B */ tex_res.dst_sel_w = SQ_SEL_1; /* A */ } else { tex_res.format = FMT_8_8_8_8; tex_res.dst_sel_x = SQ_SEL_Z; /* R */ tex_res.dst_sel_y = SQ_SEL_Y; /* G */ tex_res.dst_sel_z = SQ_SEL_X; /* B */ tex_res.dst_sel_w = SQ_SEL_W; /* A */ } tex_res.base_level = 0; tex_res.last_level = 0; tex_res.perf_modulation = 0; if ((accel_state->src_obj[0].tiling_flags & RADEON_TILING_MASK) == RADEON_TILING_LINEAR) tex_res.array_mode = 0; evergreen_set_tex_resource(pScrn, &tex_res, accel_state->src_obj[0].domain); tex_samp.id = 0; tex_samp.clamp_x = SQ_TEX_CLAMP_LAST_TEXEL; tex_samp.clamp_y = SQ_TEX_CLAMP_LAST_TEXEL; tex_samp.clamp_z = SQ_TEX_WRAP; tex_samp.xy_mag_filter = SQ_TEX_XY_FILTER_POINT; tex_samp.xy_min_filter = SQ_TEX_XY_FILTER_POINT; tex_samp.mc_coord_truncate = 1; tex_samp.z_filter = SQ_TEX_Z_FILTER_NONE; tex_samp.mip_filter = 0; /* no mipmap */ evergreen_set_tex_sampler (pScrn, &tex_samp); cb_conf.id = 0; cb_conf.w = accel_state->dst_obj.pitch; cb_conf.h = accel_state->dst_obj.height; cb_conf.base = 0; cb_conf.bo = accel_state->dst_obj.bo; cb_conf.surface = accel_state->dst_obj.surface; if (accel_state->dst_obj.bpp == 8) { cb_conf.format = COLOR_8; cb_conf.comp_swap = 3; /* A */ } else if (accel_state->dst_obj.bpp == 16) { cb_conf.format = COLOR_5_6_5; cb_conf.comp_swap = 2; /* RGB */ } else { cb_conf.format = COLOR_8_8_8_8; cb_conf.comp_swap = 1; /* ARGB */ } cb_conf.source_format = EXPORT_4C_16BPC; cb_conf.blend_clamp = 1; /* Render setup */ if (accel_state->planemask & 0x000000ff) cb_conf.pmask |= 4; /* B */ if (accel_state->planemask & 0x0000ff00) cb_conf.pmask |= 2; /* G */ if (accel_state->planemask & 0x00ff0000) cb_conf.pmask |= 1; /* R */ if (accel_state->planemask & 0xff000000) cb_conf.pmask |= 8; /* A */ cb_conf.rop = accel_state->rop; if ((accel_state->dst_obj.tiling_flags & RADEON_TILING_MASK) == RADEON_TILING_LINEAR) { cb_conf.array_mode = 0; cb_conf.non_disp_tiling = 1; } evergreen_set_render_target(pScrn, &cb_conf, accel_state->dst_obj.domain); evergreen_set_spi(pScrn, (1 - 1), 1); } static void EVERGREENDoCopy(ScrnInfoPtr pScrn) { evergreen_finish_op(pScrn, 16); } static void EVERGREENDoCopyVline(PixmapPtr pPix) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; if (accel_state->vsync) evergreen_cp_wait_vline_sync(pScrn, pPix, accel_state->vline_crtc, accel_state->vline_y1, accel_state->vline_y2); evergreen_finish_op(pScrn, 16); } static void EVERGREENAppendCopyVertex(ScrnInfoPtr pScrn, int srcX, int srcY, int dstX, int dstY, int w, int h) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; float *vb; vb = radeon_vbo_space(pScrn, &accel_state->vbo, 16); vb[0] = (float)dstX; vb[1] = (float)dstY; vb[2] = (float)srcX; vb[3] = (float)srcY; vb[4] = (float)dstX; vb[5] = (float)(dstY + h); vb[6] = (float)srcX; vb[7] = (float)(srcY + h); vb[8] = (float)(dstX + w); vb[9] = (float)(dstY + h); vb[10] = (float)(srcX + w); vb[11] = (float)(srcY + h); radeon_vbo_commit(pScrn, &accel_state->vbo); } static Bool EVERGREENPrepareCopy(PixmapPtr pSrc, PixmapPtr pDst, int xdir, int ydir, int rop, Pixel planemask) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; struct r600_accel_object src_obj, dst_obj; if (!RADEONCheckBPP(pSrc->drawable.bitsPerPixel)) RADEON_FALLBACK(("EVERGREENCheckDatatype src failed\n")); if (!RADEONCheckBPP(pDst->drawable.bitsPerPixel)) RADEON_FALLBACK(("EVERGREENCheckDatatype dst failed\n")); if (!RADEONValidPM(planemask, pDst->drawable.bitsPerPixel)) RADEON_FALLBACK(("Invalid planemask\n")); dst_obj.pitch = exaGetPixmapPitch(pDst) / (pDst->drawable.bitsPerPixel / 8); src_obj.pitch = exaGetPixmapPitch(pSrc) / (pSrc->drawable.bitsPerPixel / 8); accel_state->same_surface = FALSE; src_obj.bo = radeon_get_pixmap_bo(pSrc); dst_obj.bo = radeon_get_pixmap_bo(pDst); dst_obj.surface = radeon_get_pixmap_surface(pDst); src_obj.surface = radeon_get_pixmap_surface(pSrc); dst_obj.tiling_flags = radeon_get_pixmap_tiling(pDst); src_obj.tiling_flags = radeon_get_pixmap_tiling(pSrc); if (radeon_get_pixmap_bo(pSrc) == radeon_get_pixmap_bo(pDst)) accel_state->same_surface = TRUE; src_obj.width = pSrc->drawable.width; src_obj.height = pSrc->drawable.height; src_obj.bpp = pSrc->drawable.bitsPerPixel; src_obj.domain = RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT; dst_obj.width = pDst->drawable.width; dst_obj.height = pDst->drawable.height; dst_obj.bpp = pDst->drawable.bitsPerPixel; if (radeon_get_pixmap_shared(pDst) == TRUE) dst_obj.domain = RADEON_GEM_DOMAIN_GTT; else dst_obj.domain = RADEON_GEM_DOMAIN_VRAM; if (!R600SetAccelState(pScrn, &src_obj, NULL, &dst_obj, accel_state->copy_vs_offset, accel_state->copy_ps_offset, rop, planemask)) return FALSE; if (accel_state->same_surface == TRUE) { unsigned height = RADEON_ALIGN(pDst->drawable.height, drmmode_get_height_align(pScrn, accel_state->dst_obj.tiling_flags)); unsigned long size = height * accel_state->dst_obj.pitch * pDst->drawable.bitsPerPixel/8; if (accel_state->dst_obj.surface) size = accel_state->dst_obj.surface->bo_size; if (accel_state->copy_area_bo) { radeon_bo_unref(accel_state->copy_area_bo); accel_state->copy_area_bo = NULL; } accel_state->copy_area_bo = radeon_bo_open(info->bufmgr, 0, size, 0, RADEON_GEM_DOMAIN_VRAM, 0); if (accel_state->copy_area_bo == NULL) RADEON_FALLBACK(("temp copy surface alloc failed\n")); radeon_cs_space_add_persistent_bo(info->cs, accel_state->copy_area_bo, 0, RADEON_GEM_DOMAIN_VRAM); if (radeon_cs_space_check(info->cs)) { radeon_bo_unref(accel_state->copy_area_bo); accel_state->copy_area_bo = NULL; return FALSE; } accel_state->copy_area = (void*)accel_state->copy_area_bo; } else EVERGREENDoPrepareCopy(pScrn); if (accel_state->vsync) RADEONVlineHelperClear(pScrn); accel_state->dst_pix = pDst; accel_state->src_pix = pSrc; accel_state->xdir = xdir; accel_state->ydir = ydir; return TRUE; } static void EVERGREENDoneCopy(PixmapPtr pDst) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; if (!accel_state->same_surface) EVERGREENDoCopyVline(pDst); if (accel_state->copy_area) accel_state->copy_area = NULL; } static void EVERGREENCopy(PixmapPtr pDst, int srcX, int srcY, int dstX, int dstY, int w, int h) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; if (accel_state->same_surface && (srcX == dstX) && (srcY == dstY)) return; if (CS_FULL(info->cs)) { EVERGREENDoneCopy(info->accel_state->dst_pix); radeon_cs_flush_indirect(pScrn); EVERGREENPrepareCopy(accel_state->src_pix, accel_state->dst_pix, accel_state->xdir, accel_state->ydir, accel_state->rop, accel_state->planemask); } if (accel_state->vsync) RADEONVlineHelperSet(pScrn, dstX, dstY, dstX + w, dstY + h); if (accel_state->same_surface && (srcX + w <= dstX || dstX + w <= srcX || srcY + h <= dstY || dstY + h <= srcY)) { EVERGREENDoPrepareCopy(pScrn); EVERGREENAppendCopyVertex(pScrn, srcX, srcY, dstX, dstY, w, h); EVERGREENDoCopyVline(pDst); } else if (accel_state->same_surface && accel_state->copy_area) { uint32_t orig_dst_domain = accel_state->dst_obj.domain; uint32_t orig_src_domain = accel_state->src_obj[0].domain; uint32_t orig_src_tiling_flags = accel_state->src_obj[0].tiling_flags; uint32_t orig_dst_tiling_flags = accel_state->dst_obj.tiling_flags; struct radeon_bo *orig_bo = accel_state->dst_obj.bo; int orig_rop = accel_state->rop; struct radeon_surface *orig_dst_surface = accel_state->dst_obj.surface; struct radeon_surface *orig_src_surface = accel_state->src_obj[0].surface; /* src to tmp */ accel_state->dst_obj.domain = RADEON_GEM_DOMAIN_VRAM; accel_state->dst_obj.bo = accel_state->copy_area_bo; accel_state->dst_obj.tiling_flags = 0; accel_state->rop = 3; accel_state->dst_obj.surface = NULL; EVERGREENDoPrepareCopy(pScrn); EVERGREENAppendCopyVertex(pScrn, srcX, srcY, dstX, dstY, w, h); EVERGREENDoCopy(pScrn); /* tmp to dst */ accel_state->src_obj[0].domain = RADEON_GEM_DOMAIN_VRAM; accel_state->src_obj[0].bo = accel_state->copy_area_bo; accel_state->src_obj[0].tiling_flags = 0; accel_state->src_obj[0].surface = NULL; accel_state->dst_obj.domain = orig_dst_domain; accel_state->dst_obj.bo = orig_bo; accel_state->dst_obj.tiling_flags = orig_dst_tiling_flags; accel_state->rop = orig_rop; accel_state->dst_obj.surface = orig_dst_surface; EVERGREENDoPrepareCopy(pScrn); EVERGREENAppendCopyVertex(pScrn, dstX, dstY, dstX, dstY, w, h); EVERGREENDoCopyVline(pDst); /* restore state */ accel_state->src_obj[0].domain = orig_src_domain; accel_state->src_obj[0].bo = orig_bo; accel_state->src_obj[0].tiling_flags = orig_src_tiling_flags; accel_state->src_obj[0].surface = orig_src_surface; } else EVERGREENAppendCopyVertex(pScrn, srcX, srcY, dstX, dstY, w, h); } struct blendinfo { Bool dst_alpha; Bool src_alpha; uint32_t blend_cntl; }; static struct blendinfo EVERGREENBlendOp[] = { /* Clear */ {0, 0, (BLEND_ZERO << COLOR_SRCBLEND_shift) | (BLEND_ZERO << COLOR_DESTBLEND_shift)}, /* Src */ {0, 0, (BLEND_ONE << COLOR_SRCBLEND_shift) | (BLEND_ZERO << COLOR_DESTBLEND_shift)}, /* Dst */ {0, 0, (BLEND_ZERO << COLOR_SRCBLEND_shift) | (BLEND_ONE << COLOR_DESTBLEND_shift)}, /* Over */ {0, 1, (BLEND_ONE << COLOR_SRCBLEND_shift) | (BLEND_ONE_MINUS_SRC_ALPHA << COLOR_DESTBLEND_shift)}, /* OverReverse */ {1, 0, (BLEND_ONE_MINUS_DST_ALPHA << COLOR_SRCBLEND_shift) | (BLEND_ONE << COLOR_DESTBLEND_shift)}, /* In */ {1, 0, (BLEND_DST_ALPHA << COLOR_SRCBLEND_shift) | (BLEND_ZERO << COLOR_DESTBLEND_shift)}, /* InReverse */ {0, 1, (BLEND_ZERO << COLOR_SRCBLEND_shift) | (BLEND_SRC_ALPHA << COLOR_DESTBLEND_shift)}, /* Out */ {1, 0, (BLEND_ONE_MINUS_DST_ALPHA << COLOR_SRCBLEND_shift) | (BLEND_ZERO << COLOR_DESTBLEND_shift)}, /* OutReverse */ {0, 1, (BLEND_ZERO << COLOR_SRCBLEND_shift) | (BLEND_ONE_MINUS_SRC_ALPHA << COLOR_DESTBLEND_shift)}, /* Atop */ {1, 1, (BLEND_DST_ALPHA << COLOR_SRCBLEND_shift) | (BLEND_ONE_MINUS_SRC_ALPHA << COLOR_DESTBLEND_shift)}, /* AtopReverse */ {1, 1, (BLEND_ONE_MINUS_DST_ALPHA << COLOR_SRCBLEND_shift) | (BLEND_SRC_ALPHA << COLOR_DESTBLEND_shift)}, /* Xor */ {1, 1, (BLEND_ONE_MINUS_DST_ALPHA << COLOR_SRCBLEND_shift) | (BLEND_ONE_MINUS_SRC_ALPHA << COLOR_DESTBLEND_shift)}, /* Add */ {0, 0, (BLEND_ONE << COLOR_SRCBLEND_shift) | (BLEND_ONE << COLOR_DESTBLEND_shift)}, }; struct formatinfo { unsigned int fmt; uint32_t card_fmt; }; static struct formatinfo EVERGREENTexFormats[] = { {PICT_a8r8g8b8, FMT_8_8_8_8}, {PICT_x8r8g8b8, FMT_8_8_8_8}, {PICT_a8b8g8r8, FMT_8_8_8_8}, {PICT_x8b8g8r8, FMT_8_8_8_8}, {PICT_b8g8r8a8, FMT_8_8_8_8}, {PICT_b8g8r8x8, FMT_8_8_8_8}, {PICT_r5g6b5, FMT_5_6_5}, {PICT_a1r5g5b5, FMT_1_5_5_5}, {PICT_x1r5g5b5, FMT_1_5_5_5}, {PICT_a8, FMT_8}, }; static uint32_t EVERGREENGetBlendCntl(int op, PicturePtr pMask, uint32_t dst_format) { uint32_t sblend, dblend; sblend = EVERGREENBlendOp[op].blend_cntl & COLOR_SRCBLEND_mask; dblend = EVERGREENBlendOp[op].blend_cntl & COLOR_DESTBLEND_mask; /* If there's no dst alpha channel, adjust the blend op so that we'll treat * it as always 1. */ if (PICT_FORMAT_A(dst_format) == 0 && EVERGREENBlendOp[op].dst_alpha) { if (sblend == (BLEND_DST_ALPHA << COLOR_SRCBLEND_shift)) sblend = (BLEND_ONE << COLOR_SRCBLEND_shift); else if (sblend == (BLEND_ONE_MINUS_DST_ALPHA << COLOR_SRCBLEND_shift)) sblend = (BLEND_ZERO << COLOR_SRCBLEND_shift); } /* If the source alpha is being used, then we should only be in a case where * the source blend factor is 0, and the source blend value is the mask * channels multiplied by the source picture's alpha. */ if (pMask && pMask->componentAlpha && EVERGREENBlendOp[op].src_alpha) { if (dblend == (BLEND_SRC_ALPHA << COLOR_DESTBLEND_shift)) { dblend = (BLEND_SRC_COLOR << COLOR_DESTBLEND_shift); } else if (dblend == (BLEND_ONE_MINUS_SRC_ALPHA << COLOR_DESTBLEND_shift)) { dblend = (BLEND_ONE_MINUS_SRC_COLOR << COLOR_DESTBLEND_shift); } /* With some tricks, we can still accelerate PictOpOver with solid src. * This is commonly used for text rendering, so it's worth the extra * effort. */ if (sblend == (BLEND_ONE << COLOR_SRCBLEND_shift)) { sblend = (BLEND_CONSTANT_COLOR << COLOR_SRCBLEND_shift); } } return sblend | dblend; } static Bool EVERGREENGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) { switch (pDstPicture->format) { case PICT_a8r8g8b8: case PICT_x8r8g8b8: case PICT_a8b8g8r8: case PICT_x8b8g8r8: case PICT_b8g8r8a8: case PICT_b8g8r8x8: *dst_format = COLOR_8_8_8_8; break; case PICT_r5g6b5: *dst_format = COLOR_5_6_5; break; case PICT_a1r5g5b5: case PICT_x1r5g5b5: *dst_format = COLOR_1_5_5_5; break; case PICT_a8: *dst_format = COLOR_8; break; default: RADEON_FALLBACK(("Unsupported dest format 0x%x\n", (int)pDstPicture->format)); } return TRUE; } static Bool EVERGREENCheckCompositeTexture(PicturePtr pPict, PicturePtr pDstPict, int op, int unit) { unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; unsigned int i; for (i = 0; i < sizeof(EVERGREENTexFormats) / sizeof(EVERGREENTexFormats[0]); i++) { if (EVERGREENTexFormats[i].fmt == pPict->format) break; } if (i == sizeof(EVERGREENTexFormats) / sizeof(EVERGREENTexFormats[0])) RADEON_FALLBACK(("Unsupported picture format 0x%x\n", (int)pPict->format)); if (pPict->filter != PictFilterNearest && pPict->filter != PictFilterBilinear) RADEON_FALLBACK(("Unsupported filter 0x%x\n", pPict->filter)); /* for REPEAT_NONE, Render semantics are that sampling outside the source * picture results in alpha=0 pixels. We can implement this with a border color * *if* our source texture has an alpha channel, otherwise we need to fall * back. If we're not transformed then we hope that upper layers have clipped * rendering to the bounds of the source drawable, in which case it doesn't * matter. I have not, however, verified that the X server always does such * clipping. */ /* FIXME evergreen */ if (pPict->transform != 0 && repeatType == RepeatNone && PICT_FORMAT_A(pPict->format) == 0) { if (!(((op == PictOpSrc) || (op == PictOpClear)) && (PICT_FORMAT_A(pDstPict->format) == 0))) RADEON_FALLBACK(("REPEAT_NONE unsupported for transformed xRGB source\n")); } if (!radeon_transform_is_affine_or_scaled(pPict->transform)) RADEON_FALLBACK(("non-affine transforms not supported\n")); return TRUE; } static void EVERGREENXFormSetup(PicturePtr pPict, ScrnInfoPtr pScrn, int unit, float *vs_alu_consts) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; int const_offset = unit * 8; int w, h; if (pPict->pDrawable) { w = pPict->pDrawable->width; h = pPict->pDrawable->height; } else { w = 1; h = 1; } if (pPict->transform != 0) { accel_state->is_transform[unit] = TRUE; accel_state->transform[unit] = pPict->transform; vs_alu_consts[0 + const_offset] = xFixedToFloat(pPict->transform->matrix[0][0]); vs_alu_consts[1 + const_offset] = xFixedToFloat(pPict->transform->matrix[0][1]); vs_alu_consts[2 + const_offset] = xFixedToFloat(pPict->transform->matrix[0][2]); vs_alu_consts[3 + const_offset] = 1.0 / w; vs_alu_consts[4 + const_offset] = xFixedToFloat(pPict->transform->matrix[1][0]); vs_alu_consts[5 + const_offset] = xFixedToFloat(pPict->transform->matrix[1][1]); vs_alu_consts[6 + const_offset] = xFixedToFloat(pPict->transform->matrix[1][2]); vs_alu_consts[7 + const_offset] = 1.0 / h; } else { accel_state->is_transform[unit] = FALSE; vs_alu_consts[0 + const_offset] = 1.0; vs_alu_consts[1 + const_offset] = 0.0; vs_alu_consts[2 + const_offset] = 0.0; vs_alu_consts[3 + const_offset] = 1.0 / w; vs_alu_consts[4 + const_offset] = 0.0; vs_alu_consts[5 + const_offset] = 1.0; vs_alu_consts[6 + const_offset] = 0.0; vs_alu_consts[7 + const_offset] = 1.0 / h; } } static Bool EVERGREENTextureSetup(PicturePtr pPict, PixmapPtr pPix, int unit) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; unsigned int repeatType; unsigned int i; tex_resource_t tex_res; tex_sampler_t tex_samp; int pix_r, pix_g, pix_b, pix_a; CLEAR (tex_res); CLEAR (tex_samp); for (i = 0; i < sizeof(EVERGREENTexFormats) / sizeof(EVERGREENTexFormats[0]); i++) { if (EVERGREENTexFormats[i].fmt == pPict->format) break; } /* Texture */ if (pPict->pDrawable) { tex_res.w = pPict->pDrawable->width; tex_res.h = pPict->pDrawable->height; repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; } else { tex_res.w = 1; tex_res.h = 1; repeatType = RepeatNormal; } tex_res.id = unit; tex_res.pitch = accel_state->src_obj[unit].pitch; tex_res.depth = 0; tex_res.dim = SQ_TEX_DIM_2D; tex_res.base = 0; tex_res.mip_base = 0; tex_res.size = accel_state->src_size[unit]; tex_res.format = EVERGREENTexFormats[i].card_fmt; tex_res.bo = accel_state->src_obj[unit].bo; tex_res.mip_bo = accel_state->src_obj[unit].bo; tex_res.surface = accel_state->src_obj[unit].surface; #if X_BYTE_ORDER == X_BIG_ENDIAN switch (accel_state->src_obj[unit].bpp) { case 16: tex_res.endian = SQ_ENDIAN_8IN16; break; case 32: tex_res.endian = SQ_ENDIAN_8IN32; break; default : break; } #endif /* component swizzles */ switch (pPict->format) { case PICT_a1r5g5b5: case PICT_a8r8g8b8: pix_r = SQ_SEL_Z; /* R */ pix_g = SQ_SEL_Y; /* G */ pix_b = SQ_SEL_X; /* B */ pix_a = SQ_SEL_W; /* A */ break; case PICT_a8b8g8r8: pix_r = SQ_SEL_X; /* R */ pix_g = SQ_SEL_Y; /* G */ pix_b = SQ_SEL_Z; /* B */ pix_a = SQ_SEL_W; /* A */ break; case PICT_x8b8g8r8: pix_r = SQ_SEL_X; /* R */ pix_g = SQ_SEL_Y; /* G */ pix_b = SQ_SEL_Z; /* B */ pix_a = SQ_SEL_1; /* A */ break; case PICT_b8g8r8a8: pix_r = SQ_SEL_Y; /* R */ pix_g = SQ_SEL_Z; /* G */ pix_b = SQ_SEL_W; /* B */ pix_a = SQ_SEL_X; /* A */ break; case PICT_b8g8r8x8: pix_r = SQ_SEL_Y; /* R */ pix_g = SQ_SEL_Z; /* G */ pix_b = SQ_SEL_W; /* B */ pix_a = SQ_SEL_1; /* A */ break; case PICT_x1r5g5b5: case PICT_x8r8g8b8: case PICT_r5g6b5: pix_r = SQ_SEL_Z; /* R */ pix_g = SQ_SEL_Y; /* G */ pix_b = SQ_SEL_X; /* B */ pix_a = SQ_SEL_1; /* A */ break; case PICT_a8: pix_r = SQ_SEL_0; /* R */ pix_g = SQ_SEL_0; /* G */ pix_b = SQ_SEL_0; /* B */ pix_a = SQ_SEL_X; /* A */ break; default: RADEON_FALLBACK(("Bad format 0x%x\n", pPict->format)); } if (unit == 0) { if (!accel_state->msk_pic) { if (PICT_FORMAT_RGB(pPict->format) == 0) { pix_r = SQ_SEL_0; pix_g = SQ_SEL_0; pix_b = SQ_SEL_0; } if (PICT_FORMAT_A(pPict->format) == 0) pix_a = SQ_SEL_1; } else { if (accel_state->component_alpha) { if (accel_state->src_alpha) { if (PICT_FORMAT_A(pPict->format) == 0) { pix_r = SQ_SEL_1; pix_g = SQ_SEL_1; pix_b = SQ_SEL_1; pix_a = SQ_SEL_1; } else { pix_r = pix_a; pix_g = pix_a; pix_b = pix_a; } } else { if (PICT_FORMAT_A(pPict->format) == 0) pix_a = SQ_SEL_1; } } else { if (PICT_FORMAT_RGB(pPict->format) == 0) { pix_r = SQ_SEL_0; pix_g = SQ_SEL_0; pix_b = SQ_SEL_0; } if (PICT_FORMAT_A(pPict->format) == 0) pix_a = SQ_SEL_1; } } } else { if (accel_state->component_alpha) { if (PICT_FORMAT_A(pPict->format) == 0) pix_a = SQ_SEL_1; } else { if (PICT_FORMAT_A(pPict->format) == 0) { pix_r = SQ_SEL_1; pix_g = SQ_SEL_1; pix_b = SQ_SEL_1; pix_a = SQ_SEL_1; } else { pix_r = pix_a; pix_g = pix_a; pix_b = pix_a; } } } tex_res.dst_sel_x = pix_r; /* R */ tex_res.dst_sel_y = pix_g; /* G */ tex_res.dst_sel_z = pix_b; /* B */ tex_res.dst_sel_w = pix_a; /* A */ tex_res.base_level = 0; tex_res.last_level = 0; tex_res.perf_modulation = 0; if ((accel_state->src_obj[unit].tiling_flags & RADEON_TILING_MASK) == RADEON_TILING_LINEAR) tex_res.array_mode = 0; evergreen_set_tex_resource (pScrn, &tex_res, accel_state->src_obj[unit].domain); tex_samp.id = unit; tex_samp.border_color = SQ_TEX_BORDER_COLOR_TRANS_BLACK; switch (repeatType) { case RepeatNormal: tex_samp.clamp_x = SQ_TEX_WRAP; tex_samp.clamp_y = SQ_TEX_WRAP; break; case RepeatPad: tex_samp.clamp_x = SQ_TEX_CLAMP_LAST_TEXEL; tex_samp.clamp_y = SQ_TEX_CLAMP_LAST_TEXEL; break; case RepeatReflect: tex_samp.clamp_x = SQ_TEX_MIRROR; tex_samp.clamp_y = SQ_TEX_MIRROR; break; case RepeatNone: tex_samp.clamp_x = SQ_TEX_CLAMP_BORDER; tex_samp.clamp_y = SQ_TEX_CLAMP_BORDER; break; default: RADEON_FALLBACK(("Bad repeat 0x%x\n", repeatType)); } switch (pPict->filter) { case PictFilterNearest: tex_samp.xy_mag_filter = SQ_TEX_XY_FILTER_POINT; tex_samp.xy_min_filter = SQ_TEX_XY_FILTER_POINT; tex_samp.mc_coord_truncate = 1; break; case PictFilterBilinear: tex_samp.xy_mag_filter = SQ_TEX_XY_FILTER_BILINEAR; tex_samp.xy_min_filter = SQ_TEX_XY_FILTER_BILINEAR; break; default: RADEON_FALLBACK(("Bad filter 0x%x\n", pPict->filter)); } tex_samp.clamp_z = SQ_TEX_WRAP; tex_samp.z_filter = SQ_TEX_Z_FILTER_NONE; tex_samp.mip_filter = 0; /* no mipmap */ evergreen_set_tex_sampler (pScrn, &tex_samp); return TRUE; } static Bool EVERGREENCheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, PicturePtr pDstPicture) { uint32_t tmp1; PixmapPtr pSrcPixmap, pDstPixmap; /* Check for unsupported compositing operations. */ if (op >= (int) (sizeof(EVERGREENBlendOp) / sizeof(EVERGREENBlendOp[0]))) RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op)); if (pSrcPicture->pDrawable) { pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); if (pSrcPixmap->drawable.width >= 16384 || pSrcPixmap->drawable.height >= 16384) { RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", pSrcPixmap->drawable.width, pSrcPixmap->drawable.height)); } if (!EVERGREENCheckCompositeTexture(pSrcPicture, pDstPicture, op, 0)) return FALSE; } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill) RADEON_FALLBACK(("Gradient pictures not supported yet\n")); pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable); if (pDstPixmap->drawable.width >= 16384 || pDstPixmap->drawable.height >= 16384) { RADEON_FALLBACK(("Dest w/h too large (%d,%d).\n", pDstPixmap->drawable.width, pDstPixmap->drawable.height)); } if (pMaskPicture) { PixmapPtr pMaskPixmap; if (pMaskPicture->pDrawable) { pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); if (pMaskPixmap->drawable.width >= 16384 || pMaskPixmap->drawable.height >= 16384) { RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", pMaskPixmap->drawable.width, pMaskPixmap->drawable.height)); } if (pMaskPicture->componentAlpha) { /* Check if it's component alpha that relies on a source alpha and * on the source value. We can only get one of those into the * single source value that we get to blend with. * * We can cheat a bit if the src is solid, though. PictOpOver * can use the constant blend color to sneak a second blend * source in. */ if (EVERGREENBlendOp[op].src_alpha && (EVERGREENBlendOp[op].blend_cntl & COLOR_SRCBLEND_mask) != (BLEND_ZERO << COLOR_SRCBLEND_shift)) { if (pSrcPicture->pDrawable || op != PictOpOver) RADEON_FALLBACK(("Component alpha not supported with source " "alpha and source value blending.\n")); } } if (!EVERGREENCheckCompositeTexture(pMaskPicture, pDstPicture, op, 1)) return FALSE; } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill) RADEON_FALLBACK(("Gradient pictures not supported yet\n")); } if (!EVERGREENGetDestFormat(pDstPicture, &tmp1)) return FALSE; return TRUE; } static void EVERGREENSetSolidConsts(ScrnInfoPtr pScrn, float *buf, int format, uint32_t fg, int unit) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; float pix_r = 0, pix_g = 0, pix_b = 0, pix_a = 0; uint32_t w = (fg >> 24) & 0xff; uint32_t z = (fg >> 16) & 0xff; uint32_t y = (fg >> 8) & 0xff; uint32_t x = (fg >> 0) & 0xff; float xf = (float)x / 255; /* R */ float yf = (float)y / 255; /* G */ float zf = (float)z / 255; /* B */ float wf = (float)w / 255; /* A */ /* component swizzles */ switch (format) { case PICT_a1r5g5b5: case PICT_a8r8g8b8: pix_r = zf; /* R */ pix_g = yf; /* G */ pix_b = xf; /* B */ pix_a = wf; /* A */ break; case PICT_a8b8g8r8: pix_r = xf; /* R */ pix_g = yf; /* G */ pix_b = zf; /* B */ pix_a = wf; /* A */ break; case PICT_x8b8g8r8: pix_r = xf; /* R */ pix_g = yf; /* G */ pix_b = zf; /* B */ pix_a = 1.0; /* A */ break; case PICT_b8g8r8a8: pix_r = yf; /* R */ pix_g = zf; /* G */ pix_b = wf; /* B */ pix_a = xf; /* A */ break; case PICT_b8g8r8x8: pix_r = yf; /* R */ pix_g = zf; /* G */ pix_b = wf; /* B */ pix_a = 1.0; /* A */ break; case PICT_x1r5g5b5: case PICT_x8r8g8b8: case PICT_r5g6b5: pix_r = zf; /* R */ pix_g = yf; /* G */ pix_b = xf; /* B */ pix_a = 1.0; /* A */ break; case PICT_a8: pix_r = 0.0; /* R */ pix_g = 0.0; /* G */ pix_b = 0.0; /* B */ pix_a = xf; /* A */ break; default: ErrorF("Bad format 0x%x\n", format); } if (unit == 0) { if (!accel_state->msk_pic) { if (PICT_FORMAT_RGB(format) == 0) { pix_r = 0.0; pix_g = 0.0; pix_b = 0.0; } if (PICT_FORMAT_A(format) == 0) pix_a = 1.0; } else { if (accel_state->component_alpha) { if (accel_state->src_alpha) { /* required for PictOpOver */ float cblend[4] = { pix_r / pix_a, pix_g / pix_a, pix_b / pix_a, pix_a / pix_a }; evergreen_set_blend_color(pScrn, cblend); if (PICT_FORMAT_A(format) == 0) { pix_r = 1.0; pix_g = 1.0; pix_b = 1.0; pix_a = 1.0; } else { pix_r = pix_a; pix_g = pix_a; pix_b = pix_a; } } else { if (PICT_FORMAT_A(format) == 0) pix_a = 1.0; } } else { if (PICT_FORMAT_RGB(format) == 0) { pix_r = 0; pix_g = 0; pix_b = 0; } if (PICT_FORMAT_A(format) == 0) pix_a = 1.0; } } } else { if (accel_state->component_alpha) { if (PICT_FORMAT_A(format) == 0) pix_a = 1.0; } else { if (PICT_FORMAT_A(format) == 0) { pix_r = 1.0; pix_g = 1.0; pix_b = 1.0; pix_a = 1.0; } else { pix_r = pix_a; pix_g = pix_a; pix_b = pix_a; } } } buf[0] = pix_r; buf[1] = pix_g; buf[2] = pix_b; buf[3] = pix_a; } static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, PicturePtr pDstPicture, PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst) { ScreenPtr pScreen = pDst->drawable.pScreen; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; uint32_t dst_format; cb_config_t cb_conf; shader_config_t vs_conf, ps_conf; const_config_t vs_const_conf; struct r600_accel_object src_obj, mask_obj, dst_obj; float *cbuf; uint32_t ps_bool_consts = 0; if (pDst->drawable.bitsPerPixel < 8 || (pSrc && pSrc->drawable.bitsPerPixel < 8)) return FALSE; if (pSrc) { src_obj.bo = radeon_get_pixmap_bo(pSrc); src_obj.surface = radeon_get_pixmap_surface(pSrc); src_obj.tiling_flags = radeon_get_pixmap_tiling(pSrc); src_obj.pitch = exaGetPixmapPitch(pSrc) / (pSrc->drawable.bitsPerPixel / 8); src_obj.width = pSrc->drawable.width; src_obj.height = pSrc->drawable.height; src_obj.bpp = pSrc->drawable.bitsPerPixel; src_obj.domain = RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT; } dst_obj.bo = radeon_get_pixmap_bo(pDst); dst_obj.surface = radeon_get_pixmap_surface(pDst); dst_obj.tiling_flags = radeon_get_pixmap_tiling(pDst); dst_obj.pitch = exaGetPixmapPitch(pDst) / (pDst->drawable.bitsPerPixel / 8); dst_obj.width = pDst->drawable.width; dst_obj.height = pDst->drawable.height; dst_obj.bpp = pDst->drawable.bitsPerPixel; if (radeon_get_pixmap_shared(pDst) == TRUE) dst_obj.domain = RADEON_GEM_DOMAIN_GTT; else dst_obj.domain = RADEON_GEM_DOMAIN_VRAM; if (pMaskPicture) { if (pMask) { mask_obj.bo = radeon_get_pixmap_bo(pMask); mask_obj.tiling_flags = radeon_get_pixmap_tiling(pMask); mask_obj.pitch = exaGetPixmapPitch(pMask) / (pMask->drawable.bitsPerPixel / 8); mask_obj.surface = radeon_get_pixmap_surface(pMask); mask_obj.width = pMask->drawable.width; mask_obj.height = pMask->drawable.height; mask_obj.bpp = pMask->drawable.bitsPerPixel; mask_obj.domain = RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT; } accel_state->msk_pic = pMaskPicture; if (pMaskPicture->componentAlpha) { accel_state->component_alpha = TRUE; if (EVERGREENBlendOp[op].src_alpha) accel_state->src_alpha = TRUE; else accel_state->src_alpha = FALSE; } else { accel_state->component_alpha = FALSE; accel_state->src_alpha = FALSE; } } else { accel_state->msk_pic = NULL; accel_state->component_alpha = FALSE; accel_state->src_alpha = FALSE; } if (!R600SetAccelState(pScrn, pSrc ? &src_obj : NULL, (pMaskPicture && pMask) ? &mask_obj : NULL, &dst_obj, accel_state->comp_vs_offset, accel_state->comp_ps_offset, 3, 0xffffffff)) return FALSE; if (!EVERGREENGetDestFormat(pDstPicture, &dst_format)) return FALSE; CLEAR (cb_conf); CLEAR (vs_conf); CLEAR (ps_conf); CLEAR (vs_const_conf); if (pMask) radeon_vbo_check(pScrn, &accel_state->vbo, 24); else radeon_vbo_check(pScrn, &accel_state->vbo, 16); radeon_vbo_check(pScrn, &accel_state->cbuf, 256); radeon_cp_start(pScrn); evergreen_set_default_state(pScrn); evergreen_set_generic_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); evergreen_set_screen_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); evergreen_set_window_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); if (pSrc) { if (!EVERGREENTextureSetup(pSrcPicture, pSrc, 0)) { radeon_ib_discard(pScrn); radeon_cs_flush_indirect(pScrn); return FALSE; } } else accel_state->is_transform[0] = FALSE; if (pMask) { if (!EVERGREENTextureSetup(pMaskPicture, pMask, 1)) { radeon_ib_discard(pScrn); radeon_cs_flush_indirect(pScrn); return FALSE; } } else accel_state->is_transform[1] = FALSE; if (pSrc) ps_bool_consts |= (1 << 0); if (pMask) ps_bool_consts |= (1 << 1); evergreen_set_bool_consts(pScrn, SQ_BOOL_CONST_ps, ps_bool_consts); if (pMask) { evergreen_set_bool_consts(pScrn, SQ_BOOL_CONST_vs, (1 << 0)); } else { evergreen_set_bool_consts(pScrn, SQ_BOOL_CONST_vs, (0 << 0)); } /* Shader */ vs_conf.shader_addr = accel_state->vs_mc_addr; vs_conf.shader_size = accel_state->vs_size; vs_conf.num_gprs = 5; vs_conf.stack_size = 1; vs_conf.bo = accel_state->shaders_bo; evergreen_vs_setup(pScrn, &vs_conf, RADEON_GEM_DOMAIN_VRAM); ps_conf.shader_addr = accel_state->ps_mc_addr; ps_conf.shader_size = accel_state->ps_size; ps_conf.num_gprs = 2; ps_conf.stack_size = 1; ps_conf.clamp_consts = 0; ps_conf.export_mode = 2; ps_conf.bo = accel_state->shaders_bo; evergreen_ps_setup(pScrn, &ps_conf, RADEON_GEM_DOMAIN_VRAM); cb_conf.id = 0; cb_conf.w = accel_state->dst_obj.pitch; cb_conf.h = accel_state->dst_obj.height; cb_conf.base = 0; cb_conf.format = dst_format; cb_conf.bo = accel_state->dst_obj.bo; cb_conf.surface = accel_state->dst_obj.surface; switch (pDstPicture->format) { case PICT_a8r8g8b8: case PICT_x8r8g8b8: case PICT_a1r5g5b5: case PICT_x1r5g5b5: default: cb_conf.comp_swap = 1; /* ARGB */ break; case PICT_a8b8g8r8: case PICT_x8b8g8r8: cb_conf.comp_swap = 0; /* ABGR */ break; case PICT_b8g8r8a8: case PICT_b8g8r8x8: cb_conf.comp_swap = 3; /* BGRA */ break; case PICT_r5g6b5: cb_conf.comp_swap = 2; /* RGB */ break; case PICT_a8: cb_conf.comp_swap = 3; /* A */ break; } cb_conf.source_format = EXPORT_4C_16BPC; cb_conf.blend_clamp = 1; cb_conf.blendcntl = EVERGREENGetBlendCntl(op, pMaskPicture, pDstPicture->format); cb_conf.blendcntl |= CB_BLEND0_CONTROL__ENABLE_bit; cb_conf.rop = 3; cb_conf.pmask = 0xf; if ((accel_state->dst_obj.tiling_flags & RADEON_TILING_MASK) == RADEON_TILING_LINEAR) { cb_conf.array_mode = 0; cb_conf.non_disp_tiling = 1; } #if X_BYTE_ORDER == X_BIG_ENDIAN switch (dst_obj.bpp) { case 16: cb_conf.endian = ENDIAN_8IN16; break; case 32: cb_conf.endian = ENDIAN_8IN32; break; default: break; } #endif evergreen_set_render_target(pScrn, &cb_conf, accel_state->dst_obj.domain); if (pMask) evergreen_set_spi(pScrn, (2 - 1), 2); else evergreen_set_spi(pScrn, (1 - 1), 1); /* VS alu constants */ vs_const_conf.size_bytes = 256; vs_const_conf.type = SHADER_TYPE_VS; cbuf = radeon_vbo_space(pScrn, &accel_state->cbuf, 256); vs_const_conf.bo = accel_state->cbuf.vb_bo; vs_const_conf.const_addr = accel_state->cbuf.vb_offset; vs_const_conf.cpu_ptr = (uint32_t *)(char *)cbuf; EVERGREENXFormSetup(pSrcPicture, pScrn, 0, cbuf); if (pMask) EVERGREENXFormSetup(pMaskPicture, pScrn, 1, cbuf); if (!pSrc) { /* solid src color */ EVERGREENSetSolidConsts(pScrn, &cbuf[16], pSrcPicture->format, pSrcPicture->pSourcePict->solidFill.color, 0); } if (!pMaskPicture) { /* use identity constant if there is no mask */ cbuf[20] = 1.0; cbuf[21] = 1.0; cbuf[22] = 1.0; cbuf[23] = 1.0; } else if (!pMask) { /* solid mask color */ EVERGREENSetSolidConsts(pScrn, &cbuf[20], pMaskPicture->format, pMaskPicture->pSourcePict->solidFill.color, 1); } radeon_vbo_commit(pScrn, &accel_state->cbuf); evergreen_set_alu_consts(pScrn, &vs_const_conf, RADEON_GEM_DOMAIN_GTT); if (accel_state->vsync) RADEONVlineHelperClear(pScrn); accel_state->composite_op = op; accel_state->dst_pic = pDstPicture; accel_state->src_pic = pSrcPicture; accel_state->dst_pix = pDst; accel_state->msk_pix = pMask; accel_state->src_pix = pSrc; return TRUE; } static void EVERGREENFinishComposite(ScrnInfoPtr pScrn, PixmapPtr pDst, struct radeon_accel_state *accel_state) { int vtx_size; if (accel_state->vsync) evergreen_cp_wait_vline_sync(pScrn, pDst, accel_state->vline_crtc, accel_state->vline_y1, accel_state->vline_y2); vtx_size = accel_state->msk_pix ? 24 : 16; evergreen_finish_op(pScrn, vtx_size); } static void EVERGREENDoneComposite(PixmapPtr pDst) { ScreenPtr pScreen = pDst->drawable.pScreen; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; EVERGREENFinishComposite(pScrn, pDst, accel_state); } static void EVERGREENComposite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, int w, int h) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; float *vb; if (CS_FULL(info->cs)) { EVERGREENFinishComposite(pScrn, pDst, info->accel_state); radeon_cs_flush_indirect(pScrn); EVERGREENPrepareComposite(info->accel_state->composite_op, info->accel_state->src_pic, info->accel_state->msk_pic, info->accel_state->dst_pic, info->accel_state->src_pix, info->accel_state->msk_pix, info->accel_state->dst_pix); } if (accel_state->vsync) RADEONVlineHelperSet(pScrn, dstX, dstY, dstX + w, dstY + h); if (accel_state->msk_pix) { vb = radeon_vbo_space(pScrn, &accel_state->vbo, 24); vb[0] = (float)dstX; vb[1] = (float)dstY; vb[2] = (float)srcX; vb[3] = (float)srcY; vb[4] = (float)maskX; vb[5] = (float)maskY; vb[6] = (float)dstX; vb[7] = (float)(dstY + h); vb[8] = (float)srcX; vb[9] = (float)(srcY + h); vb[10] = (float)maskX; vb[11] = (float)(maskY + h); vb[12] = (float)(dstX + w); vb[13] = (float)(dstY + h); vb[14] = (float)(srcX + w); vb[15] = (float)(srcY + h); vb[16] = (float)(maskX + w); vb[17] = (float)(maskY + h); radeon_vbo_commit(pScrn, &accel_state->vbo); } else { vb = radeon_vbo_space(pScrn, &accel_state->vbo, 16); vb[0] = (float)dstX; vb[1] = (float)dstY; vb[2] = (float)srcX; vb[3] = (float)srcY; vb[4] = (float)dstX; vb[5] = (float)(dstY + h); vb[6] = (float)srcX; vb[7] = (float)(srcY + h); vb[8] = (float)(dstX + w); vb[9] = (float)(dstY + h); vb[10] = (float)(srcX + w); vb[11] = (float)(srcY + h); radeon_vbo_commit(pScrn, &accel_state->vbo); } } static Bool EVERGREENUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, char *src, int src_pitch) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; struct radeon_exa_pixmap_priv *driver_priv; struct radeon_bo *scratch = NULL; struct radeon_bo *copy_dst; unsigned char *dst; unsigned size; uint32_t dst_domain; int bpp = pDst->drawable.bitsPerPixel; uint32_t scratch_pitch; uint32_t copy_pitch; uint32_t dst_pitch_hw = exaGetPixmapPitch(pDst) / (bpp / 8); int ret; Bool flush = TRUE; Bool r; int i; struct r600_accel_object src_obj, dst_obj; uint32_t height, base_align; if (bpp < 8) return FALSE; driver_priv = exaGetPixmapDriverPrivate(pDst); if (!driver_priv || !driver_priv->bo) return FALSE; /* If we know the BO won't be busy / in VRAM, don't bother with a scratch */ copy_dst = driver_priv->bo; copy_pitch = pDst->devKind; if (!(driver_priv->tiling_flags & (RADEON_TILING_MACRO | RADEON_TILING_MICRO))) { if (!radeon_bo_is_referenced_by_cs(driver_priv->bo, info->cs)) { flush = FALSE; if (!radeon_bo_is_busy(driver_priv->bo, &dst_domain) && !(dst_domain & RADEON_GEM_DOMAIN_VRAM)) goto copy; } } scratch_pitch = RADEON_ALIGN(w, drmmode_get_pitch_align(pScrn, (bpp / 8), 0)); height = RADEON_ALIGN(h, drmmode_get_height_align(pScrn, 0)); base_align = drmmode_get_base_align(pScrn, (bpp / 8), 0); size = scratch_pitch * height * (bpp / 8); scratch = radeon_bo_open(info->bufmgr, 0, size, base_align, RADEON_GEM_DOMAIN_GTT, 0); if (scratch == NULL) { goto copy; } src_obj.pitch = scratch_pitch; src_obj.width = w; src_obj.height = h; src_obj.bpp = bpp; src_obj.domain = RADEON_GEM_DOMAIN_GTT; src_obj.bo = scratch; src_obj.tiling_flags = 0; src_obj.surface = NULL; dst_obj.pitch = dst_pitch_hw; dst_obj.width = pDst->drawable.width; dst_obj.height = pDst->drawable.height; dst_obj.bpp = bpp; dst_obj.domain = RADEON_GEM_DOMAIN_VRAM; dst_obj.bo = radeon_get_pixmap_bo(pDst); dst_obj.tiling_flags = radeon_get_pixmap_tiling(pDst); dst_obj.surface = radeon_get_pixmap_surface(pDst); if (!R600SetAccelState(pScrn, &src_obj, NULL, &dst_obj, accel_state->copy_vs_offset, accel_state->copy_ps_offset, 3, 0xffffffff)) { goto copy; } copy_dst = scratch; copy_pitch = scratch_pitch * (bpp / 8); flush = FALSE; copy: if (flush) radeon_cs_flush_indirect(pScrn); ret = radeon_bo_map(copy_dst, 0); if (ret) { r = FALSE; goto out; } r = TRUE; size = w * bpp / 8; dst = copy_dst->ptr; if (copy_dst == driver_priv->bo) dst += y * copy_pitch + x * bpp / 8; for (i = 0; i < h; i++) { memcpy(dst + i * copy_pitch, src, size); src += src_pitch; } radeon_bo_unmap(copy_dst); if (copy_dst == scratch) { if (info->accel_state->vsync) RADEONVlineHelperSet(pScrn, x, y, x + w, y + h); /* blit from gart to vram */ EVERGREENDoPrepareCopy(pScrn); EVERGREENAppendCopyVertex(pScrn, 0, 0, x, y, w, h); EVERGREENDoCopyVline(pDst); } out: if (scratch) radeon_bo_unref(scratch); return r; } static Bool EVERGREENDownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h, char *dst, int dst_pitch) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pSrc->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; struct radeon_exa_pixmap_priv *driver_priv; struct radeon_bo *scratch = NULL; struct radeon_bo *copy_src; unsigned size; uint32_t src_domain = 0; int bpp = pSrc->drawable.bitsPerPixel; uint32_t scratch_pitch; uint32_t copy_pitch; uint32_t src_pitch_hw = exaGetPixmapPitch(pSrc) / (bpp / 8); int ret; Bool flush = FALSE; Bool r; struct r600_accel_object src_obj, dst_obj; uint32_t height, base_align; if (bpp < 8) return FALSE; driver_priv = exaGetPixmapDriverPrivate(pSrc); if (!driver_priv || !driver_priv->bo) return FALSE; /* If we know the BO won't end up in VRAM anyway, don't bother with a scratch */ copy_src = driver_priv->bo; copy_pitch = pSrc->devKind; if (!(driver_priv->tiling_flags & (RADEON_TILING_MACRO | RADEON_TILING_MICRO))) { if (radeon_bo_is_referenced_by_cs(driver_priv->bo, info->cs)) { src_domain = radeon_bo_get_src_domain(driver_priv->bo); if ((src_domain & (RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM)) == (RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM)) src_domain = 0; else /* A write may be scheduled */ flush = TRUE; } if (!src_domain) radeon_bo_is_busy(driver_priv->bo, &src_domain); if (src_domain & ~(uint32_t)RADEON_GEM_DOMAIN_VRAM) goto copy; } if (!accel_state->allowHWDFS) goto copy; scratch_pitch = RADEON_ALIGN(w, drmmode_get_pitch_align(pScrn, (bpp / 8), 0)); height = RADEON_ALIGN(h, drmmode_get_height_align(pScrn, 0)); base_align = drmmode_get_base_align(pScrn, (bpp / 8), 0); size = scratch_pitch * height * (bpp / 8); scratch = radeon_bo_open(info->bufmgr, 0, size, base_align, RADEON_GEM_DOMAIN_GTT, 0); if (scratch == NULL) { goto copy; } radeon_cs_space_reset_bos(info->cs); radeon_cs_space_add_persistent_bo(info->cs, info->accel_state->shaders_bo, RADEON_GEM_DOMAIN_VRAM, 0); accel_state->src_obj[0].domain = RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM; radeon_add_pixmap(info->cs, pSrc, info->accel_state->src_obj[0].domain, 0); accel_state->dst_obj.domain = RADEON_GEM_DOMAIN_GTT; radeon_cs_space_add_persistent_bo(info->cs, scratch, 0, accel_state->dst_obj.domain); ret = radeon_cs_space_check(info->cs); if (ret) { goto copy; } src_obj.pitch = src_pitch_hw; src_obj.width = pSrc->drawable.width; src_obj.height = pSrc->drawable.height; src_obj.bpp = bpp; src_obj.domain = RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT; src_obj.bo = radeon_get_pixmap_bo(pSrc); src_obj.tiling_flags = radeon_get_pixmap_tiling(pSrc); src_obj.surface = radeon_get_pixmap_surface(pSrc); dst_obj.pitch = scratch_pitch; dst_obj.width = w; dst_obj.height = h; dst_obj.bo = scratch; dst_obj.bpp = bpp; dst_obj.domain = RADEON_GEM_DOMAIN_GTT; dst_obj.tiling_flags = 0; dst_obj.surface = NULL; if (!R600SetAccelState(pScrn, &src_obj, NULL, &dst_obj, accel_state->copy_vs_offset, accel_state->copy_ps_offset, 3, 0xffffffff)) { goto copy; } /* blit from vram to gart */ EVERGREENDoPrepareCopy(pScrn); EVERGREENAppendCopyVertex(pScrn, x, y, 0, 0, w, h); EVERGREENDoCopy(pScrn); copy_src = scratch; copy_pitch = scratch_pitch * (bpp / 8); flush = TRUE; copy: if (flush) radeon_cs_flush_indirect(pScrn); ret = radeon_bo_map(copy_src, 0); if (ret) { ErrorF("failed to map pixmap: %d\n", ret); r = FALSE; goto out; } r = TRUE; w *= bpp / 8; if (copy_src == driver_priv->bo) size = y * copy_pitch + x * bpp / 8; else size = 0; while (h--) { memcpy(dst, copy_src->ptr + size, w); size += copy_pitch; dst += dst_pitch; } radeon_bo_unmap(copy_src); out: if (scratch) radeon_bo_unref(scratch); return r; } static int EVERGREENMarkSync(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; return ++accel_state->exaSyncMarker; } static void EVERGREENSync(ScreenPtr pScreen, int marker) { return; } static Bool EVERGREENAllocShaders(ScrnInfoPtr pScrn, ScreenPtr pScreen) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; /* 512 bytes per shader for now */ int size = 512 * 9; accel_state->shaders_bo = radeon_bo_open(info->bufmgr, 0, size, 0, RADEON_GEM_DOMAIN_VRAM, 0); if (accel_state->shaders_bo == NULL) { ErrorF("Allocating shader failed\n"); return FALSE; } return TRUE; } static Bool EVERGREENLoadShaders(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; RADEONChipFamily ChipSet = info->ChipFamily; uint32_t *shader; int ret; ret = radeon_bo_map(accel_state->shaders_bo, 1); if (ret) { FatalError("failed to map shader %d\n", ret); return FALSE; } shader = accel_state->shaders_bo->ptr; /* solid vs --------------------------------------- */ accel_state->solid_vs_offset = 0; evergreen_solid_vs(ChipSet, shader + accel_state->solid_vs_offset / 4); /* solid ps --------------------------------------- */ accel_state->solid_ps_offset = 512; evergreen_solid_ps(ChipSet, shader + accel_state->solid_ps_offset / 4); /* copy vs --------------------------------------- */ accel_state->copy_vs_offset = 1024; evergreen_copy_vs(ChipSet, shader + accel_state->copy_vs_offset / 4); /* copy ps --------------------------------------- */ accel_state->copy_ps_offset = 1536; evergreen_copy_ps(ChipSet, shader + accel_state->copy_ps_offset / 4); /* comp vs --------------------------------------- */ accel_state->comp_vs_offset = 2048; evergreen_comp_vs(ChipSet, shader + accel_state->comp_vs_offset / 4); /* comp ps --------------------------------------- */ accel_state->comp_ps_offset = 2560; evergreen_comp_ps(ChipSet, shader + accel_state->comp_ps_offset / 4); /* xv vs --------------------------------------- */ accel_state->xv_vs_offset = 3072; evergreen_xv_vs(ChipSet, shader + accel_state->xv_vs_offset / 4); /* xv ps --------------------------------------- */ accel_state->xv_ps_offset = 3584; evergreen_xv_ps(ChipSet, shader + accel_state->xv_ps_offset / 4); radeon_bo_unmap(accel_state->shaders_bo); return TRUE; } static Bool CAYMANLoadShaders(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; RADEONChipFamily ChipSet = info->ChipFamily; uint32_t *shader; int ret; ret = radeon_bo_map(accel_state->shaders_bo, 1); if (ret) { FatalError("failed to map shader %d\n", ret); return FALSE; } shader = accel_state->shaders_bo->ptr; /* solid vs --------------------------------------- */ accel_state->solid_vs_offset = 0; cayman_solid_vs(ChipSet, shader + accel_state->solid_vs_offset / 4); /* solid ps --------------------------------------- */ accel_state->solid_ps_offset = 512; cayman_solid_ps(ChipSet, shader + accel_state->solid_ps_offset / 4); /* copy vs --------------------------------------- */ accel_state->copy_vs_offset = 1024; cayman_copy_vs(ChipSet, shader + accel_state->copy_vs_offset / 4); /* copy ps --------------------------------------- */ accel_state->copy_ps_offset = 1536; cayman_copy_ps(ChipSet, shader + accel_state->copy_ps_offset / 4); /* comp vs --------------------------------------- */ accel_state->comp_vs_offset = 2048; cayman_comp_vs(ChipSet, shader + accel_state->comp_vs_offset / 4); /* comp ps --------------------------------------- */ accel_state->comp_ps_offset = 2560; cayman_comp_ps(ChipSet, shader + accel_state->comp_ps_offset / 4); /* xv vs --------------------------------------- */ accel_state->xv_vs_offset = 3072; cayman_xv_vs(ChipSet, shader + accel_state->xv_vs_offset / 4); /* xv ps --------------------------------------- */ accel_state->xv_ps_offset = 3584; cayman_xv_ps(ChipSet, shader + accel_state->xv_ps_offset / 4); radeon_bo_unmap(accel_state->shaders_bo); return TRUE; } Bool EVERGREENDrawInit(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); if (info->accel_state->exa == NULL) { xf86DrvMsg(pScreen->myNum, X_ERROR, "Memory map not set up\n"); return FALSE; } info->accel_state->exa->exa_major = EXA_VERSION_MAJOR; info->accel_state->exa->exa_minor = EXA_VERSION_MINOR; info->accel_state->exa->PrepareSolid = EVERGREENPrepareSolid; info->accel_state->exa->Solid = EVERGREENSolid; info->accel_state->exa->DoneSolid = EVERGREENDoneSolid; info->accel_state->exa->PrepareCopy = EVERGREENPrepareCopy; info->accel_state->exa->Copy = EVERGREENCopy; info->accel_state->exa->DoneCopy = EVERGREENDoneCopy; info->accel_state->exa->MarkSync = EVERGREENMarkSync; info->accel_state->exa->WaitMarker = EVERGREENSync; info->accel_state->exa->CreatePixmap = RADEONEXACreatePixmap; info->accel_state->exa->DestroyPixmap = RADEONEXADestroyPixmap; info->accel_state->exa->PixmapIsOffscreen = RADEONEXAPixmapIsOffscreen; info->accel_state->exa->PrepareAccess = RADEONPrepareAccess_CS; info->accel_state->exa->FinishAccess = RADEONFinishAccess_CS; info->accel_state->exa->UploadToScreen = EVERGREENUploadToScreen; info->accel_state->exa->DownloadFromScreen = EVERGREENDownloadFromScreen; info->accel_state->exa->CreatePixmap2 = RADEONEXACreatePixmap2; #if (EXA_VERSION_MAJOR == 2 && EXA_VERSION_MINOR >= 6) info->accel_state->exa->SharePixmapBacking = RADEONEXASharePixmapBacking; info->accel_state->exa->SetSharedPixmapBacking = RADEONEXASetSharedPixmapBacking; #endif info->accel_state->exa->flags = EXA_OFFSCREEN_PIXMAPS | EXA_SUPPORTS_PREPARE_AUX | EXA_HANDLES_PIXMAPS | EXA_MIXED_PIXMAPS; info->accel_state->exa->pixmapOffsetAlign = 256; info->accel_state->exa->pixmapPitchAlign = 256; info->accel_state->exa->CheckComposite = EVERGREENCheckComposite; info->accel_state->exa->PrepareComposite = EVERGREENPrepareComposite; info->accel_state->exa->Composite = EVERGREENComposite; info->accel_state->exa->DoneComposite = EVERGREENDoneComposite; info->accel_state->exa->maxPitchBytes = 32768; info->accel_state->exa->maxX = 8192; info->accel_state->exa->maxY = 8192; /* not supported yet */ if (xf86ReturnOptValBool(info->Options, OPTION_EXA_VSYNC, FALSE)) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "EXA VSync enabled\n"); info->accel_state->vsync = TRUE; } else info->accel_state->vsync = FALSE; if (!exaDriverInit(pScreen, info->accel_state->exa)) { free(info->accel_state->exa); return FALSE; } info->accel_state->XInited3D = FALSE; info->accel_state->copy_area = NULL; info->accel_state->src_obj[0].bo = NULL; info->accel_state->src_obj[1].bo = NULL; info->accel_state->dst_obj.bo = NULL; info->accel_state->copy_area_bo = NULL; info->accel_state->vbo.vb_start_op = -1; info->accel_state->cbuf.vb_start_op = -1; info->accel_state->finish_op = evergreen_finish_op; info->accel_state->vbo.verts_per_op = 3; info->accel_state->cbuf.verts_per_op = 1; RADEONVlineHelperClear(pScrn); radeon_vbo_init_lists(pScrn); if (!EVERGREENAllocShaders(pScrn, pScreen)) return FALSE; if (info->ChipFamily >= CHIP_FAMILY_CAYMAN) { if (!CAYMANLoadShaders(pScrn)) return FALSE; } else { if (!EVERGREENLoadShaders(pScrn)) return FALSE; } exaMarkSync(pScreen); return TRUE; } xf86-video-ati-7.3.0/src/evergreen_textured_videofuncs.c0000664000175000017500000004167112234257031020214 00000000000000/* * Copyright 2010 Advanced Micro Devices, 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: Alex Deucher * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "xf86.h" #include "exa.h" #include "radeon.h" #include "radeon_reg.h" #include "evergreen_shader.h" #include "evergreen_reg.h" #include "evergreen_state.h" #include "radeon_video.h" #include #include "fourcc.h" #include "damage.h" #include "radeon_exa_shared.h" #include "radeon_vbo.h" /* Parameters for ITU-R BT.601 and ITU-R BT.709 colour spaces note the difference to the parameters used in overlay are due to 10bit vs. float calcs */ static REF_TRANSFORM trans[2] = { {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 */ }; void EVERGREENDisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; PixmapPtr pPixmap = pPriv->pPixmap; BoxPtr pBox = REGION_RECTS(&pPriv->clip); int nBox = REGION_NUM_RECTS(&pPriv->clip); int dstxoff, dstyoff; struct r600_accel_object src_obj, dst_obj; cb_config_t cb_conf; tex_resource_t tex_res; tex_sampler_t tex_samp; shader_config_t vs_conf, ps_conf; /* * y' = y - .0625 * u' = u - .5 * v' = v - .5; * * r = 1.1643 * y' + 0.0 * u' + 1.5958 * v' * g = 1.1643 * y' - 0.39173 * u' - 0.81290 * v' * b = 1.1643 * y' + 2.017 * u' + 0.0 * v' * * DP3 might look like the straightforward solution * but we'd need to move the texture yuv values in * the same reg for this to work. Therefore use MADs. * Brightness just adds to the off constant. * Contrast is multiplication of luminance. * Saturation and hue change the u and v coeffs. * Default values (before adjustments - depend on colorspace): * yco = 1.1643 * uco = 0, -0.39173, 2.017 * vco = 1.5958, -0.8129, 0 * off = -0.0625 * yco + -0.5 * uco[r] + -0.5 * vco[r], * -0.0625 * yco + -0.5 * uco[g] + -0.5 * vco[g], * -0.0625 * yco + -0.5 * uco[b] + -0.5 * vco[b], * * temp = MAD(yco, yuv.yyyy, off) * temp = MAD(uco, yuv.uuuu, temp) * result = MAD(vco, yuv.vvvv, temp) */ /* TODO: calc consts in the shader */ const float Loff = -0.0627; const float Coff = -0.502; float uvcosf, uvsinf; float yco; float uco[3], vco[3], off[3]; float bright, cont, gamma; int ref = pPriv->transform_index; float *ps_alu_consts; const_config_t ps_const_conf; float *vs_alu_consts; const_config_t vs_const_conf; cont = RTFContrast(pPriv->contrast); bright = RTFBrightness(pPriv->brightness); gamma = (float)pPriv->gamma / 1000.0; uvcosf = RTFSaturation(pPriv->saturation) * cos(RTFHue(pPriv->hue)); uvsinf = RTFSaturation(pPriv->saturation) * sin(RTFHue(pPriv->hue)); /* overlay video also does pre-gamma contrast/sat adjust, should we? */ 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; // XXX gamma = 1.0; CLEAR (cb_conf); CLEAR (tex_res); CLEAR (tex_samp); CLEAR (vs_conf); CLEAR (ps_conf); CLEAR (vs_const_conf); CLEAR (ps_const_conf); dst_obj.bo = radeon_get_pixmap_bo(pPixmap); dst_obj.tiling_flags = radeon_get_pixmap_tiling(pPixmap); dst_obj.surface = radeon_get_pixmap_surface(pPixmap); dst_obj.pitch = exaGetPixmapPitch(pPixmap) / (pPixmap->drawable.bitsPerPixel / 8); src_obj.pitch = pPriv->src_pitch; src_obj.width = pPriv->w; src_obj.height = pPriv->h; src_obj.bpp = 16; src_obj.domain = RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT; src_obj.bo = pPriv->src_bo[pPriv->currentBuffer]; src_obj.tiling_flags = 0; src_obj.surface = NULL; dst_obj.width = pPixmap->drawable.width; dst_obj.height = pPixmap->drawable.height; dst_obj.bpp = pPixmap->drawable.bitsPerPixel; dst_obj.domain = RADEON_GEM_DOMAIN_VRAM; if (!R600SetAccelState(pScrn, &src_obj, NULL, &dst_obj, accel_state->xv_vs_offset, accel_state->xv_ps_offset, 3, 0xffffffff)) return; #ifdef COMPOSITE dstxoff = -pPixmap->screen_x + pPixmap->drawable.x; dstyoff = -pPixmap->screen_y + pPixmap->drawable.y; #else dstxoff = 0; dstyoff = 0; #endif radeon_vbo_check(pScrn, &accel_state->vbo, 16); radeon_vbo_check(pScrn, &accel_state->cbuf, 512); radeon_cp_start(pScrn); evergreen_set_default_state(pScrn); evergreen_set_generic_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); evergreen_set_screen_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); evergreen_set_window_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); /* PS bool constant */ switch(pPriv->id) { case FOURCC_YV12: case FOURCC_I420: evergreen_set_bool_consts(pScrn, SQ_BOOL_CONST_ps, (1 << 0)); break; case FOURCC_UYVY: case FOURCC_YUY2: default: evergreen_set_bool_consts(pScrn, SQ_BOOL_CONST_ps, (0 << 0)); break; } /* Shader */ vs_conf.shader_addr = accel_state->vs_mc_addr; vs_conf.shader_size = accel_state->vs_size; vs_conf.num_gprs = 2; vs_conf.stack_size = 0; vs_conf.bo = accel_state->shaders_bo; evergreen_vs_setup(pScrn, &vs_conf, RADEON_GEM_DOMAIN_VRAM); ps_conf.shader_addr = accel_state->ps_mc_addr; ps_conf.shader_size = accel_state->ps_size; ps_conf.num_gprs = 3; ps_conf.stack_size = 1; ps_conf.clamp_consts = 0; ps_conf.export_mode = 2; ps_conf.bo = accel_state->shaders_bo; evergreen_ps_setup(pScrn, &ps_conf, RADEON_GEM_DOMAIN_VRAM); /* Texture */ switch(pPriv->id) { case FOURCC_YV12: case FOURCC_I420: accel_state->src_size[0] = accel_state->src_obj[0].pitch * pPriv->h; /* Y texture */ tex_res.id = 0; tex_res.w = accel_state->src_obj[0].width; tex_res.h = accel_state->src_obj[0].height; tex_res.pitch = accel_state->src_obj[0].pitch; tex_res.depth = 0; tex_res.dim = SQ_TEX_DIM_2D; tex_res.base = 0; tex_res.mip_base = 0; tex_res.size = accel_state->src_size[0]; tex_res.bo = accel_state->src_obj[0].bo; tex_res.mip_bo = accel_state->src_obj[0].bo; tex_res.surface = NULL; tex_res.format = FMT_8; tex_res.dst_sel_x = SQ_SEL_X; /* Y */ tex_res.dst_sel_y = SQ_SEL_1; tex_res.dst_sel_z = SQ_SEL_1; tex_res.dst_sel_w = SQ_SEL_1; tex_res.base_level = 0; tex_res.last_level = 0; tex_res.perf_modulation = 0; tex_res.interlaced = 0; if ((accel_state->src_obj[0].tiling_flags & RADEON_TILING_MASK) == RADEON_TILING_LINEAR) tex_res.array_mode = 1; evergreen_set_tex_resource(pScrn, &tex_res, accel_state->src_obj[0].domain); /* Y sampler */ tex_samp.id = 0; tex_samp.clamp_x = SQ_TEX_CLAMP_LAST_TEXEL; tex_samp.clamp_y = SQ_TEX_CLAMP_LAST_TEXEL; tex_samp.clamp_z = SQ_TEX_WRAP; /* xxx: switch to bicubic */ tex_samp.xy_mag_filter = SQ_TEX_XY_FILTER_BILINEAR; tex_samp.xy_min_filter = SQ_TEX_XY_FILTER_BILINEAR; tex_samp.z_filter = SQ_TEX_Z_FILTER_NONE; tex_samp.mip_filter = 0; /* no mipmap */ evergreen_set_tex_sampler(pScrn, &tex_samp); /* U or V texture */ tex_res.id = 1; tex_res.format = FMT_8; tex_res.w = accel_state->src_obj[0].width >> 1; tex_res.h = accel_state->src_obj[0].height >> 1; tex_res.pitch = RADEON_ALIGN(accel_state->src_obj[0].pitch >> 1, pPriv->hw_align); tex_res.dst_sel_x = SQ_SEL_X; /* V or U */ tex_res.dst_sel_y = SQ_SEL_1; tex_res.dst_sel_z = SQ_SEL_1; tex_res.dst_sel_w = SQ_SEL_1; tex_res.interlaced = 0; tex_res.base = pPriv->planev_offset; tex_res.mip_base = pPriv->planev_offset; tex_res.size = tex_res.pitch * (pPriv->h >> 1); if ((accel_state->src_obj[0].tiling_flags & RADEON_TILING_MASK) == RADEON_TILING_LINEAR) tex_res.array_mode = 1; evergreen_set_tex_resource(pScrn, &tex_res, accel_state->src_obj[0].domain); /* U or V sampler */ tex_samp.id = 1; evergreen_set_tex_sampler(pScrn, &tex_samp); /* U or V texture */ tex_res.id = 2; tex_res.format = FMT_8; tex_res.w = accel_state->src_obj[0].width >> 1; tex_res.h = accel_state->src_obj[0].height >> 1; tex_res.pitch = RADEON_ALIGN(accel_state->src_obj[0].pitch >> 1, pPriv->hw_align); tex_res.dst_sel_x = SQ_SEL_X; /* V or U */ tex_res.dst_sel_y = SQ_SEL_1; tex_res.dst_sel_z = SQ_SEL_1; tex_res.dst_sel_w = SQ_SEL_1; tex_res.interlaced = 0; tex_res.base = pPriv->planeu_offset; tex_res.mip_base = pPriv->planeu_offset; tex_res.size = tex_res.pitch * (pPriv->h >> 1); if ((accel_state->src_obj[0].tiling_flags & RADEON_TILING_MASK) == RADEON_TILING_LINEAR) tex_res.array_mode = 1; evergreen_set_tex_resource(pScrn, &tex_res, accel_state->src_obj[0].domain); /* UV sampler */ tex_samp.id = 2; evergreen_set_tex_sampler(pScrn, &tex_samp); break; case FOURCC_UYVY: case FOURCC_YUY2: default: accel_state->src_size[0] = accel_state->src_obj[0].pitch * pPriv->h; /* YUV texture */ tex_res.id = 0; tex_res.w = accel_state->src_obj[0].width; tex_res.h = accel_state->src_obj[0].height; tex_res.pitch = accel_state->src_obj[0].pitch >> 1; tex_res.depth = 0; tex_res.dim = SQ_TEX_DIM_2D; tex_res.base = 0; tex_res.mip_base = 0; tex_res.size = accel_state->src_size[0]; tex_res.bo = accel_state->src_obj[0].bo; tex_res.mip_bo = accel_state->src_obj[0].bo; tex_res.surface = NULL; if (pPriv->id == FOURCC_UYVY) tex_res.format = FMT_GB_GR; else tex_res.format = FMT_BG_RG; tex_res.dst_sel_x = SQ_SEL_Y; tex_res.dst_sel_y = SQ_SEL_X; tex_res.dst_sel_z = SQ_SEL_Z; tex_res.dst_sel_w = SQ_SEL_1; tex_res.base_level = 0; tex_res.last_level = 0; tex_res.perf_modulation = 0; tex_res.interlaced = 0; if ((accel_state->src_obj[0].tiling_flags & RADEON_TILING_MASK) == RADEON_TILING_LINEAR) tex_res.array_mode = 1; evergreen_set_tex_resource(pScrn, &tex_res, accel_state->src_obj[0].domain); /* YUV sampler */ tex_samp.id = 0; tex_samp.clamp_x = SQ_TEX_CLAMP_LAST_TEXEL; tex_samp.clamp_y = SQ_TEX_CLAMP_LAST_TEXEL; tex_samp.clamp_z = SQ_TEX_WRAP; tex_samp.xy_mag_filter = SQ_TEX_XY_FILTER_BILINEAR; tex_samp.xy_min_filter = SQ_TEX_XY_FILTER_BILINEAR; tex_samp.z_filter = SQ_TEX_Z_FILTER_NONE; tex_samp.mip_filter = 0; /* no mipmap */ evergreen_set_tex_sampler(pScrn, &tex_samp); break; } cb_conf.id = 0; cb_conf.w = accel_state->dst_obj.pitch; cb_conf.h = accel_state->dst_obj.height; cb_conf.base = 0; cb_conf.bo = accel_state->dst_obj.bo; cb_conf.surface = accel_state->dst_obj.surface; switch (accel_state->dst_obj.bpp) { case 16: if (pPixmap->drawable.depth == 15) { cb_conf.format = COLOR_1_5_5_5; cb_conf.comp_swap = 1; /* ARGB */ } else { cb_conf.format = COLOR_5_6_5; cb_conf.comp_swap = 2; /* RGB */ } #if X_BYTE_ORDER == X_BIG_ENDIAN cb_conf.endian = ENDIAN_8IN16; #endif break; case 32: cb_conf.format = COLOR_8_8_8_8; cb_conf.comp_swap = 1; /* ARGB */ #if X_BYTE_ORDER == X_BIG_ENDIAN cb_conf.endian = ENDIAN_8IN32; #endif break; default: return; } cb_conf.source_format = EXPORT_4C_16BPC; cb_conf.blend_clamp = 1; cb_conf.pmask = 0xf; cb_conf.rop = 3; if ((accel_state->dst_obj.tiling_flags & RADEON_TILING_MASK) == RADEON_TILING_LINEAR) { cb_conf.array_mode = 1; cb_conf.non_disp_tiling = 1; } evergreen_set_render_target(pScrn, &cb_conf, accel_state->dst_obj.domain); evergreen_set_spi(pScrn, (1 - 1), 1); /* PS alu constants */ ps_const_conf.size_bytes = 256; ps_const_conf.type = SHADER_TYPE_PS; ps_alu_consts = radeon_vbo_space(pScrn, &accel_state->cbuf, 256); ps_const_conf.bo = accel_state->cbuf.vb_bo; ps_const_conf.const_addr = accel_state->cbuf.vb_offset; ps_const_conf.cpu_ptr = (uint32_t *)(char *)ps_alu_consts; ps_alu_consts[0] = off[0]; ps_alu_consts[1] = off[1]; ps_alu_consts[2] = off[2]; ps_alu_consts[3] = yco; ps_alu_consts[4] = uco[0]; ps_alu_consts[5] = uco[1]; ps_alu_consts[6] = uco[2]; ps_alu_consts[7] = gamma; ps_alu_consts[8] = vco[0]; ps_alu_consts[9] = vco[1]; ps_alu_consts[10] = vco[2]; ps_alu_consts[11] = 0.0; radeon_vbo_commit(pScrn, &accel_state->cbuf); evergreen_set_alu_consts(pScrn, &ps_const_conf, RADEON_GEM_DOMAIN_GTT); /* VS alu constants */ vs_const_conf.size_bytes = 256; vs_const_conf.type = SHADER_TYPE_VS; vs_alu_consts = radeon_vbo_space(pScrn, &accel_state->cbuf, 256); vs_const_conf.bo = accel_state->cbuf.vb_bo; vs_const_conf.const_addr = accel_state->cbuf.vb_offset; vs_const_conf.cpu_ptr = (uint32_t *)(char *)vs_alu_consts; vs_alu_consts[0] = 1.0 / pPriv->w; vs_alu_consts[1] = 1.0 / pPriv->h; vs_alu_consts[2] = 0.0; vs_alu_consts[3] = 0.0; radeon_vbo_commit(pScrn, &accel_state->cbuf); evergreen_set_alu_consts(pScrn, &vs_const_conf, RADEON_GEM_DOMAIN_GTT); if (pPriv->vsync) { xf86CrtcPtr crtc; if (pPriv->desired_crtc) crtc = pPriv->desired_crtc; else crtc = radeon_pick_best_crtc(pScrn, FALSE, pPriv->drw_x, pPriv->drw_x + pPriv->dst_w, pPriv->drw_y, pPriv->drw_y + pPriv->dst_h); if (crtc) evergreen_cp_wait_vline_sync(pScrn, pPixmap, crtc, pPriv->drw_y - crtc->y, (pPriv->drw_y - crtc->y) + pPriv->dst_h); } while (nBox--) { float srcX, srcY, srcw, srch; int dstX, dstY, dstw, dsth; float *vb; dstX = pBox->x1 + dstxoff; dstY = pBox->y1 + dstyoff; dstw = pBox->x2 - pBox->x1; dsth = pBox->y2 - pBox->y1; srcX = pPriv->src_x; srcX += ((pBox->x1 - pPriv->drw_x) * pPriv->src_w) / (float)pPriv->dst_w; srcY = pPriv->src_y; srcY += ((pBox->y1 - pPriv->drw_y) * pPriv->src_h) / (float)pPriv->dst_h; srcw = (pPriv->src_w * dstw) / (float)pPriv->dst_w; srch = (pPriv->src_h * dsth) / (float)pPriv->dst_h; vb = radeon_vbo_space(pScrn, &accel_state->vbo, 16); vb[0] = (float)dstX; vb[1] = (float)dstY; vb[2] = (float)srcX; vb[3] = (float)srcY; vb[4] = (float)dstX; vb[5] = (float)(dstY + dsth); vb[6] = (float)srcX; vb[7] = (float)(srcY + srch); vb[8] = (float)(dstX + dstw); vb[9] = (float)(dstY + dsth); vb[10] = (float)(srcX + srcw); vb[11] = (float)(srcY + srch); radeon_vbo_commit(pScrn, &accel_state->vbo); pBox++; } evergreen_finish_op(pScrn, 16); DamageDamageRegion(pPriv->pDraw, &pPriv->clip); } xf86-video-ati-7.3.0/src/r600_state.h0000664000175000017500000002272712177731114013763 00000000000000#ifndef __R600_STATE_H__ #define __R600_STATE_H__ #include "xf86drm.h" typedef int bool_t; #define CLEAR(x) memset (&x, 0, sizeof(x)) /* Sequencer / thread handling */ typedef struct { int ps_prio; int vs_prio; int gs_prio; int es_prio; int num_ps_gprs; int num_vs_gprs; int num_gs_gprs; int num_es_gprs; int num_temp_gprs; int num_ps_threads; int num_vs_threads; int num_gs_threads; int num_es_threads; int num_ps_stack_entries; int num_vs_stack_entries; int num_gs_stack_entries; int num_es_stack_entries; } sq_config_t; /* Color buffer / render target */ typedef struct { int id; int w; int h; uint64_t base; int format; int endian; int array_mode; // tiling int number_type; int read_size; int comp_swap; int tile_mode; int blend_clamp; int clear_color; int blend_bypass; int blend_float32; int simple_float; int round_mode; int tile_compact; int source_format; /* 2D related CB state */ uint32_t pmask; int rop; int blend_enable; uint32_t blendcntl; struct radeon_bo *bo; struct radeon_surface *surface; } cb_config_t; /* Depth buffer */ typedef struct { int w; int h; uint64_t base; int format; int read_size; int array_mode; // tiling int tile_surface_en; int tile_compact; int zrange_precision; struct radeon_bo *bo; } db_config_t; /* Shader */ typedef struct { uint64_t shader_addr; uint32_t shader_size; int num_gprs; int stack_size; int dx10_clamp; int prime_cache_pgm_en; int prime_cache_on_draw; int fetch_cache_lines; int prime_cache_en; int prime_cache_on_const; int clamp_consts; int export_mode; int uncached_first_inst; struct radeon_bo *bo; } shader_config_t; /* Vertex buffer / vtx resource */ typedef struct { int id; uint64_t vb_addr; uint32_t vtx_num_entries; uint32_t vtx_size_dw; int clamp_x; int format; int num_format_all; int format_comp_all; int srf_mode_all; int endian; int mem_req_size; struct radeon_bo *bo; } vtx_resource_t; /* Texture resource */ typedef struct { int id; int w; int h; int pitch; int depth; int dim; int tile_mode; int tile_type; int format; uint64_t base; uint64_t mip_base; uint32_t size; int format_comp_x; int format_comp_y; int format_comp_z; int format_comp_w; int num_format_all; int srf_mode_all; int force_degamma; int endian; int request_size; int dst_sel_x; int dst_sel_y; int dst_sel_z; int dst_sel_w; int base_level; int last_level; int base_array; int last_array; int mpeg_clamp; int perf_modulation; int interlaced; struct radeon_bo *bo; struct radeon_bo *mip_bo; struct radeon_surface *surface; } tex_resource_t; /* Texture sampler */ typedef struct { int id; /* Clamping */ int clamp_x, clamp_y, clamp_z; int border_color; /* Filtering */ int xy_mag_filter, xy_min_filter; int z_filter; int mip_filter; bool_t high_precision_filter; /* ? */ int perf_mip; /* ? 0-7 */ int perf_z; /* ? 3 */ /* LoD selection */ int min_lod, max_lod; /* 0-0x3ff */ int lod_bias; /* 0-0xfff (signed?) */ int lod_bias2; /* ? 0-0xfff (signed?) */ bool_t lod_uses_minor_axis; /* ? */ /* Other stuff */ bool_t point_sampling_clamp; /* ? */ bool_t tex_array_override; /* ? */ bool_t mc_coord_truncate; /* ? */ bool_t force_degamma; /* ? */ bool_t fetch_4; /* ? */ bool_t sample_is_pcf; /* ? */ bool_t type; /* ? */ int depth_compare; /* only depth textures? */ int chroma_key; } tex_sampler_t; /* Draw command */ typedef struct { uint32_t prim_type; uint32_t vgt_draw_initiator; uint32_t index_type; uint32_t num_instances; uint32_t num_indices; } draw_config_t; #define BEGIN_BATCH(n) \ do { \ radeon_ddx_cs_start(pScrn, (n), __FILE__, __func__, __LINE__); \ } while(0) #define END_BATCH() \ do { \ radeon_cs_end(info->cs, __FILE__, __func__, __LINE__); \ } while(0) #define RELOC_BATCH(bo, rd, wd) \ do { \ int _ret; \ _ret = radeon_cs_write_reloc(info->cs, (bo), (rd), (wd), 0); \ if (_ret) ErrorF("reloc emit failure %d (%s %d)\n", _ret, __func__, __LINE__); \ } while(0) #define E32(dword) \ do { \ radeon_cs_write_dword(info->cs, (dword)); \ } while (0) #define EFLOAT(val) \ do { \ union { float f; uint32_t d; } a; \ a.f = (val); \ E32(a.d); \ } while (0) #define PACK3(cmd, num) \ do { \ E32(RADEON_CP_PACKET3 | ((cmd) << 8) | ((((num) - 1) & 0x3fff) << 16)); \ } while (0) /* write num registers, start at reg */ /* If register falls in a special area, special commands are issued */ #define PACK0(reg, num) \ do { \ if ((reg) >= SET_CONFIG_REG_offset && (reg) < SET_CONFIG_REG_end) { \ PACK3(IT_SET_CONFIG_REG, (num) + 1); \ E32(((reg) - SET_CONFIG_REG_offset) >> 2); \ } else if ((reg) >= SET_CONTEXT_REG_offset && (reg) < SET_CONTEXT_REG_end) { \ PACK3(IT_SET_CONTEXT_REG, (num) + 1); \ E32(((reg) - SET_CONTEXT_REG_offset) >> 2); \ } else if ((reg) >= SET_ALU_CONST_offset && (reg) < SET_ALU_CONST_end) { \ PACK3(IT_SET_ALU_CONST, (num) + 1); \ E32(((reg) - SET_ALU_CONST_offset) >> 2); \ } else if ((reg) >= SET_RESOURCE_offset && (reg) < SET_RESOURCE_end) { \ PACK3(IT_SET_RESOURCE, num + 1); \ E32(((reg) - SET_RESOURCE_offset) >> 2); \ } else if ((reg) >= SET_SAMPLER_offset && (reg) < SET_SAMPLER_end) { \ PACK3(IT_SET_SAMPLER, (num) + 1); \ E32((reg - SET_SAMPLER_offset) >> 2); \ } else if ((reg) >= SET_CTL_CONST_offset && (reg) < SET_CTL_CONST_end) { \ PACK3(IT_SET_CTL_CONST, (num) + 1); \ E32(((reg) - SET_CTL_CONST_offset) >> 2); \ } else if ((reg) >= SET_LOOP_CONST_offset && (reg) < SET_LOOP_CONST_end) { \ PACK3(IT_SET_LOOP_CONST, (num) + 1); \ E32(((reg) - SET_LOOP_CONST_offset) >> 2); \ } else if ((reg) >= SET_BOOL_CONST_offset && (reg) < SET_BOOL_CONST_end) { \ PACK3(IT_SET_BOOL_CONST, (num) + 1); \ E32(((reg) - SET_BOOL_CONST_offset) >> 2); \ } else { \ E32(CP_PACKET0 ((reg), (num) - 1)); \ } \ } while (0) /* write a single register */ #define EREG(reg, val) \ do { \ PACK0((reg), 1); \ E32((val)); \ } while (0) void R600CPFlushIndirect(ScrnInfoPtr pScrn); void R600IBDiscard(ScrnInfoPtr pScrn); void r600_wait_3d_idle_clean(ScrnInfoPtr pScrn); void r600_wait_3d_idle(ScrnInfoPtr pScrn); void r600_start_3d(ScrnInfoPtr pScrn); void r600_set_render_target(ScrnInfoPtr pScrn, cb_config_t *cb_conf, uint32_t domain); void r600_cp_wait_vline_sync(ScrnInfoPtr pScrn, PixmapPtr pPix, xf86CrtcPtr crtc, int start, int stop); void r600_set_spi(ScrnInfoPtr pScrn, int vs_export_count, int num_interp); void r600_fs_setup(ScrnInfoPtr pScrn, shader_config_t *fs_conf, uint32_t domain); void r600_vs_setup(ScrnInfoPtr pScrn, shader_config_t *vs_conf, uint32_t domain); void r600_ps_setup(ScrnInfoPtr pScrn, shader_config_t *ps_conf, uint32_t domain); void r600_set_alu_consts(ScrnInfoPtr pScrn, int offset, int count, float *const_buf); void r600_set_bool_consts(ScrnInfoPtr pScrn, int offset, uint32_t val); void r600_set_tex_resource(ScrnInfoPtr pScrn, tex_resource_t *tex_res, uint32_t domain); void r600_set_tex_sampler (ScrnInfoPtr pScrn, tex_sampler_t *s); void r600_set_screen_scissor(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2); void r600_set_vport_scissor(ScrnInfoPtr pScrn, int id, int x1, int y1, int x2, int y2); void r600_set_generic_scissor(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2); void r600_set_window_scissor(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2); void r600_set_clip_rect(ScrnInfoPtr pScrn, int id, int x1, int y1, int x2, int y2); void r600_set_default_state(ScrnInfoPtr pScrn); void r600_draw_immd(ScrnInfoPtr pScrn, draw_config_t *draw_conf, uint32_t *indices); void r600_draw_auto(ScrnInfoPtr pScrn, draw_config_t *draw_conf); void r600_finish_op(ScrnInfoPtr pScrn, int vtx_size); Bool R600SetAccelState(ScrnInfoPtr pScrn, struct r600_accel_object *src0, struct r600_accel_object *src1, struct r600_accel_object *dst, uint32_t vs_offset, uint32_t ps_offset, int rop, Pixel planemask); extern Bool RADEONPrepareAccess_CS(PixmapPtr pPix, int index); extern void RADEONFinishAccess_CS(PixmapPtr pPix, int index); extern void *RADEONEXACreatePixmap(ScreenPtr pScreen, int size, int align); extern void *RADEONEXACreatePixmap2(ScreenPtr pScreen, int width, int height, int depth, int usage_hint, int bitsPerPixel, int *new_pitch); extern void RADEONEXADestroyPixmap(ScreenPtr pScreen, void *driverPriv); extern struct radeon_bo *radeon_get_pixmap_bo(PixmapPtr pPix); extern Bool RADEONEXAPixmapIsOffscreen(PixmapPtr pPix); extern Bool RADEONEXASharePixmapBacking(PixmapPtr ppix, ScreenPtr slave, void **handle_p); extern Bool RADEONEXASetSharedPixmapBacking(PixmapPtr ppix, void *handle); #endif xf86-video-ati-7.3.0/src/radeon_vbo.h0000664000175000017500000000235212177731114014202 00000000000000 #ifndef RADEON_VBO_H #define RADEON_VBO_H extern void radeon_vb_no_space(ScrnInfoPtr pScrn, struct radeon_vbo_object *vbo, int vert_size); extern void radeon_vbo_init_lists(ScrnInfoPtr pScrn); extern void radeon_vbo_free_lists(ScrnInfoPtr pScrn); extern void radeon_vbo_flush_bos(ScrnInfoPtr pScrn); extern void radeon_vbo_get(ScrnInfoPtr pScrn, struct radeon_vbo_object *vbo); extern void radeon_vbo_put(ScrnInfoPtr pScrn, struct radeon_vbo_object *vbo); static inline void radeon_vbo_check(ScrnInfoPtr pScrn, struct radeon_vbo_object *vbo, int vert_size) { if ((vbo->vb_offset + (vbo->verts_per_op * vert_size)) > vbo->vb_total) { radeon_vb_no_space(pScrn, vbo, vert_size); } } static inline void * radeon_vbo_space(ScrnInfoPtr pScrn, struct radeon_vbo_object *vbo, int vert_size) { void *vb; /* we've ran out of space in the vertex buffer - need to get a new one */ radeon_vbo_check(pScrn, vbo, vert_size); vbo->vb_op_vert_size = vert_size; vb = (pointer)((char *)vbo->vb_bo->ptr + vbo->vb_offset); return vb; } static inline void radeon_vbo_commit(ScrnInfoPtr pScrn, struct radeon_vbo_object *vbo) { vbo->vb_offset += vbo->verts_per_op * vbo->vb_op_vert_size; } #endif xf86-video-ati-7.3.0/src/r600_textured_videofuncs.c0000664000175000017500000003756312177731114016733 00000000000000/* * Copyright 2008 Advanced Micro Devices, 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: Alex Deucher * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "xf86.h" #include "exa.h" #include "radeon.h" #include "radeon_reg.h" #include "r600_shader.h" #include "r600_reg.h" #include "r600_state.h" #include "radeon_video.h" #include #include "fourcc.h" #include "damage.h" #include "radeon_exa_shared.h" #include "radeon_vbo.h" /* Parameters for ITU-R BT.601 and ITU-R BT.709 colour spaces note the difference to the parameters used in overlay are due to 10bit vs. float calcs */ static REF_TRANSFORM trans[2] = { {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 */ }; void R600DisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; PixmapPtr pPixmap = pPriv->pPixmap; BoxPtr pBox = REGION_RECTS(&pPriv->clip); int nBox = REGION_NUM_RECTS(&pPriv->clip); int dstxoff, dstyoff; struct r600_accel_object src_obj, dst_obj; cb_config_t cb_conf; tex_resource_t tex_res; tex_sampler_t tex_samp; shader_config_t vs_conf, ps_conf; /* * y' = y - .0625 * u' = u - .5 * v' = v - .5; * * r = 1.1643 * y' + 0.0 * u' + 1.5958 * v' * g = 1.1643 * y' - 0.39173 * u' - 0.81290 * v' * b = 1.1643 * y' + 2.017 * u' + 0.0 * v' * * DP3 might look like the straightforward solution * but we'd need to move the texture yuv values in * the same reg for this to work. Therefore use MADs. * Brightness just adds to the off constant. * Contrast is multiplication of luminance. * Saturation and hue change the u and v coeffs. * Default values (before adjustments - depend on colorspace): * yco = 1.1643 * uco = 0, -0.39173, 2.017 * vco = 1.5958, -0.8129, 0 * off = -0.0625 * yco + -0.5 * uco[r] + -0.5 * vco[r], * -0.0625 * yco + -0.5 * uco[g] + -0.5 * vco[g], * -0.0625 * yco + -0.5 * uco[b] + -0.5 * vco[b], * * temp = MAD(yco, yuv.yyyy, off) * temp = MAD(uco, yuv.uuuu, temp) * result = MAD(vco, yuv.vvvv, temp) */ /* TODO: calc consts in the shader */ const float Loff = -0.0627; const float Coff = -0.502; float uvcosf, uvsinf; float yco; float uco[3], vco[3], off[3]; float bright, cont, gamma; int ref = pPriv->transform_index; float ps_alu_consts[12]; float vs_alu_consts[4]; cont = RTFContrast(pPriv->contrast); bright = RTFBrightness(pPriv->brightness); gamma = (float)pPriv->gamma / 1000.0; uvcosf = RTFSaturation(pPriv->saturation) * cos(RTFHue(pPriv->hue)); uvsinf = RTFSaturation(pPriv->saturation) * sin(RTFHue(pPriv->hue)); /* overlay video also does pre-gamma contrast/sat adjust, should we? */ 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; // XXX gamma = 1.0; /* setup the ps consts */ ps_alu_consts[0] = off[0]; ps_alu_consts[1] = off[1]; ps_alu_consts[2] = off[2]; ps_alu_consts[3] = yco; ps_alu_consts[4] = uco[0]; ps_alu_consts[5] = uco[1]; ps_alu_consts[6] = uco[2]; ps_alu_consts[7] = gamma; ps_alu_consts[8] = vco[0]; ps_alu_consts[9] = vco[1]; ps_alu_consts[10] = vco[2]; ps_alu_consts[11] = 0.0; CLEAR (cb_conf); CLEAR (tex_res); CLEAR (tex_samp); CLEAR (vs_conf); CLEAR (ps_conf); dst_obj.bo = radeon_get_pixmap_bo(pPixmap); dst_obj.tiling_flags = radeon_get_pixmap_tiling(pPixmap); dst_obj.surface = radeon_get_pixmap_surface(pPixmap); dst_obj.pitch = exaGetPixmapPitch(pPixmap) / (pPixmap->drawable.bitsPerPixel / 8); src_obj.pitch = pPriv->src_pitch; src_obj.width = pPriv->w; src_obj.height = pPriv->h; src_obj.bpp = 16; src_obj.domain = RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT; src_obj.bo = pPriv->src_bo[pPriv->currentBuffer]; src_obj.tiling_flags = 0; src_obj.surface = NULL; dst_obj.width = pPixmap->drawable.width; dst_obj.height = pPixmap->drawable.height; dst_obj.bpp = pPixmap->drawable.bitsPerPixel; dst_obj.domain = RADEON_GEM_DOMAIN_VRAM; if (!R600SetAccelState(pScrn, &src_obj, NULL, &dst_obj, accel_state->xv_vs_offset, accel_state->xv_ps_offset, 3, 0xffffffff)) return; #ifdef COMPOSITE dstxoff = -pPixmap->screen_x + pPixmap->drawable.x; dstyoff = -pPixmap->screen_y + pPixmap->drawable.y; #else dstxoff = 0; dstyoff = 0; #endif radeon_vbo_check(pScrn, &accel_state->vbo, 16); radeon_cp_start(pScrn); r600_set_default_state(pScrn); r600_set_generic_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); r600_set_screen_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); r600_set_window_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); /* PS bool constant */ switch(pPriv->id) { case FOURCC_YV12: case FOURCC_I420: r600_set_bool_consts(pScrn, SQ_BOOL_CONST_ps, (1 << 0)); break; case FOURCC_UYVY: case FOURCC_YUY2: default: r600_set_bool_consts(pScrn, SQ_BOOL_CONST_ps, (0 << 0)); break; } /* Shader */ vs_conf.shader_addr = accel_state->vs_mc_addr; vs_conf.shader_size = accel_state->vs_size; vs_conf.num_gprs = 2; vs_conf.stack_size = 0; vs_conf.bo = accel_state->shaders_bo; r600_vs_setup(pScrn, &vs_conf, RADEON_GEM_DOMAIN_VRAM); ps_conf.shader_addr = accel_state->ps_mc_addr; ps_conf.shader_size = accel_state->ps_size; ps_conf.num_gprs = 3; ps_conf.stack_size = 1; ps_conf.uncached_first_inst = 1; ps_conf.clamp_consts = 0; ps_conf.export_mode = 2; ps_conf.bo = accel_state->shaders_bo; r600_ps_setup(pScrn, &ps_conf, RADEON_GEM_DOMAIN_VRAM); /* PS alu constants */ r600_set_alu_consts(pScrn, SQ_ALU_CONSTANT_ps, sizeof(ps_alu_consts) / SQ_ALU_CONSTANT_offset, ps_alu_consts); /* Texture */ switch(pPriv->id) { case FOURCC_YV12: case FOURCC_I420: accel_state->src_size[0] = accel_state->src_obj[0].pitch * pPriv->h; /* Y texture */ tex_res.id = 0; tex_res.w = accel_state->src_obj[0].width; tex_res.h = accel_state->src_obj[0].height; tex_res.pitch = accel_state->src_obj[0].pitch; tex_res.depth = 0; tex_res.dim = SQ_TEX_DIM_2D; tex_res.base = 0; tex_res.mip_base = 0; tex_res.size = accel_state->src_size[0]; tex_res.bo = accel_state->src_obj[0].bo; tex_res.mip_bo = accel_state->src_obj[0].bo; tex_res.surface = NULL; tex_res.format = FMT_8; tex_res.dst_sel_x = SQ_SEL_X; /* Y */ tex_res.dst_sel_y = SQ_SEL_1; tex_res.dst_sel_z = SQ_SEL_1; tex_res.dst_sel_w = SQ_SEL_1; tex_res.request_size = 1; tex_res.base_level = 0; tex_res.last_level = 0; tex_res.perf_modulation = 0; tex_res.interlaced = 0; if (accel_state->src_obj[0].tiling_flags == 0) tex_res.tile_mode = 1; r600_set_tex_resource(pScrn, &tex_res, accel_state->src_obj[0].domain); /* Y sampler */ tex_samp.id = 0; tex_samp.clamp_x = SQ_TEX_CLAMP_LAST_TEXEL; tex_samp.clamp_y = SQ_TEX_CLAMP_LAST_TEXEL; tex_samp.clamp_z = SQ_TEX_WRAP; /* xxx: switch to bicubic */ tex_samp.xy_mag_filter = SQ_TEX_XY_FILTER_BILINEAR; tex_samp.xy_min_filter = SQ_TEX_XY_FILTER_BILINEAR; tex_samp.z_filter = SQ_TEX_Z_FILTER_NONE; tex_samp.mip_filter = 0; /* no mipmap */ r600_set_tex_sampler(pScrn, &tex_samp); /* U or V texture */ tex_res.id = 1; tex_res.format = FMT_8; tex_res.w = accel_state->src_obj[0].width >> 1; tex_res.h = accel_state->src_obj[0].height >> 1; tex_res.pitch = RADEON_ALIGN(accel_state->src_obj[0].pitch >> 1, pPriv->hw_align); tex_res.dst_sel_x = SQ_SEL_X; /* V or U */ tex_res.dst_sel_y = SQ_SEL_1; tex_res.dst_sel_z = SQ_SEL_1; tex_res.dst_sel_w = SQ_SEL_1; tex_res.interlaced = 0; tex_res.base = pPriv->planev_offset; tex_res.mip_base = pPriv->planev_offset; tex_res.size = tex_res.pitch * (pPriv->h >> 1); if (accel_state->src_obj[0].tiling_flags == 0) tex_res.tile_mode = 1; r600_set_tex_resource(pScrn, &tex_res, accel_state->src_obj[0].domain); /* U or V sampler */ tex_samp.id = 1; r600_set_tex_sampler(pScrn, &tex_samp); /* U or V texture */ tex_res.id = 2; tex_res.format = FMT_8; tex_res.w = accel_state->src_obj[0].width >> 1; tex_res.h = accel_state->src_obj[0].height >> 1; tex_res.pitch = RADEON_ALIGN(accel_state->src_obj[0].pitch >> 1, pPriv->hw_align); tex_res.dst_sel_x = SQ_SEL_X; /* V or U */ tex_res.dst_sel_y = SQ_SEL_1; tex_res.dst_sel_z = SQ_SEL_1; tex_res.dst_sel_w = SQ_SEL_1; tex_res.interlaced = 0; tex_res.base = pPriv->planeu_offset; tex_res.mip_base = pPriv->planeu_offset; tex_res.size = tex_res.pitch * (pPriv->h >> 1); if (accel_state->src_obj[0].tiling_flags == 0) tex_res.tile_mode = 1; r600_set_tex_resource(pScrn, &tex_res, accel_state->src_obj[0].domain); /* UV sampler */ tex_samp.id = 2; r600_set_tex_sampler(pScrn, &tex_samp); break; case FOURCC_UYVY: case FOURCC_YUY2: default: accel_state->src_size[0] = accel_state->src_obj[0].pitch * pPriv->h; /* YUV texture */ tex_res.id = 0; tex_res.w = accel_state->src_obj[0].width; tex_res.h = accel_state->src_obj[0].height; tex_res.pitch = accel_state->src_obj[0].pitch >> 1; tex_res.depth = 0; tex_res.dim = SQ_TEX_DIM_2D; tex_res.base = 0; tex_res.mip_base = 0; tex_res.size = accel_state->src_size[0]; tex_res.bo = accel_state->src_obj[0].bo; tex_res.mip_bo = accel_state->src_obj[0].bo; if (pPriv->id == FOURCC_UYVY) tex_res.format = FMT_GB_GR; else tex_res.format = FMT_BG_RG; tex_res.dst_sel_x = SQ_SEL_Y; tex_res.dst_sel_y = SQ_SEL_X; tex_res.dst_sel_z = SQ_SEL_Z; tex_res.dst_sel_w = SQ_SEL_1; tex_res.request_size = 1; tex_res.base_level = 0; tex_res.last_level = 0; tex_res.perf_modulation = 0; tex_res.interlaced = 0; if (accel_state->src_obj[0].tiling_flags == 0) tex_res.tile_mode = 1; r600_set_tex_resource(pScrn, &tex_res, accel_state->src_obj[0].domain); /* YUV sampler */ tex_samp.id = 0; tex_samp.clamp_x = SQ_TEX_CLAMP_LAST_TEXEL; tex_samp.clamp_y = SQ_TEX_CLAMP_LAST_TEXEL; tex_samp.clamp_z = SQ_TEX_WRAP; /* xxx: switch to bicubic */ tex_samp.xy_mag_filter = SQ_TEX_XY_FILTER_BILINEAR; tex_samp.xy_min_filter = SQ_TEX_XY_FILTER_BILINEAR; tex_samp.z_filter = SQ_TEX_Z_FILTER_NONE; tex_samp.mip_filter = 0; /* no mipmap */ r600_set_tex_sampler(pScrn, &tex_samp); break; } cb_conf.id = 0; cb_conf.w = accel_state->dst_obj.pitch; cb_conf.h = accel_state->dst_obj.height; cb_conf.base = 0; cb_conf.bo = accel_state->dst_obj.bo; cb_conf.surface = accel_state->dst_obj.surface; switch (accel_state->dst_obj.bpp) { case 16: if (pPixmap->drawable.depth == 15) { cb_conf.format = COLOR_1_5_5_5; cb_conf.comp_swap = 1; /* ARGB */ } else { cb_conf.format = COLOR_5_6_5; cb_conf.comp_swap = 2; /* RGB */ } #if X_BYTE_ORDER == X_BIG_ENDIAN cb_conf.endian = ENDIAN_8IN16; #endif break; case 32: cb_conf.format = COLOR_8_8_8_8; cb_conf.comp_swap = 1; /* ARGB */ #if X_BYTE_ORDER == X_BIG_ENDIAN cb_conf.endian = ENDIAN_8IN32; #endif break; default: return; } cb_conf.source_format = 1; cb_conf.blend_clamp = 1; cb_conf.pmask = 0xf; cb_conf.rop = 3; if (accel_state->dst_obj.tiling_flags == 0) cb_conf.array_mode = 1; r600_set_render_target(pScrn, &cb_conf, accel_state->dst_obj.domain); r600_set_spi(pScrn, (1 - 1), 1); vs_alu_consts[0] = 1.0 / pPriv->w; vs_alu_consts[1] = 1.0 / pPriv->h; vs_alu_consts[2] = 0.0; vs_alu_consts[3] = 0.0; /* VS alu constants */ r600_set_alu_consts(pScrn, SQ_ALU_CONSTANT_vs, sizeof(vs_alu_consts) / SQ_ALU_CONSTANT_offset, vs_alu_consts); if (pPriv->vsync) { xf86CrtcPtr crtc; if (pPriv->desired_crtc) crtc = pPriv->desired_crtc; else crtc = radeon_pick_best_crtc(pScrn, FALSE, pPriv->drw_x, pPriv->drw_x + pPriv->dst_w, pPriv->drw_y, pPriv->drw_y + pPriv->dst_h); if (crtc) r600_cp_wait_vline_sync(pScrn, pPixmap, crtc, pPriv->drw_y - crtc->y, (pPriv->drw_y - crtc->y) + pPriv->dst_h); } while (nBox--) { float srcX, srcY, srcw, srch; int dstX, dstY, dstw, dsth; float *vb; dstX = pBox->x1 + dstxoff; dstY = pBox->y1 + dstyoff; dstw = pBox->x2 - pBox->x1; dsth = pBox->y2 - pBox->y1; srcX = pPriv->src_x; srcX += ((pBox->x1 - pPriv->drw_x) * pPriv->src_w) / (float)pPriv->dst_w; srcY = pPriv->src_y; srcY += ((pBox->y1 - pPriv->drw_y) * pPriv->src_h) / (float)pPriv->dst_h; srcw = (pPriv->src_w * dstw) / (float)pPriv->dst_w; srch = (pPriv->src_h * dsth) / (float)pPriv->dst_h; vb = radeon_vbo_space(pScrn, &accel_state->vbo, 16); vb[0] = (float)dstX; vb[1] = (float)dstY; vb[2] = (float)srcX; vb[3] = (float)srcY; vb[4] = (float)dstX; vb[5] = (float)(dstY + dsth); vb[6] = (float)srcX; vb[7] = (float)(srcY + srch); vb[8] = (float)(dstX + dstw); vb[9] = (float)(dstY + dsth); vb[10] = (float)(srcX + srcw); vb[11] = (float)(srcY + srch); radeon_vbo_commit(pScrn, &accel_state->vbo); pBox++; } r600_finish_op(pScrn, 16); DamageDamageRegion(pPriv->pDraw, &pPriv->clip); } xf86-video-ati-7.3.0/src/atimodule.c0000664000175000017500000000420312177731114014037 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * 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 Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "ati.h" #include "ativersion.h" /* Module loader interface */ static XF86ModuleVersionInfo ATIVersionRec = { ATI_DRIVER_NAME, MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2, XORG_VERSION_CURRENT, ATI_VERSION_MAJOR, ATI_VERSION_MINOR, ATI_VERSION_PATCH, ABI_CLASS_VIDEODRV, ABI_VIDEODRV_VERSION, MOD_CLASS_VIDEODRV, {0, 0, 0, 0} }; /* * ATISetup -- * * This function is called every time the module is loaded. */ static pointer ATISetup ( pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor ) { static Bool Inited = FALSE; if (!Inited) { Inited = TRUE; ati_gdev_subdriver(Options); } return (pointer)1; } /* The following record must be called atiModuleData */ _X_EXPORT XF86ModuleData atiModuleData = { &ATIVersionRec, ATISetup, NULL }; xf86-video-ati-7.3.0/src/radeon_pci_chipset_gen.h0000644000175000017500000012322012256365422016536 00000000000000/* This file is autogenerated please do not edit */ static PciChipsets RADEONPciChipsets[] = { { PCI_CHIP_RV380_3150, PCI_CHIP_RV380_3150, RES_SHARED_VGA }, { PCI_CHIP_RV380_3151, PCI_CHIP_RV380_3151, RES_SHARED_VGA }, { PCI_CHIP_RV380_3152, PCI_CHIP_RV380_3152, RES_SHARED_VGA }, { PCI_CHIP_RV380_3154, PCI_CHIP_RV380_3154, RES_SHARED_VGA }, { PCI_CHIP_RV380_3155, PCI_CHIP_RV380_3155, RES_SHARED_VGA }, { PCI_CHIP_RV380_3E50, PCI_CHIP_RV380_3E50, RES_SHARED_VGA }, { PCI_CHIP_RV380_3E54, PCI_CHIP_RV380_3E54, RES_SHARED_VGA }, { PCI_CHIP_RS100_4136, PCI_CHIP_RS100_4136, RES_SHARED_VGA }, { PCI_CHIP_RS200_4137, PCI_CHIP_RS200_4137, RES_SHARED_VGA }, { PCI_CHIP_R300_AD, PCI_CHIP_R300_AD, RES_SHARED_VGA }, { PCI_CHIP_R300_AE, PCI_CHIP_R300_AE, RES_SHARED_VGA }, { PCI_CHIP_R300_AF, PCI_CHIP_R300_AF, RES_SHARED_VGA }, { PCI_CHIP_R300_AG, PCI_CHIP_R300_AG, RES_SHARED_VGA }, { PCI_CHIP_R350_AH, PCI_CHIP_R350_AH, RES_SHARED_VGA }, { PCI_CHIP_R350_AI, PCI_CHIP_R350_AI, RES_SHARED_VGA }, { PCI_CHIP_R350_AJ, PCI_CHIP_R350_AJ, RES_SHARED_VGA }, { PCI_CHIP_R350_AK, PCI_CHIP_R350_AK, RES_SHARED_VGA }, { PCI_CHIP_RV350_AP, PCI_CHIP_RV350_AP, RES_SHARED_VGA }, { PCI_CHIP_RV350_AQ, PCI_CHIP_RV350_AQ, RES_SHARED_VGA }, { PCI_CHIP_RV360_AR, PCI_CHIP_RV360_AR, RES_SHARED_VGA }, { PCI_CHIP_RV350_AS, PCI_CHIP_RV350_AS, RES_SHARED_VGA }, { PCI_CHIP_RV350_AT, PCI_CHIP_RV350_AT, RES_SHARED_VGA }, { PCI_CHIP_RV350_4155, PCI_CHIP_RV350_4155, RES_SHARED_VGA }, { PCI_CHIP_RV350_AV, PCI_CHIP_RV350_AV, RES_SHARED_VGA }, { PCI_CHIP_RS250_4237, PCI_CHIP_RS250_4237, RES_SHARED_VGA }, { PCI_CHIP_R200_BB, PCI_CHIP_R200_BB, RES_SHARED_VGA }, { PCI_CHIP_RS100_4336, PCI_CHIP_RS100_4336, RES_SHARED_VGA }, { PCI_CHIP_RS200_4337, PCI_CHIP_RS200_4337, RES_SHARED_VGA }, { PCI_CHIP_RS250_4437, PCI_CHIP_RS250_4437, RES_SHARED_VGA }, { PCI_CHIP_RV250_If, PCI_CHIP_RV250_If, RES_SHARED_VGA }, { PCI_CHIP_RV250_Ig, PCI_CHIP_RV250_Ig, RES_SHARED_VGA }, { PCI_CHIP_R420_JH, PCI_CHIP_R420_JH, RES_SHARED_VGA }, { PCI_CHIP_R420_JI, PCI_CHIP_R420_JI, RES_SHARED_VGA }, { PCI_CHIP_R420_JJ, PCI_CHIP_R420_JJ, RES_SHARED_VGA }, { PCI_CHIP_R420_JK, PCI_CHIP_R420_JK, RES_SHARED_VGA }, { PCI_CHIP_R420_JL, PCI_CHIP_R420_JL, RES_SHARED_VGA }, { PCI_CHIP_R420_JM, PCI_CHIP_R420_JM, RES_SHARED_VGA }, { PCI_CHIP_R420_JN, PCI_CHIP_R420_JN, RES_SHARED_VGA }, { PCI_CHIP_R420_4A4F, PCI_CHIP_R420_4A4F, RES_SHARED_VGA }, { PCI_CHIP_R420_JP, PCI_CHIP_R420_JP, RES_SHARED_VGA }, { PCI_CHIP_R420_JT, PCI_CHIP_R420_JT, RES_SHARED_VGA }, { PCI_CHIP_R481_4B48, PCI_CHIP_R481_4B48, RES_SHARED_VGA }, { PCI_CHIP_R481_4B49, PCI_CHIP_R481_4B49, RES_SHARED_VGA }, { PCI_CHIP_R481_4B4A, PCI_CHIP_R481_4B4A, RES_SHARED_VGA }, { PCI_CHIP_R481_4B4B, PCI_CHIP_R481_4B4B, RES_SHARED_VGA }, { PCI_CHIP_R481_4B4C, PCI_CHIP_R481_4B4C, RES_SHARED_VGA }, { PCI_CHIP_RADEON_LW, PCI_CHIP_RADEON_LW, RES_SHARED_VGA }, { PCI_CHIP_RADEON_LX, PCI_CHIP_RADEON_LX, RES_SHARED_VGA }, { PCI_CHIP_RADEON_LY, PCI_CHIP_RADEON_LY, RES_SHARED_VGA }, { PCI_CHIP_RADEON_LZ, PCI_CHIP_RADEON_LZ, RES_SHARED_VGA }, { PCI_CHIP_RV250_Ld, PCI_CHIP_RV250_Ld, RES_SHARED_VGA }, { PCI_CHIP_RV250_Lf, PCI_CHIP_RV250_Lf, RES_SHARED_VGA }, { PCI_CHIP_RV250_Lg, PCI_CHIP_RV250_Lg, RES_SHARED_VGA }, { PCI_CHIP_RV280_4C6E, PCI_CHIP_RV280_4C6E, RES_SHARED_VGA }, { PCI_CHIP_R300_ND, PCI_CHIP_R300_ND, RES_SHARED_VGA }, { PCI_CHIP_R300_NE, PCI_CHIP_R300_NE, RES_SHARED_VGA }, { PCI_CHIP_R300_NF, PCI_CHIP_R300_NF, RES_SHARED_VGA }, { PCI_CHIP_R300_NG, PCI_CHIP_R300_NG, RES_SHARED_VGA }, { PCI_CHIP_R350_NH, PCI_CHIP_R350_NH, RES_SHARED_VGA }, { PCI_CHIP_R350_NI, PCI_CHIP_R350_NI, RES_SHARED_VGA }, { PCI_CHIP_R360_NJ, PCI_CHIP_R360_NJ, RES_SHARED_VGA }, { PCI_CHIP_R350_NK, PCI_CHIP_R350_NK, RES_SHARED_VGA }, { PCI_CHIP_RV350_NP, PCI_CHIP_RV350_NP, RES_SHARED_VGA }, { PCI_CHIP_RV350_NQ, PCI_CHIP_RV350_NQ, RES_SHARED_VGA }, { PCI_CHIP_RV350_NR, PCI_CHIP_RV350_NR, RES_SHARED_VGA }, { PCI_CHIP_RV350_NS, PCI_CHIP_RV350_NS, RES_SHARED_VGA }, { PCI_CHIP_RV350_NT, PCI_CHIP_RV350_NT, RES_SHARED_VGA }, { PCI_CHIP_RV350_NV, PCI_CHIP_RV350_NV, RES_SHARED_VGA }, { PCI_CHIP_RADEON_QD, PCI_CHIP_RADEON_QD, RES_SHARED_VGA }, { PCI_CHIP_RADEON_QE, PCI_CHIP_RADEON_QE, RES_SHARED_VGA }, { PCI_CHIP_RADEON_QF, PCI_CHIP_RADEON_QF, RES_SHARED_VGA }, { PCI_CHIP_RADEON_QG, PCI_CHIP_RADEON_QG, RES_SHARED_VGA }, { PCI_CHIP_R200_QH, PCI_CHIP_R200_QH, RES_SHARED_VGA }, { PCI_CHIP_R200_QL, PCI_CHIP_R200_QL, RES_SHARED_VGA }, { PCI_CHIP_R200_QM, PCI_CHIP_R200_QM, RES_SHARED_VGA }, { PCI_CHIP_RV200_QW, PCI_CHIP_RV200_QW, RES_SHARED_VGA }, { PCI_CHIP_RV200_QX, PCI_CHIP_RV200_QX, RES_SHARED_VGA }, { PCI_CHIP_RV100_QY, PCI_CHIP_RV100_QY, RES_SHARED_VGA }, { PCI_CHIP_RV100_QZ, PCI_CHIP_RV100_QZ, RES_SHARED_VGA }, { PCI_CHIP_RN50_515E, PCI_CHIP_RN50_515E, RES_SHARED_VGA }, { PCI_CHIP_RV370_5460, PCI_CHIP_RV370_5460, RES_SHARED_VGA }, { PCI_CHIP_RV370_5462, PCI_CHIP_RV370_5462, RES_SHARED_VGA }, { PCI_CHIP_RV370_5464, PCI_CHIP_RV370_5464, RES_SHARED_VGA }, { PCI_CHIP_R423_UH, PCI_CHIP_R423_UH, RES_SHARED_VGA }, { PCI_CHIP_R423_UI, PCI_CHIP_R423_UI, RES_SHARED_VGA }, { PCI_CHIP_R423_UJ, PCI_CHIP_R423_UJ, RES_SHARED_VGA }, { PCI_CHIP_R423_UK, PCI_CHIP_R423_UK, RES_SHARED_VGA }, { PCI_CHIP_R430_554C, PCI_CHIP_R430_554C, RES_SHARED_VGA }, { PCI_CHIP_R430_554D, PCI_CHIP_R430_554D, RES_SHARED_VGA }, { PCI_CHIP_R430_554E, PCI_CHIP_R430_554E, RES_SHARED_VGA }, { PCI_CHIP_R430_554F, PCI_CHIP_R430_554F, RES_SHARED_VGA }, { PCI_CHIP_R423_5550, PCI_CHIP_R423_5550, RES_SHARED_VGA }, { PCI_CHIP_R423_UQ, PCI_CHIP_R423_UQ, RES_SHARED_VGA }, { PCI_CHIP_R423_UR, PCI_CHIP_R423_UR, RES_SHARED_VGA }, { PCI_CHIP_R423_UT, PCI_CHIP_R423_UT, RES_SHARED_VGA }, { PCI_CHIP_RV410_564A, PCI_CHIP_RV410_564A, RES_SHARED_VGA }, { PCI_CHIP_RV410_564B, PCI_CHIP_RV410_564B, RES_SHARED_VGA }, { PCI_CHIP_RV410_564F, PCI_CHIP_RV410_564F, RES_SHARED_VGA }, { PCI_CHIP_RV410_5652, PCI_CHIP_RV410_5652, RES_SHARED_VGA }, { PCI_CHIP_RV410_5653, PCI_CHIP_RV410_5653, RES_SHARED_VGA }, { PCI_CHIP_RV410_5657, PCI_CHIP_RV410_5657, RES_SHARED_VGA }, { PCI_CHIP_RS300_5834, PCI_CHIP_RS300_5834, RES_SHARED_VGA }, { PCI_CHIP_RS300_5835, PCI_CHIP_RS300_5835, RES_SHARED_VGA }, { PCI_CHIP_RS480_5954, PCI_CHIP_RS480_5954, RES_SHARED_VGA }, { PCI_CHIP_RS480_5955, PCI_CHIP_RS480_5955, RES_SHARED_VGA }, { PCI_CHIP_RV280_5960, PCI_CHIP_RV280_5960, RES_SHARED_VGA }, { PCI_CHIP_RV280_5961, PCI_CHIP_RV280_5961, RES_SHARED_VGA }, { PCI_CHIP_RV280_5962, PCI_CHIP_RV280_5962, RES_SHARED_VGA }, { PCI_CHIP_RV280_5964, PCI_CHIP_RV280_5964, RES_SHARED_VGA }, { PCI_CHIP_RV280_5965, PCI_CHIP_RV280_5965, RES_SHARED_VGA }, { PCI_CHIP_RN50_5969, PCI_CHIP_RN50_5969, RES_SHARED_VGA }, { PCI_CHIP_RS482_5974, PCI_CHIP_RS482_5974, RES_SHARED_VGA }, { PCI_CHIP_RS485_5975, PCI_CHIP_RS485_5975, RES_SHARED_VGA }, { PCI_CHIP_RS400_5A41, PCI_CHIP_RS400_5A41, RES_SHARED_VGA }, { PCI_CHIP_RS400_5A42, PCI_CHIP_RS400_5A42, RES_SHARED_VGA }, { PCI_CHIP_RC410_5A61, PCI_CHIP_RC410_5A61, RES_SHARED_VGA }, { PCI_CHIP_RC410_5A62, PCI_CHIP_RC410_5A62, RES_SHARED_VGA }, { PCI_CHIP_RV370_5B60, PCI_CHIP_RV370_5B60, RES_SHARED_VGA }, { PCI_CHIP_RV370_5B62, PCI_CHIP_RV370_5B62, RES_SHARED_VGA }, { PCI_CHIP_RV370_5B63, PCI_CHIP_RV370_5B63, RES_SHARED_VGA }, { PCI_CHIP_RV370_5B64, PCI_CHIP_RV370_5B64, RES_SHARED_VGA }, { PCI_CHIP_RV370_5B65, PCI_CHIP_RV370_5B65, RES_SHARED_VGA }, { PCI_CHIP_RV280_5C61, PCI_CHIP_RV280_5C61, RES_SHARED_VGA }, { PCI_CHIP_RV280_5C63, PCI_CHIP_RV280_5C63, RES_SHARED_VGA }, { PCI_CHIP_R430_5D48, PCI_CHIP_R430_5D48, RES_SHARED_VGA }, { PCI_CHIP_R430_5D49, PCI_CHIP_R430_5D49, RES_SHARED_VGA }, { PCI_CHIP_R430_5D4A, PCI_CHIP_R430_5D4A, RES_SHARED_VGA }, { PCI_CHIP_R480_5D4C, PCI_CHIP_R480_5D4C, RES_SHARED_VGA }, { PCI_CHIP_R480_5D4D, PCI_CHIP_R480_5D4D, RES_SHARED_VGA }, { PCI_CHIP_R480_5D4E, PCI_CHIP_R480_5D4E, RES_SHARED_VGA }, { PCI_CHIP_R480_5D4F, PCI_CHIP_R480_5D4F, RES_SHARED_VGA }, { PCI_CHIP_R480_5D50, PCI_CHIP_R480_5D50, RES_SHARED_VGA }, { PCI_CHIP_R480_5D52, PCI_CHIP_R480_5D52, RES_SHARED_VGA }, { PCI_CHIP_R423_5D57, PCI_CHIP_R423_5D57, RES_SHARED_VGA }, { PCI_CHIP_RV410_5E48, PCI_CHIP_RV410_5E48, RES_SHARED_VGA }, { PCI_CHIP_RV410_5E4A, PCI_CHIP_RV410_5E4A, RES_SHARED_VGA }, { PCI_CHIP_RV410_5E4B, PCI_CHIP_RV410_5E4B, RES_SHARED_VGA }, { PCI_CHIP_RV410_5E4C, PCI_CHIP_RV410_5E4C, RES_SHARED_VGA }, { PCI_CHIP_RV410_5E4D, PCI_CHIP_RV410_5E4D, RES_SHARED_VGA }, { PCI_CHIP_RV410_5E4F, PCI_CHIP_RV410_5E4F, RES_SHARED_VGA }, { PCI_CHIP_R520_7100, PCI_CHIP_R520_7100, RES_SHARED_VGA }, { PCI_CHIP_R520_7101, PCI_CHIP_R520_7101, RES_SHARED_VGA }, { PCI_CHIP_R520_7102, PCI_CHIP_R520_7102, RES_SHARED_VGA }, { PCI_CHIP_R520_7103, PCI_CHIP_R520_7103, RES_SHARED_VGA }, { PCI_CHIP_R520_7104, PCI_CHIP_R520_7104, RES_SHARED_VGA }, { PCI_CHIP_R520_7105, PCI_CHIP_R520_7105, RES_SHARED_VGA }, { PCI_CHIP_R520_7106, PCI_CHIP_R520_7106, RES_SHARED_VGA }, { PCI_CHIP_R520_7108, PCI_CHIP_R520_7108, RES_SHARED_VGA }, { PCI_CHIP_R520_7109, PCI_CHIP_R520_7109, RES_SHARED_VGA }, { PCI_CHIP_R520_710A, PCI_CHIP_R520_710A, RES_SHARED_VGA }, { PCI_CHIP_R520_710B, PCI_CHIP_R520_710B, RES_SHARED_VGA }, { PCI_CHIP_R520_710C, PCI_CHIP_R520_710C, RES_SHARED_VGA }, { PCI_CHIP_R520_710E, PCI_CHIP_R520_710E, RES_SHARED_VGA }, { PCI_CHIP_R520_710F, PCI_CHIP_R520_710F, RES_SHARED_VGA }, { PCI_CHIP_RV515_7140, PCI_CHIP_RV515_7140, RES_SHARED_VGA }, { PCI_CHIP_RV515_7141, PCI_CHIP_RV515_7141, RES_SHARED_VGA }, { PCI_CHIP_RV515_7142, PCI_CHIP_RV515_7142, RES_SHARED_VGA }, { PCI_CHIP_RV515_7143, PCI_CHIP_RV515_7143, RES_SHARED_VGA }, { PCI_CHIP_RV515_7144, PCI_CHIP_RV515_7144, RES_SHARED_VGA }, { PCI_CHIP_RV515_7145, PCI_CHIP_RV515_7145, RES_SHARED_VGA }, { PCI_CHIP_RV515_7146, PCI_CHIP_RV515_7146, RES_SHARED_VGA }, { PCI_CHIP_RV515_7147, PCI_CHIP_RV515_7147, RES_SHARED_VGA }, { PCI_CHIP_RV515_7149, PCI_CHIP_RV515_7149, RES_SHARED_VGA }, { PCI_CHIP_RV515_714A, PCI_CHIP_RV515_714A, RES_SHARED_VGA }, { PCI_CHIP_RV515_714B, PCI_CHIP_RV515_714B, RES_SHARED_VGA }, { PCI_CHIP_RV515_714C, PCI_CHIP_RV515_714C, RES_SHARED_VGA }, { PCI_CHIP_RV515_714D, PCI_CHIP_RV515_714D, RES_SHARED_VGA }, { PCI_CHIP_RV515_714E, PCI_CHIP_RV515_714E, RES_SHARED_VGA }, { PCI_CHIP_RV515_714F, PCI_CHIP_RV515_714F, RES_SHARED_VGA }, { PCI_CHIP_RV515_7151, PCI_CHIP_RV515_7151, RES_SHARED_VGA }, { PCI_CHIP_RV515_7152, PCI_CHIP_RV515_7152, RES_SHARED_VGA }, { PCI_CHIP_RV515_7153, PCI_CHIP_RV515_7153, RES_SHARED_VGA }, { PCI_CHIP_RV515_715E, PCI_CHIP_RV515_715E, RES_SHARED_VGA }, { PCI_CHIP_RV515_715F, PCI_CHIP_RV515_715F, RES_SHARED_VGA }, { PCI_CHIP_RV515_7180, PCI_CHIP_RV515_7180, RES_SHARED_VGA }, { PCI_CHIP_RV515_7181, PCI_CHIP_RV515_7181, RES_SHARED_VGA }, { PCI_CHIP_RV515_7183, PCI_CHIP_RV515_7183, RES_SHARED_VGA }, { PCI_CHIP_RV515_7186, PCI_CHIP_RV515_7186, RES_SHARED_VGA }, { PCI_CHIP_RV515_7187, PCI_CHIP_RV515_7187, RES_SHARED_VGA }, { PCI_CHIP_RV515_7188, PCI_CHIP_RV515_7188, RES_SHARED_VGA }, { PCI_CHIP_RV515_718A, PCI_CHIP_RV515_718A, RES_SHARED_VGA }, { PCI_CHIP_RV515_718B, PCI_CHIP_RV515_718B, RES_SHARED_VGA }, { PCI_CHIP_RV515_718C, PCI_CHIP_RV515_718C, RES_SHARED_VGA }, { PCI_CHIP_RV515_718D, PCI_CHIP_RV515_718D, RES_SHARED_VGA }, { PCI_CHIP_RV515_718F, PCI_CHIP_RV515_718F, RES_SHARED_VGA }, { PCI_CHIP_RV515_7193, PCI_CHIP_RV515_7193, RES_SHARED_VGA }, { PCI_CHIP_RV515_7196, PCI_CHIP_RV515_7196, RES_SHARED_VGA }, { PCI_CHIP_RV515_719B, PCI_CHIP_RV515_719B, RES_SHARED_VGA }, { PCI_CHIP_RV515_719F, PCI_CHIP_RV515_719F, RES_SHARED_VGA }, { PCI_CHIP_RV530_71C0, PCI_CHIP_RV530_71C0, RES_SHARED_VGA }, { PCI_CHIP_RV530_71C1, PCI_CHIP_RV530_71C1, RES_SHARED_VGA }, { PCI_CHIP_RV530_71C2, PCI_CHIP_RV530_71C2, RES_SHARED_VGA }, { PCI_CHIP_RV530_71C3, PCI_CHIP_RV530_71C3, RES_SHARED_VGA }, { PCI_CHIP_RV530_71C4, PCI_CHIP_RV530_71C4, RES_SHARED_VGA }, { PCI_CHIP_RV530_71C5, PCI_CHIP_RV530_71C5, RES_SHARED_VGA }, { PCI_CHIP_RV530_71C6, PCI_CHIP_RV530_71C6, RES_SHARED_VGA }, { PCI_CHIP_RV530_71C7, PCI_CHIP_RV530_71C7, RES_SHARED_VGA }, { PCI_CHIP_RV530_71CD, PCI_CHIP_RV530_71CD, RES_SHARED_VGA }, { PCI_CHIP_RV530_71CE, PCI_CHIP_RV530_71CE, RES_SHARED_VGA }, { PCI_CHIP_RV530_71D2, PCI_CHIP_RV530_71D2, RES_SHARED_VGA }, { PCI_CHIP_RV530_71D4, PCI_CHIP_RV530_71D4, RES_SHARED_VGA }, { PCI_CHIP_RV530_71D5, PCI_CHIP_RV530_71D5, RES_SHARED_VGA }, { PCI_CHIP_RV530_71D6, PCI_CHIP_RV530_71D6, RES_SHARED_VGA }, { PCI_CHIP_RV530_71DA, PCI_CHIP_RV530_71DA, RES_SHARED_VGA }, { PCI_CHIP_RV530_71DE, PCI_CHIP_RV530_71DE, RES_SHARED_VGA }, { PCI_CHIP_RV515_7200, PCI_CHIP_RV515_7200, RES_SHARED_VGA }, { PCI_CHIP_RV515_7210, PCI_CHIP_RV515_7210, RES_SHARED_VGA }, { PCI_CHIP_RV515_7211, PCI_CHIP_RV515_7211, RES_SHARED_VGA }, { PCI_CHIP_R580_7240, PCI_CHIP_R580_7240, RES_SHARED_VGA }, { PCI_CHIP_R580_7243, PCI_CHIP_R580_7243, RES_SHARED_VGA }, { PCI_CHIP_R580_7244, PCI_CHIP_R580_7244, RES_SHARED_VGA }, { PCI_CHIP_R580_7245, PCI_CHIP_R580_7245, RES_SHARED_VGA }, { PCI_CHIP_R580_7246, PCI_CHIP_R580_7246, RES_SHARED_VGA }, { PCI_CHIP_R580_7247, PCI_CHIP_R580_7247, RES_SHARED_VGA }, { PCI_CHIP_R580_7248, PCI_CHIP_R580_7248, RES_SHARED_VGA }, { PCI_CHIP_R580_7249, PCI_CHIP_R580_7249, RES_SHARED_VGA }, { PCI_CHIP_R580_724A, PCI_CHIP_R580_724A, RES_SHARED_VGA }, { PCI_CHIP_R580_724B, PCI_CHIP_R580_724B, RES_SHARED_VGA }, { PCI_CHIP_R580_724C, PCI_CHIP_R580_724C, RES_SHARED_VGA }, { PCI_CHIP_R580_724D, PCI_CHIP_R580_724D, RES_SHARED_VGA }, { PCI_CHIP_R580_724E, PCI_CHIP_R580_724E, RES_SHARED_VGA }, { PCI_CHIP_R580_724F, PCI_CHIP_R580_724F, RES_SHARED_VGA }, { PCI_CHIP_RV570_7280, PCI_CHIP_RV570_7280, RES_SHARED_VGA }, { PCI_CHIP_RV560_7281, PCI_CHIP_RV560_7281, RES_SHARED_VGA }, { PCI_CHIP_RV560_7283, PCI_CHIP_RV560_7283, RES_SHARED_VGA }, { PCI_CHIP_R580_7284, PCI_CHIP_R580_7284, RES_SHARED_VGA }, { PCI_CHIP_RV560_7287, PCI_CHIP_RV560_7287, RES_SHARED_VGA }, { PCI_CHIP_RV570_7288, PCI_CHIP_RV570_7288, RES_SHARED_VGA }, { PCI_CHIP_RV570_7289, PCI_CHIP_RV570_7289, RES_SHARED_VGA }, { PCI_CHIP_RV570_728B, PCI_CHIP_RV570_728B, RES_SHARED_VGA }, { PCI_CHIP_RV570_728C, PCI_CHIP_RV570_728C, RES_SHARED_VGA }, { PCI_CHIP_RV560_7290, PCI_CHIP_RV560_7290, RES_SHARED_VGA }, { PCI_CHIP_RV560_7291, PCI_CHIP_RV560_7291, RES_SHARED_VGA }, { PCI_CHIP_RV560_7293, PCI_CHIP_RV560_7293, RES_SHARED_VGA }, { PCI_CHIP_RV560_7297, PCI_CHIP_RV560_7297, RES_SHARED_VGA }, { PCI_CHIP_RS350_7834, PCI_CHIP_RS350_7834, RES_SHARED_VGA }, { PCI_CHIP_RS350_7835, PCI_CHIP_RS350_7835, RES_SHARED_VGA }, { PCI_CHIP_RS690_791E, PCI_CHIP_RS690_791E, RES_SHARED_VGA }, { PCI_CHIP_RS690_791F, PCI_CHIP_RS690_791F, RES_SHARED_VGA }, { PCI_CHIP_RS600_793F, PCI_CHIP_RS600_793F, RES_SHARED_VGA }, { PCI_CHIP_RS600_7941, PCI_CHIP_RS600_7941, RES_SHARED_VGA }, { PCI_CHIP_RS600_7942, PCI_CHIP_RS600_7942, RES_SHARED_VGA }, { PCI_CHIP_RS740_796C, PCI_CHIP_RS740_796C, RES_SHARED_VGA }, { PCI_CHIP_RS740_796D, PCI_CHIP_RS740_796D, RES_SHARED_VGA }, { PCI_CHIP_RS740_796E, PCI_CHIP_RS740_796E, RES_SHARED_VGA }, { PCI_CHIP_RS740_796F, PCI_CHIP_RS740_796F, RES_SHARED_VGA }, { PCI_CHIP_R600_9400, PCI_CHIP_R600_9400, RES_SHARED_VGA }, { PCI_CHIP_R600_9401, PCI_CHIP_R600_9401, RES_SHARED_VGA }, { PCI_CHIP_R600_9402, PCI_CHIP_R600_9402, RES_SHARED_VGA }, { PCI_CHIP_R600_9403, PCI_CHIP_R600_9403, RES_SHARED_VGA }, { PCI_CHIP_R600_9405, PCI_CHIP_R600_9405, RES_SHARED_VGA }, { PCI_CHIP_R600_940A, PCI_CHIP_R600_940A, RES_SHARED_VGA }, { PCI_CHIP_R600_940B, PCI_CHIP_R600_940B, RES_SHARED_VGA }, { PCI_CHIP_R600_940F, PCI_CHIP_R600_940F, RES_SHARED_VGA }, { PCI_CHIP_RV770_9440, PCI_CHIP_RV770_9440, RES_SHARED_VGA }, { PCI_CHIP_RV770_9441, PCI_CHIP_RV770_9441, RES_SHARED_VGA }, { PCI_CHIP_RV770_9442, PCI_CHIP_RV770_9442, RES_SHARED_VGA }, { PCI_CHIP_RV770_9443, PCI_CHIP_RV770_9443, RES_SHARED_VGA }, { PCI_CHIP_RV770_9444, PCI_CHIP_RV770_9444, RES_SHARED_VGA }, { PCI_CHIP_RV770_9446, PCI_CHIP_RV770_9446, RES_SHARED_VGA }, { PCI_CHIP_RV770_944A, PCI_CHIP_RV770_944A, RES_SHARED_VGA }, { PCI_CHIP_RV770_944B, PCI_CHIP_RV770_944B, RES_SHARED_VGA }, { PCI_CHIP_RV770_944C, PCI_CHIP_RV770_944C, RES_SHARED_VGA }, { PCI_CHIP_RV770_944E, PCI_CHIP_RV770_944E, RES_SHARED_VGA }, { PCI_CHIP_RV770_9450, PCI_CHIP_RV770_9450, RES_SHARED_VGA }, { PCI_CHIP_RV770_9452, PCI_CHIP_RV770_9452, RES_SHARED_VGA }, { PCI_CHIP_RV770_9456, PCI_CHIP_RV770_9456, RES_SHARED_VGA }, { PCI_CHIP_RV770_945A, PCI_CHIP_RV770_945A, RES_SHARED_VGA }, { PCI_CHIP_RV770_945B, PCI_CHIP_RV770_945B, RES_SHARED_VGA }, { PCI_CHIP_RV770_945E, PCI_CHIP_RV770_945E, RES_SHARED_VGA }, { PCI_CHIP_RV790_9460, PCI_CHIP_RV790_9460, RES_SHARED_VGA }, { PCI_CHIP_RV790_9462, PCI_CHIP_RV790_9462, RES_SHARED_VGA }, { PCI_CHIP_RV770_946A, PCI_CHIP_RV770_946A, RES_SHARED_VGA }, { PCI_CHIP_RV770_946B, PCI_CHIP_RV770_946B, RES_SHARED_VGA }, { PCI_CHIP_RV770_947A, PCI_CHIP_RV770_947A, RES_SHARED_VGA }, { PCI_CHIP_RV770_947B, PCI_CHIP_RV770_947B, RES_SHARED_VGA }, { PCI_CHIP_RV730_9480, PCI_CHIP_RV730_9480, RES_SHARED_VGA }, { PCI_CHIP_RV730_9487, PCI_CHIP_RV730_9487, RES_SHARED_VGA }, { PCI_CHIP_RV730_9488, PCI_CHIP_RV730_9488, RES_SHARED_VGA }, { PCI_CHIP_RV730_9489, PCI_CHIP_RV730_9489, RES_SHARED_VGA }, { PCI_CHIP_RV730_948A, PCI_CHIP_RV730_948A, RES_SHARED_VGA }, { PCI_CHIP_RV730_948F, PCI_CHIP_RV730_948F, RES_SHARED_VGA }, { PCI_CHIP_RV730_9490, PCI_CHIP_RV730_9490, RES_SHARED_VGA }, { PCI_CHIP_RV730_9491, PCI_CHIP_RV730_9491, RES_SHARED_VGA }, { PCI_CHIP_RV730_9495, PCI_CHIP_RV730_9495, RES_SHARED_VGA }, { PCI_CHIP_RV730_9498, PCI_CHIP_RV730_9498, RES_SHARED_VGA }, { PCI_CHIP_RV730_949C, PCI_CHIP_RV730_949C, RES_SHARED_VGA }, { PCI_CHIP_RV730_949E, PCI_CHIP_RV730_949E, RES_SHARED_VGA }, { PCI_CHIP_RV730_949F, PCI_CHIP_RV730_949F, RES_SHARED_VGA }, { PCI_CHIP_RV740_94A0, PCI_CHIP_RV740_94A0, RES_SHARED_VGA }, { PCI_CHIP_RV740_94A1, PCI_CHIP_RV740_94A1, RES_SHARED_VGA }, { PCI_CHIP_RV740_94A3, PCI_CHIP_RV740_94A3, RES_SHARED_VGA }, { PCI_CHIP_RV740_94B1, PCI_CHIP_RV740_94B1, RES_SHARED_VGA }, { PCI_CHIP_RV740_94B3, PCI_CHIP_RV740_94B3, RES_SHARED_VGA }, { PCI_CHIP_RV740_94B4, PCI_CHIP_RV740_94B4, RES_SHARED_VGA }, { PCI_CHIP_RV740_94B5, PCI_CHIP_RV740_94B5, RES_SHARED_VGA }, { PCI_CHIP_RV740_94B9, PCI_CHIP_RV740_94B9, RES_SHARED_VGA }, { PCI_CHIP_RV610_94C0, PCI_CHIP_RV610_94C0, RES_SHARED_VGA }, { PCI_CHIP_RV610_94C1, PCI_CHIP_RV610_94C1, RES_SHARED_VGA }, { PCI_CHIP_RV610_94C3, PCI_CHIP_RV610_94C3, RES_SHARED_VGA }, { PCI_CHIP_RV610_94C4, PCI_CHIP_RV610_94C4, RES_SHARED_VGA }, { PCI_CHIP_RV610_94C5, PCI_CHIP_RV610_94C5, RES_SHARED_VGA }, { PCI_CHIP_RV610_94C6, PCI_CHIP_RV610_94C6, RES_SHARED_VGA }, { PCI_CHIP_RV610_94C7, PCI_CHIP_RV610_94C7, RES_SHARED_VGA }, { PCI_CHIP_RV610_94C8, PCI_CHIP_RV610_94C8, RES_SHARED_VGA }, { PCI_CHIP_RV610_94C9, PCI_CHIP_RV610_94C9, RES_SHARED_VGA }, { PCI_CHIP_RV610_94CB, PCI_CHIP_RV610_94CB, RES_SHARED_VGA }, { PCI_CHIP_RV610_94CC, PCI_CHIP_RV610_94CC, RES_SHARED_VGA }, { PCI_CHIP_RV610_94CD, PCI_CHIP_RV610_94CD, RES_SHARED_VGA }, { PCI_CHIP_RV670_9500, PCI_CHIP_RV670_9500, RES_SHARED_VGA }, { PCI_CHIP_RV670_9501, PCI_CHIP_RV670_9501, RES_SHARED_VGA }, { PCI_CHIP_RV670_9504, PCI_CHIP_RV670_9504, RES_SHARED_VGA }, { PCI_CHIP_RV670_9505, PCI_CHIP_RV670_9505, RES_SHARED_VGA }, { PCI_CHIP_RV670_9506, PCI_CHIP_RV670_9506, RES_SHARED_VGA }, { PCI_CHIP_RV670_9507, PCI_CHIP_RV670_9507, RES_SHARED_VGA }, { PCI_CHIP_RV670_9508, PCI_CHIP_RV670_9508, RES_SHARED_VGA }, { PCI_CHIP_RV670_9509, PCI_CHIP_RV670_9509, RES_SHARED_VGA }, { PCI_CHIP_RV670_950F, PCI_CHIP_RV670_950F, RES_SHARED_VGA }, { PCI_CHIP_RV670_9511, PCI_CHIP_RV670_9511, RES_SHARED_VGA }, { PCI_CHIP_RV670_9515, PCI_CHIP_RV670_9515, RES_SHARED_VGA }, { PCI_CHIP_RV670_9517, PCI_CHIP_RV670_9517, RES_SHARED_VGA }, { PCI_CHIP_RV670_9519, PCI_CHIP_RV670_9519, RES_SHARED_VGA }, { PCI_CHIP_RV710_9540, PCI_CHIP_RV710_9540, RES_SHARED_VGA }, { PCI_CHIP_RV710_9541, PCI_CHIP_RV710_9541, RES_SHARED_VGA }, { PCI_CHIP_RV710_9542, PCI_CHIP_RV710_9542, RES_SHARED_VGA }, { PCI_CHIP_RV710_954E, PCI_CHIP_RV710_954E, RES_SHARED_VGA }, { PCI_CHIP_RV710_954F, PCI_CHIP_RV710_954F, RES_SHARED_VGA }, { PCI_CHIP_RV710_9552, PCI_CHIP_RV710_9552, RES_SHARED_VGA }, { PCI_CHIP_RV710_9553, PCI_CHIP_RV710_9553, RES_SHARED_VGA }, { PCI_CHIP_RV710_9555, PCI_CHIP_RV710_9555, RES_SHARED_VGA }, { PCI_CHIP_RV710_9557, PCI_CHIP_RV710_9557, RES_SHARED_VGA }, { PCI_CHIP_RV710_955F, PCI_CHIP_RV710_955F, RES_SHARED_VGA }, { PCI_CHIP_RV630_9580, PCI_CHIP_RV630_9580, RES_SHARED_VGA }, { PCI_CHIP_RV630_9581, PCI_CHIP_RV630_9581, RES_SHARED_VGA }, { PCI_CHIP_RV630_9583, PCI_CHIP_RV630_9583, RES_SHARED_VGA }, { PCI_CHIP_RV630_9586, PCI_CHIP_RV630_9586, RES_SHARED_VGA }, { PCI_CHIP_RV630_9587, PCI_CHIP_RV630_9587, RES_SHARED_VGA }, { PCI_CHIP_RV630_9588, PCI_CHIP_RV630_9588, RES_SHARED_VGA }, { PCI_CHIP_RV630_9589, PCI_CHIP_RV630_9589, RES_SHARED_VGA }, { PCI_CHIP_RV630_958A, PCI_CHIP_RV630_958A, RES_SHARED_VGA }, { PCI_CHIP_RV630_958B, PCI_CHIP_RV630_958B, RES_SHARED_VGA }, { PCI_CHIP_RV630_958C, PCI_CHIP_RV630_958C, RES_SHARED_VGA }, { PCI_CHIP_RV630_958D, PCI_CHIP_RV630_958D, RES_SHARED_VGA }, { PCI_CHIP_RV630_958E, PCI_CHIP_RV630_958E, RES_SHARED_VGA }, { PCI_CHIP_RV630_958F, PCI_CHIP_RV630_958F, RES_SHARED_VGA }, { PCI_CHIP_RV620_95C0, PCI_CHIP_RV620_95C0, RES_SHARED_VGA }, { PCI_CHIP_RV620_95C2, PCI_CHIP_RV620_95C2, RES_SHARED_VGA }, { PCI_CHIP_RV620_95C4, PCI_CHIP_RV620_95C4, RES_SHARED_VGA }, { PCI_CHIP_RV620_95C5, PCI_CHIP_RV620_95C5, RES_SHARED_VGA }, { PCI_CHIP_RV620_95C6, PCI_CHIP_RV620_95C6, RES_SHARED_VGA }, { PCI_CHIP_RV620_95C7, PCI_CHIP_RV620_95C7, RES_SHARED_VGA }, { PCI_CHIP_RV620_95C9, PCI_CHIP_RV620_95C9, RES_SHARED_VGA }, { PCI_CHIP_RV620_95CC, PCI_CHIP_RV620_95CC, RES_SHARED_VGA }, { PCI_CHIP_RV620_95CD, PCI_CHIP_RV620_95CD, RES_SHARED_VGA }, { PCI_CHIP_RV620_95CE, PCI_CHIP_RV620_95CE, RES_SHARED_VGA }, { PCI_CHIP_RV620_95CF, PCI_CHIP_RV620_95CF, RES_SHARED_VGA }, { PCI_CHIP_RV635_9590, PCI_CHIP_RV635_9590, RES_SHARED_VGA }, { PCI_CHIP_RV635_9596, PCI_CHIP_RV635_9596, RES_SHARED_VGA }, { PCI_CHIP_RV635_9597, PCI_CHIP_RV635_9597, RES_SHARED_VGA }, { PCI_CHIP_RV635_9598, PCI_CHIP_RV635_9598, RES_SHARED_VGA }, { PCI_CHIP_RV635_9599, PCI_CHIP_RV635_9599, RES_SHARED_VGA }, { PCI_CHIP_RV635_9591, PCI_CHIP_RV635_9591, RES_SHARED_VGA }, { PCI_CHIP_RV635_9593, PCI_CHIP_RV635_9593, RES_SHARED_VGA }, { PCI_CHIP_RV635_9595, PCI_CHIP_RV635_9595, RES_SHARED_VGA }, { PCI_CHIP_RV635_959B, PCI_CHIP_RV635_959B, RES_SHARED_VGA }, { PCI_CHIP_RS780_9610, PCI_CHIP_RS780_9610, RES_SHARED_VGA }, { PCI_CHIP_RS780_9611, PCI_CHIP_RS780_9611, RES_SHARED_VGA }, { PCI_CHIP_RS780_9612, PCI_CHIP_RS780_9612, RES_SHARED_VGA }, { PCI_CHIP_RS780_9613, PCI_CHIP_RS780_9613, RES_SHARED_VGA }, { PCI_CHIP_RS780_9614, PCI_CHIP_RS780_9614, RES_SHARED_VGA }, { PCI_CHIP_RS780_9615, PCI_CHIP_RS780_9615, RES_SHARED_VGA }, { PCI_CHIP_RS780_9616, PCI_CHIP_RS780_9616, RES_SHARED_VGA }, { PCI_CHIP_SUMO_9640, PCI_CHIP_SUMO_9640, RES_SHARED_VGA }, { PCI_CHIP_SUMO_9641, PCI_CHIP_SUMO_9641, RES_SHARED_VGA }, { PCI_CHIP_SUMO2_9642, PCI_CHIP_SUMO2_9642, RES_SHARED_VGA }, { PCI_CHIP_SUMO2_9643, PCI_CHIP_SUMO2_9643, RES_SHARED_VGA }, { PCI_CHIP_SUMO2_9644, PCI_CHIP_SUMO2_9644, RES_SHARED_VGA }, { PCI_CHIP_SUMO2_9645, PCI_CHIP_SUMO2_9645, RES_SHARED_VGA }, { PCI_CHIP_SUMO_9647, PCI_CHIP_SUMO_9647, RES_SHARED_VGA }, { PCI_CHIP_SUMO_9648, PCI_CHIP_SUMO_9648, RES_SHARED_VGA }, { PCI_CHIP_SUMO2_9649, PCI_CHIP_SUMO2_9649, RES_SHARED_VGA }, { PCI_CHIP_SUMO_964A, PCI_CHIP_SUMO_964A, RES_SHARED_VGA }, { PCI_CHIP_SUMO_964B, PCI_CHIP_SUMO_964B, RES_SHARED_VGA }, { PCI_CHIP_SUMO_964C, PCI_CHIP_SUMO_964C, RES_SHARED_VGA }, { PCI_CHIP_SUMO_964E, PCI_CHIP_SUMO_964E, RES_SHARED_VGA }, { PCI_CHIP_SUMO_964F, PCI_CHIP_SUMO_964F, RES_SHARED_VGA }, { PCI_CHIP_RS880_9710, PCI_CHIP_RS880_9710, RES_SHARED_VGA }, { PCI_CHIP_RS880_9711, PCI_CHIP_RS880_9711, RES_SHARED_VGA }, { PCI_CHIP_RS880_9712, PCI_CHIP_RS880_9712, RES_SHARED_VGA }, { PCI_CHIP_RS880_9713, PCI_CHIP_RS880_9713, RES_SHARED_VGA }, { PCI_CHIP_RS880_9714, PCI_CHIP_RS880_9714, RES_SHARED_VGA }, { PCI_CHIP_RS880_9715, PCI_CHIP_RS880_9715, RES_SHARED_VGA }, { PCI_CHIP_PALM_9802, PCI_CHIP_PALM_9802, RES_SHARED_VGA }, { PCI_CHIP_PALM_9803, PCI_CHIP_PALM_9803, RES_SHARED_VGA }, { PCI_CHIP_PALM_9804, PCI_CHIP_PALM_9804, RES_SHARED_VGA }, { PCI_CHIP_PALM_9805, PCI_CHIP_PALM_9805, RES_SHARED_VGA }, { PCI_CHIP_PALM_9806, PCI_CHIP_PALM_9806, RES_SHARED_VGA }, { PCI_CHIP_PALM_9807, PCI_CHIP_PALM_9807, RES_SHARED_VGA }, { PCI_CHIP_PALM_9808, PCI_CHIP_PALM_9808, RES_SHARED_VGA }, { PCI_CHIP_PALM_9809, PCI_CHIP_PALM_9809, RES_SHARED_VGA }, { PCI_CHIP_PALM_980A, PCI_CHIP_PALM_980A, RES_SHARED_VGA }, { PCI_CHIP_CYPRESS_6880, PCI_CHIP_CYPRESS_6880, RES_SHARED_VGA }, { PCI_CHIP_CYPRESS_6888, PCI_CHIP_CYPRESS_6888, RES_SHARED_VGA }, { PCI_CHIP_CYPRESS_6889, PCI_CHIP_CYPRESS_6889, RES_SHARED_VGA }, { PCI_CHIP_CYPRESS_688A, PCI_CHIP_CYPRESS_688A, RES_SHARED_VGA }, { PCI_CHIP_CYPRESS_688C, PCI_CHIP_CYPRESS_688C, RES_SHARED_VGA }, { PCI_CHIP_CYPRESS_688D, PCI_CHIP_CYPRESS_688D, RES_SHARED_VGA }, { PCI_CHIP_CYPRESS_6898, PCI_CHIP_CYPRESS_6898, RES_SHARED_VGA }, { PCI_CHIP_CYPRESS_6899, PCI_CHIP_CYPRESS_6899, RES_SHARED_VGA }, { PCI_CHIP_CYPRESS_689B, PCI_CHIP_CYPRESS_689B, RES_SHARED_VGA }, { PCI_CHIP_CYPRESS_689E, PCI_CHIP_CYPRESS_689E, RES_SHARED_VGA }, { PCI_CHIP_HEMLOCK_689C, PCI_CHIP_HEMLOCK_689C, RES_SHARED_VGA }, { PCI_CHIP_HEMLOCK_689D, PCI_CHIP_HEMLOCK_689D, RES_SHARED_VGA }, { PCI_CHIP_JUNIPER_68A0, PCI_CHIP_JUNIPER_68A0, RES_SHARED_VGA }, { PCI_CHIP_JUNIPER_68A1, PCI_CHIP_JUNIPER_68A1, RES_SHARED_VGA }, { PCI_CHIP_JUNIPER_68A8, PCI_CHIP_JUNIPER_68A8, RES_SHARED_VGA }, { PCI_CHIP_JUNIPER_68A9, PCI_CHIP_JUNIPER_68A9, RES_SHARED_VGA }, { PCI_CHIP_JUNIPER_68B0, PCI_CHIP_JUNIPER_68B0, RES_SHARED_VGA }, { PCI_CHIP_JUNIPER_68B8, PCI_CHIP_JUNIPER_68B8, RES_SHARED_VGA }, { PCI_CHIP_JUNIPER_68B9, PCI_CHIP_JUNIPER_68B9, RES_SHARED_VGA }, { PCI_CHIP_JUNIPER_68BA, PCI_CHIP_JUNIPER_68BA, RES_SHARED_VGA }, { PCI_CHIP_JUNIPER_68BE, PCI_CHIP_JUNIPER_68BE, RES_SHARED_VGA }, { PCI_CHIP_JUNIPER_68BF, PCI_CHIP_JUNIPER_68BF, RES_SHARED_VGA }, { PCI_CHIP_REDWOOD_68C0, PCI_CHIP_REDWOOD_68C0, RES_SHARED_VGA }, { PCI_CHIP_REDWOOD_68C1, PCI_CHIP_REDWOOD_68C1, RES_SHARED_VGA }, { PCI_CHIP_REDWOOD_68C7, PCI_CHIP_REDWOOD_68C7, RES_SHARED_VGA }, { PCI_CHIP_REDWOOD_68C8, PCI_CHIP_REDWOOD_68C8, RES_SHARED_VGA }, { PCI_CHIP_REDWOOD_68C9, PCI_CHIP_REDWOOD_68C9, RES_SHARED_VGA }, { PCI_CHIP_REDWOOD_68D8, PCI_CHIP_REDWOOD_68D8, RES_SHARED_VGA }, { PCI_CHIP_REDWOOD_68D9, PCI_CHIP_REDWOOD_68D9, RES_SHARED_VGA }, { PCI_CHIP_REDWOOD_68DA, PCI_CHIP_REDWOOD_68DA, RES_SHARED_VGA }, { PCI_CHIP_REDWOOD_68DE, PCI_CHIP_REDWOOD_68DE, RES_SHARED_VGA }, { PCI_CHIP_CEDAR_68E0, PCI_CHIP_CEDAR_68E0, RES_SHARED_VGA }, { PCI_CHIP_CEDAR_68E1, PCI_CHIP_CEDAR_68E1, RES_SHARED_VGA }, { PCI_CHIP_CEDAR_68E4, PCI_CHIP_CEDAR_68E4, RES_SHARED_VGA }, { PCI_CHIP_CEDAR_68E5, PCI_CHIP_CEDAR_68E5, RES_SHARED_VGA }, { PCI_CHIP_CEDAR_68E8, PCI_CHIP_CEDAR_68E8, RES_SHARED_VGA }, { PCI_CHIP_CEDAR_68E9, PCI_CHIP_CEDAR_68E9, RES_SHARED_VGA }, { PCI_CHIP_CEDAR_68F1, PCI_CHIP_CEDAR_68F1, RES_SHARED_VGA }, { PCI_CHIP_CEDAR_68F2, PCI_CHIP_CEDAR_68F2, RES_SHARED_VGA }, { PCI_CHIP_CEDAR_68F8, PCI_CHIP_CEDAR_68F8, RES_SHARED_VGA }, { PCI_CHIP_CEDAR_68F9, PCI_CHIP_CEDAR_68F9, RES_SHARED_VGA }, { PCI_CHIP_CEDAR_68FA, PCI_CHIP_CEDAR_68FA, RES_SHARED_VGA }, { PCI_CHIP_CEDAR_68FE, PCI_CHIP_CEDAR_68FE, RES_SHARED_VGA }, { PCI_CHIP_CAYMAN_6700, PCI_CHIP_CAYMAN_6700, RES_SHARED_VGA }, { PCI_CHIP_CAYMAN_6701, PCI_CHIP_CAYMAN_6701, RES_SHARED_VGA }, { PCI_CHIP_CAYMAN_6702, PCI_CHIP_CAYMAN_6702, RES_SHARED_VGA }, { PCI_CHIP_CAYMAN_6703, PCI_CHIP_CAYMAN_6703, RES_SHARED_VGA }, { PCI_CHIP_CAYMAN_6704, PCI_CHIP_CAYMAN_6704, RES_SHARED_VGA }, { PCI_CHIP_CAYMAN_6705, PCI_CHIP_CAYMAN_6705, RES_SHARED_VGA }, { PCI_CHIP_CAYMAN_6706, PCI_CHIP_CAYMAN_6706, RES_SHARED_VGA }, { PCI_CHIP_CAYMAN_6707, PCI_CHIP_CAYMAN_6707, RES_SHARED_VGA }, { PCI_CHIP_CAYMAN_6708, PCI_CHIP_CAYMAN_6708, RES_SHARED_VGA }, { PCI_CHIP_CAYMAN_6709, PCI_CHIP_CAYMAN_6709, RES_SHARED_VGA }, { PCI_CHIP_CAYMAN_6718, PCI_CHIP_CAYMAN_6718, RES_SHARED_VGA }, { PCI_CHIP_CAYMAN_6719, PCI_CHIP_CAYMAN_6719, RES_SHARED_VGA }, { PCI_CHIP_CAYMAN_671C, PCI_CHIP_CAYMAN_671C, RES_SHARED_VGA }, { PCI_CHIP_CAYMAN_671D, PCI_CHIP_CAYMAN_671D, RES_SHARED_VGA }, { PCI_CHIP_CAYMAN_671F, PCI_CHIP_CAYMAN_671F, RES_SHARED_VGA }, { PCI_CHIP_BARTS_6720, PCI_CHIP_BARTS_6720, RES_SHARED_VGA }, { PCI_CHIP_BARTS_6721, PCI_CHIP_BARTS_6721, RES_SHARED_VGA }, { PCI_CHIP_BARTS_6722, PCI_CHIP_BARTS_6722, RES_SHARED_VGA }, { PCI_CHIP_BARTS_6723, PCI_CHIP_BARTS_6723, RES_SHARED_VGA }, { PCI_CHIP_BARTS_6724, PCI_CHIP_BARTS_6724, RES_SHARED_VGA }, { PCI_CHIP_BARTS_6725, PCI_CHIP_BARTS_6725, RES_SHARED_VGA }, { PCI_CHIP_BARTS_6726, PCI_CHIP_BARTS_6726, RES_SHARED_VGA }, { PCI_CHIP_BARTS_6727, PCI_CHIP_BARTS_6727, RES_SHARED_VGA }, { PCI_CHIP_BARTS_6728, PCI_CHIP_BARTS_6728, RES_SHARED_VGA }, { PCI_CHIP_BARTS_6729, PCI_CHIP_BARTS_6729, RES_SHARED_VGA }, { PCI_CHIP_BARTS_6738, PCI_CHIP_BARTS_6738, RES_SHARED_VGA }, { PCI_CHIP_BARTS_6739, PCI_CHIP_BARTS_6739, RES_SHARED_VGA }, { PCI_CHIP_BARTS_673E, PCI_CHIP_BARTS_673E, RES_SHARED_VGA }, { PCI_CHIP_TURKS_6740, PCI_CHIP_TURKS_6740, RES_SHARED_VGA }, { PCI_CHIP_TURKS_6741, PCI_CHIP_TURKS_6741, RES_SHARED_VGA }, { PCI_CHIP_TURKS_6742, PCI_CHIP_TURKS_6742, RES_SHARED_VGA }, { PCI_CHIP_TURKS_6743, PCI_CHIP_TURKS_6743, RES_SHARED_VGA }, { PCI_CHIP_TURKS_6744, PCI_CHIP_TURKS_6744, RES_SHARED_VGA }, { PCI_CHIP_TURKS_6745, PCI_CHIP_TURKS_6745, RES_SHARED_VGA }, { PCI_CHIP_TURKS_6746, PCI_CHIP_TURKS_6746, RES_SHARED_VGA }, { PCI_CHIP_TURKS_6747, PCI_CHIP_TURKS_6747, RES_SHARED_VGA }, { PCI_CHIP_TURKS_6748, PCI_CHIP_TURKS_6748, RES_SHARED_VGA }, { PCI_CHIP_TURKS_6749, PCI_CHIP_TURKS_6749, RES_SHARED_VGA }, { PCI_CHIP_TURKS_674A, PCI_CHIP_TURKS_674A, RES_SHARED_VGA }, { PCI_CHIP_TURKS_6750, PCI_CHIP_TURKS_6750, RES_SHARED_VGA }, { PCI_CHIP_TURKS_6751, PCI_CHIP_TURKS_6751, RES_SHARED_VGA }, { PCI_CHIP_TURKS_6758, PCI_CHIP_TURKS_6758, RES_SHARED_VGA }, { PCI_CHIP_TURKS_6759, PCI_CHIP_TURKS_6759, RES_SHARED_VGA }, { PCI_CHIP_TURKS_675B, PCI_CHIP_TURKS_675B, RES_SHARED_VGA }, { PCI_CHIP_TURKS_675D, PCI_CHIP_TURKS_675D, RES_SHARED_VGA }, { PCI_CHIP_TURKS_675F, PCI_CHIP_TURKS_675F, RES_SHARED_VGA }, { PCI_CHIP_TURKS_6840, PCI_CHIP_TURKS_6840, RES_SHARED_VGA }, { PCI_CHIP_TURKS_6841, PCI_CHIP_TURKS_6841, RES_SHARED_VGA }, { PCI_CHIP_TURKS_6842, PCI_CHIP_TURKS_6842, RES_SHARED_VGA }, { PCI_CHIP_TURKS_6843, PCI_CHIP_TURKS_6843, RES_SHARED_VGA }, { PCI_CHIP_TURKS_6849, PCI_CHIP_TURKS_6849, RES_SHARED_VGA }, { PCI_CHIP_TURKS_6850, PCI_CHIP_TURKS_6850, RES_SHARED_VGA }, { PCI_CHIP_TURKS_6858, PCI_CHIP_TURKS_6858, RES_SHARED_VGA }, { PCI_CHIP_TURKS_6859, PCI_CHIP_TURKS_6859, RES_SHARED_VGA }, { PCI_CHIP_CAICOS_6760, PCI_CHIP_CAICOS_6760, RES_SHARED_VGA }, { PCI_CHIP_CAICOS_6761, PCI_CHIP_CAICOS_6761, RES_SHARED_VGA }, { PCI_CHIP_CAICOS_6762, PCI_CHIP_CAICOS_6762, RES_SHARED_VGA }, { PCI_CHIP_CAICOS_6763, PCI_CHIP_CAICOS_6763, RES_SHARED_VGA }, { PCI_CHIP_CAICOS_6764, PCI_CHIP_CAICOS_6764, RES_SHARED_VGA }, { PCI_CHIP_CAICOS_6765, PCI_CHIP_CAICOS_6765, RES_SHARED_VGA }, { PCI_CHIP_CAICOS_6766, PCI_CHIP_CAICOS_6766, RES_SHARED_VGA }, { PCI_CHIP_CAICOS_6767, PCI_CHIP_CAICOS_6767, RES_SHARED_VGA }, { PCI_CHIP_CAICOS_6768, PCI_CHIP_CAICOS_6768, RES_SHARED_VGA }, { PCI_CHIP_CAICOS_6770, PCI_CHIP_CAICOS_6770, RES_SHARED_VGA }, { PCI_CHIP_CAICOS_6771, PCI_CHIP_CAICOS_6771, RES_SHARED_VGA }, { PCI_CHIP_CAICOS_6772, PCI_CHIP_CAICOS_6772, RES_SHARED_VGA }, { PCI_CHIP_CAICOS_6778, PCI_CHIP_CAICOS_6778, RES_SHARED_VGA }, { PCI_CHIP_CAICOS_6779, PCI_CHIP_CAICOS_6779, RES_SHARED_VGA }, { PCI_CHIP_CAICOS_677B, PCI_CHIP_CAICOS_677B, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_9900, PCI_CHIP_ARUBA_9900, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_9901, PCI_CHIP_ARUBA_9901, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_9903, PCI_CHIP_ARUBA_9903, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_9904, PCI_CHIP_ARUBA_9904, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_9905, PCI_CHIP_ARUBA_9905, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_9906, PCI_CHIP_ARUBA_9906, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_9907, PCI_CHIP_ARUBA_9907, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_9908, PCI_CHIP_ARUBA_9908, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_9909, PCI_CHIP_ARUBA_9909, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_990A, PCI_CHIP_ARUBA_990A, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_990B, PCI_CHIP_ARUBA_990B, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_990C, PCI_CHIP_ARUBA_990C, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_990D, PCI_CHIP_ARUBA_990D, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_990E, PCI_CHIP_ARUBA_990E, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_990F, PCI_CHIP_ARUBA_990F, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_9910, PCI_CHIP_ARUBA_9910, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_9913, PCI_CHIP_ARUBA_9913, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_9917, PCI_CHIP_ARUBA_9917, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_9918, PCI_CHIP_ARUBA_9918, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_9919, PCI_CHIP_ARUBA_9919, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_9990, PCI_CHIP_ARUBA_9990, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_9991, PCI_CHIP_ARUBA_9991, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_9992, PCI_CHIP_ARUBA_9992, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_9993, PCI_CHIP_ARUBA_9993, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_9994, PCI_CHIP_ARUBA_9994, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_9995, PCI_CHIP_ARUBA_9995, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_9996, PCI_CHIP_ARUBA_9996, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_9997, PCI_CHIP_ARUBA_9997, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_9998, PCI_CHIP_ARUBA_9998, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_9999, PCI_CHIP_ARUBA_9999, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_999A, PCI_CHIP_ARUBA_999A, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_999B, PCI_CHIP_ARUBA_999B, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_999C, PCI_CHIP_ARUBA_999C, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_999D, PCI_CHIP_ARUBA_999D, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_99A0, PCI_CHIP_ARUBA_99A0, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_99A2, PCI_CHIP_ARUBA_99A2, RES_SHARED_VGA }, { PCI_CHIP_ARUBA_99A4, PCI_CHIP_ARUBA_99A4, RES_SHARED_VGA }, { PCI_CHIP_TAHITI_6780, PCI_CHIP_TAHITI_6780, RES_SHARED_VGA }, { PCI_CHIP_TAHITI_6784, PCI_CHIP_TAHITI_6784, RES_SHARED_VGA }, { PCI_CHIP_TAHITI_6788, PCI_CHIP_TAHITI_6788, RES_SHARED_VGA }, { PCI_CHIP_TAHITI_678A, PCI_CHIP_TAHITI_678A, RES_SHARED_VGA }, { PCI_CHIP_TAHITI_6790, PCI_CHIP_TAHITI_6790, RES_SHARED_VGA }, { PCI_CHIP_TAHITI_6791, PCI_CHIP_TAHITI_6791, RES_SHARED_VGA }, { PCI_CHIP_TAHITI_6792, PCI_CHIP_TAHITI_6792, RES_SHARED_VGA }, { PCI_CHIP_TAHITI_6798, PCI_CHIP_TAHITI_6798, RES_SHARED_VGA }, { PCI_CHIP_TAHITI_6799, PCI_CHIP_TAHITI_6799, RES_SHARED_VGA }, { PCI_CHIP_TAHITI_679A, PCI_CHIP_TAHITI_679A, RES_SHARED_VGA }, { PCI_CHIP_TAHITI_679B, PCI_CHIP_TAHITI_679B, RES_SHARED_VGA }, { PCI_CHIP_TAHITI_679E, PCI_CHIP_TAHITI_679E, RES_SHARED_VGA }, { PCI_CHIP_TAHITI_679F, PCI_CHIP_TAHITI_679F, RES_SHARED_VGA }, { PCI_CHIP_PITCAIRN_6800, PCI_CHIP_PITCAIRN_6800, RES_SHARED_VGA }, { PCI_CHIP_PITCAIRN_6801, PCI_CHIP_PITCAIRN_6801, RES_SHARED_VGA }, { PCI_CHIP_PITCAIRN_6802, PCI_CHIP_PITCAIRN_6802, RES_SHARED_VGA }, { PCI_CHIP_PITCAIRN_6806, PCI_CHIP_PITCAIRN_6806, RES_SHARED_VGA }, { PCI_CHIP_PITCAIRN_6808, PCI_CHIP_PITCAIRN_6808, RES_SHARED_VGA }, { PCI_CHIP_PITCAIRN_6809, PCI_CHIP_PITCAIRN_6809, RES_SHARED_VGA }, { PCI_CHIP_PITCAIRN_6810, PCI_CHIP_PITCAIRN_6810, RES_SHARED_VGA }, { PCI_CHIP_PITCAIRN_6811, PCI_CHIP_PITCAIRN_6811, RES_SHARED_VGA }, { PCI_CHIP_PITCAIRN_6816, PCI_CHIP_PITCAIRN_6816, RES_SHARED_VGA }, { PCI_CHIP_PITCAIRN_6817, PCI_CHIP_PITCAIRN_6817, RES_SHARED_VGA }, { PCI_CHIP_PITCAIRN_6818, PCI_CHIP_PITCAIRN_6818, RES_SHARED_VGA }, { PCI_CHIP_PITCAIRN_6819, PCI_CHIP_PITCAIRN_6819, RES_SHARED_VGA }, { PCI_CHIP_PITCAIRN_684C, PCI_CHIP_PITCAIRN_684C, RES_SHARED_VGA }, { PCI_CHIP_VERDE_6820, PCI_CHIP_VERDE_6820, RES_SHARED_VGA }, { PCI_CHIP_VERDE_6821, PCI_CHIP_VERDE_6821, RES_SHARED_VGA }, { PCI_CHIP_VERDE_6822, PCI_CHIP_VERDE_6822, RES_SHARED_VGA }, { PCI_CHIP_VERDE_6823, PCI_CHIP_VERDE_6823, RES_SHARED_VGA }, { PCI_CHIP_VERDE_6824, PCI_CHIP_VERDE_6824, RES_SHARED_VGA }, { PCI_CHIP_VERDE_6825, PCI_CHIP_VERDE_6825, RES_SHARED_VGA }, { PCI_CHIP_VERDE_6826, PCI_CHIP_VERDE_6826, RES_SHARED_VGA }, { PCI_CHIP_VERDE_6827, PCI_CHIP_VERDE_6827, RES_SHARED_VGA }, { PCI_CHIP_VERDE_6828, PCI_CHIP_VERDE_6828, RES_SHARED_VGA }, { PCI_CHIP_VERDE_6829, PCI_CHIP_VERDE_6829, RES_SHARED_VGA }, { PCI_CHIP_VERDE_682A, PCI_CHIP_VERDE_682A, RES_SHARED_VGA }, { PCI_CHIP_VERDE_682B, PCI_CHIP_VERDE_682B, RES_SHARED_VGA }, { PCI_CHIP_VERDE_682D, PCI_CHIP_VERDE_682D, RES_SHARED_VGA }, { PCI_CHIP_VERDE_682F, PCI_CHIP_VERDE_682F, RES_SHARED_VGA }, { PCI_CHIP_VERDE_6830, PCI_CHIP_VERDE_6830, RES_SHARED_VGA }, { PCI_CHIP_VERDE_6831, PCI_CHIP_VERDE_6831, RES_SHARED_VGA }, { PCI_CHIP_VERDE_6835, PCI_CHIP_VERDE_6835, RES_SHARED_VGA }, { PCI_CHIP_VERDE_6837, PCI_CHIP_VERDE_6837, RES_SHARED_VGA }, { PCI_CHIP_VERDE_6838, PCI_CHIP_VERDE_6838, RES_SHARED_VGA }, { PCI_CHIP_VERDE_6839, PCI_CHIP_VERDE_6839, RES_SHARED_VGA }, { PCI_CHIP_VERDE_683B, PCI_CHIP_VERDE_683B, RES_SHARED_VGA }, { PCI_CHIP_VERDE_683D, PCI_CHIP_VERDE_683D, RES_SHARED_VGA }, { PCI_CHIP_VERDE_683F, PCI_CHIP_VERDE_683F, RES_SHARED_VGA }, { PCI_CHIP_OLAND_6600, PCI_CHIP_OLAND_6600, RES_SHARED_VGA }, { PCI_CHIP_OLAND_6601, PCI_CHIP_OLAND_6601, RES_SHARED_VGA }, { PCI_CHIP_OLAND_6602, PCI_CHIP_OLAND_6602, RES_SHARED_VGA }, { PCI_CHIP_OLAND_6603, PCI_CHIP_OLAND_6603, RES_SHARED_VGA }, { PCI_CHIP_OLAND_6606, PCI_CHIP_OLAND_6606, RES_SHARED_VGA }, { PCI_CHIP_OLAND_6607, PCI_CHIP_OLAND_6607, RES_SHARED_VGA }, { PCI_CHIP_OLAND_6610, PCI_CHIP_OLAND_6610, RES_SHARED_VGA }, { PCI_CHIP_OLAND_6611, PCI_CHIP_OLAND_6611, RES_SHARED_VGA }, { PCI_CHIP_OLAND_6613, PCI_CHIP_OLAND_6613, RES_SHARED_VGA }, { PCI_CHIP_OLAND_6620, PCI_CHIP_OLAND_6620, RES_SHARED_VGA }, { PCI_CHIP_OLAND_6621, PCI_CHIP_OLAND_6621, RES_SHARED_VGA }, { PCI_CHIP_OLAND_6623, PCI_CHIP_OLAND_6623, RES_SHARED_VGA }, { PCI_CHIP_OLAND_6631, PCI_CHIP_OLAND_6631, RES_SHARED_VGA }, { PCI_CHIP_HAINAN_6660, PCI_CHIP_HAINAN_6660, RES_SHARED_VGA }, { PCI_CHIP_HAINAN_6663, PCI_CHIP_HAINAN_6663, RES_SHARED_VGA }, { PCI_CHIP_HAINAN_6664, PCI_CHIP_HAINAN_6664, RES_SHARED_VGA }, { PCI_CHIP_HAINAN_6665, PCI_CHIP_HAINAN_6665, RES_SHARED_VGA }, { PCI_CHIP_HAINAN_6667, PCI_CHIP_HAINAN_6667, RES_SHARED_VGA }, { PCI_CHIP_HAINAN_666F, PCI_CHIP_HAINAN_666F, RES_SHARED_VGA }, { PCI_CHIP_BONAIRE_6640, PCI_CHIP_BONAIRE_6640, RES_SHARED_VGA }, { PCI_CHIP_BONAIRE_6641, PCI_CHIP_BONAIRE_6641, RES_SHARED_VGA }, { PCI_CHIP_BONAIRE_6649, PCI_CHIP_BONAIRE_6649, RES_SHARED_VGA }, { PCI_CHIP_BONAIRE_6650, PCI_CHIP_BONAIRE_6650, RES_SHARED_VGA }, { PCI_CHIP_BONAIRE_6651, PCI_CHIP_BONAIRE_6651, RES_SHARED_VGA }, { PCI_CHIP_BONAIRE_6658, PCI_CHIP_BONAIRE_6658, RES_SHARED_VGA }, { PCI_CHIP_BONAIRE_665C, PCI_CHIP_BONAIRE_665C, RES_SHARED_VGA }, { PCI_CHIP_BONAIRE_665D, PCI_CHIP_BONAIRE_665D, RES_SHARED_VGA }, { PCI_CHIP_KABINI_9830, PCI_CHIP_KABINI_9830, RES_SHARED_VGA }, { PCI_CHIP_KABINI_9831, PCI_CHIP_KABINI_9831, RES_SHARED_VGA }, { PCI_CHIP_KABINI_9832, PCI_CHIP_KABINI_9832, RES_SHARED_VGA }, { PCI_CHIP_KABINI_9833, PCI_CHIP_KABINI_9833, RES_SHARED_VGA }, { PCI_CHIP_KABINI_9834, PCI_CHIP_KABINI_9834, RES_SHARED_VGA }, { PCI_CHIP_KABINI_9835, PCI_CHIP_KABINI_9835, RES_SHARED_VGA }, { PCI_CHIP_KABINI_9836, PCI_CHIP_KABINI_9836, RES_SHARED_VGA }, { PCI_CHIP_KABINI_9837, PCI_CHIP_KABINI_9837, RES_SHARED_VGA }, { PCI_CHIP_KABINI_9838, PCI_CHIP_KABINI_9838, RES_SHARED_VGA }, { PCI_CHIP_KABINI_9839, PCI_CHIP_KABINI_9839, RES_SHARED_VGA }, { PCI_CHIP_KABINI_983A, PCI_CHIP_KABINI_983A, RES_SHARED_VGA }, { PCI_CHIP_KABINI_983B, PCI_CHIP_KABINI_983B, RES_SHARED_VGA }, { PCI_CHIP_KABINI_983C, PCI_CHIP_KABINI_983C, RES_SHARED_VGA }, { PCI_CHIP_KABINI_983D, PCI_CHIP_KABINI_983D, RES_SHARED_VGA }, { PCI_CHIP_KABINI_983E, PCI_CHIP_KABINI_983E, RES_SHARED_VGA }, { PCI_CHIP_KABINI_983F, PCI_CHIP_KABINI_983F, RES_SHARED_VGA }, { PCI_CHIP_KAVERI_1304, PCI_CHIP_KAVERI_1304, RES_SHARED_VGA }, { PCI_CHIP_KAVERI_1305, PCI_CHIP_KAVERI_1305, RES_SHARED_VGA }, { PCI_CHIP_KAVERI_1306, PCI_CHIP_KAVERI_1306, RES_SHARED_VGA }, { PCI_CHIP_KAVERI_1307, PCI_CHIP_KAVERI_1307, RES_SHARED_VGA }, { PCI_CHIP_KAVERI_1309, PCI_CHIP_KAVERI_1309, RES_SHARED_VGA }, { PCI_CHIP_KAVERI_130A, PCI_CHIP_KAVERI_130A, RES_SHARED_VGA }, { PCI_CHIP_KAVERI_130B, PCI_CHIP_KAVERI_130B, RES_SHARED_VGA }, { PCI_CHIP_KAVERI_130C, PCI_CHIP_KAVERI_130C, RES_SHARED_VGA }, { PCI_CHIP_KAVERI_130D, PCI_CHIP_KAVERI_130D, RES_SHARED_VGA }, { PCI_CHIP_KAVERI_130E, PCI_CHIP_KAVERI_130E, RES_SHARED_VGA }, { PCI_CHIP_KAVERI_130F, PCI_CHIP_KAVERI_130F, RES_SHARED_VGA }, { PCI_CHIP_KAVERI_1310, PCI_CHIP_KAVERI_1310, RES_SHARED_VGA }, { PCI_CHIP_KAVERI_1311, PCI_CHIP_KAVERI_1311, RES_SHARED_VGA }, { PCI_CHIP_KAVERI_1312, PCI_CHIP_KAVERI_1312, RES_SHARED_VGA }, { PCI_CHIP_KAVERI_1313, PCI_CHIP_KAVERI_1313, RES_SHARED_VGA }, { PCI_CHIP_KAVERI_1315, PCI_CHIP_KAVERI_1315, RES_SHARED_VGA }, { PCI_CHIP_KAVERI_1316, PCI_CHIP_KAVERI_1316, RES_SHARED_VGA }, { PCI_CHIP_KAVERI_1317, PCI_CHIP_KAVERI_1317, RES_SHARED_VGA }, { PCI_CHIP_KAVERI_131B, PCI_CHIP_KAVERI_131B, RES_SHARED_VGA }, { PCI_CHIP_KAVERI_131C, PCI_CHIP_KAVERI_131C, RES_SHARED_VGA }, { PCI_CHIP_KAVERI_131D, PCI_CHIP_KAVERI_131D, RES_SHARED_VGA }, { PCI_CHIP_HAWAII_67A0, PCI_CHIP_HAWAII_67A0, RES_SHARED_VGA }, { PCI_CHIP_HAWAII_67A1, PCI_CHIP_HAWAII_67A1, RES_SHARED_VGA }, { PCI_CHIP_HAWAII_67A2, PCI_CHIP_HAWAII_67A2, RES_SHARED_VGA }, { PCI_CHIP_HAWAII_67A8, PCI_CHIP_HAWAII_67A8, RES_SHARED_VGA }, { PCI_CHIP_HAWAII_67A9, PCI_CHIP_HAWAII_67A9, RES_SHARED_VGA }, { PCI_CHIP_HAWAII_67AA, PCI_CHIP_HAWAII_67AA, RES_SHARED_VGA }, { PCI_CHIP_HAWAII_67B0, PCI_CHIP_HAWAII_67B0, RES_SHARED_VGA }, { PCI_CHIP_HAWAII_67B1, PCI_CHIP_HAWAII_67B1, RES_SHARED_VGA }, { PCI_CHIP_HAWAII_67B8, PCI_CHIP_HAWAII_67B8, RES_SHARED_VGA }, { PCI_CHIP_HAWAII_67B9, PCI_CHIP_HAWAII_67B9, RES_SHARED_VGA }, { PCI_CHIP_HAWAII_67BA, PCI_CHIP_HAWAII_67BA, RES_SHARED_VGA }, { PCI_CHIP_HAWAII_67BE, PCI_CHIP_HAWAII_67BE, RES_SHARED_VGA }, { -1, -1, RES_UNDEFINED } }; xf86-video-ati-7.3.0/src/radeon_vbo.c0000664000175000017500000001326512177731114014202 00000000000000/* * 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: * Dave Airlie * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "radeon.h" #include "radeon_bo.h" #include "radeon_cs.h" #define VBO_SIZE (16*1024) /* KMS vertex buffer support - for R600 only but could be used on previous gpus */ static struct radeon_bo *radeon_vbo_get_bo(ScrnInfoPtr pScrn); void radeon_vbo_put(ScrnInfoPtr pScrn, struct radeon_vbo_object *vbo) { if (vbo->vb_bo) { radeon_bo_unmap(vbo->vb_bo); radeon_bo_unref(vbo->vb_bo); vbo->vb_bo = NULL; vbo->vb_total = 0; } vbo->vb_offset = 0; } void radeon_vbo_get(ScrnInfoPtr pScrn, struct radeon_vbo_object *vbo) { int ret; vbo->vb_bo = radeon_vbo_get_bo(pScrn); if (vbo->vb_bo) { radeon_bo_ref(vbo->vb_bo); ret = radeon_bo_map(vbo->vb_bo, 1); if (ret) FatalError("Failed to map vb %d\n", ret); } vbo->vb_total = VBO_SIZE; vbo->vb_offset = 0; vbo->vb_start_op = vbo->vb_offset; } /* these functions could migrate to libdrm and be shared with the radeon 3D driver */ static int radeon_bo_is_idle(struct radeon_bo *bo) { uint32_t domain; int ret = radeon_bo_is_busy(bo, &domain); return ret != -EBUSY; } void radeon_vbo_init_lists(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; accel_state->use_vbos = TRUE; make_empty_list(&accel_state->bo_free); make_empty_list(&accel_state->bo_wait); make_empty_list(&accel_state->bo_reserved); } void radeon_vbo_free_lists(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; struct radeon_dma_bo *dma_bo, *temp; foreach_s(dma_bo, temp, &accel_state->bo_free) { remove_from_list(dma_bo); radeon_bo_unref(dma_bo->bo); free(dma_bo); } foreach_s(dma_bo, temp, &accel_state->bo_wait) { remove_from_list(dma_bo); radeon_bo_unref(dma_bo->bo); free(dma_bo); } foreach_s(dma_bo, temp, &accel_state->bo_reserved) { remove_from_list(dma_bo); radeon_bo_unref(dma_bo->bo); free(dma_bo); } } void radeon_vbo_flush_bos(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; struct radeon_dma_bo *dma_bo, *temp; const int expire_at = ++accel_state->bo_free.expire_counter + DMA_BO_FREE_TIME; const int time = accel_state->bo_free.expire_counter; foreach_s(dma_bo, temp, &accel_state->bo_wait) { if (dma_bo->expire_counter == time) { ErrorF("leaking dma buffer\n"); while ((dma_bo->bo = radeon_bo_unref(dma_bo->bo))) {} remove_from_list(dma_bo); free(dma_bo); continue; } if (!radeon_bo_is_idle(dma_bo->bo)) continue; if (dma_bo->bo->ptr) { ErrorF("bo with pointer on wait list!\n"); continue; } remove_from_list(dma_bo); dma_bo->expire_counter = expire_at; insert_at_tail(&accel_state->bo_free, dma_bo); } /* move reserved to wait list */ foreach_s(dma_bo, temp, &accel_state->bo_reserved) { remove_from_list(dma_bo); dma_bo->expire_counter = expire_at; insert_at_tail(&accel_state->bo_wait, dma_bo); } /* free bos that have been unused */ foreach_s(dma_bo, temp, &accel_state->bo_free) { if (dma_bo->expire_counter != time) break; /* always keep one hanging around at end */ if (at_end(&accel_state->bo_free, dma_bo)) { dma_bo->expire_counter = time + DMA_BO_FREE_TIME; break; } remove_from_list(dma_bo); radeon_bo_unref(dma_bo->bo); free(dma_bo); } } static struct radeon_bo *radeon_vbo_get_bo(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; struct radeon_dma_bo *dma_bo = NULL; struct radeon_bo *bo; if (is_empty_list(&accel_state->bo_free)) { dma_bo = calloc(1, sizeof(struct radeon_dma_bo)); if (!dma_bo) return NULL; again_alloc: dma_bo->bo = radeon_bo_open(info->bufmgr, 0, VBO_SIZE, 0, RADEON_GEM_DOMAIN_GTT, 0); if (!dma_bo->bo) { ErrorF("failure to allocate DMA BO\n"); return NULL; } insert_at_head(&accel_state->bo_reserved, dma_bo); } else { dma_bo = last_elem(&accel_state->bo_free); remove_from_list(dma_bo); insert_at_head(&accel_state->bo_reserved, dma_bo); } if (is_empty_list(&accel_state->bo_reserved)) goto again_alloc; bo = first_elem(&accel_state->bo_reserved)->bo; /* need a space check */ if (radeon_cs_space_check_with_bo(info->cs, bo, RADEON_GEM_DOMAIN_GTT, 0)) ErrorF("failed to revalidate\n"); return bo; } xf86-video-ati-7.3.0/src/r600_reg.h0000664000175000017500000001156212177731114013413 00000000000000/* * RadeonHD R6xx, R7xx Register documentation * * Copyright (C) 2008-2009 Advanced Micro Devices, Inc. * Copyright (C) 2008-2009 Matthias Hopf * * 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) 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 _R600_REG_H_ #define _R600_REG_H_ /* * Register definitions */ #include "r600_reg_auto_r6xx.h" #include "r600_reg_r6xx.h" #include "r600_reg_r7xx.h" /* SET_*_REG offsets + ends */ #define SET_CONFIG_REG_offset 0x00008000 #define SET_CONFIG_REG_end 0x0000ac00 #define SET_CONTEXT_REG_offset 0x00028000 #define SET_CONTEXT_REG_end 0x00029000 #define SET_ALU_CONST_offset 0x00030000 #define SET_ALU_CONST_end 0x00032000 #define SET_RESOURCE_offset 0x00038000 #define SET_RESOURCE_end 0x0003c000 #define SET_SAMPLER_offset 0x0003c000 #define SET_SAMPLER_end 0x0003cff0 #define SET_CTL_CONST_offset 0x0003cff0 #define SET_CTL_CONST_end 0x0003e200 #define SET_LOOP_CONST_offset 0x0003e200 #define SET_LOOP_CONST_end 0x0003e380 #define SET_BOOL_CONST_offset 0x0003e380 #define SET_BOOL_CONST_end 0x0003e38c /* packet3 IT_SURFACE_BASE_UPDATE bits */ enum { DEPTH_BASE = (1 << 0), COLOR0_BASE = (1 << 1), COLOR1_BASE = (1 << 2), COLOR2_BASE = (1 << 3), COLOR3_BASE = (1 << 4), COLOR4_BASE = (1 << 5), COLOR5_BASE = (1 << 6), COLOR6_BASE = (1 << 7), COLOR7_BASE = (1 << 8), STRMOUT_BASE0 = (1 << 9), STRMOUT_BASE1 = (1 << 10), STRMOUT_BASE2 = (1 << 11), STRMOUT_BASE3 = (1 << 12), COHER_BASE0 = (1 << 13), COHER_BASE1 = (1 << 14), }; /* Packet3 commands */ enum { IT_NOP = 0x10, IT_INDIRECT_BUFFER_END = 0x17, IT_SET_PREDICATION = 0x20, IT_REG_RMW = 0x21, IT_COND_EXEC = 0x22, IT_PRED_EXEC = 0x23, IT_START_3D_CMDBUF = 0x24, IT_DRAW_INDEX_2 = 0x27, IT_CONTEXT_CONTROL = 0x28, IT_DRAW_INDEX_IMMD_BE = 0x29, IT_INDEX_TYPE = 0x2A, IT_DRAW_INDEX = 0x2B, IT_DRAW_INDEX_AUTO = 0x2D, IT_DRAW_INDEX_IMMD = 0x2E, IT_NUM_INSTANCES = 0x2F, IT_STRMOUT_BUFFER_UPDATE = 0x34, IT_INDIRECT_BUFFER_MP = 0x38, IT_MEM_SEMAPHORE = 0x39, IT_MPEG_INDEX = 0x3A, IT_WAIT_REG_MEM = 0x3C, IT_MEM_WRITE = 0x3D, IT_INDIRECT_BUFFER = 0x32, IT_CP_INTERRUPT = 0x40, IT_SURFACE_SYNC = 0x43, IT_ME_INITIALIZE = 0x44, IT_COND_WRITE = 0x45, IT_EVENT_WRITE = 0x46, IT_EVENT_WRITE_EOP = 0x47, IT_ONE_REG_WRITE = 0x57, IT_SET_CONFIG_REG = 0x68, IT_SET_CONTEXT_REG = 0x69, IT_SET_ALU_CONST = 0x6A, IT_SET_BOOL_CONST = 0x6B, IT_SET_LOOP_CONST = 0x6C, IT_SET_RESOURCE = 0x6D, IT_SET_SAMPLER = 0x6E, IT_SET_CTL_CONST = 0x6F, IT_SURFACE_BASE_UPDATE = 0x73, } ; /* IT_WAIT_REG_MEM operation encoding */ #define IT_WAIT_ALWAYS (0 << 0) #define IT_WAIT_LT (1 << 0) #define IT_WAIT_LE (2 << 0) #define IT_WAIT_EQ (3 << 0) #define IT_WAIT_NE (4 << 0) #define IT_WAIT_GE (5 << 0) #define IT_WAIT_GT (6 << 0) #define IT_WAIT_REG (0 << 4) #define IT_WAIT_MEM (1 << 4) #define IT_WAIT_ADDR(x) ((x) >> 2) /* IT_INDEX_TYPE */ #define IT_INDEX_TYPE_SWAP_MODE(x) ((x) << 2) #endif xf86-video-ati-7.3.0/src/evergreen_shader.h0000664000175000017500000002476312177731114015406 00000000000000/* * Evergreen shaders * * Copyright (C) 2010 Advanced Micro Devices, 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 * BRIAN PAUL 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. */ /* * Shader macros */ #ifndef __SHADER_H__ #define __SHADER_H__ #include "radeon.h" /* Oder of instructions: All CF, All ALU, All Tex/Vtx fetches */ // CF insts // addr #define ADDR(x) (x) // jumptable #define JUMPTABLE_SEL(x) (x) // pc #define POP_COUNT(x) (x) // const #define CF_CONST(x) (x) // cond #define COND(x) (x) // SQ_COND_* // count #define I_COUNT(x) ((x) ? ((x) - 1) : 0) // vpm #define VALID_PIXEL_MODE(x) (x) // eop #define END_OF_PROGRAM(x) (x) // cf inst #define CF_INST(x) (x) // SQ_CF_INST_* // wqm #define WHOLE_QUAD_MODE(x) (x) // barrier #define BARRIER(x) (x) //kb0 #define KCACHE_BANK0(x) (x) //kb1 #define KCACHE_BANK1(x) (x) // km0/1 #define KCACHE_MODE0(x) (x) #define KCACHE_MODE1(x) (x) // SQ_CF_KCACHE_* // #define KCACHE_ADDR0(x) (x) #define KCACHE_ADDR1(x) (x) #define ALT_CONST(x) (x) #define ARRAY_BASE(x) (x) // export pixel #define CF_PIXEL_MRT0 0 #define CF_PIXEL_MRT1 1 #define CF_PIXEL_MRT2 2 #define CF_PIXEL_MRT3 3 #define CF_PIXEL_MRT4 4 #define CF_PIXEL_MRT5 5 #define CF_PIXEL_MRT6 6 #define CF_PIXEL_MRT7 7 // computed Z #define CF_COMPUTED_Z 61 // export pos #define CF_POS0 60 #define CF_POS1 61 #define CF_POS2 62 #define CF_POS3 63 // export param // 0...31 #define TYPE(x) (x) // SQ_EXPORT_* #define RW_GPR(x) (x) #define RW_REL(x) (x) #define ABSOLUTE 0 #define RELATIVE 1 #define INDEX_GPR(x) (x) #define ELEM_SIZE(x) (x ? (x - 1) : 0) #define BURST_COUNT(x) (x ? (x - 1) : 0) #define MARK(x) (x) // swiz #define SRC_SEL_X(x) (x) // SQ_SEL_* each #define SRC_SEL_Y(x) (x) #define SRC_SEL_Z(x) (x) #define SRC_SEL_W(x) (x) #define CF_DWORD0(addr, jmptbl) cpu_to_le32(((addr) | ((jmptbl) << 24))) #define CF_DWORD1(pc, cf_const, cond, count, vpm, eop, cf_inst, wqm, b) \ cpu_to_le32((((pc) << 0) | ((cf_const) << 3) | ((cond) << 8) | ((count) << 10) | \ ((vpm) << 20) | ((eop) << 21) | ((cf_inst) << 22) | ((wqm) << 30) | ((b) << 31))) #define CF_ALU_DWORD0(addr, kb0, kb1, km0) cpu_to_le32((((addr) << 0) | ((kb0) << 22) | ((kb1) << 26) | ((km0) << 30))) #define CF_ALU_DWORD1(km1, kcache_addr0, kcache_addr1, count, alt_const, cf_inst, wqm, b) \ cpu_to_le32((((km1) << 0) | ((kcache_addr0) << 2) | ((kcache_addr1) << 10) | \ ((count) << 18) | ((alt_const) << 25) | ((cf_inst) << 26) | ((wqm) << 30) | ((b) << 31))) #define CF_ALLOC_IMP_EXP_DWORD0(array_base, type, rw_gpr, rr, index_gpr, es) \ cpu_to_le32((((array_base) << 0) | ((type) << 13) | ((rw_gpr) << 15) | ((rr) << 22) | \ ((index_gpr) << 23) | ((es) << 30))) #define CF_ALLOC_IMP_EXP_DWORD1_SWIZ(sel_x, sel_y, sel_z, sel_w, bc, vpm, eop, cf_inst, m, b) \ cpu_to_le32((((sel_x) << 0) | ((sel_y) << 3) | ((sel_z) << 6) | ((sel_w) << 9) | \ ((bc) << 16) | ((vpm) << 20) | ((eop) << 21) | ((cf_inst) << 22) | \ ((m) << 30) | ((b) << 31))) // ALU clause insts #define SRC0_SEL(x) (x) #define SRC1_SEL(x) (x) #define SRC2_SEL(x) (x) // src[0-2]_sel // 0-127 GPR // 128-159 kcache constants bank 0 // 160-191 kcache constants bank 1 // 192-255 inline const values // 256-287 kcache constants bank 2 // 288-319 kcache constants bank 3 // 219-255 special SQ_ALU_SRC_* (0, 1, etc.) // 488-520 src param space #define ALU_SRC_GPR_BASE 0 #define ALU_SRC_KCACHE0_BASE 128 #define ALU_SRC_KCACHE1_BASE 160 #define ALU_SRC_INLINE_K_BASE 192 #define ALU_SRC_KCACHE2_BASE 256 #define ALU_SRC_KCACHE3_BASE 288 #define ALU_SRC_PARAM_BASE 448 #define SRC0_REL(x) (x) #define SRC1_REL(x) (x) #define SRC2_REL(x) (x) // elem #define SRC0_ELEM(x) (x) #define SRC1_ELEM(x) (x) #define SRC2_ELEM(x) (x) #define ELEM_X 0 #define ELEM_Y 1 #define ELEM_Z 2 #define ELEM_W 3 // neg #define SRC0_NEG(x) (x) #define SRC1_NEG(x) (x) #define SRC2_NEG(x) (x) // im #define INDEX_MODE(x) (x) // SQ_INDEX_* // ps #define PRED_SEL(x) (x) // SQ_PRED_SEL_* // last #define LAST(x) (x) // abs #define SRC0_ABS(x) (x) #define SRC1_ABS(x) (x) // uem #define UPDATE_EXECUTE_MASK(x) (x) // up #define UPDATE_PRED(x) (x) // wm #define WRITE_MASK(x) (x) // omod #define OMOD(x) (x) // SQ_ALU_OMOD_* // alu inst #define ALU_INST(x) (x) // SQ_ALU_INST_* //bs #define BANK_SWIZZLE(x) (x) // SQ_ALU_VEC_* #define DST_GPR(x) (x) #define DST_REL(x) (x) #define DST_ELEM(x) (x) #define CLAMP(x) (x) #define ALU_DWORD0(src0_sel, s0r, s0e, s0n, src1_sel, s1r, s1e, s1n, im, ps, last) \ cpu_to_le32((((src0_sel) << 0) | ((s0r) << 9) | ((s0e) << 10) | ((s0n) << 12) | \ ((src1_sel) << 13) | ((s1r) << 22) | ((s1e) << 23) | ((s1n) << 25) | \ ((im) << 26) | ((ps) << 29) | ((last) << 31))) #define ALU_DWORD1_OP2(s0a, s1a, uem, up, wm, omod, alu_inst, bs, dst_gpr, dr, de, clamp) \ cpu_to_le32((((s0a) << 0) | ((s1a) << 1) | ((uem) << 2) | ((up) << 3) | ((wm) << 4) | \ ((omod) << 5) | ((alu_inst) << 7) | ((bs) << 18) | ((dst_gpr) << 21) | \ ((dr) << 28) | ((de) << 29) | ((clamp) << 31))) #define ALU_DWORD1_OP3(src2_sel, s2r, s2e, s2n, alu_inst, bs, dst_gpr, dr, de, clamp) \ cpu_to_le32((((src2_sel) << 0) | ((s2r) << 9) | ((s2e) << 10) | ((s2n) << 12) | \ ((alu_inst) << 13) | ((bs) << 18) | ((dst_gpr) << 21) | ((dr) << 28) | \ ((de) << 29) | ((clamp) << 31))) // VTX clause insts // vxt insts #define VTX_INST(x) (x) // SQ_VTX_INST_* // fetch type #define FETCH_TYPE(x) (x) // SQ_VTX_FETCH_* #define FETCH_WHOLE_QUAD(x) (x) #define BUFFER_ID(x) (x) #define SRC_GPR(x) (x) #define SRC_REL(x) (x) #define MEGA_FETCH_COUNT(x) ((x) ? ((x) - 1) : 0) #define DST_SEL_X(x) (x) #define DST_SEL_Y(x) (x) #define DST_SEL_Z(x) (x) #define DST_SEL_W(x) (x) #define USE_CONST_FIELDS(x) (x) #define DATA_FORMAT(x) (x) // num format #define NUM_FORMAT_ALL(x) (x) // SQ_NUM_FORMAT_* // format comp #define FORMAT_COMP_ALL(x) (x) // SQ_FORMAT_COMP_* // sma #define SRF_MODE_ALL(x) (x) #define SRF_MODE_ZERO_CLAMP_MINUS_ONE 0 #define SRF_MODE_NO_ZERO 1 #define OFFSET(x) (x) // endian swap #define ENDIAN_SWAP(x) (x) // SQ_ENDIAN_* #define CONST_BUF_NO_STRIDE(x) (x) // mf #define MEGA_FETCH(x) (x) #define BUFFER_INDEX_MODE(x) (x) #define VTX_DWORD0(vtx_inst, ft, fwq, buffer_id, src_gpr, sr, ssx, mfc) \ cpu_to_le32((((vtx_inst) << 0) | ((ft) << 5) | ((fwq) << 7) | ((buffer_id) << 8) | \ ((src_gpr) << 16) | ((sr) << 23) | ((ssx) << 24) | ((mfc) << 26))) #define VTX_DWORD1_GPR(dst_gpr, dr, dsx, dsy, dsz, dsw, ucf, data_format, nfa, fca, sma) \ cpu_to_le32((((dst_gpr) << 0) | ((dr) << 7) | ((dsx) << 9) | ((dsy) << 12) | ((dsz) << 15) | ((dsw) << 18) | \ ((ucf) << 21) | ((data_format) << 22) | ((nfa) << 28) | ((fca) << 30) | ((sma) << 31))) #define VTX_DWORD2(offset, es, cbns, mf, alt_const, bim) \ cpu_to_le32((((offset) << 0) | ((es) << 16) | ((cbns) << 18) | ((mf) << 19) | ((alt_const) << 20) | ((bim) << 21))) #define VTX_DWORD_PAD cpu_to_le32(0x00000000) // TEX clause insts // tex insts #define TEX_INST(x) (x) // SQ_TEX_INST_* #define INST_MOD(x) (x) #define FETCH_WHOLE_QUAD(x) (x) #define RESOURCE_ID(x) (x) #define RESOURCE_INDEX_MODE(x) (x) #define SAMPLER_INDEX_MODE(x) (x) #define LOD_BIAS(x) (x) //ct #define COORD_TYPE_X(x) (x) #define COORD_TYPE_Y(x) (x) #define COORD_TYPE_Z(x) (x) #define COORD_TYPE_W(x) (x) #define TEX_UNNORMALIZED 0 #define TEX_NORMALIZED 1 #define OFFSET_X(x) (((int)(x) * 2) & 0x1f) /* 4:1-bits 2's-complement fixed-point: [-8.0..7.5] */ #define OFFSET_Y(x) (((int)(x) * 2) & 0x1f) #define OFFSET_Z(x) (((int)(x) * 2) & 0x1f) #define SAMPLER_ID(x) (x) #define TEX_DWORD0(tex_inst, im, fwq, resource_id, src_gpr, sr, ac, rim, sim) \ cpu_to_le32((((tex_inst) << 0) | ((im) << 5) | ((fwq) << 7) | ((resource_id) << 8) | \ ((src_gpr) << 16) | ((sr) << 23) | ((ac) << 24) | ((rim) << 25) | ((sim) << 27))) #define TEX_DWORD1(dst_gpr, dr, dsx, dsy, dsz, dsw, lod_bias, ctx, cty, ctz, ctw) \ cpu_to_le32((((dst_gpr) << 0) | ((dr) << 7) | ((dsx) << 9) | ((dsy) << 12) | ((dsz) << 15) | ((dsw) << 18) | \ ((lod_bias) << 21) | ((ctx) << 28) | ((cty) << 29) | ((ctz) << 30) | ((ctw) << 31))) #define TEX_DWORD2(offset_x, offset_y, offset_z, sampler_id, ssx, ssy, ssz, ssw) \ cpu_to_le32((((offset_x) << 0) | ((offset_y) << 5) | ((offset_z) << 10) | ((sampler_id) << 15) | \ ((ssx) << 20) | ((ssy) << 23) | ((ssz) << 26) | ((ssw) << 29))) #define TEX_DWORD_PAD cpu_to_le32(0x00000000) extern int evergreen_solid_vs(RADEONChipFamily ChipSet, uint32_t* vs); extern int evergreen_solid_ps(RADEONChipFamily ChipSet, uint32_t* ps); extern int evergreen_copy_vs(RADEONChipFamily ChipSet, uint32_t* vs); extern int evergreen_copy_ps(RADEONChipFamily ChipSet, uint32_t* ps); extern int evergreen_xv_vs(RADEONChipFamily ChipSet, uint32_t* shader); extern int evergreen_xv_ps(RADEONChipFamily ChipSet, uint32_t* shader); extern int evergreen_comp_vs(RADEONChipFamily ChipSet, uint32_t* vs); extern int evergreen_comp_ps(RADEONChipFamily ChipSet, uint32_t* ps); #endif xf86-video-ati-7.3.0/src/atipciids.h0000664000175000017500000000375312177731114014043 00000000000000/* * Copyright (c) 1995-2003 by The XFree86 Project, 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. * * Except as contained in this notice, the name of the copyright holder(s) * and author(s) shall not be used in advertising or otherwise to promote * the sale, use or other dealings in this Software without prior written * authorization from the copyright holder(s) and author(s). */ /* * This file is a replacement for xf86PciInfo.h moving ATI related PCI IDs * locally to the driver module */ #ifndef _ATIPCIIDS_H #define _ATIPCIIDS_H /* PCI Vendor */ #define PCI_VENDOR_ASUS 0x1043 #define PCI_VENDOR_ATI 0x1002 #define PCI_VENDOR_IBM 0x1014 #define PCI_VENDOR_AMD 0x1022 #define PCI_VENDOR_DELL 0x1028 #define PCI_VENDOR_VIA 0x1106 #define PCI_VENDOR_INTEL 0x8086 #ifndef PCI_VENDOR_HP #define PCI_VENDOR_HP 0x103c #endif #define PCI_VENDOR_SONY 0x104D #include "ati_pciids_gen.h" /* Misc */ #define PCI_CHIP_AMD761 0x700E #endif /* _ATIPCIIDS_H */ xf86-video-ati-7.3.0/src/radeon_textured_video.c0000664000175000017500000006064012177731114016445 00000000000000/* * Copyright 2008 Alex Deucher * * 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. * * * Based on radeon_exa_render.c and kdrive ati_video.c by Eric Anholt, et al. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include "radeon.h" #include "radeon_reg.h" #include "radeon_probe.h" #include "radeon_video.h" #include #include "fourcc.h" extern void R600DisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv); extern void EVERGREENDisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv); #define IMAGE_MAX_WIDTH 2048 #define IMAGE_MAX_HEIGHT 2048 #define IMAGE_MAX_WIDTH_R500 4096 #define IMAGE_MAX_HEIGHT_R500 4096 #define IMAGE_MAX_WIDTH_R600 8192 #define IMAGE_MAX_HEIGHT_R600 8192 #define IMAGE_MAX_WIDTH_EG 16384 #define IMAGE_MAX_HEIGHT_EG 16384 static Bool RADEONTilingEnabled(ScrnInfoPtr pScrn, PixmapPtr pPix) { return FALSE; } static __inline__ uint32_t F_TO_DW(float val) { union { float f; uint32_t l; } tmp; tmp.f = val; return tmp.l; } /* Borrowed from Mesa */ static __inline__ uint32_t F_TO_24(float val) { float mantissa; int exponent; uint32_t float24 = 0; if (val == 0.0) return 0; mantissa = frexpf(val, &exponent); /* Handle -ve */ if (mantissa < 0) { float24 |= (1 << 23); mantissa = mantissa * -1.0; } /* Handle exponent, bias of 63 */ exponent += 62; float24 |= (exponent << 16); /* Kill 7 LSB of mantissa */ float24 |= (F_TO_DW(mantissa) & 0x7FFFFF) >> 7; return float24; } static __inline__ uint32_t float4touint(float fr, float fg, float fb, float fa) { unsigned ur = fr * 255.0 + 0.5; unsigned ug = fg * 255.0 + 0.5; unsigned ub = fb * 255.0 + 0.5; unsigned ua = fa * 255.0 + 0.5; return (ua << 24) | (ur << 16) | (ug << 8) | ub; } /* Parameters for ITU-R BT.601 and ITU-R BT.709 colour spaces note the difference to the parameters used in overlay are due to 10bit vs. float calcs */ static REF_TRANSFORM trans[2] = { {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 */ }; /* Allocates memory, either by resizing the allocation pointed to by mem_struct, * or by freeing mem_struct (if non-NULL) and allocating a new space. The size * is measured in bytes, and the offset from the beginning of card space is * returned. */ static Bool radeon_allocate_video_bo(ScrnInfoPtr pScrn, struct radeon_bo **video_bo_p, int size, int align, int domain) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_bo *video_bo; if (*video_bo_p) radeon_bo_unref(*video_bo_p); video_bo = radeon_bo_open(info->bufmgr, 0, size, align, domain, 0); *video_bo_p = video_bo; if (!video_bo) return FALSE; return TRUE; } static void RADEONFreeVideoMemory(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) { if (pPriv->video_memory != NULL) { radeon_bo_unref(pPriv->video_memory); pPriv->video_memory = NULL; if (pPriv->textured) { pPriv->src_bo[0] = NULL; radeon_bo_unref(pPriv->src_bo[1]); pPriv->src_bo[1] = NULL; } } } static void RADEONStopVideo(ScrnInfoPtr pScrn, pointer data, Bool cleanup) { RADEONPortPrivPtr pPriv = (RADEONPortPrivPtr)data; if (pPriv->textured) { if (cleanup) { RADEONFreeVideoMemory(pScrn, pPriv); } return; } } #define OUT_ACCEL_REG_F(reg, val) OUT_RING_REG(reg, F_TO_DW(val)) #include "radeon_textured_videofuncs.c" #undef OUT_ACCEL_REG_F static void R600CopyData( ScrnInfoPtr pScrn, unsigned char *src, unsigned char *dst, unsigned int srcPitch, unsigned int dstPitch, unsigned int h, unsigned int w, unsigned int cpp ){ if (cpp == 2) { w *= 2; cpp = 1; } if (srcPitch == dstPitch) memcpy(dst, src, srcPitch * h); else { while (h--) { memcpy(dst, src, srcPitch); src += srcPitch; dst += dstPitch; } } } static int RADEONPutImageTextured(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) { ScreenPtr pScreen = pScrn->pScreen; RADEONInfoPtr info = RADEONPTR(pScrn); RADEONPortPrivPtr pPriv = (RADEONPortPrivPtr)data; INT32 x1, x2, y1, y2; int srcPitch, srcPitch2, dstPitch, dstPitch2 = 0; int s2offset, s3offset, tmp; int d2line, d3line; int top, nlines, size; BoxRec dstBox; int dst_width = width, dst_height = height; int aligned_height; int h_align = drmmode_get_height_align(pScrn, 0); struct radeon_bo *src_bo; int ret; /* make the compiler happy */ s2offset = s3offset = srcPitch2 = 0; /* Clip */ x1 = src_x; x2 = src_x + src_w; y1 = src_y; y2 = 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, &x1, &x2, &y1, &y2, clipBoxes, width, height)) return Success; if ((x1 >= x2) || (y1 >= y2)) return Success; /* Bicubic filter setup */ pPriv->bicubic_enabled = (pPriv->bicubic_state != BICUBIC_OFF); if (!(IS_R300_3D || IS_R500_3D)) { pPriv->bicubic_enabled = FALSE; pPriv->bicubic_state = BICUBIC_OFF; } if (pPriv->bicubic_enabled && (pPriv->bicubic_state == BICUBIC_AUTO)) { /* * Applying the bicubic filter with a scale of less than 200% * results in a blurred picture, so disable the filter. */ if ((src_w > drw_w / 2) || (src_h > drw_h / 2)) pPriv->bicubic_enabled = FALSE; } if (info->ChipFamily >= CHIP_FAMILY_R600) pPriv->hw_align = drmmode_get_base_align(pScrn, 2, 0); else pPriv->hw_align = 64; aligned_height = RADEON_ALIGN(dst_height, h_align); switch(id) { case FOURCC_YV12: case FOURCC_I420: srcPitch = RADEON_ALIGN(width, 4); srcPitch2 = RADEON_ALIGN(width >> 1, 4); if (pPriv->bicubic_state != BICUBIC_OFF) { dstPitch = RADEON_ALIGN(dst_width << 1, pPriv->hw_align); dstPitch2 = 0; } else { dstPitch = RADEON_ALIGN(dst_width, pPriv->hw_align); dstPitch2 = RADEON_ALIGN(dstPitch >> 1, pPriv->hw_align); } break; case FOURCC_UYVY: case FOURCC_YUY2: default: dstPitch = RADEON_ALIGN(dst_width << 1, pPriv->hw_align); srcPitch = (width << 1); srcPitch2 = 0; break; } size = dstPitch * aligned_height + 2 * dstPitch2 * RADEON_ALIGN(((aligned_height + 1) >> 1), h_align); size = RADEON_ALIGN(size, pPriv->hw_align); if (size != pPriv->size) { RADEONFreeVideoMemory(pScrn, pPriv); } if (pPriv->video_memory == NULL) { Bool ret; ret = radeon_allocate_video_bo(pScrn, &pPriv->video_memory, size, pPriv->hw_align, RADEON_GEM_DOMAIN_GTT); if (ret == FALSE) return BadAlloc; pPriv->src_bo[0] = pPriv->video_memory; radeon_allocate_video_bo(pScrn, (void*)&pPriv->src_bo[1], size, pPriv->hw_align, RADEON_GEM_DOMAIN_GTT); } /* Bicubic filter loading */ if (pPriv->bicubic_enabled) { if (info->bicubic_bo == NULL) pPriv->bicubic_enabled = FALSE; } if (pDraw->type == DRAWABLE_WINDOW) pPriv->pPixmap = (*pScreen->GetWindowPixmap)((WindowPtr)pDraw); else pPriv->pPixmap = (PixmapPtr)pDraw; /* Force the pixmap into framebuffer so we can draw to it. */ info->exa_force_create = TRUE; exaMoveInPixmap(pPriv->pPixmap); info->exa_force_create = FALSE; /* copy data */ top = (y1 >> 16) & ~1; nlines = ((y2 + 0xffff) >> 16) - top; pPriv->currentBuffer ^= 1; src_bo = pPriv->src_bo[pPriv->currentBuffer]; ret = radeon_bo_map(src_bo, 1); if (ret) return BadAlloc; pPriv->src_addr = src_bo->ptr; pPriv->src_pitch = dstPitch; pPriv->planeu_offset = dstPitch * aligned_height; pPriv->planeu_offset = RADEON_ALIGN(pPriv->planeu_offset, pPriv->hw_align); pPriv->planev_offset = pPriv->planeu_offset + dstPitch2 * RADEON_ALIGN(((aligned_height + 1) >> 1), h_align); pPriv->planev_offset = RADEON_ALIGN(pPriv->planev_offset, pPriv->hw_align); pPriv->size = size; pPriv->pDraw = pDraw; switch(id) { case FOURCC_YV12: case FOURCC_I420: s2offset = srcPitch * (RADEON_ALIGN(height, 2)); s3offset = s2offset + (srcPitch2 * ((height + 1) >> 1)); s2offset += ((top >> 1) * srcPitch2); s3offset += ((top >> 1) * srcPitch2); if (pPriv->bicubic_state != BICUBIC_OFF) { if (id == FOURCC_I420) { tmp = s2offset; s2offset = s3offset; s3offset = tmp; } RADEONCopyMungedData(pScrn, buf + (top * srcPitch), buf + s2offset, buf + s3offset, pPriv->src_addr + (top * dstPitch), srcPitch, srcPitch2, dstPitch, nlines, width); } else { if (id == FOURCC_YV12) { tmp = s2offset; s2offset = s3offset; s3offset = tmp; } d2line = pPriv->planeu_offset + ((top >> 1) * dstPitch2); d3line = pPriv->planev_offset + ((top >> 1) * dstPitch2); if (info->ChipFamily >= CHIP_FAMILY_R600) { R600CopyData(pScrn, buf + (top * srcPitch), pPriv->src_addr + (top * dstPitch), srcPitch, dstPitch, nlines, width, 1); R600CopyData(pScrn, buf + s2offset, pPriv->src_addr + d2line, srcPitch2, dstPitch2, (nlines + 1) >> 1, width >> 1, 1); R600CopyData(pScrn, buf + s3offset, pPriv->src_addr + d3line, srcPitch2, dstPitch2, (nlines + 1) >> 1, width >> 1, 1); } else { RADEONCopyData(pScrn, buf + (top * srcPitch), pPriv->src_addr + (top * dstPitch), srcPitch, dstPitch, nlines, width, 1); RADEONCopyData(pScrn, buf + s2offset, pPriv->src_addr + d2line, srcPitch2, dstPitch2, (nlines + 1) >> 1, width >> 1, 1); RADEONCopyData(pScrn, buf + s3offset, pPriv->src_addr + d3line, srcPitch2, dstPitch2, (nlines + 1) >> 1, width >> 1, 1); } } break; case FOURCC_UYVY: case FOURCC_YUY2: default: if (info->ChipFamily >= CHIP_FAMILY_R600) R600CopyData(pScrn, buf + (top * srcPitch), pPriv->src_addr + (top * dstPitch), srcPitch, dstPitch, nlines, width, 2); else RADEONCopyData(pScrn, buf + (top * srcPitch), pPriv->src_addr + (top * dstPitch), srcPitch, dstPitch, nlines, width, 2); break; } /* update cliplist */ if (!REGION_EQUAL(pScrn->pScreen, &pPriv->clip, clipBoxes)) { REGION_COPY(pScrn->pScreen, &pPriv->clip, clipBoxes); } pPriv->id = id; pPriv->src_w = src_w; pPriv->src_h = src_h; pPriv->src_x = src_x; pPriv->src_y = src_y; pPriv->drw_x = drw_x; pPriv->drw_y = drw_y; pPriv->dst_w = drw_w; pPriv->dst_h = drw_h; pPriv->w = width; pPriv->h = height; radeon_bo_unmap(pPriv->src_bo[pPriv->currentBuffer]); if (info->directRenderingEnabled) { if (IS_EVERGREEN_3D) EVERGREENDisplayTexturedVideo(pScrn, pPriv); else if (IS_R600_3D) R600DisplayTexturedVideo(pScrn, pPriv); else if (IS_R500_3D) R500DisplayTexturedVideo(pScrn, pPriv); else if (IS_R300_3D) R300DisplayTexturedVideo(pScrn, pPriv); else if (IS_R200_3D) R200DisplayTexturedVideo(pScrn, pPriv); else RADEONDisplayTexturedVideo(pScrn, pPriv); } return Success; } /* client libraries expect an encoding */ static XF86VideoEncodingRec DummyEncoding[1] = { { 0, "XV_IMAGE", IMAGE_MAX_WIDTH, IMAGE_MAX_HEIGHT, {1, 1} } }; static XF86VideoEncodingRec DummyEncodingR500[1] = { { 0, "XV_IMAGE", IMAGE_MAX_WIDTH_R500, IMAGE_MAX_HEIGHT_R500, {1, 1} } }; static XF86VideoEncodingRec DummyEncodingR600[1] = { { 0, "XV_IMAGE", IMAGE_MAX_WIDTH_R600, IMAGE_MAX_HEIGHT_R600, {1, 1} } }; static XF86VideoEncodingRec DummyEncodingEG[1] = { { 0, "XV_IMAGE", IMAGE_MAX_WIDTH_EG, IMAGE_MAX_HEIGHT_EG, {1, 1} } }; #define NUM_FORMATS 3 static XF86VideoFormatRec Formats[NUM_FORMATS] = { {15, TrueColor}, {16, TrueColor}, {24, TrueColor} }; #define NUM_ATTRIBUTES 2 static XF86AttributeRec Attributes[NUM_ATTRIBUTES+1] = { {XvSettable | XvGettable, 0, 1, "XV_VSYNC"}, {XvSettable | XvGettable, -1, 1, "XV_CRTC"}, {0, 0, 0, NULL} }; #define NUM_ATTRIBUTES_R200 7 static XF86AttributeRec Attributes_r200[NUM_ATTRIBUTES_R200+1] = { {XvSettable | XvGettable, 0, 1, "XV_VSYNC"}, {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_COLORSPACE"}, {XvSettable | XvGettable, -1, 1, "XV_CRTC"}, {0, 0, 0, NULL} }; #define NUM_ATTRIBUTES_R300 9 static XF86AttributeRec Attributes_r300[NUM_ATTRIBUTES_R300+1] = { {XvSettable | XvGettable, 0, 2, "XV_BICUBIC"}, {XvSettable | XvGettable, 0, 1, "XV_VSYNC"}, {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, 100, 10000, "XV_GAMMA"}, {XvSettable | XvGettable, 0, 1, "XV_COLORSPACE"}, {XvSettable | XvGettable, -1, 1, "XV_CRTC"}, {0, 0, 0, NULL} }; #define NUM_ATTRIBUTES_R500 8 static XF86AttributeRec Attributes_r500[NUM_ATTRIBUTES_R500+1] = { {XvSettable | XvGettable, 0, 2, "XV_BICUBIC"}, {XvSettable | XvGettable, 0, 1, "XV_VSYNC"}, {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_COLORSPACE"}, {XvSettable | XvGettable, -1, 1, "XV_CRTC"}, {0, 0, 0, NULL} }; #define NUM_ATTRIBUTES_R600 7 static XF86AttributeRec Attributes_r600[NUM_ATTRIBUTES_R600+1] = { {XvSettable | XvGettable, 0, 1, "XV_VSYNC"}, {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_COLORSPACE"}, {XvSettable | XvGettable, -1, 1, "XV_CRTC"}, {0, 0, 0, NULL} }; static XF86AttributeRec Attributes_eg[NUM_ATTRIBUTES_R600+1] = { {XvSettable | XvGettable, 0, 1, "XV_VSYNC"}, {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_COLORSPACE"}, {XvSettable | XvGettable, -1, 5, "XV_CRTC"}, {0, 0, 0, NULL} }; static Atom xvBicubic; static Atom xvVSync; static Atom xvBrightness, xvContrast, xvSaturation, xvHue; static Atom xvGamma, xvColorspace; static Atom xvCRTC; #define NUM_IMAGES 4 static XF86ImageRec Images[NUM_IMAGES] = { XVIMAGE_YUY2, XVIMAGE_YV12, XVIMAGE_I420, XVIMAGE_UYVY }; int RADEONGetTexPortAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 *value, pointer data) { RADEONInfoPtr info = RADEONPTR(pScrn); RADEONPortPrivPtr pPriv = (RADEONPortPrivPtr)data; if (info->accelOn) RADEON_SYNC(info, pScrn); if (attribute == xvBicubic) *value = pPriv->bicubic_state; else if (attribute == xvVSync) *value = pPriv->vsync; 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 == xvGamma) *value = pPriv->gamma; else if(attribute == xvColorspace) *value = pPriv->transform_index; else if(attribute == xvCRTC) { int c; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); for (c = 0; c < xf86_config->num_crtc; c++) if (xf86_config->crtc[c] == pPriv->desired_crtc) break; if (c == xf86_config->num_crtc) c = -1; *value = c; } else return BadMatch; return Success; } int RADEONSetTexPortAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 value, pointer data) { RADEONInfoPtr info = RADEONPTR(pScrn); RADEONPortPrivPtr pPriv = (RADEONPortPrivPtr)data; RADEON_SYNC(info, pScrn); if (attribute == xvBicubic) pPriv->bicubic_state = ClipValue (value, 0, 2); else if (attribute == xvVSync) pPriv->vsync = ClipValue (value, 0, 1); else if (attribute == xvBrightness) pPriv->brightness = ClipValue (value, -1000, 1000); else if (attribute == xvContrast) pPriv->contrast = ClipValue (value, -1000, 1000); else if (attribute == xvSaturation) pPriv->saturation = ClipValue (value, -1000, 1000); else if (attribute == xvHue) pPriv->hue = ClipValue (value, -1000, 1000); else if (attribute == xvGamma) pPriv->gamma = ClipValue (value, 100, 10000); else if(attribute == xvColorspace) pPriv->transform_index = ClipValue (value, 0, 1); else if(attribute == xvCRTC) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); if ((value < -1) || (value > xf86_config->num_crtc)) return BadValue; if (value < 0) pPriv->desired_crtc = NULL; else pPriv->desired_crtc = xf86_config->crtc[value]; } else return BadMatch; return Success; } Bool radeon_load_bicubic_texture(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); int ret; /* Bicubic filter loading */ ret = radeon_allocate_video_bo(pScrn, &info->bicubic_bo, sizeof(bicubic_tex_512), 64, RADEON_GEM_DOMAIN_VRAM); if (ret == FALSE) return FALSE; /* Upload bicubic filter tex */ if (info->ChipFamily < CHIP_FAMILY_R600) { uint8_t *bicubic_addr; int ret; ret = radeon_bo_map(info->bicubic_bo, 1); if (ret) return FALSE; bicubic_addr = info->bicubic_bo->ptr; RADEONCopySwap(bicubic_addr, (uint8_t *)bicubic_tex_512, 1024, #if X_BYTE_ORDER == X_BIG_ENDIAN RADEON_HOST_DATA_SWAP_16BIT #else RADEON_HOST_DATA_SWAP_NONE #endif ); radeon_bo_unmap(info->bicubic_bo); } return TRUE; } #if 0 /* XXX */ static void radeon_unload_bicubic_texture(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); if (info->bicubic_memory != NULL) { radeon_bo_unref(info->bicubic_memory); info->bicubic_memory = NULL; } } #endif static void RADEONQueryBestSize( 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 ){ RADEONPortPrivPtr pPriv = (RADEONPortPrivPtr)data; if (!pPriv->textured) { if (vid_w > (drw_w << 4)) drw_w = vid_w >> 4; if (vid_h > (drw_h << 4)) drw_h = vid_h >> 4; } *p_w = drw_w; *p_h = drw_h; } #define FOURCC_RGB24 0x00000000 #define FOURCC_RGBT16 0x54424752 #define FOURCC_RGB16 0x32424752 #define FOURCC_RGBA32 0x41424752 static int RADEONQueryImageAttributes( ScrnInfoPtr pScrn, int id, unsigned short *w, unsigned short *h, int *pitches, int *offsets ){ const RADEONInfoRec * const info = RADEONPTR(pScrn); int size, tmp; if(*w > info->xv_max_width) *w = info->xv_max_width; if(*h > info->xv_max_height) *h = info->xv_max_height; *w = RADEON_ALIGN(*w, 2); if(offsets) offsets[0] = 0; switch(id) { case FOURCC_YV12: case FOURCC_I420: *h = RADEON_ALIGN(*h, 2); size = RADEON_ALIGN(*w, 4); if(pitches) pitches[0] = size; size *= *h; if(offsets) offsets[1] = size; tmp = RADEON_ALIGN(*w >> 1, 4); if(pitches) pitches[1] = pitches[2] = tmp; tmp *= (*h >> 1); size += tmp; if(offsets) offsets[2] = size; size += tmp; break; case FOURCC_RGBA32: size = *w << 2; if(pitches) pitches[0] = size; size *= *h; break; case FOURCC_RGB24: size = *w * 3; if(pitches) pitches[0] = size; size *= *h; break; case FOURCC_RGBT16: case FOURCC_RGB16: case FOURCC_UYVY: case FOURCC_YUY2: default: size = *w << 1; if(pitches) pitches[0] = size; size *= *h; break; } return size; } XF86VideoAdaptorPtr RADEONSetupImageTexturedVideo(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); RADEONPortPrivPtr pPortPriv; XF86VideoAdaptorPtr adapt; int i; int num_texture_ports = 16; adapt = calloc(1, sizeof(XF86VideoAdaptorRec) + num_texture_ports * (sizeof(RADEONPortPrivRec) + sizeof(DevUnion))); if (adapt == NULL) return NULL; xvBicubic = MAKE_ATOM("XV_BICUBIC"); xvVSync = MAKE_ATOM("XV_VSYNC"); xvBrightness = MAKE_ATOM("XV_BRIGHTNESS"); xvContrast = MAKE_ATOM("XV_CONTRAST"); xvSaturation = MAKE_ATOM("XV_SATURATION"); xvHue = MAKE_ATOM("XV_HUE"); xvGamma = MAKE_ATOM("XV_GAMMA"); xvColorspace = MAKE_ATOM("XV_COLORSPACE"); xvCRTC = MAKE_ATOM("XV_CRTC"); adapt->type = XvWindowMask | XvInputMask | XvImageMask; adapt->flags = 0; adapt->name = "Radeon Textured Video"; adapt->nEncodings = 1; if (IS_EVERGREEN_3D) adapt->pEncodings = DummyEncodingEG; else if (IS_R600_3D) adapt->pEncodings = DummyEncodingR600; else if (IS_R500_3D) adapt->pEncodings = DummyEncodingR500; else adapt->pEncodings = DummyEncoding; adapt->nFormats = NUM_FORMATS; adapt->pFormats = Formats; adapt->nPorts = num_texture_ports; adapt->pPortPrivates = (DevUnion*)(&adapt[1]); pPortPriv = (RADEONPortPrivPtr)(&adapt->pPortPrivates[num_texture_ports]); if (IS_EVERGREEN_3D) { adapt->pAttributes = Attributes_eg; adapt->nAttributes = NUM_ATTRIBUTES_R600; } else if (IS_R600_3D) { adapt->pAttributes = Attributes_r600; adapt->nAttributes = NUM_ATTRIBUTES_R600; } else if (IS_R500_3D) { adapt->pAttributes = Attributes_r500; adapt->nAttributes = NUM_ATTRIBUTES_R500; } else if (IS_R300_3D) { adapt->pAttributes = Attributes_r300; adapt->nAttributes = NUM_ATTRIBUTES_R300; } else if (IS_R200_3D) { adapt->pAttributes = Attributes_r200; adapt->nAttributes = NUM_ATTRIBUTES_R200; } else { adapt->pAttributes = Attributes; adapt->nAttributes = NUM_ATTRIBUTES; } adapt->pImages = Images; adapt->nImages = NUM_IMAGES; adapt->PutVideo = NULL; adapt->PutStill = NULL; adapt->GetVideo = NULL; adapt->GetStill = NULL; adapt->StopVideo = RADEONStopVideo; adapt->SetPortAttribute = RADEONSetTexPortAttribute; adapt->GetPortAttribute = RADEONGetTexPortAttribute; adapt->QueryBestSize = RADEONQueryBestSize; adapt->PutImage = RADEONPutImageTextured; adapt->ReputImage = NULL; adapt->QueryImageAttributes = RADEONQueryImageAttributes; for (i = 0; i < num_texture_ports; i++) { RADEONPortPrivPtr pPriv = &pPortPriv[i]; pPriv->textured = TRUE; pPriv->bicubic_state = BICUBIC_OFF; pPriv->vsync = TRUE; pPriv->brightness = 0; pPriv->contrast = 0; pPriv->saturation = 0; pPriv->hue = 0; pPriv->gamma = 1000; pPriv->transform_index = 0; pPriv->desired_crtc = NULL; /* gotta uninit this someplace, XXX: shouldn't be necessary for textured */ REGION_NULL(pScreen, &pPriv->clip); adapt->pPortPrivates[i].ptr = (pointer) (pPriv); } if (IS_R500_3D || IS_R300_3D) radeon_load_bicubic_texture(pScrn); info->xv_max_width = adapt->pEncodings->width; info->xv_max_height = adapt->pEncodings->height; return adapt; } xf86-video-ati-7.3.0/src/Makefile.in0000664000175000017500000007274212270503571013770 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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. # Copyright 2005 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 # 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. VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' 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@ @LIBUDEV_TRUE@am__append_1 = $(LIBUDEV_LIBS) @GLAMOR_TRUE@am__append_2 = @LIBGLAMOR_CFLAGS@ @GLAMOR_TRUE@am__append_3 = @LIBGLAMOR_LIBS@ @GLAMOR_TRUE@am__append_4 = \ @GLAMOR_TRUE@ radeon_glamor.c subdir = src DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) 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)$(ati_drv_ladir)" \ "$(DESTDIR)$(radeon_drv_ladir)" LTLIBRARIES = $(ati_drv_la_LTLIBRARIES) $(radeon_drv_la_LTLIBRARIES) am__DEPENDENCIES_1 = ati_drv_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_ati_drv_la_OBJECTS = ati.lo atimodule.lo ati_drv_la_OBJECTS = $(am_ati_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 = ati_drv_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(ati_drv_la_LDFLAGS) $(LDFLAGS) -o $@ @LIBUDEV_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) radeon_drv_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_2) \ $(am__DEPENDENCIES_1) am__radeon_drv_la_SOURCES_DIST = radeon_accel.c radeon_video.c \ radeon_misc.c radeon_probe.c radeon_textured_video.c \ radeon_xvmc.c radeon_exa.c r600_exa.c r6xx_accel.c \ r600_textured_videofuncs.c r600_shader.c radeon_exa_shared.c \ evergreen_exa.c evergreen_accel.c evergreen_shader.c \ evergreen_textured_videofuncs.c cayman_accel.c cayman_shader.c \ radeon_dri2.c radeon_kms.c drmmode_display.c radeon_vbo.c \ radeon_bo_helper.c radeon_glamor.c am__objects_1 = radeon_exa.lo r600_exa.lo r6xx_accel.lo \ r600_textured_videofuncs.lo r600_shader.lo \ radeon_exa_shared.lo evergreen_exa.lo evergreen_accel.lo \ evergreen_shader.lo evergreen_textured_videofuncs.lo \ cayman_accel.lo cayman_shader.lo am__objects_2 = radeon_dri2.lo radeon_kms.lo drmmode_display.lo \ radeon_vbo.lo radeon_bo_helper.lo @GLAMOR_TRUE@am__objects_3 = radeon_glamor.lo am_radeon_drv_la_OBJECTS = radeon_accel.lo radeon_video.lo \ radeon_misc.lo radeon_probe.lo radeon_textured_video.lo \ radeon_xvmc.lo $(am__objects_1) $(am__objects_2) \ $(am__objects_3) radeon_drv_la_OBJECTS = $(am_radeon_drv_la_OBJECTS) radeon_drv_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(radeon_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__depfiles_maybe = depfiles 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 = $(ati_drv_la_SOURCES) $(radeon_drv_la_SOURCES) DIST_SOURCES = $(ati_drv_la_SOURCES) $(am__radeon_drv_la_SOURCES_DIST) 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)` ETAGS = etags CTAGS = ctags 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@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_RADEON_CFLAGS = @LIBDRM_RADEON_CFLAGS@ LIBDRM_RADEON_LIBS = @LIBDRM_RADEON_LIBS@ LIBGLAMOR_CFLAGS = @LIBGLAMOR_CFLAGS@ LIBGLAMOR_EGL_CFLAGS = @LIBGLAMOR_EGL_CFLAGS@ LIBGLAMOR_EGL_LIBS = @LIBGLAMOR_EGL_LIBS@ LIBGLAMOR_LIBS = @LIBGLAMOR_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@ MAINT = @MAINT@ 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@ 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@ ati_drv_la_LIBADD = $(PCIACCESS_LIBS) radeon_drv_la_LIBADD = $(LIBDRM_RADEON_LIBS) $(PCIACCESS_LIBS) \ $(am__append_1) $(am__append_3) RADEON_KMS_SRCS = radeon_dri2.c radeon_kms.c drmmode_display.c radeon_vbo.c \ radeon_bo_helper.c RADEON_EXA_SOURCES = radeon_exa.c r600_exa.c r6xx_accel.c r600_textured_videofuncs.c r600_shader.c radeon_exa_shared.c \ evergreen_exa.c evergreen_accel.c evergreen_shader.c evergreen_textured_videofuncs.c cayman_accel.c cayman_shader.c AM_CFLAGS = @LIBDRM_RADEON_CFLAGS@ @XORG_CFLAGS@ @LIBUDEV_CFLAGS@ \ $(am__append_2) ati_drv_la_LTLIBRARIES = ati_drv.la ati_drv_la_LDFLAGS = -module -avoid-version ati_drv_ladir = @moduledir@/drivers ati_drv_la_SOURCES = \ ati.c atimodule.c radeon_drv_la_LTLIBRARIES = radeon_drv.la radeon_drv_la_LDFLAGS = -module -avoid-version radeon_drv_ladir = @moduledir@/drivers radeon_drv_la_SOURCES = radeon_accel.c radeon_video.c radeon_misc.c \ radeon_probe.c radeon_textured_video.c radeon_xvmc.c \ $(RADEON_EXA_SOURCES) $(RADEON_KMS_SRCS) $(am__append_4) EXTRA_DIST = \ radeon_textured_videofuncs.c \ r600_reg.h \ r600_reg_auto_r6xx.h \ r600_reg_r6xx.h \ r600_reg_r7xx.h \ r600_shader.h \ r600_state.h \ evergreen_reg.h \ evergreen_reg_auto.h \ evergreen_shader.h \ evergreen_state.h \ cayman_reg.h \ cayman_reg_auto.h \ cayman_shader.h \ compat-api.h \ ati.h \ ativersion.h \ bicubic_table.h \ bicubic_table.py \ radeon_bo_helper.h \ radeon_drm.h \ radeon_exa_render.c \ radeon_exa_funcs.c \ radeon_exa_shared.h \ radeon_glamor.h \ radeon.h \ radeon_probe.h \ radeon_reg.h \ radeon_version.h \ radeon_vbo.h \ radeon_video.h \ simple_list.h \ atipciids.h \ atipcirename.h \ ati_pciids_gen.h \ radeon_chipinfo_gen.h \ radeon_chipset_gen.h \ radeon_pci_chipset_gen.h \ radeon_pci_device_match_gen.h \ pcidb/ati_pciids.csv \ pcidb/parse_pci_ids.pl \ radeon_dri2.h \ drmmode_display.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(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 .PRECIOUS: 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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-ati_drv_laLTLIBRARIES: $(ati_drv_la_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(ati_drv_la_LTLIBRARIES)'; test -n "$(ati_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)$(ati_drv_ladir)'"; \ $(MKDIR_P) "$(DESTDIR)$(ati_drv_ladir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(ati_drv_ladir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(ati_drv_ladir)"; \ } uninstall-ati_drv_laLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(ati_drv_la_LTLIBRARIES)'; test -n "$(ati_drv_ladir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(ati_drv_ladir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(ati_drv_ladir)/$$f"; \ done clean-ati_drv_laLTLIBRARIES: -test -z "$(ati_drv_la_LTLIBRARIES)" || rm -f $(ati_drv_la_LTLIBRARIES) @list='$(ati_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}; \ } install-radeon_drv_laLTLIBRARIES: $(radeon_drv_la_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(radeon_drv_la_LTLIBRARIES)'; test -n "$(radeon_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)$(radeon_drv_ladir)'"; \ $(MKDIR_P) "$(DESTDIR)$(radeon_drv_ladir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(radeon_drv_ladir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(radeon_drv_ladir)"; \ } uninstall-radeon_drv_laLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(radeon_drv_la_LTLIBRARIES)'; test -n "$(radeon_drv_ladir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(radeon_drv_ladir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(radeon_drv_ladir)/$$f"; \ done clean-radeon_drv_laLTLIBRARIES: -test -z "$(radeon_drv_la_LTLIBRARIES)" || rm -f $(radeon_drv_la_LTLIBRARIES) @list='$(radeon_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}; \ } ati_drv.la: $(ati_drv_la_OBJECTS) $(ati_drv_la_DEPENDENCIES) $(EXTRA_ati_drv_la_DEPENDENCIES) $(AM_V_CCLD)$(ati_drv_la_LINK) -rpath $(ati_drv_ladir) $(ati_drv_la_OBJECTS) $(ati_drv_la_LIBADD) $(LIBS) radeon_drv.la: $(radeon_drv_la_OBJECTS) $(radeon_drv_la_DEPENDENCIES) $(EXTRA_radeon_drv_la_DEPENDENCIES) $(AM_V_CCLD)$(radeon_drv_la_LINK) -rpath $(radeon_drv_ladir) $(radeon_drv_la_OBJECTS) $(radeon_drv_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ati.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atimodule.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cayman_accel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cayman_shader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drmmode_display.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evergreen_accel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evergreen_exa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evergreen_shader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evergreen_textured_videofuncs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/r600_exa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/r600_shader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/r600_textured_videofuncs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/r6xx_accel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeon_accel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeon_bo_helper.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeon_dri2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeon_exa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeon_exa_shared.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeon_glamor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeon_kms.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeon_misc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeon_probe.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeon_textured_video.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeon_vbo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeon_video.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/radeon_xvmc.Plo@am__quote@ .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 $< .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 `$(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: $(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)$(ati_drv_ladir)" "$(DESTDIR)$(radeon_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-ati_drv_laLTLIBRARIES clean-generic clean-libtool \ clean-radeon_drv_laLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -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-ati_drv_laLTLIBRARIES \ install-radeon_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 -rf ./$(DEPDIR) -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-ati_drv_laLTLIBRARIES \ uninstall-radeon_drv_laLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-ati_drv_laLTLIBRARIES clean-generic clean-libtool \ clean-radeon_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-ati_drv_laLTLIBRARIES 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-radeon_drv_laLTLIBRARIES 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-ati_drv_laLTLIBRARIES \ uninstall-radeon_drv_laLTLIBRARIES # 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-ati-7.3.0/src/ativersion.h0000664000175000017500000000427412177731114014254 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * 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 Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE 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. */ #ifndef ___ATIVERSION_H___ #define ___ATIVERSION_H___ 1 #undef ATI_NAME #undef ATI_DRIVER_NAME #undef ATI_VERSION_CURRENT #undef ATI_VERSION_EVALUATE #undef ATI_VERSION_STRINGIFY #undef ATI_VERSION_NAME #define ATI_NAME "ATI" #define ATI_DRIVER_NAME "ati" #ifndef ATI_VERSION_EXTRA #define ATI_VERSION_EXTRA "" #endif #define ATI_VERSION_MAJOR PACKAGE_VERSION_MAJOR #define ATI_VERSION_MINOR PACKAGE_VERSION_MINOR #define ATI_VERSION_PATCH PACKAGE_VERSION_PATCHLEVEL #define ATI_VERSION_CURRENT \ ((ATI_VERSION_MAJOR << 20) | (ATI_VERSION_MINOR << 10) | ATI_VERSION_PATCH) #define ATI_VERSION_EVALUATE(__x) #__x #define ATI_VERSION_STRINGIFY(_x) ATI_VERSION_EVALUATE(_x) #define ATI_VERSION_NAME \ ATI_VERSION_STRINGIFY(ATI_VERSION_MAJOR) "." \ ATI_VERSION_STRINGIFY(ATI_VERSION_MINOR) "." \ ATI_VERSION_STRINGIFY(ATI_VERSION_PATCH) ATI_VERSION_EXTRA #endif /* ___ATIVERSION_H___ */ xf86-video-ati-7.3.0/src/simple_list.h0000664000175000017500000001132612177731114014411 00000000000000/** * \file simple_list.h * Simple macros for type-safe, intrusive lists. * * Intended to work with a list sentinal which is created as an empty * list. Insert & delete are O(1). * * \author * (C) 1997, Keith Whitwell */ /* * Mesa 3-D graphics library * Version: 3.5 * * Copyright (C) 1999-2001 Brian Paul 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 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 * BRIAN PAUL 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 _SIMPLE_LIST_H #define _SIMPLE_LIST_H struct simple_node { struct simple_node *next; struct simple_node *prev; }; /** * Remove an element from list. * * \param elem element to remove. */ #define remove_from_list(elem) \ do { \ (elem)->next->prev = (elem)->prev; \ (elem)->prev->next = (elem)->next; \ } while (0) /** * Insert an element to the list head. * * \param list list. * \param elem element to insert. */ #define insert_at_head(list, elem) \ do { \ (elem)->prev = list; \ (elem)->next = (list)->next; \ (list)->next->prev = elem; \ (list)->next = elem; \ } while(0) /** * Insert an element to the list tail. * * \param list list. * \param elem element to insert. */ #define insert_at_tail(list, elem) \ do { \ (elem)->next = list; \ (elem)->prev = (list)->prev; \ (list)->prev->next = elem; \ (list)->prev = elem; \ } while(0) /** * Move an element to the list head. * * \param list list. * \param elem element to move. */ #define move_to_head(list, elem) \ do { \ remove_from_list(elem); \ insert_at_head(list, elem); \ } while (0) /** * Move an element to the list tail. * * \param list list. * \param elem element to move. */ #define move_to_tail(list, elem) \ do { \ remove_from_list(elem); \ insert_at_tail(list, elem); \ } while (0) /** * Make a empty list empty. * * \param sentinal list (sentinal element). */ #define make_empty_list(sentinal) \ do { \ (sentinal)->next = sentinal; \ (sentinal)->prev = sentinal; \ } while (0) /** * Get list first element. * * \param list list. * * \return pointer to first element. */ #define first_elem(list) ((list)->next) /** * Get list last element. * * \param list list. * * \return pointer to last element. */ #define last_elem(list) ((list)->prev) /** * Get next element. * * \param elem element. * * \return pointer to next element. */ #define next_elem(elem) ((elem)->next) /** * Get previous element. * * \param elem element. * * \return pointer to previous element. */ #define prev_elem(elem) ((elem)->prev) /** * Test whether element is at end of the list. * * \param list list. * \param elem element. * * \return non-zero if element is at end of list, or zero otherwise. */ #define at_end(list, elem) ((elem) == (list)) /** * Test if a list is empty. * * \param list list. * * \return non-zero if list empty, or zero otherwise. */ #define is_empty_list(list) ((list)->next == (list)) /** * Walk through the elements of a list. * * \param ptr pointer to the current element. * \param list list. * * \note It should be followed by a { } block or a single statement, as in a \c * for loop. */ #define foreach(ptr, list) \ for( ptr=(list)->next ; ptr!=list ; ptr=(ptr)->next ) /** * Walk through the elements of a list. * * Same as #foreach but lets you unlink the current value during a list * traversal. Useful for freeing a list, element by element. * * \param ptr pointer to the current element. * \param t temporary pointer. * \param list list. * * \note It should be followed by a { } block or a single statement, as in a \c * for loop. */ #define foreach_s(ptr, t, list) \ for(ptr=(list)->next,t=(ptr)->next; list != ptr; ptr=t, t=(t)->next) #endif xf86-video-ati-7.3.0/src/radeon_drm.h0000664000175000017500000007735712234257031014212 00000000000000/* radeon_drm.h -- Public header for the radeon driver -*- linux-c -*- * * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas. * Copyright 2000 VA Linux Systems, Inc., Fremont, California. * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas. * 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 * PRECISION INSIGHT 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. * * Authors: * Kevin E. Martin * Gareth Hughes * Keith Whitwell */ #ifndef __RADEON_DRM_H__ #define __RADEON_DRM_H__ /* WARNING: If you change any of these defines, make sure to change the * defines in the X server file (radeon_sarea.h) */ #ifndef __RADEON_SAREA_DEFINES__ #define __RADEON_SAREA_DEFINES__ /* Old style state flags, required for sarea interface (1.1 and 1.2 * clears) and 1.2 drm_vertex2 ioctl. */ #define RADEON_UPLOAD_CONTEXT 0x00000001 #define RADEON_UPLOAD_VERTFMT 0x00000002 #define RADEON_UPLOAD_LINE 0x00000004 #define RADEON_UPLOAD_BUMPMAP 0x00000008 #define RADEON_UPLOAD_MASKS 0x00000010 #define RADEON_UPLOAD_VIEWPORT 0x00000020 #define RADEON_UPLOAD_SETUP 0x00000040 #define RADEON_UPLOAD_TCL 0x00000080 #define RADEON_UPLOAD_MISC 0x00000100 #define RADEON_UPLOAD_TEX0 0x00000200 #define RADEON_UPLOAD_TEX1 0x00000400 #define RADEON_UPLOAD_TEX2 0x00000800 #define RADEON_UPLOAD_TEX0IMAGES 0x00001000 #define RADEON_UPLOAD_TEX1IMAGES 0x00002000 #define RADEON_UPLOAD_TEX2IMAGES 0x00004000 #define RADEON_UPLOAD_CLIPRECTS 0x00008000 /* handled client-side */ #define RADEON_REQUIRE_QUIESCENCE 0x00010000 #define RADEON_UPLOAD_ZBIAS 0x00020000 /* version 1.2 and newer */ #define RADEON_UPLOAD_ALL 0x003effff #define RADEON_UPLOAD_CONTEXT_ALL 0x003e01ff /* New style per-packet identifiers for use in cmd_buffer ioctl with * the RADEON_EMIT_PACKET command. Comments relate new packets to old * state bits and the packet size: */ #define RADEON_EMIT_PP_MISC 0 /* context/7 */ #define RADEON_EMIT_PP_CNTL 1 /* context/3 */ #define RADEON_EMIT_RB3D_COLORPITCH 2 /* context/1 */ #define RADEON_EMIT_RE_LINE_PATTERN 3 /* line/2 */ #define RADEON_EMIT_SE_LINE_WIDTH 4 /* line/1 */ #define RADEON_EMIT_PP_LUM_MATRIX 5 /* bumpmap/1 */ #define RADEON_EMIT_PP_ROT_MATRIX_0 6 /* bumpmap/2 */ #define RADEON_EMIT_RB3D_STENCILREFMASK 7 /* masks/3 */ #define RADEON_EMIT_SE_VPORT_XSCALE 8 /* viewport/6 */ #define RADEON_EMIT_SE_CNTL 9 /* setup/2 */ #define RADEON_EMIT_SE_CNTL_STATUS 10 /* setup/1 */ #define RADEON_EMIT_RE_MISC 11 /* misc/1 */ #define RADEON_EMIT_PP_TXFILTER_0 12 /* tex0/6 */ #define RADEON_EMIT_PP_BORDER_COLOR_0 13 /* tex0/1 */ #define RADEON_EMIT_PP_TXFILTER_1 14 /* tex1/6 */ #define RADEON_EMIT_PP_BORDER_COLOR_1 15 /* tex1/1 */ #define RADEON_EMIT_PP_TXFILTER_2 16 /* tex2/6 */ #define RADEON_EMIT_PP_BORDER_COLOR_2 17 /* tex2/1 */ #define RADEON_EMIT_SE_ZBIAS_FACTOR 18 /* zbias/2 */ #define RADEON_EMIT_SE_TCL_OUTPUT_VTX_FMT 19 /* tcl/11 */ #define RADEON_EMIT_SE_TCL_MATERIAL_EMMISSIVE_RED 20 /* material/17 */ #define R200_EMIT_PP_TXCBLEND_0 21 /* tex0/4 */ #define R200_EMIT_PP_TXCBLEND_1 22 /* tex1/4 */ #define R200_EMIT_PP_TXCBLEND_2 23 /* tex2/4 */ #define R200_EMIT_PP_TXCBLEND_3 24 /* tex3/4 */ #define R200_EMIT_PP_TXCBLEND_4 25 /* tex4/4 */ #define R200_EMIT_PP_TXCBLEND_5 26 /* tex5/4 */ #define R200_EMIT_PP_TXCBLEND_6 27 /* /4 */ #define R200_EMIT_PP_TXCBLEND_7 28 /* /4 */ #define R200_EMIT_TCL_LIGHT_MODEL_CTL_0 29 /* tcl/7 */ #define R200_EMIT_TFACTOR_0 30 /* tf/7 */ #define R200_EMIT_VTX_FMT_0 31 /* vtx/5 */ #define R200_EMIT_VAP_CTL 32 /* vap/1 */ #define R200_EMIT_MATRIX_SELECT_0 33 /* msl/5 */ #define R200_EMIT_TEX_PROC_CTL_2 34 /* tcg/5 */ #define R200_EMIT_TCL_UCP_VERT_BLEND_CTL 35 /* tcl/1 */ #define R200_EMIT_PP_TXFILTER_0 36 /* tex0/6 */ #define R200_EMIT_PP_TXFILTER_1 37 /* tex1/6 */ #define R200_EMIT_PP_TXFILTER_2 38 /* tex2/6 */ #define R200_EMIT_PP_TXFILTER_3 39 /* tex3/6 */ #define R200_EMIT_PP_TXFILTER_4 40 /* tex4/6 */ #define R200_EMIT_PP_TXFILTER_5 41 /* tex5/6 */ #define R200_EMIT_PP_TXOFFSET_0 42 /* tex0/1 */ #define R200_EMIT_PP_TXOFFSET_1 43 /* tex1/1 */ #define R200_EMIT_PP_TXOFFSET_2 44 /* tex2/1 */ #define R200_EMIT_PP_TXOFFSET_3 45 /* tex3/1 */ #define R200_EMIT_PP_TXOFFSET_4 46 /* tex4/1 */ #define R200_EMIT_PP_TXOFFSET_5 47 /* tex5/1 */ #define R200_EMIT_VTE_CNTL 48 /* vte/1 */ #define R200_EMIT_OUTPUT_VTX_COMP_SEL 49 /* vtx/1 */ #define R200_EMIT_PP_TAM_DEBUG3 50 /* tam/1 */ #define R200_EMIT_PP_CNTL_X 51 /* cst/1 */ #define R200_EMIT_RB3D_DEPTHXY_OFFSET 52 /* cst/1 */ #define R200_EMIT_RE_AUX_SCISSOR_CNTL 53 /* cst/1 */ #define R200_EMIT_RE_SCISSOR_TL_0 54 /* cst/2 */ #define R200_EMIT_RE_SCISSOR_TL_1 55 /* cst/2 */ #define R200_EMIT_RE_SCISSOR_TL_2 56 /* cst/2 */ #define R200_EMIT_SE_VAP_CNTL_STATUS 57 /* cst/1 */ #define R200_EMIT_SE_VTX_STATE_CNTL 58 /* cst/1 */ #define R200_EMIT_RE_POINTSIZE 59 /* cst/1 */ #define R200_EMIT_TCL_INPUT_VTX_VECTOR_ADDR_0 60 /* cst/4 */ #define R200_EMIT_PP_CUBIC_FACES_0 61 #define R200_EMIT_PP_CUBIC_OFFSETS_0 62 #define R200_EMIT_PP_CUBIC_FACES_1 63 #define R200_EMIT_PP_CUBIC_OFFSETS_1 64 #define R200_EMIT_PP_CUBIC_FACES_2 65 #define R200_EMIT_PP_CUBIC_OFFSETS_2 66 #define R200_EMIT_PP_CUBIC_FACES_3 67 #define R200_EMIT_PP_CUBIC_OFFSETS_3 68 #define R200_EMIT_PP_CUBIC_FACES_4 69 #define R200_EMIT_PP_CUBIC_OFFSETS_4 70 #define R200_EMIT_PP_CUBIC_FACES_5 71 #define R200_EMIT_PP_CUBIC_OFFSETS_5 72 #define RADEON_EMIT_PP_TEX_SIZE_0 73 #define RADEON_EMIT_PP_TEX_SIZE_1 74 #define RADEON_EMIT_PP_TEX_SIZE_2 75 #define R200_EMIT_RB3D_BLENDCOLOR 76 #define R200_EMIT_TCL_POINT_SPRITE_CNTL 77 #define RADEON_EMIT_PP_CUBIC_FACES_0 78 #define RADEON_EMIT_PP_CUBIC_OFFSETS_T0 79 #define RADEON_EMIT_PP_CUBIC_FACES_1 80 #define RADEON_EMIT_PP_CUBIC_OFFSETS_T1 81 #define RADEON_EMIT_PP_CUBIC_FACES_2 82 #define RADEON_EMIT_PP_CUBIC_OFFSETS_T2 83 #define R200_EMIT_PP_TRI_PERF_CNTL 84 #define R200_EMIT_PP_AFS_0 85 #define R200_EMIT_PP_AFS_1 86 #define R200_EMIT_ATF_TFACTOR 87 #define R200_EMIT_PP_TXCTLALL_0 88 #define R200_EMIT_PP_TXCTLALL_1 89 #define R200_EMIT_PP_TXCTLALL_2 90 #define R200_EMIT_PP_TXCTLALL_3 91 #define R200_EMIT_PP_TXCTLALL_4 92 #define R200_EMIT_PP_TXCTLALL_5 93 #define R200_EMIT_VAP_PVS_CNTL 94 #define RADEON_MAX_STATE_PACKETS 95 /* Commands understood by cmd_buffer ioctl. More can be added but * obviously these can't be removed or changed: */ #define RADEON_CMD_PACKET 1 /* emit one of the register packets above */ #define RADEON_CMD_SCALARS 2 /* emit scalar data */ #define RADEON_CMD_VECTORS 3 /* emit vector data */ #define RADEON_CMD_DMA_DISCARD 4 /* discard current dma buf */ #define RADEON_CMD_PACKET3 5 /* emit hw packet */ #define RADEON_CMD_PACKET3_CLIP 6 /* emit hw packet wrapped in cliprects */ #define RADEON_CMD_SCALARS2 7 /* r200 stopgap */ #define RADEON_CMD_WAIT 8 /* emit hw wait commands -- note: * doesn't make the cpu wait, just * the graphics hardware */ #define RADEON_CMD_VECLINEAR 9 /* another r200 stopgap */ typedef union { int i; struct { unsigned char cmd_type, pad0, pad1, pad2; } header; struct { unsigned char cmd_type, packet_id, pad0, pad1; } packet; struct { unsigned char cmd_type, offset, stride, count; } scalars; struct { unsigned char cmd_type, offset, stride, count; } vectors; struct { unsigned char cmd_type, addr_lo, addr_hi, count; } veclinear; struct { unsigned char cmd_type, buf_idx, pad0, pad1; } dma; struct { unsigned char cmd_type, flags, pad0, pad1; } wait; } drm_radeon_cmd_header_t; #define RADEON_WAIT_2D 0x1 #define RADEON_WAIT_3D 0x2 /* Allowed parameters for R300_CMD_PACKET3 */ #define R300_CMD_PACKET3_CLEAR 0 #define R300_CMD_PACKET3_RAW 1 /* Commands understood by cmd_buffer ioctl for R300. * The interface has not been stabilized, so some of these may be removed * and eventually reordered before stabilization. */ #define R300_CMD_PACKET0 1 #define R300_CMD_VPU 2 /* emit vertex program upload */ #define R300_CMD_PACKET3 3 /* emit a packet3 */ #define R300_CMD_END3D 4 /* emit sequence ending 3d rendering */ #define R300_CMD_CP_DELAY 5 #define R300_CMD_DMA_DISCARD 6 #define R300_CMD_WAIT 7 # define R300_WAIT_2D 0x1 # define R300_WAIT_3D 0x2 /* these two defines are DOING IT WRONG - however * we have userspace which relies on using these. * The wait interface is backwards compat new * code should use the NEW_WAIT defines below * THESE ARE NOT BIT FIELDS */ # define R300_WAIT_2D_CLEAN 0x3 # define R300_WAIT_3D_CLEAN 0x4 # define R300_NEW_WAIT_2D_3D 0x3 # define R300_NEW_WAIT_2D_2D_CLEAN 0x4 # define R300_NEW_WAIT_3D_3D_CLEAN 0x6 # define R300_NEW_WAIT_2D_2D_CLEAN_3D_3D_CLEAN 0x8 #define R300_CMD_SCRATCH 8 #define R300_CMD_R500FP 9 typedef union { unsigned int u; struct { unsigned char cmd_type, pad0, pad1, pad2; } header; struct { unsigned char cmd_type, count, reglo, reghi; } packet0; struct { unsigned char cmd_type, count, adrlo, adrhi; } vpu; struct { unsigned char cmd_type, packet, pad0, pad1; } packet3; struct { unsigned char cmd_type, packet; unsigned short count; /* amount of packet2 to emit */ } delay; struct { unsigned char cmd_type, buf_idx, pad0, pad1; } dma; struct { unsigned char cmd_type, flags, pad0, pad1; } wait; struct { unsigned char cmd_type, reg, n_bufs, flags; } scratch; struct { unsigned char cmd_type, count, adrlo, adrhi_flags; } r500fp; } drm_r300_cmd_header_t; #define RADEON_FRONT 0x1 #define RADEON_BACK 0x2 #define RADEON_DEPTH 0x4 #define RADEON_STENCIL 0x8 #define RADEON_CLEAR_FASTZ 0x80000000 #define RADEON_USE_HIERZ 0x40000000 #define RADEON_USE_COMP_ZBUF 0x20000000 #define R500FP_CONSTANT_TYPE (1 << 1) #define R500FP_CONSTANT_CLAMP (1 << 2) /* Primitive types */ #define RADEON_POINTS 0x1 #define RADEON_LINES 0x2 #define RADEON_LINE_STRIP 0x3 #define RADEON_TRIANGLES 0x4 #define RADEON_TRIANGLE_FAN 0x5 #define RADEON_TRIANGLE_STRIP 0x6 /* Vertex/indirect buffer size */ #define RADEON_BUFFER_SIZE 65536 /* Byte offsets for indirect buffer data */ #define RADEON_INDEX_PRIM_OFFSET 20 #define RADEON_SCRATCH_REG_OFFSET 32 #define R600_SCRATCH_REG_OFFSET 256 #define RADEON_NR_SAREA_CLIPRECTS 12 /* There are 2 heaps (local/GART). Each region within a heap is a * minimum of 64k, and there are at most 64 of them per heap. */ #define RADEON_LOCAL_TEX_HEAP 0 #define RADEON_GART_TEX_HEAP 1 #define RADEON_NR_TEX_HEAPS 2 #define RADEON_NR_TEX_REGIONS 64 #define RADEON_LOG_TEX_GRANULARITY 16 #define RADEON_MAX_TEXTURE_LEVELS 12 #define RADEON_MAX_TEXTURE_UNITS 3 #define RADEON_MAX_SURFACES 8 /* Blits have strict offset rules. All blit offset must be aligned on * a 1K-byte boundary. */ #define RADEON_OFFSET_SHIFT 10 #define RADEON_OFFSET_ALIGN (1 << RADEON_OFFSET_SHIFT) #define RADEON_OFFSET_MASK (RADEON_OFFSET_ALIGN - 1) #endif /* __RADEON_SAREA_DEFINES__ */ typedef struct { unsigned int red; unsigned int green; unsigned int blue; unsigned int alpha; } radeon_color_regs_t; typedef struct { /* Context state */ unsigned int pp_misc; /* 0x1c14 */ unsigned int pp_fog_color; unsigned int re_solid_color; unsigned int rb3d_blendcntl; unsigned int rb3d_depthoffset; unsigned int rb3d_depthpitch; unsigned int rb3d_zstencilcntl; unsigned int pp_cntl; /* 0x1c38 */ unsigned int rb3d_cntl; unsigned int rb3d_coloroffset; unsigned int re_width_height; unsigned int rb3d_colorpitch; unsigned int se_cntl; /* Vertex format state */ unsigned int se_coord_fmt; /* 0x1c50 */ /* Line state */ unsigned int re_line_pattern; /* 0x1cd0 */ unsigned int re_line_state; unsigned int se_line_width; /* 0x1db8 */ /* Bumpmap state */ unsigned int pp_lum_matrix; /* 0x1d00 */ unsigned int pp_rot_matrix_0; /* 0x1d58 */ unsigned int pp_rot_matrix_1; /* Mask state */ unsigned int rb3d_stencilrefmask; /* 0x1d7c */ unsigned int rb3d_ropcntl; unsigned int rb3d_planemask; /* Viewport state */ unsigned int se_vport_xscale; /* 0x1d98 */ unsigned int se_vport_xoffset; unsigned int se_vport_yscale; unsigned int se_vport_yoffset; unsigned int se_vport_zscale; unsigned int se_vport_zoffset; /* Setup state */ unsigned int se_cntl_status; /* 0x2140 */ /* Misc state */ unsigned int re_top_left; /* 0x26c0 */ unsigned int re_misc; } drm_radeon_context_regs_t; typedef struct { /* Zbias state */ unsigned int se_zbias_factor; /* 0x1dac */ unsigned int se_zbias_constant; } drm_radeon_context2_regs_t; /* Setup registers for each texture unit */ typedef struct { unsigned int pp_txfilter; unsigned int pp_txformat; unsigned int pp_txoffset; unsigned int pp_txcblend; unsigned int pp_txablend; unsigned int pp_tfactor; unsigned int pp_border_color; } drm_radeon_texture_regs_t; typedef struct { unsigned int start; unsigned int finish; unsigned int prim:8; unsigned int stateidx:8; unsigned int numverts:16; /* overloaded as offset/64 for elt prims */ unsigned int vc_format; /* vertex format */ } drm_radeon_prim_t; typedef struct { drm_radeon_context_regs_t context; drm_radeon_texture_regs_t tex[RADEON_MAX_TEXTURE_UNITS]; drm_radeon_context2_regs_t context2; unsigned int dirty; } drm_radeon_state_t; typedef struct { /* The channel for communication of state information to the * kernel on firing a vertex buffer with either of the * obsoleted vertex/index ioctls. */ drm_radeon_context_regs_t context_state; drm_radeon_texture_regs_t tex_state[RADEON_MAX_TEXTURE_UNITS]; unsigned int dirty; unsigned int vertsize; unsigned int vc_format; /* The current cliprects, or a subset thereof. */ struct drm_clip_rect boxes[RADEON_NR_SAREA_CLIPRECTS]; unsigned int nbox; /* Counters for client-side throttling of rendering clients. */ unsigned int last_frame; unsigned int last_dispatch; unsigned int last_clear; struct drm_tex_region tex_list[RADEON_NR_TEX_HEAPS][RADEON_NR_TEX_REGIONS + 1]; unsigned int tex_age[RADEON_NR_TEX_HEAPS]; int ctx_owner; int pfState; /* number of 3d windows (0,1,2ormore) */ int pfCurrentPage; /* which buffer is being displayed? */ int crtc2_base; /* CRTC2 frame offset */ int tiling_enabled; /* set by drm, read by 2d + 3d clients */ } drm_radeon_sarea_t; /* WARNING: If you change any of these defines, make sure to change the * defines in the Xserver file (xf86drmRadeon.h) * * KW: actually it's illegal to change any of this (backwards compatibility). */ /* Radeon specific ioctls * The device specific ioctl range is 0x40 to 0x79. */ #define DRM_RADEON_CP_INIT 0x00 #define DRM_RADEON_CP_START 0x01 #define DRM_RADEON_CP_STOP 0x02 #define DRM_RADEON_CP_RESET 0x03 #define DRM_RADEON_CP_IDLE 0x04 #define DRM_RADEON_RESET 0x05 #define DRM_RADEON_FULLSCREEN 0x06 #define DRM_RADEON_SWAP 0x07 #define DRM_RADEON_CLEAR 0x08 #define DRM_RADEON_VERTEX 0x09 #define DRM_RADEON_INDICES 0x0A #define DRM_RADEON_NOT_USED #define DRM_RADEON_STIPPLE 0x0C #define DRM_RADEON_INDIRECT 0x0D #define DRM_RADEON_TEXTURE 0x0E #define DRM_RADEON_VERTEX2 0x0F #define DRM_RADEON_CMDBUF 0x10 #define DRM_RADEON_GETPARAM 0x11 #define DRM_RADEON_FLIP 0x12 #define DRM_RADEON_ALLOC 0x13 #define DRM_RADEON_FREE 0x14 #define DRM_RADEON_INIT_HEAP 0x15 #define DRM_RADEON_IRQ_EMIT 0x16 #define DRM_RADEON_IRQ_WAIT 0x17 #define DRM_RADEON_CP_RESUME 0x18 #define DRM_RADEON_SETPARAM 0x19 #define DRM_RADEON_SURF_ALLOC 0x1a #define DRM_RADEON_SURF_FREE 0x1b /* KMS ioctl */ #define DRM_RADEON_GEM_INFO 0x1c #define DRM_RADEON_GEM_CREATE 0x1d #define DRM_RADEON_GEM_MMAP 0x1e #define DRM_RADEON_GEM_PREAD 0x21 #define DRM_RADEON_GEM_PWRITE 0x22 #define DRM_RADEON_GEM_SET_DOMAIN 0x23 #define DRM_RADEON_GEM_WAIT_IDLE 0x24 #define DRM_RADEON_CS 0x26 #define DRM_RADEON_INFO 0x27 #define DRM_RADEON_GEM_SET_TILING 0x28 #define DRM_RADEON_GEM_GET_TILING 0x29 #define DRM_IOCTL_RADEON_CP_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CP_INIT, drm_radeon_init_t) #define DRM_IOCTL_RADEON_CP_START DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_START) #define DRM_IOCTL_RADEON_CP_STOP DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CP_STOP, drm_radeon_cp_stop_t) #define DRM_IOCTL_RADEON_CP_RESET DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_RESET) #define DRM_IOCTL_RADEON_CP_IDLE DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_IDLE) #define DRM_IOCTL_RADEON_RESET DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_RESET) #define DRM_IOCTL_RADEON_FULLSCREEN DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_FULLSCREEN, drm_radeon_fullscreen_t) #define DRM_IOCTL_RADEON_SWAP DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_SWAP) #define DRM_IOCTL_RADEON_CLEAR DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CLEAR, drm_radeon_clear_t) #define DRM_IOCTL_RADEON_VERTEX DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_VERTEX, drm_radeon_vertex_t) #define DRM_IOCTL_RADEON_INDICES DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_INDICES, drm_radeon_indices_t) #define DRM_IOCTL_RADEON_STIPPLE DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_STIPPLE, drm_radeon_stipple_t) #define DRM_IOCTL_RADEON_INDIRECT DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INDIRECT, drm_radeon_indirect_t) #define DRM_IOCTL_RADEON_TEXTURE DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_TEXTURE, drm_radeon_texture_t) #define DRM_IOCTL_RADEON_VERTEX2 DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_VERTEX2, drm_radeon_vertex2_t) #define DRM_IOCTL_RADEON_CMDBUF DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_CMDBUF, drm_radeon_cmd_buffer_t) #define DRM_IOCTL_RADEON_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GETPARAM, drm_radeon_getparam_t) #define DRM_IOCTL_RADEON_FLIP DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_FLIP) #define DRM_IOCTL_RADEON_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_ALLOC, drm_radeon_mem_alloc_t) #define DRM_IOCTL_RADEON_FREE DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_FREE, drm_radeon_mem_free_t) #define DRM_IOCTL_RADEON_INIT_HEAP DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_INIT_HEAP, drm_radeon_mem_init_heap_t) #define DRM_IOCTL_RADEON_IRQ_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_IRQ_EMIT, drm_radeon_irq_emit_t) #define DRM_IOCTL_RADEON_IRQ_WAIT DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_IRQ_WAIT, drm_radeon_irq_wait_t) #define DRM_IOCTL_RADEON_CP_RESUME DRM_IO( DRM_COMMAND_BASE + DRM_RADEON_CP_RESUME) #define DRM_IOCTL_RADEON_SETPARAM DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_SETPARAM, drm_radeon_setparam_t) #define DRM_IOCTL_RADEON_SURF_ALLOC DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_SURF_ALLOC, drm_radeon_surface_alloc_t) #define DRM_IOCTL_RADEON_SURF_FREE DRM_IOW( DRM_COMMAND_BASE + DRM_RADEON_SURF_FREE, drm_radeon_surface_free_t) /* KMS */ #define DRM_IOCTL_RADEON_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_INFO, struct drm_radeon_gem_info) #define DRM_IOCTL_RADEON_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_CREATE, struct drm_radeon_gem_create) #define DRM_IOCTL_RADEON_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_MMAP, struct drm_radeon_gem_mmap) #define DRM_IOCTL_RADEON_GEM_PREAD DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_PREAD, struct drm_radeon_gem_pread) #define DRM_IOCTL_RADEON_GEM_PWRITE DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_PWRITE, struct drm_radeon_gem_pwrite) #define DRM_IOCTL_RADEON_GEM_SET_DOMAIN DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_DOMAIN, struct drm_radeon_gem_set_domain) #define DRM_IOCTL_RADEON_GEM_WAIT_IDLE DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_GEM_WAIT_IDLE, struct drm_radeon_gem_wait_idle) #define DRM_IOCTL_RADEON_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_CS, struct drm_radeon_cs) #define DRM_IOCTL_RADEON_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INFO, struct drm_radeon_info) #define DRM_IOCTL_RADEON_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_TILING, struct drm_radeon_gem_set_tiling) #define DRM_IOCTL_RADEON_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_GET_TILING, struct drm_radeon_gem_get_tiling) typedef struct drm_radeon_init { enum { RADEON_INIT_CP = 0x01, RADEON_CLEANUP_CP = 0x02, RADEON_INIT_R200_CP = 0x03, RADEON_INIT_R300_CP = 0x04, RADEON_INIT_R600_CP = 0x05 } func; unsigned long sarea_priv_offset; int is_pci; /* for overriding only */ int cp_mode; int gart_size; int ring_size; int usec_timeout; unsigned int fb_bpp; unsigned int front_offset, front_pitch; unsigned int back_offset, back_pitch; unsigned int depth_bpp; unsigned int depth_offset, depth_pitch; /* DEPRECATED commented out below to allow for -Werror build */ unsigned long fb_offset; /* deprecated, driver asks hardware */ unsigned long mmio_offset; /* deprecated, driver asks hardware */ unsigned long ring_offset; unsigned long ring_rptr_offset; unsigned long buffers_offset; unsigned long gart_textures_offset; } drm_radeon_init_t; typedef struct drm_radeon_cp_stop { int flush; int idle; } drm_radeon_cp_stop_t; typedef struct drm_radeon_fullscreen { enum { RADEON_INIT_FULLSCREEN = 0x01, RADEON_CLEANUP_FULLSCREEN = 0x02 } func; } drm_radeon_fullscreen_t; #define CLEAR_X1 0 #define CLEAR_Y1 1 #define CLEAR_X2 2 #define CLEAR_Y2 3 #define CLEAR_DEPTH 4 typedef union drm_radeon_clear_rect { float f[5]; unsigned int ui[5]; } drm_radeon_clear_rect_t; typedef struct drm_radeon_clear { unsigned int flags; unsigned int clear_color; unsigned int clear_depth; unsigned int color_mask; unsigned int depth_mask; /* misnamed field: should be stencil */ drm_radeon_clear_rect_t *depth_boxes; } drm_radeon_clear_t; typedef struct drm_radeon_vertex { int prim; int idx; /* Index of vertex buffer */ int count; /* Number of vertices in buffer */ int discard; /* Client finished with buffer? */ } drm_radeon_vertex_t; typedef struct drm_radeon_indices { int prim; int idx; int start; int end; int discard; /* Client finished with buffer? */ } drm_radeon_indices_t; /* v1.2 - obsoletes drm_radeon_vertex and drm_radeon_indices * - allows multiple primitives and state changes in a single ioctl * - supports driver change to emit native primitives */ typedef struct drm_radeon_vertex2 { int idx; /* Index of vertex buffer */ int discard; /* Client finished with buffer? */ int nr_states; drm_radeon_state_t *state; int nr_prims; drm_radeon_prim_t *prim; } drm_radeon_vertex2_t; /* v1.3 - obsoletes drm_radeon_vertex2 * - allows arbitarily large cliprect list * - allows updating of tcl packet, vector and scalar state * - allows memory-efficient description of state updates * - allows state to be emitted without a primitive * (for clears, ctx switches) * - allows more than one dma buffer to be referenced per ioctl * - supports tcl driver * - may be extended in future versions with new cmd types, packets */ typedef struct drm_radeon_cmd_buffer { int bufsz; char *buf; int nbox; struct drm_clip_rect *boxes; } drm_radeon_cmd_buffer_t; typedef struct drm_radeon_tex_image { unsigned int x, y; /* Blit coordinates */ unsigned int width, height; const void *data; } drm_radeon_tex_image_t; typedef struct drm_radeon_texture { unsigned int offset; int pitch; int format; int width; /* Texture image coordinates */ int height; drm_radeon_tex_image_t *image; } drm_radeon_texture_t; typedef struct drm_radeon_stipple { unsigned int *mask; } drm_radeon_stipple_t; typedef struct drm_radeon_indirect { int idx; int start; int end; int discard; } drm_radeon_indirect_t; #define RADEON_INDIRECT_DISCARD (1 << 0) #define RADEON_INDIRECT_NOFLUSH (1 << 1) /* enum for card type parameters */ #define RADEON_CARD_PCI 0 #define RADEON_CARD_AGP 1 #define RADEON_CARD_PCIE 2 /* 1.3: An ioctl to get parameters that aren't available to the 3d * client any other way. */ #define RADEON_PARAM_GART_BUFFER_OFFSET 1 /* card offset of 1st GART buffer */ #define RADEON_PARAM_LAST_FRAME 2 #define RADEON_PARAM_LAST_DISPATCH 3 #define RADEON_PARAM_LAST_CLEAR 4 /* Added with DRM version 1.6. */ #define RADEON_PARAM_IRQ_NR 5 #define RADEON_PARAM_GART_BASE 6 /* card offset of GART base */ /* Added with DRM version 1.8. */ #define RADEON_PARAM_REGISTER_HANDLE 7 /* for drmMap() */ #define RADEON_PARAM_STATUS_HANDLE 8 #define RADEON_PARAM_SAREA_HANDLE 9 #define RADEON_PARAM_GART_TEX_HANDLE 10 #define RADEON_PARAM_SCRATCH_OFFSET 11 #define RADEON_PARAM_CARD_TYPE 12 #define RADEON_PARAM_VBLANK_CRTC 13 /* VBLANK CRTC */ #define RADEON_PARAM_FB_LOCATION 14 /* FB location */ #define RADEON_PARAM_NUM_GB_PIPES 15 /* num GB pipes */ typedef struct drm_radeon_getparam { int param; void *value; } drm_radeon_getparam_t; /* 1.6: Set up a memory manager for regions of shared memory: */ #define RADEON_MEM_REGION_GART 1 #define RADEON_MEM_REGION_FB 2 typedef struct drm_radeon_mem_alloc { int region; int alignment; int size; int *region_offset; /* offset from start of fb or GART */ } drm_radeon_mem_alloc_t; typedef struct drm_radeon_mem_free { int region; int region_offset; } drm_radeon_mem_free_t; typedef struct drm_radeon_mem_init_heap { int region; int size; int start; } drm_radeon_mem_init_heap_t; /* 1.6: Userspace can request & wait on irq's: */ typedef struct drm_radeon_irq_emit { int *irq_seq; } drm_radeon_irq_emit_t; typedef struct drm_radeon_irq_wait { int irq_seq; } drm_radeon_irq_wait_t; /* 1.10: Clients tell the DRM where they think the framebuffer is located in * the card's address space, via a new generic ioctl to set parameters */ typedef struct drm_radeon_setparam { unsigned int param; int64_t value; } drm_radeon_setparam_t; #define RADEON_SETPARAM_FB_LOCATION 1 /* determined framebuffer location */ #define RADEON_SETPARAM_SWITCH_TILING 2 /* enable/disable color tiling */ #define RADEON_SETPARAM_PCIGART_LOCATION 3 /* PCI Gart Location */ #define RADEON_SETPARAM_NEW_MEMMAP 4 /* Use new memory map */ #define RADEON_SETPARAM_PCIGART_TABLE_SIZE 5 /* PCI GART Table Size */ #define RADEON_SETPARAM_VBLANK_CRTC 6 /* VBLANK CRTC */ /* 1.14: Clients can allocate/free a surface */ typedef struct drm_radeon_surface_alloc { unsigned int address; unsigned int size; unsigned int flags; } drm_radeon_surface_alloc_t; typedef struct drm_radeon_surface_free { unsigned int address; } drm_radeon_surface_free_t; #define DRM_RADEON_VBLANK_CRTC1 1 #define DRM_RADEON_VBLANK_CRTC2 2 /* * Kernel modesetting world below. */ #define RADEON_GEM_DOMAIN_CPU 0x1 #define RADEON_GEM_DOMAIN_GTT 0x2 #define RADEON_GEM_DOMAIN_VRAM 0x4 struct drm_radeon_gem_info { uint64_t gart_size; uint64_t vram_size; uint64_t vram_visible; }; #define RADEON_GEM_NO_BACKING_STORE 1 struct drm_radeon_gem_create { uint64_t size; uint64_t alignment; uint32_t handle; uint32_t initial_domain; uint32_t flags; }; #define RADEON_TILING_MASK 0xff #define RADEON_TILING_LINEAR 0x0 #define RADEON_TILING_MACRO 0x1 #define RADEON_TILING_MICRO 0x2 #define RADEON_TILING_SWAP_16BIT 0x4 #define RADEON_TILING_SWAP_32BIT 0x8 /* this object requires a surface when mapped - i.e. front buffer */ #define RADEON_TILING_SURFACE 0x10 #define RADEON_TILING_MICRO_SQUARE 0x20 #define RADEON_TILING_EG_BANKW_SHIFT 8 #define RADEON_TILING_EG_BANKW_MASK 0xf #define RADEON_TILING_EG_BANKH_SHIFT 12 #define RADEON_TILING_EG_BANKH_MASK 0xf #define RADEON_TILING_EG_MACRO_TILE_ASPECT_SHIFT 16 #define RADEON_TILING_EG_MACRO_TILE_ASPECT_MASK 0xf #define RADEON_TILING_EG_TILE_SPLIT_SHIFT 24 #define RADEON_TILING_EG_TILE_SPLIT_MASK 0xf #define RADEON_TILING_EG_STENCIL_TILE_SPLIT_SHIFT 28 #define RADEON_TILING_EG_STENCIL_TILE_SPLIT_MASK 0xf struct drm_radeon_gem_set_tiling { uint32_t handle; uint32_t tiling_flags; uint32_t pitch; }; struct drm_radeon_gem_get_tiling { uint32_t handle; uint32_t tiling_flags; uint32_t pitch; }; struct drm_radeon_gem_mmap { uint32_t handle; uint32_t pad; uint64_t offset; uint64_t size; uint64_t addr_ptr; }; struct drm_radeon_gem_set_domain { uint32_t handle; uint32_t read_domains; uint32_t write_domain; }; struct drm_radeon_gem_wait_idle { uint32_t handle; uint32_t pad; }; struct drm_radeon_gem_busy { uint32_t handle; uint32_t busy; }; struct drm_radeon_gem_pread { /** Handle for the object being read. */ uint32_t handle; uint32_t pad; /** Offset into the object to read from */ uint64_t offset; /** Length of data to read */ uint64_t size; /** Pointer to write the data into. */ /* void *, but pointers are not 32/64 compatible */ uint64_t data_ptr; }; struct drm_radeon_gem_pwrite { /** Handle for the object being written to. */ uint32_t handle; uint32_t pad; /** Offset into the object to write to */ uint64_t offset; /** Length of data to write */ uint64_t size; /** Pointer to read the data from. */ /* void *, but pointers are not 32/64 compatible */ uint64_t data_ptr; }; #define RADEON_CHUNK_ID_RELOCS 0x01 #define RADEON_CHUNK_ID_IB 0x02 struct drm_radeon_cs_chunk { uint32_t chunk_id; uint32_t length_dw; uint64_t chunk_data; }; struct drm_radeon_cs_reloc { uint32_t handle; uint32_t read_domains; uint32_t write_domain; uint32_t flags; }; struct drm_radeon_cs { uint32_t num_chunks; uint32_t cs_id; /* this points to uint64_t * which point to cs chunks */ uint64_t chunks; /* updates to the limits after this CS ioctl */ uint64_t gart_limit; uint64_t vram_limit; }; #define RADEON_INFO_DEVICE_ID 0x00 #define RADEON_INFO_NUM_GB_PIPES 0x01 struct drm_radeon_info { uint32_t request; uint32_t pad; uint64_t value; }; #endif xf86-video-ati-7.3.0/src/drmmode_display.c0000664000175000017500000016576712221374311015247 00000000000000/* * Copyright © 2007 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: * Dave Airlie * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include "micmap.h" #include "xf86cmap.h" #include "radeon.h" #include "radeon_reg.h" #include "radeon_drm.h" #include "sarea.h" #include "drmmode_display.h" /* DPMS */ #ifdef HAVE_XEXTPROTO_71 #include #else #define DPMS_SERVER #include #endif #define DEFAULT_NOMINAL_FRAME_RATE 60 static Bool drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height); static Bool RADEONZaphodStringMatches(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 PixmapPtr drmmode_create_bo_pixmap(ScrnInfoPtr pScrn, int width, int height, int depth, int bpp, int pitch, int tiling, struct radeon_bo *bo, struct radeon_surface *psurf) { RADEONInfoPtr info = RADEONPTR(pScrn); ScreenPtr pScreen = pScrn->pScreen; PixmapPtr pixmap; struct radeon_surface *surface; pixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, depth, 0); if (!pixmap) return NULL; if (!(*pScreen->ModifyPixmapHeader)(pixmap, width, height, depth, bpp, pitch, NULL)) { return NULL; } if (!info->use_glamor) exaMoveInPixmap(pixmap); radeon_set_pixmap_bo(pixmap, bo); if (info->ChipFamily >= CHIP_FAMILY_R600) { surface = radeon_get_pixmap_surface(pixmap); if (surface && psurf) *surface = *psurf; else if (surface) { memset(surface, 0, sizeof(struct radeon_surface)); surface->npix_x = width; surface->npix_y = height; surface->npix_z = 1; surface->blk_w = 1; surface->blk_h = 1; surface->blk_d = 1; surface->array_size = 1; surface->last_level = 0; surface->bpe = bpp / 8; surface->nsamples = 1; surface->flags = RADEON_SURF_SCANOUT; /* we are requiring a recent enough libdrm version */ surface->flags |= RADEON_SURF_HAS_TILE_MODE_INDEX; surface->flags |= RADEON_SURF_SET(RADEON_SURF_TYPE_2D, TYPE); surface->flags |= RADEON_SURF_SET(RADEON_SURF_MODE_LINEAR_ALIGNED, MODE); if (tiling & RADEON_TILING_MICRO) { surface->flags = RADEON_SURF_CLR(surface->flags, MODE); surface->flags |= RADEON_SURF_SET(RADEON_SURF_MODE_1D, MODE); } if (tiling & RADEON_TILING_MACRO) { surface->flags = RADEON_SURF_CLR(surface->flags, MODE); surface->flags |= RADEON_SURF_SET(RADEON_SURF_MODE_2D, MODE); } if (radeon_surface_best(info->surf_man, surface)) { return NULL; } if (radeon_surface_init(info->surf_man, surface)) { return NULL; } } } if (!radeon_glamor_create_textured_pixmap(pixmap)) { pScreen->DestroyPixmap(pixmap); return NULL; } return pixmap; } static void drmmode_destroy_bo_pixmap(PixmapPtr pixmap) { ScreenPtr pScreen = pixmap->drawable.pScreen; (*pScreen->DestroyPixmap)(pixmap); } 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; } /* * Retrieves present time in microseconds that is compatible * with units used by vblank timestamps. Depending on the kernel * version and DRM kernel module configuration, the vblank * timestamp can either be in real time or monotonic time */ int drmmode_get_current_ust(int drm_fd, CARD64 *ust) { uint64_t cap_value; int ret; struct timespec now; ret = drmGetCap(drm_fd, DRM_CAP_TIMESTAMP_MONOTONIC, &cap_value); if (ret || !cap_value) /* old kernel or drm_timestamp_monotonic turned off */ ret = clock_gettime(CLOCK_REALTIME, &now); else ret = clock_gettime(CLOCK_MONOTONIC, &now); if (ret) return ret; *ust = ((CARD64)now.tv_sec * 1000000) + ((CARD64)now.tv_nsec / 1000); return 0; } static void drmmode_crtc_dpms(xf86CrtcPtr crtc, int mode) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; ScrnInfoPtr scrn = crtc->scrn; RADEONInfoPtr info = RADEONPTR(scrn); CARD64 ust; int ret; if (drmmode_crtc->dpms_mode == DPMSModeOn && mode != DPMSModeOn) { drmVBlank vbl; /* * On->Off transition: record the last vblank time, * sequence number and frame period. */ vbl.request.type = DRM_VBLANK_RELATIVE; vbl.request.type |= radeon_populate_vbl_request_type(crtc); vbl.request.sequence = 0; ret = drmWaitVBlank(info->dri2.drm_fd, &vbl); if (ret) xf86DrvMsg(scrn->scrnIndex, X_ERROR, "%s cannot get last vblank counter\n", __func__); else { CARD64 seq = (CARD64)vbl.reply.sequence; CARD64 nominal_frame_rate, pix_in_frame; ust = ((CARD64)vbl.reply.tval_sec * 1000000) + vbl.reply.tval_usec; drmmode_crtc->dpms_last_ust = ust; drmmode_crtc->dpms_last_seq = seq; nominal_frame_rate = crtc->mode.Clock; nominal_frame_rate *= 1000; pix_in_frame = crtc->mode.HTotal * crtc->mode.VTotal; if (nominal_frame_rate == 0 || pix_in_frame == 0) nominal_frame_rate = DEFAULT_NOMINAL_FRAME_RATE; else nominal_frame_rate /= pix_in_frame; drmmode_crtc->dpms_last_fps = nominal_frame_rate; } } else if (drmmode_crtc->dpms_mode != DPMSModeOn && mode == DPMSModeOn) { /* * Off->On transition: calculate and accumulate the * number of interpolated vblanks while we were in Off state */ ret = drmmode_get_current_ust(info->dri2.drm_fd, &ust); if (ret) xf86DrvMsg(scrn->scrnIndex, X_ERROR, "%s cannot get current time\n", __func__); else if (drmmode_crtc->dpms_last_ust) { CARD64 time_elapsed, delta_seq; time_elapsed = ust - drmmode_crtc->dpms_last_ust; delta_seq = time_elapsed * drmmode_crtc->dpms_last_fps; delta_seq /= 1000000; drmmode_crtc->interpolated_vblanks += delta_seq; } } drmmode_crtc->dpms_mode = mode; } static PixmapPtr create_pixmap_for_fbcon(drmmode_ptr drmmode, ScrnInfoPtr pScrn, int fbcon_id) { PixmapPtr pixmap = NULL; struct radeon_bo *bo; drmModeFBPtr fbcon; struct drm_gem_flink flink; fbcon = drmModeGetFB(drmmode->fd, fbcon_id); if (fbcon == NULL) return NULL; if (fbcon->depth != pScrn->depth || fbcon->width != pScrn->virtualX || fbcon->height != pScrn->virtualY) goto out_free_fb; flink.handle = fbcon->handle; if (ioctl(drmmode->fd, DRM_IOCTL_GEM_FLINK, &flink) < 0) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Couldn't flink fbcon handle\n"); goto out_free_fb; } bo = radeon_bo_open(drmmode->bufmgr, flink.name, 0, 0, 0, 0); if (bo == NULL) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Couldn't allocate bo for fbcon handle\n"); goto out_free_fb; } pixmap = drmmode_create_bo_pixmap(pScrn, fbcon->width, fbcon->height, fbcon->depth, fbcon->bpp, fbcon->pitch, 0, bo, NULL); radeon_bo_unref(bo); out_free_fb: drmModeFreeFB(fbcon); return pixmap; } void drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); RADEONInfoPtr info = RADEONPTR(pScrn); PixmapPtr src, dst; ScreenPtr pScreen = pScrn->pScreen; int fbcon_id = 0; int i; int pitch; uint32_t tiling_flags = 0; Bool ret; if (info->accelOn == FALSE || info->use_glamor) goto fallback; for (i = 0; i < xf86_config->num_crtc; i++) { drmmode_crtc_private_ptr drmmode_crtc = xf86_config->crtc[i]->driver_private; if (drmmode_crtc->mode_crtc->buffer_id) fbcon_id = drmmode_crtc->mode_crtc->buffer_id; } if (!fbcon_id) goto fallback; if (fbcon_id == drmmode->fb_id) { /* in some rare case there might be no fbcon and we might already * be the one with the current fb to avoid a false deadlck in * kernel ttm code just do nothing as anyway there is nothing * to do */ return; } src = create_pixmap_for_fbcon(drmmode, pScrn, fbcon_id); if (!src) goto fallback; if (info->allowColorTiling) { if (info->ChipFamily >= CHIP_FAMILY_R600) { if (info->allowColorTiling2D) { tiling_flags |= RADEON_TILING_MACRO; } else { tiling_flags |= RADEON_TILING_MICRO; } } else tiling_flags |= RADEON_TILING_MACRO; } pitch = RADEON_ALIGN(pScrn->displayWidth, drmmode_get_pitch_align(pScrn, info->pixel_bytes, tiling_flags)) * info->pixel_bytes; dst = drmmode_create_bo_pixmap(pScrn, pScrn->virtualX, pScrn->virtualY, pScrn->depth, pScrn->bitsPerPixel, pitch, tiling_flags, info->front_bo, &info->front_surface); if (!dst) goto out_free_src; ret = info->accel_state->exa->PrepareCopy (src, dst, -1, -1, GXcopy, FB_ALLONES); if (!ret) goto out_free_src; info->accel_state->exa->Copy (dst, 0, 0, 0, 0, pScrn->virtualX, pScrn->virtualY); info->accel_state->exa->DoneCopy (dst); radeon_cs_flush_indirect(pScrn); #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) >= 10 pScreen->canDoBGNoneRoot = TRUE; #endif drmmode_destroy_bo_pixmap(dst); out_free_src: drmmode_destroy_bo_pixmap(src); return; fallback: /* map and memset the bo */ if (radeon_bo_map(info->front_bo, 1)) return; memset(info->front_bo->ptr, 0x00, info->front_bo->size); radeon_bo_unmap(info->front_bo); } static Bool drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, int x, int y) { ScrnInfoPtr pScrn = crtc->scrn; RADEONInfoPtr info = RADEONPTR(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; int saved_x, saved_y; Rotation saved_rotation; DisplayModeRec saved_mode; uint32_t *output_ids; int output_count = 0; Bool ret = TRUE; int i; int fb_id; drmModeModeInfo kmode; int pitch; uint32_t tiling_flags = 0; int height; if (info->allowColorTiling) { if (info->ChipFamily >= CHIP_FAMILY_R600) tiling_flags |= RADEON_TILING_MICRO; else tiling_flags |= RADEON_TILING_MACRO; } pitch = RADEON_ALIGN(pScrn->displayWidth, drmmode_get_pitch_align(pScrn, info->pixel_bytes, tiling_flags)) * info->pixel_bytes; height = RADEON_ALIGN(pScrn->virtualY, drmmode_get_height_align(pScrn, tiling_flags)); if (info->ChipFamily >= CHIP_FAMILY_R600) { pitch = info->front_surface.level[0].pitch_bytes; } if (drmmode->fb_id == 0) { ret = drmModeAddFB(drmmode->fd, pScrn->virtualX, height, pScrn->depth, pScrn->bitsPerPixel, pitch, info->front_bo->handle, &drmmode->fb_id); if (ret < 0) { ErrorF("failed to add fb\n"); return FALSE; } } saved_mode = crtc->mode; saved_x = crtc->x; saved_y = crtc->y; saved_rotation = crtc->rotation; if (mode) { crtc->mode = *mode; crtc->x = x; crtc->y = y; crtc->rotation = rotation; crtc->transformPresent = FALSE; } output_ids = calloc(sizeof(uint32_t), xf86_config->num_output); if (!output_ids) { ret = FALSE; goto done; } if (mode) { 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; output_ids[output_count] = drmmode_output->mode_output->connector_id; output_count++; } if (!xf86CrtcRotate(crtc)) { goto done; } crtc->funcs->gamma_set(crtc, crtc->gamma_red, crtc->gamma_green, crtc->gamma_blue, crtc->gamma_size); drmmode_ConvertToKMode(crtc->scrn, &kmode, mode); fb_id = drmmode->fb_id; #ifdef RADEON_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 = y = 0; } ret = drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, fb_id, x, y, output_ids, output_count, &kmode); if (ret) xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR, "failed to set mode: %s", strerror(-ret)); else ret = TRUE; if (crtc->scrn->pScreen) xf86CrtcSetScreenSubpixelOrder(crtc->scrn->pScreen); /* go through all the outputs and force DPMS them back on? */ for (i = 0; i < xf86_config->num_output; i++) { xf86OutputPtr output = xf86_config->output[i]; if (output->crtc != crtc) continue; output->funcs->dpms(output, DPMSModeOn); } } if (pScrn->pScreen && !xf86ReturnOptValBool(info->Options, OPTION_SW_CURSOR, FALSE)) xf86_reload_cursors(pScrn->pScreen); done: if (!ret) { crtc->x = saved_x; crtc->y = saved_y; crtc->rotation = saved_rotation; crtc->mode = saved_mode; } #if defined(XF86_CRTC_VERSION) && XF86_CRTC_VERSION >= 3 else crtc->active = TRUE; #endif return ret; } static void drmmode_set_cursor_colors (xf86CrtcPtr crtc, int bg, int fg) { } 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 drmmode_load_cursor_argb (xf86CrtcPtr crtc, CARD32 *image) { ScrnInfoPtr pScrn = crtc->scrn; RADEONInfoPtr info = RADEONPTR(pScrn); drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; int i; uint32_t *ptr; uint32_t cursor_size = info->cursor_w * info->cursor_h; /* cursor should be mapped already */ ptr = (uint32_t *)(drmmode_crtc->cursor_bo->ptr); for (i = 0; i < cursor_size; i++) ptr[i] = cpu_to_le32(image[i]); } static void drmmode_hide_cursor (xf86CrtcPtr crtc) { ScrnInfoPtr pScrn = crtc->scrn; RADEONInfoPtr info = RADEONPTR(pScrn); 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, info->cursor_w, info->cursor_h); } static void drmmode_show_cursor (xf86CrtcPtr crtc) { ScrnInfoPtr pScrn = crtc->scrn; RADEONInfoPtr info = RADEONPTR(pScrn); drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; uint32_t handle = drmmode_crtc->cursor_bo->handle; drmModeSetCursor(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, handle, info->cursor_w, info->cursor_h); } static void * drmmode_crtc_shadow_allocate(xf86CrtcPtr crtc, int width, int height) { ScrnInfoPtr pScrn = crtc->scrn; RADEONInfoPtr info = RADEONPTR(pScrn); drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; int size; struct radeon_bo *rotate_bo; int ret; unsigned long rotate_pitch; int base_align; /* rotation requires acceleration */ if (info->r600_shadow_fb) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Rotation requires acceleration!\n"); return NULL; } rotate_pitch = RADEON_ALIGN(width, drmmode_get_pitch_align(crtc->scrn, drmmode->cpp, 0)) * drmmode->cpp; height = RADEON_ALIGN(height, drmmode_get_height_align(crtc->scrn, 0)); base_align = drmmode_get_base_align(crtc->scrn, drmmode->cpp, 0); size = RADEON_ALIGN(rotate_pitch * height, RADEON_GPU_PAGE_SIZE); rotate_bo = radeon_bo_open(drmmode->bufmgr, 0, size, base_align, RADEON_GEM_DOMAIN_VRAM, 0); if (rotate_bo == NULL) return NULL; radeon_bo_map(rotate_bo, 1); ret = drmModeAddFB(drmmode->fd, width, height, crtc->scrn->depth, crtc->scrn->bitsPerPixel, rotate_pitch, rotate_bo->handle, &drmmode_crtc->rotate_fb_id); if (ret) { ErrorF("failed to add rotate fb\n"); } drmmode_crtc->rotate_bo = rotate_bo; return drmmode_crtc->rotate_bo->ptr; } 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; drmmode_ptr drmmode = drmmode_crtc->drmmode; unsigned long rotate_pitch; PixmapPtr rotate_pixmap; if (!data) data = drmmode_crtc_shadow_allocate (crtc, width, height); rotate_pitch = RADEON_ALIGN(width, drmmode_get_pitch_align(pScrn, drmmode->cpp, 0)) * drmmode->cpp; rotate_pixmap = drmmode_create_bo_pixmap(pScrn, width, height, pScrn->depth, pScrn->bitsPerPixel, rotate_pitch, 0, drmmode_crtc->rotate_bo, NULL); if (rotate_pixmap == NULL) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Couldn't allocate shadow pixmap for rotated CRTC\n"); } return 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) drmmode_destroy_bo_pixmap(rotate_pixmap); if (data) { drmModeRmFB(drmmode->fd, drmmode_crtc->rotate_fb_id); drmmode_crtc->rotate_fb_id = 0; radeon_bo_unmap(drmmode_crtc->rotate_bo); radeon_bo_unref(drmmode_crtc->rotate_bo); drmmode_crtc->rotate_bo = NULL; } } static void drmmode_crtc_gamma_set(xf86CrtcPtr crtc, uint16_t *red, uint16_t *green, uint16_t *blue, int size) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; drmModeCrtcSetGamma(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, size, red, green, blue); } #ifdef RADEON_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; int c, total_width = 0, max_height = 0, this_x = 0; if (!ppix) { if (crtc->randr_crtc->scanout_pixmap) PixmapStopDirtyTracking(crtc->randr_crtc->scanout_pixmap, screenpix); 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; } #ifndef HAS_DIRTYTRACKING2 if (iter != crtc) { ErrorF("Cannot do multiple crtcs without X server dirty tracking 2 interface\n"); return FALSE; } #endif } 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_DIRTYTRACKING2 PixmapStartDirtyTracking2(ppix, screenpix, 0, 0, this_x, 0); #else PixmapStartDirtyTracking(ppix, screenpix, 0, 0); #endif return TRUE; } #endif static const xf86CrtcFuncsRec drmmode_crtc_funcs = { .dpms = drmmode_crtc_dpms, .set_mode_major = drmmode_set_mode_major, .set_cursor_colors = drmmode_set_cursor_colors, .set_cursor_position = drmmode_set_cursor_position, .show_cursor = drmmode_show_cursor, .hide_cursor = drmmode_hide_cursor, .load_cursor_argb = drmmode_load_cursor_argb, .gamma_set = drmmode_crtc_gamma_set, .shadow_create = drmmode_crtc_shadow_create, .shadow_allocate = drmmode_crtc_shadow_allocate, .shadow_destroy = drmmode_crtc_shadow_destroy, .destroy = NULL, /* XXX */ #ifdef RADEON_PIXMAP_SHARING .set_scanout_pixmap = drmmode_set_scanout_pixmap, #endif }; int drmmode_get_crtc_id(xf86CrtcPtr crtc) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; return drmmode_crtc->hw_id; } void drmmode_crtc_hw_id(xf86CrtcPtr crtc) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; ScrnInfoPtr pScrn = crtc->scrn; RADEONInfoPtr info = RADEONPTR(pScrn); struct drm_radeon_info ginfo; int r; uint32_t tmp; memset(&ginfo, 0, sizeof(ginfo)); ginfo.request = 0x4; tmp = drmmode_crtc->mode_crtc->crtc_id; ginfo.value = (uintptr_t)&tmp; r = drmCommandWriteRead(info->dri2.drm_fd, DRM_RADEON_INFO, &ginfo, sizeof(ginfo)); if (r) { drmmode_crtc->hw_id = -1; return; } drmmode_crtc->hw_id = tmp; } static void drmmode_crtc_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num) { xf86CrtcPtr crtc; drmmode_crtc_private_ptr drmmode_crtc; crtc = xf86CrtcCreate(pScrn, &drmmode_crtc_funcs); if (crtc == NULL) return; drmmode_crtc = xnfcalloc(sizeof(drmmode_crtc_private_rec), 1); drmmode_crtc->mode_crtc = drmModeGetCrtc(drmmode->fd, drmmode->mode_res->crtcs[num]); drmmode_crtc->drmmode = drmmode; crtc->driver_private = drmmode_crtc; drmmode_crtc_hw_id(crtc); return; } 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; drmModeFreeConnector(drmmode_output->mode_output); drmmode_output->mode_output = drmModeGetConnector(drmmode->fd, drmmode_output->output_id); if (!drmmode_output->mode_output) 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 pModes) { return MODE_OK; } 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; drmModePropertyPtr props; xf86MonPtr mon = NULL; if (!koutput) return NULL; /* look for an EDID property */ for (i = 0; i < koutput->count_props; i++) { props = drmModeGetProperty(drmmode->fd, koutput->props[i]); if (props && (props->flags & DRM_MODE_PROP_BLOB)) { if (!strcmp(props->name, "EDID")) { if (drmmode_output->edid_blob) drmModeFreePropertyBlob(drmmode_output->edid_blob); drmmode_output->edid_blob = drmModeGetPropertyBlob(drmmode->fd, koutput->prop_values[i]); } } if (props) drmModeFreeProperty(props); } if (drmmode_output->edid_blob) { mon = xf86InterpretEDID(output->scrn->scrnIndex, drmmode_output->edid_blob->data); if (mon && drmmode_output->edid_blob->length > 128) mon->flags |= MONITOR_EDID_COMPLETE_RAWDATA; } xf86OutputSetEDID(output, mon); /* 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); for (i = 0; i < drmmode_output->num_props; i++) { drmModeFreeProperty(drmmode_output->props[i].mode_prop); free(drmmode_output->props[i].atoms); } for (i = 0; i < drmmode_output->mode_output->count_encoders; i++) { drmModeFreeEncoder(drmmode_output->mode_encoders[i]); free(drmmode_output->mode_encoders); } free(drmmode_output->props); 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; drmmode_ptr drmmode = drmmode_output->drmmode; drmModeConnectorSetProperty(drmmode->fd, koutput->connector_id, drmmode_output->dpms_enum_id, mode); return; } 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; 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].value = mode_output->prop_values[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; if (drmmode_prop->flags & DRM_MODE_PROP_RANGE) { INT32 range[2]; INT32 value = p->value; 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, TRUE); 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 == p->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, TRUE); 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; 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; drmModeConnectorSetProperty(drmmode->fd, drmmode_output->output_id, p->mode_prop->prop_id, (uint64_t)val); 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); name = NameForAtom(atom); /* 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)) { drmModeConnectorSetProperty(drmmode->fd, drmmode_output->output_id, p->mode_prop->prop_id, p->mode_prop->enums[j].value); return TRUE; } } } } return TRUE; } static Bool drmmode_output_get_property(xf86OutputPtr output, Atom property) { return TRUE; } static const xf86OutputFuncsRec drmmode_output_funcs = { .dpms = drmmode_output_dpms, .create_resources = drmmode_output_create_resources, .set_property = drmmode_output_set_property, .get_property = drmmode_output_get_property, #if 0 .save = drmmode_crt_save, .restore = drmmode_crt_restore, .mode_fixup = drmmode_crt_mode_fixup, .prepare = drmmode_output_prepare, .mode_set = drmmode_crt_mode_set, .commit = drmmode_output_commit, #endif .detect = drmmode_output_detect, .mode_valid = drmmode_output_mode_valid, .get_modes = drmmode_output_get_modes, .destroy = drmmode_output_destroy }; static int subpixel_conv_table[7] = { 0, SubPixelUnknown, SubPixelHorizontalRGB, SubPixelHorizontalBGR, SubPixelVerticalRGB, SubPixelVerticalBGR, SubPixelNone }; const char *output_names[] = { "None", "VGA", "DVI", "DVI", "DVI", "Composite", "S-video", "LVDS", "CTV", "DIN", "DisplayPort", "HDMI", "HDMI", "TV", "eDP" }; #define NUM_OUTPUT_NAMES (sizeof(output_names) / sizeof(output_names[0])) static void drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int num, int *num_dvi, int *num_hdmi) { RADEONInfoPtr info = RADEONPTR(pScrn); xf86OutputPtr output; drmModeConnectorPtr koutput; drmModeEncoderPtr *kencoders = NULL; drmmode_output_private_ptr drmmode_output; drmModePropertyPtr props; char name[32]; int i; const char *s; koutput = drmModeGetConnector(drmmode->fd, drmmode->mode_res->connectors[num]); if (!koutput) return; kencoders = calloc(sizeof(drmModeEncoderPtr), koutput->count_encoders); if (!kencoders) { goto out_free_encoders; } for (i = 0; i < koutput->count_encoders; i++) { kencoders[i] = drmModeGetEncoder(drmmode->fd, koutput->encoders[i]); if (!kencoders[i]) { goto out_free_encoders; } } if (koutput->connector_type >= NUM_OUTPUT_NAMES) snprintf(name, 32, "Unknown%d-%d", koutput->connector_type, koutput->connector_type_id - 1); #ifdef RADEON_PIXMAP_SHARING 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 - 1); #endif else { /* need to do smart conversion here for compat with non-kms ATI driver */ if (koutput->connector_type_id == 1) { switch(koutput->connector_type) { case DRM_MODE_CONNECTOR_DVII: case DRM_MODE_CONNECTOR_DVID: case DRM_MODE_CONNECTOR_DVIA: snprintf(name, 32, "%s-%d", output_names[koutput->connector_type], *num_dvi); (*num_dvi)++; break; case DRM_MODE_CONNECTOR_HDMIA: case DRM_MODE_CONNECTOR_HDMIB: snprintf(name, 32, "%s-%d", output_names[koutput->connector_type], *num_hdmi); (*num_hdmi)++; break; case DRM_MODE_CONNECTOR_VGA: case DRM_MODE_CONNECTOR_DisplayPort: snprintf(name, 32, "%s-%d", output_names[koutput->connector_type], koutput->connector_type_id - 1); break; default: snprintf(name, 32, "%s", output_names[koutput->connector_type]); break; } } else { snprintf(name, 32, "%s-%d", output_names[koutput->connector_type], koutput->connector_type_id - 1); } } if (xf86IsEntityShared(pScrn->entityList[0])) { if ((s = xf86GetOptValString(info->Options, OPTION_ZAPHOD_HEADS))) { if (!RADEONZaphodStringMatches(pScrn, s, name)) goto out_free_encoders; } else { if (info->IsPrimary && (num != 0)) goto out_free_encoders; else if (info->IsSecondary && (num != 1)) goto out_free_encoders; } } output = xf86OutputCreate (pScrn, &drmmode_output_funcs, name); if (!output) { goto out_free_encoders; } drmmode_output = calloc(sizeof(drmmode_output_private_rec), 1); if (!drmmode_output) { xf86OutputDestroy(output); goto out_free_encoders; } drmmode_output->output_id = drmmode->mode_res->connectors[num]; drmmode_output->mode_output = koutput; drmmode_output->mode_encoders = kencoders; drmmode_output->drmmode = drmmode; output->mm_width = koutput->mmWidth; output->mm_height = koutput->mmHeight; output->subpixel_order = subpixel_conv_table[koutput->subpixel]; output->interlaceAllowed = TRUE; output->doubleScanAllowed = TRUE; output->driver_private = drmmode_output; output->possible_crtcs = 0xffffffff; for (i = 0; i < koutput->count_encoders; i++) { output->possible_crtcs &= kencoders[i]->possible_crtcs; } /* work out the possible clones later */ output->possible_clones = 0; 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")) { drmmode_output->dpms_enum_id = koutput->props[i]; drmModeFreeProperty(props); break; } drmModeFreeProperty(props); } } return; out_free_encoders: if (kencoders){ for (i = 0; i < koutput->count_encoders; i++) drmModeFreeEncoder(kencoders[i]); free(kencoders); } drmModeFreeConnector(koutput); } uint32_t find_clones(ScrnInfoPtr scrn, xf86OutputPtr output) { drmmode_output_private_ptr drmmode_output = output->driver_private, clone_drmout; int i; xf86OutputPtr clone_output; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); int index_mask = 0; if (drmmode_output->enc_clone_mask == 0) return index_mask; for (i = 0; i < xf86_config->num_output; i++) { clone_output = xf86_config->output[i]; clone_drmout = clone_output->driver_private; if (output == clone_output) continue; if (clone_drmout->enc_mask == 0) continue; if (drmmode_output->enc_clone_mask == clone_drmout->enc_mask) index_mask |= (1 << i); } return index_mask; } static void drmmode_clones_init(ScrnInfoPtr scrn, drmmode_ptr drmmode) { int i, j; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); 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; drmmode_output->enc_clone_mask = 0xff; /* and all the possible encoder clones for this output together */ for (j = 0; j < drmmode_output->mode_output->count_encoders; j++) { int k; for (k = 0; k < drmmode->mode_res->count_encoders; k++) { if (drmmode->mode_res->encoders[k] == drmmode_output->mode_encoders[j]->encoder_id) drmmode_output->enc_mask |= (1 << k); } drmmode_output->enc_clone_mask &= drmmode_output->mode_encoders[j]->possible_clones; } } for (i = 0; i < xf86_config->num_output; i++) { xf86OutputPtr output = xf86_config->output[i]; output->possible_clones = find_clones(scrn, output); } } /* returns height alignment in pixels */ int drmmode_get_height_align(ScrnInfoPtr scrn, uint32_t tiling) { RADEONInfoPtr info = RADEONPTR(scrn); int height_align = 1; if (info->ChipFamily >= CHIP_FAMILY_R600) { if (tiling & RADEON_TILING_MACRO) height_align = info->num_channels * 8; else if (tiling & RADEON_TILING_MICRO) height_align = 8; else height_align = 8; } else { if (tiling & RADEON_TILING_MICRO_SQUARE) height_align = 32; else if (tiling) height_align = 16; else height_align = 1; } return height_align; } /* returns pitch alignment in pixels */ int drmmode_get_pitch_align(ScrnInfoPtr scrn, int bpe, uint32_t tiling) { RADEONInfoPtr info = RADEONPTR(scrn); int pitch_align = 1; if (info->ChipFamily >= CHIP_FAMILY_R600) { if (tiling & RADEON_TILING_MACRO) { /* general surface requirements */ pitch_align = MAX(info->num_banks, (((info->group_bytes / 8) / bpe) * info->num_banks)) * 8; /* further restrictions for scanout */ pitch_align = MAX(info->num_banks * 8, pitch_align); } else if (tiling & RADEON_TILING_MICRO) { /* general surface requirements */ pitch_align = MAX(8, (info->group_bytes / (8 * bpe))); /* further restrictions for scanout */ pitch_align = MAX(info->group_bytes / bpe, pitch_align); } else { if (info->have_tiling_info) /* linear aligned requirements */ pitch_align = MAX(64, info->group_bytes / bpe); else /* default to 512 elements if we don't know the real * group size otherwise the kernel may reject the CS * if the group sizes don't match as the pitch won't * be aligned properly. */ pitch_align = 512; } } else { /* general surface requirements */ if (tiling) pitch_align = 256 / bpe; else pitch_align = 64; } return pitch_align; } /* returns base alignment in bytes */ int drmmode_get_base_align(ScrnInfoPtr scrn, int bpe, uint32_t tiling) { RADEONInfoPtr info = RADEONPTR(scrn); int pixel_align = drmmode_get_pitch_align(scrn, bpe, tiling); int height_align = drmmode_get_height_align(scrn, tiling); int base_align = RADEON_GPU_PAGE_SIZE; if (info->ChipFamily >= CHIP_FAMILY_R600) { if (tiling & RADEON_TILING_MACRO) base_align = MAX(info->num_banks * info->num_channels * 8 * 8 * bpe, pixel_align * bpe * height_align); else { if (info->have_tiling_info) base_align = info->group_bytes; else /* default to 512 if we don't know the real * group size otherwise the kernel may reject the CS * if the group sizes don't match as the base won't * be aligned properly. */ base_align = 512; } } return base_align; } static Bool drmmode_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); drmmode_crtc_private_ptr drmmode_crtc = xf86_config->crtc[0]->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; RADEONInfoPtr info = RADEONPTR(scrn); struct radeon_bo *old_front = NULL; Bool ret; ScreenPtr screen = xf86ScrnToScreen(scrn); uint32_t old_fb_id; int i, pitch, old_width, old_height, old_pitch; uint32_t screen_size; int cpp = info->pixel_bytes; struct radeon_bo *front_bo; struct radeon_surface surface; struct radeon_surface *psurface; uint32_t tiling_flags = 0, base_align; PixmapPtr ppix = screen->GetScreenPixmap(screen); void *fb_shadow; if (scrn->virtualX == width && scrn->virtualY == height) return TRUE; front_bo = info->front_bo; radeon_cs_flush_indirect(scrn); if (front_bo) radeon_bo_wait(front_bo); if (info->allowColorTiling) { if (info->ChipFamily >= CHIP_FAMILY_R600) { if (info->allowColorTiling2D) { tiling_flags |= RADEON_TILING_MACRO; } else { tiling_flags |= RADEON_TILING_MICRO; } } else tiling_flags |= RADEON_TILING_MACRO; } pitch = RADEON_ALIGN(width, drmmode_get_pitch_align(scrn, cpp, tiling_flags)) * cpp; height = RADEON_ALIGN(height, drmmode_get_height_align(scrn, tiling_flags)); screen_size = RADEON_ALIGN(pitch * height, RADEON_GPU_PAGE_SIZE); base_align = 4096; if (info->ChipFamily >= CHIP_FAMILY_R600) { memset(&surface, 0, sizeof(struct radeon_surface)); surface.npix_x = width; surface.npix_y = height; surface.npix_z = 1; surface.blk_w = 1; surface.blk_h = 1; surface.blk_d = 1; surface.array_size = 1; surface.last_level = 0; surface.bpe = cpp; surface.nsamples = 1; surface.flags = RADEON_SURF_SCANOUT; /* we are requiring a recent enough libdrm version */ surface.flags |= RADEON_SURF_HAS_TILE_MODE_INDEX; surface.flags |= RADEON_SURF_SET(RADEON_SURF_TYPE_2D, TYPE); surface.flags |= RADEON_SURF_SET(RADEON_SURF_MODE_LINEAR_ALIGNED, MODE); if (tiling_flags & RADEON_TILING_MICRO) { surface.flags = RADEON_SURF_CLR(surface.flags, MODE); surface.flags |= RADEON_SURF_SET(RADEON_SURF_MODE_1D, MODE); } if (tiling_flags & RADEON_TILING_MACRO) { surface.flags = RADEON_SURF_CLR(surface.flags, MODE); surface.flags |= RADEON_SURF_SET(RADEON_SURF_MODE_2D, MODE); } if (radeon_surface_best(info->surf_man, &surface)) { return FALSE; } if (radeon_surface_init(info->surf_man, &surface)) { return FALSE; } screen_size = surface.bo_size; base_align = surface.bo_alignment; pitch = surface.level[0].pitch_bytes; tiling_flags = 0; switch (surface.level[0].mode) { case RADEON_SURF_MODE_2D: tiling_flags |= RADEON_TILING_MACRO; tiling_flags |= surface.bankw << RADEON_TILING_EG_BANKW_SHIFT; tiling_flags |= surface.bankh << RADEON_TILING_EG_BANKH_SHIFT; tiling_flags |= surface.mtilea << RADEON_TILING_EG_MACRO_TILE_ASPECT_SHIFT; tiling_flags |= eg_tile_split(surface.tile_split) << RADEON_TILING_EG_TILE_SPLIT_SHIFT; break; case RADEON_SURF_MODE_1D: tiling_flags |= RADEON_TILING_MICRO; break; default: break; } info->front_surface = surface; } xf86DrvMsg(scrn->scrnIndex, X_INFO, "Allocate new frame buffer %dx%d stride %d\n", width, height, pitch / cpp); old_width = scrn->virtualX; old_height = scrn->virtualY; old_pitch = scrn->displayWidth; old_fb_id = drmmode->fb_id; old_front = info->front_bo; scrn->virtualX = width; scrn->virtualY = height; scrn->displayWidth = pitch / cpp; info->front_bo = radeon_bo_open(info->bufmgr, 0, screen_size, base_align, RADEON_GEM_DOMAIN_VRAM, 0); if (!info->front_bo) goto fail; #if X_BYTE_ORDER == X_BIG_ENDIAN switch (cpp) { case 4: tiling_flags |= RADEON_TILING_SWAP_32BIT; break; case 2: tiling_flags |= RADEON_TILING_SWAP_16BIT; break; } if (info->ChipFamily < CHIP_FAMILY_R600 && info->r600_shadow_fb && tiling_flags) tiling_flags |= RADEON_TILING_SURFACE; #endif if (tiling_flags) radeon_bo_set_tiling(info->front_bo, tiling_flags, pitch); ret = drmModeAddFB(drmmode->fd, width, height, scrn->depth, scrn->bitsPerPixel, pitch, info->front_bo->handle, &drmmode->fb_id); if (ret) goto fail; if (!info->r600_shadow_fb) { radeon_set_pixmap_bo(ppix, info->front_bo); psurface = radeon_get_pixmap_surface(ppix); *psurface = info->front_surface; screen->ModifyPixmapHeader(ppix, width, height, -1, -1, pitch, NULL); } else { if (radeon_bo_map(info->front_bo, 1)) goto fail; fb_shadow = calloc(1, screen_size); if (fb_shadow == NULL) goto fail; free(info->fb_shadow); info->fb_shadow = fb_shadow; screen->ModifyPixmapHeader(ppix, width, height, -1, -1, pitch, info->fb_shadow); } #if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,9,99,1,0) scrn->pixmapPrivate.ptr = ppix->devPrivate.ptr; #endif 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 (info->use_glamor) radeon_glamor_create_screen_resources(scrn->pScreen); if (old_fb_id) drmModeRmFB(drmmode->fd, old_fb_id); if (old_front) radeon_bo_unref(old_front); radeon_kms_update_vram_limit(scrn, screen_size); return TRUE; fail: if (info->front_bo) radeon_bo_unref(info->front_bo); info->front_bo = old_front; scrn->virtualX = old_width; scrn->virtualY = old_height; scrn->displayWidth = old_pitch; drmmode->fb_id = old_fb_id; return FALSE; } static const xf86CrtcConfigFuncsRec drmmode_xf86crtc_config_funcs = { drmmode_xf86crtc_resize }; static void drmmode_vblank_handler(int fd, unsigned int frame, unsigned int tv_sec, unsigned int tv_usec, void *event_data) { radeon_dri2_frame_event_handler(frame, tv_sec, tv_usec, event_data); } static void drmmode_flip_handler(int fd, unsigned int frame, unsigned int tv_sec, unsigned int tv_usec, void *event_data) { drmmode_flipevtcarrier_ptr flipcarrier = event_data; drmmode_flipdata_ptr flipdata = flipcarrier->flipdata; drmmode_ptr drmmode = flipdata->drmmode; /* 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_frame = frame; flipdata->fe_tv_sec = tv_sec; flipdata->fe_tv_usec = tv_usec; } free(flipcarrier); /* Last crtc completed flip? */ flipdata->flip_count--; if (flipdata->flip_count > 0) return; /* Release framebuffer */ drmModeRmFB(drmmode->fd, flipdata->old_fb_id); if (flipdata->event_data == NULL) return; /* Deliver cached msc, ust from reference crtc to flip event handler */ radeon_dri2_flip_event_handler(flipdata->fe_frame, flipdata->fe_tv_sec, flipdata->fe_tv_usec, flipdata->event_data); free(flipdata); } static void drm_wakeup_handler(pointer data, int err, pointer p) { drmmode_ptr drmmode = data; fd_set *read_mask = p; if (err >= 0 && FD_ISSET(drmmode->fd, read_mask)) { drmHandleEvent(drmmode->fd, &drmmode->event_context); } } Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp) { int i, num_dvi = 0, num_hdmi = 0; xf86CrtcConfigInit(pScrn, &drmmode_xf86crtc_config_funcs); drmmode->scrn = pScrn; drmmode->cpp = cpp; drmmode->mode_res = drmModeGetResources(drmmode->fd); if (!drmmode->mode_res) return FALSE; xf86CrtcSetSizeRange(pScrn, 320, 200, drmmode->mode_res->max_width, drmmode->mode_res->max_height); for (i = 0; i < drmmode->mode_res->count_crtcs; i++) if (!xf86IsEntityShared(pScrn->entityList[0]) || pScrn->confScreen->device->screen == i) drmmode_crtc_init(pScrn, drmmode, i); for (i = 0; i < drmmode->mode_res->count_connectors; i++) drmmode_output_init(pScrn, drmmode, i, &num_dvi, &num_hdmi); /* workout clones */ drmmode_clones_init(pScrn, drmmode); #ifdef RADEON_PIXMAP_SHARING xf86ProviderSetup(pScrn, NULL, "radeon"); #endif xf86InitialConfiguration(pScrn, TRUE); drmmode->event_context.version = DRM_EVENT_CONTEXT_VERSION; drmmode->event_context.vblank_handler = drmmode_vblank_handler; drmmode->event_context.page_flip_handler = drmmode_flip_handler; return TRUE; } void drmmode_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode) { RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); RADEONInfoPtr info = RADEONPTR(pScrn); if (info->dri2.pKernelDRMVersion->version_minor < 4) return; info->drmmode_inited = TRUE; if (pRADEONEnt->fd_wakeup_registered != serverGeneration) { AddGeneralSocket(drmmode->fd); RegisterBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA, drm_wakeup_handler, drmmode); pRADEONEnt->fd_wakeup_registered = serverGeneration; pRADEONEnt->fd_wakeup_ref = 1; } else pRADEONEnt->fd_wakeup_ref++; } void drmmode_fini(ScrnInfoPtr pScrn, drmmode_ptr drmmode) { RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); RADEONInfoPtr info = RADEONPTR(pScrn); if (info->dri2.pKernelDRMVersion->version_minor < 4 || !info->drmmode_inited) return; if (pRADEONEnt->fd_wakeup_registered == serverGeneration && !--pRADEONEnt->fd_wakeup_ref) { RemoveGeneralSocket(drmmode->fd); RemoveBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA, drm_wakeup_handler, drmmode); } } Bool drmmode_set_bufmgr(ScrnInfoPtr pScrn, drmmode_ptr drmmode, struct radeon_bo_manager *bufmgr) { drmmode->bufmgr = bufmgr; return TRUE; } void drmmode_set_cursor(ScrnInfoPtr scrn, drmmode_ptr drmmode, int id, struct radeon_bo *bo) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); xf86CrtcPtr crtc = xf86_config->crtc[id]; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; drmmode_crtc->cursor_bo = bo; } void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); xf86OutputPtr output = config->output[config->compat_output]; xf86CrtcPtr crtc = output->crtc; if (crtc && crtc->enabled) { drmmode_set_mode_major(crtc, &crtc->mode, crtc->rotation, x, y); } } Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode) { xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); int c; drmmode_copy_fb(pScrn, drmmode); for (c = 0; c < config->num_crtc; c++) { xf86CrtcPtr crtc = config->crtc[c]; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; xf86OutputPtr output = NULL; int o; /* Skip disabled CRTCs */ if (!crtc->enabled) { drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, 0, 0, 0, NULL, 0, NULL); continue; } if (config->output[config->compat_output]->crtc == crtc) output = config->output[config->compat_output]; else { for (o = 0; o < config->num_output; o++) if (config->output[o]->crtc == crtc) { output = config->output[o]; break; } } /* paranoia */ if (!output) continue; /* Mark that we'll need to re-set the mode for sure */ memset(&crtc->mode, 0, sizeof(crtc->mode)); if (!crtc->desiredMode.CrtcHDisplay) { DisplayModePtr mode = xf86OutputFindClosestMode (output, pScrn->currentMode); if (!mode) return FALSE; crtc->desiredMode = *mode; crtc->desiredRotation = RR_Rotate_0; crtc->desiredX = 0; crtc->desiredY = 0; } if (!crtc->funcs->set_mode_major(crtc, &crtc->desiredMode, crtc->desiredRotation, crtc->desiredX, crtc->desiredY)) return FALSE; } return TRUE; } static void drmmode_load_palette(ScrnInfoPtr pScrn, int numColors, int *indices, LOCO *colors, VisualPtr pVisual) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); uint16_t lut_r[256], lut_g[256], lut_b[256]; int index, j, i; int c; for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr crtc = xf86_config->crtc[c]; drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; for (i = 0 ; i < 256; i++) { lut_r[i] = drmmode_crtc->lut_r[i] << 6; lut_g[i] = drmmode_crtc->lut_g[i] << 6; lut_b[i] = drmmode_crtc->lut_b[i] << 6; } 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 << 6; lut_g[index * 8 + j] = colors[index].green << 6; lut_b[index * 8 + j] = colors[index].blue << 6; } } 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 << 6; lut_b[index * 8 + j] = colors[index].blue << 6; } } for (j = 0; j < 4; j++) { lut_g[index * 4 + j] = colors[index].green << 6; } } break; default: for (i = 0; i < numColors; i++) { index = indices[i]; lut_r[index] = colors[index].red << 6; lut_g[index] = colors[index].green << 6; lut_b[index] = colors[index].blue << 6; } break; } /* Make the change through RandR */ if (crtc->randr_crtc) RRCrtcGammaSet(crtc->randr_crtc, lut_r, lut_g, lut_b); else crtc->funcs->gamma_set(crtc, lut_r, lut_g, lut_b, 256); } } Bool drmmode_setup_colormap(ScreenPtr pScreen, ScrnInfoPtr pScrn) { xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, "Initializing kms color map\n"); if (!miCreateDefColormap(pScreen)) return FALSE; /* all radeons support 10 bit CLUTs */ if (!xf86HandleColormaps(pScreen, 256, 10, drmmode_load_palette, NULL, CMAP_PALETTED_TRUECOLOR #if 0 /* This option messes up text mode! (eich@suse.de) */ | CMAP_LOAD_EVEN_IF_OFFSCREEN #endif | CMAP_RELOAD_ON_MODE_SWITCH)) return FALSE; return TRUE; } #ifdef HAVE_LIBUDEV static void drmmode_handle_uevents(int fd, void *closure) { drmmode_ptr drmmode = closure; ScrnInfoPtr scrn = drmmode->scrn; struct udev_device *dev; dev = udev_monitor_receive_device(drmmode->uevent_monitor); if (!dev) return; RRGetInfo(xf86ScrnToScreen(scrn), TRUE); udev_device_unref(dev); } #endif void drmmode_uevent_init(ScrnInfoPtr scrn, drmmode_ptr drmmode) { #ifdef HAVE_LIBUDEV struct udev *u; struct udev_monitor *mon; 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; } drmmode->uevent_handler = xf86AddGeneralHandler(udev_monitor_get_fd(mon), drmmode_handle_uevents, drmmode); drmmode->uevent_monitor = mon; #endif } void drmmode_uevent_fini(ScrnInfoPtr scrn, drmmode_ptr drmmode) { #ifdef HAVE_LIBUDEV if (drmmode->uevent_handler) { struct udev *u = udev_monitor_get_udev(drmmode->uevent_monitor); xf86RemoveGeneralHandler(drmmode->uevent_handler); udev_monitor_unref(drmmode->uevent_monitor); udev_unref(u); } #endif } Bool radeon_do_pageflip(ScrnInfoPtr scrn, struct radeon_bo *new_front, void *data, int ref_crtc_hw_id) { RADEONInfoPtr info = RADEONPTR(scrn); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn); drmmode_crtc_private_ptr drmmode_crtc = config->crtc[0]->driver_private; drmmode_ptr drmmode = drmmode_crtc->drmmode; unsigned int pitch; int i, old_fb_id; uint32_t tiling_flags = 0; int height, emitted = 0; drmmode_flipdata_ptr flipdata; drmmode_flipevtcarrier_ptr flipcarrier; if (info->allowColorTiling) { if (info->ChipFamily >= CHIP_FAMILY_R600) tiling_flags |= RADEON_TILING_MICRO; else tiling_flags |= RADEON_TILING_MACRO; } pitch = RADEON_ALIGN(scrn->displayWidth, drmmode_get_pitch_align(scrn, info->pixel_bytes, tiling_flags)) * info->pixel_bytes; height = RADEON_ALIGN(scrn->virtualY, drmmode_get_height_align(scrn, tiling_flags)); if (info->ChipFamily >= CHIP_FAMILY_R600 && info->surf_man) { pitch = info->front_surface.level[0].pitch_bytes; } /* * Create a new handle for the back buffer */ old_fb_id = drmmode->fb_id; if (drmModeAddFB(drmmode->fd, scrn->virtualX, height, scrn->depth, scrn->bitsPerPixel, pitch, new_front->handle, &drmmode->fb_id)) goto error_out; flipdata = calloc(1, sizeof(drmmode_flipdata_rec)); if (!flipdata) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "flip queue: data alloc failed.\n"); goto error_undo; } /* * Queue flips on all enabled CRTCs * Note that if/when we get per-CRTC buffers, we'll have to update this. * Right now it assumes a single shared fb across all CRTCs, with the * kernel fixing up the offset of each CRTC as necessary. * * Also, flips queued on disabled or incorrectly configured displays * may never complete; this is a configuration error. */ flipdata->event_data = data; flipdata->drmmode = drmmode; for (i = 0; i < config->num_crtc; i++) { if (!config->crtc[i]->enabled) continue; flipdata->flip_count++; drmmode_crtc = config->crtc[i]->driver_private; flipcarrier = calloc(1, sizeof(drmmode_flipevtcarrier_rec)); 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 = (drmmode_crtc->hw_id == ref_crtc_hw_id); flipcarrier->flipdata = flipdata; if (drmModePageFlip(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id, drmmode->fb_id, DRM_MODE_PAGE_FLIP_EVENT, flipcarrier)) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "flip queue failed: %s\n", strerror(errno)); free(flipcarrier); if (emitted == 0) free(flipdata); goto error_undo; } emitted++; } flipdata->old_fb_id = old_fb_id; return TRUE; error_undo: drmModeRmFB(drmmode->fd, drmmode->fb_id); drmmode->fb_id = old_fb_id; error_out: xf86DrvMsg(scrn->scrnIndex, X_WARNING, "Page flip failed: %s\n", strerror(errno)); return FALSE; } xf86-video-ati-7.3.0/src/radeon_video.c0000664000175000017500000001671112234257031014514 00000000000000 #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include "radeon.h" #include "radeon_reg.h" #include "radeon_probe.h" #include "radeon_video.h" #include "xf86.h" #include "dixstruct.h" /* DPMS */ #ifdef HAVE_XEXTPROTO_71 #include #else #define DPMS_SERVER #include #endif #include #include "fourcc.h" #define OFF_DELAY 250 /* milliseconds */ #define FREE_DELAY 15000 #define OFF_TIMER 0x01 #define FREE_TIMER 0x02 #define CLIENT_VIDEO_ON 0x04 #define GET_PORT_PRIVATE(pScrn) \ (RADEONPortPrivPtr)((RADEONPTR(pScrn))->adaptor->pPortPrivates[0].ptr) static void radeon_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; dest->y1 = a->y1 > b->y1 ? a->y1 : b->y1; dest->y2 = a->y2 < b->y2 ? a->y2 : b->y2; if (dest->x1 >= dest->x2 || dest->y1 >= dest->y2) dest->x1 = dest->x2 = dest->y1 = dest->y2 = 0; } static void radeon_crtc_box(xf86CrtcPtr crtc, BoxPtr crtc_box) { if (crtc->enabled) { crtc_box->x1 = crtc->x; crtc_box->x2 = crtc->x + xf86ModeWidth(&crtc->mode, crtc->rotation); crtc_box->y1 = crtc->y; crtc_box->y2 = crtc->y + xf86ModeHeight(&crtc->mode, crtc->rotation); } else crtc_box->x1 = crtc_box->x2 = crtc_box->y1 = crtc_box->y2 = 0; } static int radeon_box_area(BoxPtr box) { return (int) (box->x2 - box->x1) * (int) (box->y2 - box->y1); } Bool radeon_crtc_is_enabled(xf86CrtcPtr crtc) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; return drmmode_crtc->dpms_mode == DPMSModeOn; } uint32_t radeon_get_interpolated_vblanks(xf86CrtcPtr crtc) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; return drmmode_crtc->interpolated_vblanks; } xf86CrtcPtr radeon_pick_best_crtc(ScrnInfoPtr pScrn, Bool consider_disabled, int x1, int x2, int y1, int y2) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); int coverage, best_coverage, c; BoxRec box, crtc_box, cover_box; RROutputPtr primary_output = NULL; xf86CrtcPtr best_crtc = NULL, primary_crtc = NULL; if (!pScrn->vtSema) return NULL; box.x1 = x1; box.x2 = x2; box.y1 = y1; box.y2 = y2; best_coverage = 0; /* Prefer the CRTC of the primary output */ #ifdef HAS_DIXREGISTERPRIVATEKEY if (dixPrivateKeyRegistered(rrPrivKey)) #endif { primary_output = RRFirstOutput(pScrn->pScreen); } if (primary_output && primary_output->crtc) primary_crtc = primary_output->crtc->devPrivate; /* first consider only enabled CRTCs */ for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr crtc = xf86_config->crtc[c]; if (!radeon_crtc_is_enabled(crtc)) continue; radeon_crtc_box(crtc, &crtc_box); radeon_box_intersect(&cover_box, &crtc_box, &box); coverage = radeon_box_area(&cover_box); if (coverage > best_coverage || (coverage == best_coverage && crtc == primary_crtc)) { best_crtc = crtc; best_coverage = coverage; } } if (best_crtc || !consider_disabled) return best_crtc; /* if we found nothing, repeat the search including disabled CRTCs */ for (c = 0; c < xf86_config->num_crtc; c++) { xf86CrtcPtr crtc = xf86_config->crtc[c]; radeon_crtc_box(crtc, &crtc_box); radeon_box_intersect(&cover_box, &crtc_box, &box); coverage = radeon_box_area(&cover_box); if (coverage > best_coverage || (coverage == best_coverage && crtc == primary_crtc)) { best_crtc = crtc; best_coverage = coverage; } } return best_crtc; } void RADEONInitVideo(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); XF86VideoAdaptorPtr *adaptors, *newAdaptors = NULL; XF86VideoAdaptorPtr texturedAdaptor = NULL; int num_adaptors; /* no overlay or 3D on RN50 */ if (info->ChipFamily == CHIP_FAMILY_RV100 && !pRADEONEnt->HasCRTC2) return; num_adaptors = xf86XVListGenericAdaptors(pScrn, &adaptors); newAdaptors = malloc((num_adaptors + 2) * sizeof(XF86VideoAdaptorPtr *)); if (newAdaptors == NULL) return; memcpy(newAdaptors, adaptors, num_adaptors * sizeof(XF86VideoAdaptorPtr)); adaptors = newAdaptors; if (info->use_glamor) { texturedAdaptor = radeon_glamor_xv_init(pScreen, 16); if (texturedAdaptor != NULL) { adaptors[num_adaptors++] = texturedAdaptor; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Set up textured video (glamor)\n"); } else xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to set up textured video (glamor)\n"); } else if ((info->ChipFamily < CHIP_FAMILY_RS400) || (info->directRenderingEnabled) ) { texturedAdaptor = RADEONSetupImageTexturedVideo(pScreen); if (texturedAdaptor != NULL) { adaptors[num_adaptors++] = texturedAdaptor; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Set up textured video\n"); } else xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to set up textured video\n"); } else xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Textured video requires CP on R5xx/R6xx/R7xx/IGP\n"); if(num_adaptors) xf86XVScreenInit(pScreen, adaptors, num_adaptors); if(texturedAdaptor) { XF86MCAdaptorPtr xvmcAdaptor = RADEONCreateAdaptorXvMC(pScreen, texturedAdaptor->name); if(xvmcAdaptor) { if(!xf86XvMCScreenInit(pScreen, 1, &xvmcAdaptor)) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[XvMC] Failed to initialize extension.\n"); else xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[XvMC] Extension initialized.\n"); } } if(newAdaptors) free(newAdaptors); } void RADEONCopyData( ScrnInfoPtr pScrn, unsigned char *src, unsigned char *dst, unsigned int srcPitch, unsigned int dstPitch, unsigned int h, unsigned int w, unsigned int bpp ){ /* Get the byte-swapping right for big endian systems */ if ( bpp == 2 ) { w *= 2; bpp = 1; } { int swap = RADEON_HOST_DATA_SWAP_NONE; #if X_BYTE_ORDER == X_BIG_ENDIAN switch(bpp) { case 2: swap = RADEON_HOST_DATA_SWAP_16BIT; break; case 4: swap = RADEON_HOST_DATA_SWAP_32BIT; break; } #endif w *= bpp; if (dstPitch == w && dstPitch == srcPitch) RADEONCopySwap(dst, src, h * dstPitch, swap); else { while (h--) { RADEONCopySwap(dst, src, w, swap); src += srcPitch; dst += dstPitch; } } } } void RADEONCopyMungedData( ScrnInfoPtr pScrn, unsigned char *src1, unsigned char *src2, unsigned char *src3, unsigned char *dst1, unsigned int srcPitch, unsigned int srcPitch2, unsigned int dstPitch, unsigned int h, unsigned int w ){ uint32_t *dst; uint8_t *s1, *s2, *s3; int i, j; w /= 2; for( j = 0; j < h; j++ ) { dst = (pointer)dst1; s1 = src1; s2 = src2; s3 = src3; i = w; while( i > 4 ) { dst[0] = cpu_to_le32(s1[0] | (s1[1] << 16) | (s3[0] << 8) | (s2[0] << 24)); dst[1] = cpu_to_le32(s1[2] | (s1[3] << 16) | (s3[1] << 8) | (s2[1] << 24)); dst[2] = cpu_to_le32(s1[4] | (s1[5] << 16) | (s3[2] << 8) | (s2[2] << 24)); dst[3] = cpu_to_le32(s1[6] | (s1[7] << 16) | (s3[3] << 8) | (s2[3] << 24)); dst += 4; s2 += 4; s3 += 4; s1 += 8; i -= 4; } while( i-- ) { dst[0] = cpu_to_le32(s1[0] | (s1[1] << 16) | (s3[0] << 8) | (s2[0] << 24)); dst++; s2++; s3++; s1 += 2; } dst1 += dstPitch; src1 += srcPitch; if( j & 1 ) { src2 += srcPitch2; src3 += srcPitch2; } } } xf86-video-ati-7.3.0/src/cayman_reg_auto.h0000664000175000017500000102447712177731114015236 00000000000000/* * Cayman Register documentation * * Copyright (C) 2011 Advanced Micro Devices, 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) 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 _CAYMAN_REG_AUTO #define _CAYMAN_REG_AUTO enum { VGT_VTX_VECT_EJECT_REG = 0x000088b0, PRIM_COUNT_mask = 0x3ff << 0, PRIM_COUNT_shift = 0, VGT_LAST_COPY_STATE = 0x000088c0, SRC_STATE_ID_mask = 0x07 << 0, SRC_STATE_ID_shift = 0, DST_STATE_ID_mask = 0x07 << 16, DST_STATE_ID_shift = 16, VGT_CACHE_INVALIDATION = 0x000088c4, CACHE_INVALIDATION_mask = 0x03 << 0, CACHE_INVALIDATION_shift = 0, VC_ONLY = 0x00, TC_ONLY = 0x01, VC_AND_TC = 0x02, VS_NO_EXTRA_BUFFER_bit = 1 << 5, AUTO_INVLD_EN_mask = 0x03 << 6, AUTO_INVLD_EN_shift = 6, VGT_GS_VERTEX_REUSE = 0x000088d4, VERT_REUSE_mask = 0x1f << 0, VERT_REUSE_shift = 0, VGT_CNTL_STATUS = 0x000088f0, VGT_OUT_INDX_BUSY_bit = 1 << 0, VGT_OUT_BUSY_bit = 1 << 1, VGT_PT_BUSY_bit = 1 << 2, VGT_TE_BUSY_bit = 1 << 3, VGT_VR_BUSY_bit = 1 << 4, VGT_PI_BUSY_bit = 1 << 5, VGT_INVLD_BUSY_bit = 1 << 6, VGT_GS_BUSY_bit = 1 << 7, VGT_HS_BUSY_bit = 1 << 8, VGT_TE11_BUSY_bit = 1 << 9, VGT_BUSY_bit = 1 << 10, VGT_PRIMITIVE_TYPE = 0x00008958, VGT_PRIMITIVE_TYPE__PRIM_TYPE_mask = 0x3f << 0, VGT_PRIMITIVE_TYPE__PRIM_TYPE_shift = 0, DI_PT_NONE = 0x00, DI_PT_POINTLIST = 0x01, DI_PT_LINELIST = 0x02, DI_PT_LINESTRIP = 0x03, DI_PT_TRILIST = 0x04, DI_PT_TRIFAN = 0x05, DI_PT_TRISTRIP = 0x06, DI_PT_UNUSED_0 = 0x07, DI_PT_UNUSED_1 = 0x08, DI_PT_PATCH = 0x09, DI_PT_LINELIST_ADJ = 0x0a, DI_PT_LINESTRIP_ADJ = 0x0b, DI_PT_TRILIST_ADJ = 0x0c, DI_PT_TRISTRIP_ADJ = 0x0d, DI_PT_UNUSED_3 = 0x0e, DI_PT_UNUSED_4 = 0x0f, DI_PT_TRI_WITH_WFLAGS = 0x10, DI_PT_RECTLIST = 0x11, DI_PT_LINELOOP = 0x12, DI_PT_QUADLIST = 0x13, DI_PT_QUADSTRIP = 0x14, DI_PT_POLYGON = 0x15, DI_PT_2D_COPY_RECT_LIST_V0 = 0x16, DI_PT_2D_COPY_RECT_LIST_V1 = 0x17, DI_PT_2D_COPY_RECT_LIST_V2 = 0x18, DI_PT_2D_COPY_RECT_LIST_V3 = 0x19, DI_PT_2D_FILL_RECT_LIST = 0x1a, DI_PT_2D_LINE_STRIP = 0x1b, DI_PT_2D_TRI_STRIP = 0x1c, VGT_INDEX_TYPE = 0x0000895c, INDEX_TYPE_mask = 0x03 << 0, INDEX_TYPE_shift = 0, DI_INDEX_SIZE_16_BIT = 0x00, DI_INDEX_SIZE_32_BIT = 0x01, VGT_STRMOUT_BUFFER_FILLED_SIZE_0 = 0x00008960, VGT_STRMOUT_BUFFER_FILLED_SIZE_1 = 0x00008964, VGT_STRMOUT_BUFFER_FILLED_SIZE_2 = 0x00008968, VGT_STRMOUT_BUFFER_FILLED_SIZE_3 = 0x0000896c, VGT_NUM_INDICES = 0x00008970, VGT_NUM_INSTANCES = 0x00008974, VGT_SYS_CONFIG = 0x0000898c, DUAL_CORE_EN_bit = 1 << 0, MAX_LS_HS_THDGRP_mask = 0x3f << 1, MAX_LS_HS_THDGRP_shift = 1, PA_CL_CNTL_STATUS = 0x00008a10, CL_BUSY_bit = 1 << 31, PA_CL_ENHANCE = 0x00008a14, CLIP_VTX_REORDER_ENA_bit = 1 << 0, NUM_CLIP_SEQ_mask = 0x03 << 1, NUM_CLIP_SEQ_shift = 1, CLIPPED_PRIM_SEQ_STALL_bit = 1 << 3, VE_NAN_PROC_DISABLE_bit = 1 << 4, PA_SU_CNTL_STATUS = 0x00008a50, SU_BUSY_bit = 1 << 31, PA_SU_LINE_STIPPLE_VALUE = 0x00008a60, LINE_STIPPLE_VALUE_mask = 0xffffff << 0, LINE_STIPPLE_VALUE_shift = 0, PA_SC_LINE_STIPPLE_STATE = 0x00008b10, CURRENT_PTR_mask = 0x0f << 0, CURRENT_PTR_shift = 0, CURRENT_COUNT_mask = 0xff << 8, CURRENT_COUNT_shift = 8, SQ_CONFIG = 0x00008c00, VC_ENABLE_bit = 1 << 0, EXPORT_SRC_C_bit = 1 << 1, GFX_PRIO_mask = 0x03 << 2, GFX_PRIO_shift = 2, CS1_PRIO_mask = 0x03 << 4, CS1_PRIO_shift = 4, CS2_PRIO_mask = 0x03 << 6, CS2_PRIO_shift = 6, SQ_GPR_RESOURCE_MGMT_1 = 0x00008c04, SQ_GPR_RESOURCE_MGMT_1__NUM_PS_GPRS_mask = 0xff << 0, SQ_GPR_RESOURCE_MGMT_1__NUM_PS_GPRS_shift = 0, SQ_GPR_RESOURCE_MGMT_1__NUM_VS_GPRS_mask = 0xff << 16, SQ_GPR_RESOURCE_MGMT_1__NUM_VS_GPRS_shift = 16, NUM_CLAUSE_TEMP_GPRS_mask = 0x0f << 28, NUM_CLAUSE_TEMP_GPRS_shift = 28, SQ_GLOBAL_GPR_RESOURCE_MGMT_1 = 0x00008c10, PS_GGPR_BASE_mask = 0xff << 0, PS_GGPR_BASE_shift = 0, VS_GGPR_BASE_mask = 0xff << 8, VS_GGPR_BASE_shift = 8, GS_GGPR_BASE_mask = 0xff << 16, GS_GGPR_BASE_shift = 16, ES_GGPR_BASE_mask = 0xff << 24, ES_GGPR_BASE_shift = 24, SQ_GLOBAL_GPR_RESOURCE_MGMT_2 = 0x00008c14, HS_GGPR_BASE_mask = 0xff << 0, HS_GGPR_BASE_shift = 0, LS_GGPR_BASE_mask = 0xff << 8, LS_GGPR_BASE_shift = 8, CS_GGPR_BASE_mask = 0xff << 16, CS_GGPR_BASE_shift = 16, SQ_ESGS_RING_BASE = 0x00008c40, SQ_ESGS_RING_SIZE = 0x00008c44, SQ_GSVS_RING_BASE = 0x00008c48, SQ_GSVS_RING_SIZE = 0x00008c4c, SQ_ESTMP_RING_BASE = 0x00008c50, SQ_ESTMP_RING_SIZE = 0x00008c54, SQ_GSTMP_RING_BASE = 0x00008c58, SQ_GSTMP_RING_SIZE = 0x00008c5c, SQ_VSTMP_RING_BASE = 0x00008c60, SQ_VSTMP_RING_SIZE = 0x00008c64, SQ_PSTMP_RING_BASE = 0x00008c68, SQ_PSTMP_RING_SIZE = 0x00008c6c, SQ_ALU_WORD1_OP3 = 0x00008dfc, SRC2_SEL_mask = 0x1ff << 0, SRC2_SEL_shift = 0, SQ_ALU_SRC_LDS_OQ_A = 0xdb, SQ_ALU_SRC_LDS_OQ_B = 0xdc, SQ_ALU_SRC_LDS_OQ_A_POP = 0xdd, SQ_ALU_SRC_LDS_OQ_B_POP = 0xde, SQ_ALU_SRC_LDS_DIRECT_A = 0xdf, SQ_ALU_SRC_LDS_DIRECT_B = 0xe0, SQ_ALU_SRC_TIME_HI = 0xe3, SQ_ALU_SRC_TIME_LO = 0xe4, SQ_ALU_SRC_MASK_HI = 0xe5, SQ_ALU_SRC_MASK_LO = 0xe6, SQ_ALU_SRC_HW_WAVE_ID = 0xe7, SQ_ALU_SRC_SIMD_ID = 0xe8, SQ_ALU_SRC_SE_ID = 0xe9, SQ_ALU_SRC_HW_THREADGRP_ID = 0xea, SQ_ALU_SRC_WAVE_ID_IN_GRP = 0xeb, SQ_ALU_SRC_NUM_THREADGRP_WAVES = 0xec, SQ_ALU_SRC_HW_ALU_ODD = 0xed, SQ_ALU_SRC_LOOP_IDX = 0xee, SQ_ALU_SRC_PARAM_BASE_ADDR = 0xf0, SQ_ALU_SRC_NEW_PRIM_MASK = 0xf1, SQ_ALU_SRC_PRIM_MASK_HI = 0xf2, SQ_ALU_SRC_PRIM_MASK_LO = 0xf3, SQ_ALU_SRC_1_DBL_L = 0xf4, SQ_ALU_SRC_1_DBL_M = 0xf5, SQ_ALU_SRC_0_5_DBL_L = 0xf6, SQ_ALU_SRC_0_5_DBL_M = 0xf7, SQ_ALU_SRC_0 = 0xf8, SQ_ALU_SRC_1 = 0xf9, SQ_ALU_SRC_1_INT = 0xfa, SQ_ALU_SRC_M_1_INT = 0xfb, SQ_ALU_SRC_0_5 = 0xfc, SQ_ALU_SRC_LITERAL = 0xfd, SQ_ALU_SRC_PV = 0xfe, SQ_ALU_SRC_PS = 0xff, SRC2_REL_bit = 1 << 9, SRC2_CHAN_mask = 0x03 << 10, SRC2_CHAN_shift = 10, SQ_CHAN_X = 0x00, SQ_CHAN_Y = 0x01, SQ_CHAN_Z = 0x02, SQ_CHAN_W = 0x03, SRC2_NEG_bit = 1 << 12, SQ_ALU_WORD1_OP3__ALU_INST_mask = 0x1f << 13, SQ_ALU_WORD1_OP3__ALU_INST_shift = 13, SQ_OP3_INST_BFE_UINT = 0x04, SQ_OP3_INST_BFE_INT = 0x05, SQ_OP3_INST_BFI_INT = 0x06, SQ_OP3_INST_FMA = 0x07, SQ_OP3_INST_CNDNE_64 = 0x09, SQ_OP3_INST_FMA_64 = 0x0a, SQ_OP3_INST_LERP_UINT = 0x0b, SQ_OP3_INST_BIT_ALIGN_INT = 0x0c, SQ_OP3_INST_BYTE_ALIGN_INT = 0x0d, SQ_OP3_INST_SAD_ACCUM_UINT = 0x0e, SQ_OP3_INST_SAD_ACCUM_HI_UINT = 0x0f, SQ_OP3_INST_MULADD_UINT24 = 0x10, SQ_OP3_INST_LDS_IDX_OP = 0x11, SQ_OP3_INST_MULADD = 0x14, SQ_OP3_INST_MULADD_M2 = 0x15, SQ_OP3_INST_MULADD_M4 = 0x16, SQ_OP3_INST_MULADD_D2 = 0x17, SQ_OP3_INST_MULADD_IEEE = 0x18, SQ_OP3_INST_CNDE = 0x19, SQ_OP3_INST_CNDGT = 0x1a, SQ_OP3_INST_CNDGE = 0x1b, SQ_OP3_INST_CNDE_INT = 0x1c, SQ_OP3_INST_CNDGT_INT = 0x1d, SQ_OP3_INST_CNDGE_INT = 0x1e, SQ_OP3_INST_MUL_LIT = 0x1f, SQ_ALU_WORD1_LDS_DIRECT_LITERAL_LO = 0x00008dfc, OFFSET_A_mask = 0x1fff << 0, OFFSET_A_shift = 0, STRIDE_A_mask = 0x7f << 13, STRIDE_A_shift = 13, THREAD_REL_A_bit = 1 << 22, SQ_TEX_WORD2 = 0x00008dfc, OFFSET_X_mask = 0x1f << 0, OFFSET_X_shift = 0, OFFSET_Y_mask = 0x1f << 5, OFFSET_Y_shift = 5, OFFSET_Z_mask = 0x1f << 10, OFFSET_Z_shift = 10, SAMPLER_ID_mask = 0x1f << 15, SAMPLER_ID_shift = 15, SQ_TEX_WORD2__SRC_SEL_X_mask = 0x07 << 20, SQ_TEX_WORD2__SRC_SEL_X_shift = 20, SQ_SEL_X = 0x00, SQ_SEL_Y = 0x01, SQ_SEL_Z = 0x02, SQ_SEL_W = 0x03, SQ_SEL_0 = 0x04, SQ_SEL_1 = 0x05, SQ_TEX_WORD2__SRC_SEL_Y_mask = 0x07 << 23, SQ_TEX_WORD2__SRC_SEL_Y_shift = 23, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SRC_SEL_Z_mask = 0x07 << 26, SRC_SEL_Z_shift = 26, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SRC_SEL_W_mask = 0x07 << 29, SRC_SEL_W_shift = 29, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_CF_ALLOC_EXPORT_WORD1 = 0x00008dfc, BURST_COUNT_mask = 0x0f << 16, BURST_COUNT_shift = 16, VALID_PIXEL_MODE_bit = 1 << 20, SQ_CF_ALLOC_EXPORT_WORD1__CF_INST_mask = 0xff << 22, SQ_CF_ALLOC_EXPORT_WORD1__CF_INST_shift = 22, SQ_CF_INST_MEM_STREAM0_BUF0 = 0x40, SQ_CF_INST_MEM_STREAM0_BUF1 = 0x41, SQ_CF_INST_MEM_STREAM0_BUF2 = 0x42, SQ_CF_INST_MEM_STREAM0_BUF3 = 0x43, SQ_CF_INST_MEM_STREAM1_BUF0 = 0x44, SQ_CF_INST_MEM_STREAM1_BUF1 = 0x45, SQ_CF_INST_MEM_STREAM1_BUF2 = 0x46, SQ_CF_INST_MEM_STREAM1_BUF3 = 0x47, SQ_CF_INST_MEM_STREAM2_BUF0 = 0x48, SQ_CF_INST_MEM_STREAM2_BUF1 = 0x49, SQ_CF_INST_MEM_STREAM2_BUF2 = 0x4a, SQ_CF_INST_MEM_STREAM2_BUF3 = 0x4b, SQ_CF_INST_MEM_STREAM3_BUF0 = 0x4c, SQ_CF_INST_MEM_STREAM3_BUF1 = 0x4d, SQ_CF_INST_MEM_STREAM3_BUF2 = 0x4e, SQ_CF_INST_MEM_STREAM3_BUF3 = 0x4f, SQ_CF_INST_MEM_SCRATCH = 0x50, SQ_CF_INST_MEM_RING = 0x52, SQ_CF_INST_EXPORT = 0x53, SQ_CF_INST_EXPORT_DONE = 0x54, SQ_CF_INST_MEM_EXPORT = 0x55, SQ_CF_INST_MEM_RAT = 0x56, SQ_CF_INST_MEM_RAT_CACHELESS = 0x57, SQ_CF_INST_MEM_RING1 = 0x58, SQ_CF_INST_MEM_RING2 = 0x59, SQ_CF_INST_MEM_RING3 = 0x5a, SQ_CF_INST_MEM_EXPORT_COMBINED = 0x5b, SQ_CF_INST_MEM_RAT_COMBINED_CACHELESS = 0x5c, SQ_CF_INST_MEM_RAT_COMBINED = 0x5d, SQ_CF_INST_EXPORT_DONE_END_IS_NEXT = 0x5e, MARK_bit = 1 << 30, BARRIER_bit = 1 << 31, SQ_CF_ALU_WORD1 = 0x00008dfc, KCACHE_MODE1_mask = 0x03 << 0, KCACHE_MODE1_shift = 0, SQ_CF_KCACHE_NOP = 0x00, SQ_CF_KCACHE_LOCK_1 = 0x01, SQ_CF_KCACHE_LOCK_2 = 0x02, SQ_CF_KCACHE_LOCK_LOOP_INDEX = 0x03, KCACHE_ADDR0_mask = 0xff << 2, KCACHE_ADDR0_shift = 2, KCACHE_ADDR1_mask = 0xff << 10, KCACHE_ADDR1_shift = 10, SQ_CF_ALU_WORD1__COUNT_mask = 0x7f << 18, SQ_CF_ALU_WORD1__COUNT_shift = 18, SQ_CF_ALU_WORD1__ALT_CONST_bit = 1 << 25, SQ_CF_ALU_WORD1__CF_INST_mask = 0x0f << 26, SQ_CF_ALU_WORD1__CF_INST_shift = 26, SQ_CF_INST_ALU = 0x08, SQ_CF_INST_ALU_PUSH_BEFORE = 0x09, SQ_CF_INST_ALU_POP_AFTER = 0x0a, SQ_CF_INST_ALU_POP2_AFTER = 0x0b, SQ_CF_INST_ALU_EXTENDED = 0x0c, SQ_CF_INST_ALU_CONTINUE = 0x0d, SQ_CF_INST_ALU_BREAK = 0x0e, SQ_CF_INST_ALU_ELSE_AFTER = 0x0f, WHOLE_QUAD_MODE_bit = 1 << 30, /* BARRIER_bit = 1 << 31, */ SQ_TEX_WORD1 = 0x00008dfc, SQ_TEX_WORD1__DST_GPR_mask = 0x7f << 0, SQ_TEX_WORD1__DST_GPR_shift = 0, SQ_TEX_WORD1__DST_REL_bit = 1 << 7, SQ_TEX_WORD1__DST_SEL_X_mask = 0x07 << 9, SQ_TEX_WORD1__DST_SEL_X_shift = 9, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_SEL_MASK = 0x07, SQ_TEX_WORD1__DST_SEL_Y_mask = 0x07 << 12, SQ_TEX_WORD1__DST_SEL_Y_shift = 12, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_TEX_WORD1__DST_SEL_Z_mask = 0x07 << 15, SQ_TEX_WORD1__DST_SEL_Z_shift = 15, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_TEX_WORD1__DST_SEL_W_mask = 0x07 << 18, SQ_TEX_WORD1__DST_SEL_W_shift = 18, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_TEX_WORD1__LOD_BIAS_mask = 0x7f << 21, SQ_TEX_WORD1__LOD_BIAS_shift = 21, COORD_TYPE_X_bit = 1 << 28, COORD_TYPE_Y_bit = 1 << 29, COORD_TYPE_Z_bit = 1 << 30, COORD_TYPE_W_bit = 1 << 31, SQ_ALU_WORD1_OP2_MOVA = 0x00008dfc, MOVA_DST_mask = 0x7f << 21, MOVA_DST_shift = 21, SQ_ALU_MOVA_DST_AR_X = 0x00, SQ_ALU_MOVA_DST_CF_PC = 0x01, SQ_ALU_MOVA_DST_CF_IDX0 = 0x02, SQ_ALU_MOVA_DST_CF_IDX1 = 0x03, SQ_ALU_MOVA_DST_CLAUSE_GLOBAL_B0 = 0x04, SQ_ALU_MOVA_DST_CLAUSE_GLOBAL_B1 = 0x05, SQ_ALU_MOVA_DST_CLAUSE_GLOBAL_B2 = 0x06, SQ_ALU_MOVA_DST_CLAUSE_GLOBAL_B3 = 0x07, SQ_VTX_WORD0 = 0x00008dfc, VTX_INST_mask = 0x1f << 0, VTX_INST_shift = 0, SQ_VTX_INST_FETCH = 0x00, SQ_VTX_INST_SEMANTIC = 0x01, SQ_VTX_INST_GET_BUFFER_RESINFO = 0x0e, FETCH_TYPE_mask = 0x03 << 5, FETCH_TYPE_shift = 5, SQ_VTX_FETCH_VERTEX_DATA = 0x00, SQ_VTX_FETCH_INSTANCE_DATA = 0x01, SQ_VTX_FETCH_NO_INDEX_OFFSET = 0x02, FETCH_WHOLE_QUAD_bit = 1 << 7, BUFFER_ID_mask = 0xff << 8, BUFFER_ID_shift = 8, SQ_VTX_WORD0__SRC_GPR_mask = 0x7f << 16, SQ_VTX_WORD0__SRC_GPR_shift = 16, SRC_REL_bit = 1 << 23, SQ_VTX_WORD0__SRC_SEL_X_mask = 0x03 << 24, SQ_VTX_WORD0__SRC_SEL_X_shift = 24, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ SQ_VTX_WORD0__SRC_SEL_Y_mask = 0x03 << 26, SQ_VTX_WORD0__SRC_SEL_Y_shift = 26, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ STRUCTURED_READ_mask = 0x03 << 28, STRUCTURED_READ_shift = 28, SQ_VTX_STRU_READ_OFF = 0x00, SQ_VTX_STRU_READ_GPR_OFFSET = 0x01, SQ_VTX_STRU_READ_INST_OFFSET = 0x02, LDS_REQ_bit = 1 << 30, COALESCED_READ_bit = 1 << 31, SQ_CF_ALLOC_EXPORT_WORD1_SWIZ = 0x00008dfc, SEL_X_mask = 0x07 << 0, SEL_X_shift = 0, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SEL_Y_mask = 0x07 << 3, SEL_Y_shift = 3, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SEL_Z_mask = 0x07 << 6, SEL_Z_shift = 6, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SEL_W_mask = 0x07 << 9, SEL_W_shift = 9, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_MEM_RD_WORD0 = 0x00008dfc, MEM_INST_mask = 0x1f << 0, MEM_INST_shift = 0, SQ_MEM_INST_MEM = 0x02, SQ_MEM_RD_WORD0__ELEM_SIZE_mask = 0x03 << 5, SQ_MEM_RD_WORD0__ELEM_SIZE_shift = 5, /* FETCH_WHOLE_QUAD_bit = 1 << 7, */ MEM_OP_mask = 0x07 << 8, MEM_OP_shift = 8, SQ_MEM_OP_RD_SCRATCH = 0x00, SQ_MEM_OP_RD_SCATTER = 0x02, SQ_MEM_OP_GDS = 0x04, SQ_MEM_OP_TF_WRITE = 0x05, SQ_MEM_RD_WORD0__UNCACHED_bit = 1 << 11, INDEXED_bit = 1 << 12, SQ_MEM_RD_WORD0__SRC_SEL_Y_mask = 0x03 << 13, SQ_MEM_RD_WORD0__SRC_SEL_Y_shift = 13, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ SQ_MEM_RD_WORD0__SRC_GPR_mask = 0x7f << 16, SQ_MEM_RD_WORD0__SRC_GPR_shift = 16, /* SRC_REL_bit = 1 << 23, */ SQ_MEM_RD_WORD0__SRC_SEL_X_mask = 0x03 << 24, SQ_MEM_RD_WORD0__SRC_SEL_X_shift = 24, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ BURST_CNT_mask = 0x0f << 26, BURST_CNT_shift = 26, /* LDS_REQ_bit = 1 << 30, */ /* COALESCED_READ_bit = 1 << 31, */ SQ_ALU_WORD1 = 0x00008dfc, SQ_ALU_WORD1__ENCODING_mask = 0x07 << 15, SQ_ALU_WORD1__ENCODING_shift = 15, BANK_SWIZZLE_mask = 0x07 << 18, BANK_SWIZZLE_shift = 18, SQ_ALU_VEC_012 = 0x00, SQ_ALU_VEC_021 = 0x01, SQ_ALU_VEC_120 = 0x02, SQ_ALU_VEC_102 = 0x03, SQ_ALU_VEC_201 = 0x04, SQ_ALU_VEC_210 = 0x05, SQ_ALU_WORD1__DST_GPR_mask = 0x7f << 21, SQ_ALU_WORD1__DST_GPR_shift = 21, SQ_ALU_WORD1__DST_REL_bit = 1 << 28, DST_CHAN_mask = 0x03 << 29, DST_CHAN_shift = 29, CHAN_X = 0x00, CHAN_Y = 0x01, CHAN_Z = 0x02, CHAN_W = 0x03, SQ_ALU_WORD1__CLAMP_bit = 1 << 31, SQ_CF_ALU_WORD0_EXT = 0x00008dfc, KCACHE_BANK_INDEX_MODE0_mask = 0x03 << 4, KCACHE_BANK_INDEX_MODE0_shift = 4, SQ_CF_INDEX_NONE = 0x00, SQ_CF_INDEX_0 = 0x01, SQ_CF_INDEX_1 = 0x02, SQ_CF_INVALID = 0x03, KCACHE_BANK_INDEX_MODE1_mask = 0x03 << 6, KCACHE_BANK_INDEX_MODE1_shift = 6, /* SQ_CF_INDEX_NONE = 0x00, */ /* SQ_CF_INDEX_0 = 0x01, */ /* SQ_CF_INDEX_1 = 0x02, */ /* SQ_CF_INVALID = 0x03, */ KCACHE_BANK_INDEX_MODE2_mask = 0x03 << 8, KCACHE_BANK_INDEX_MODE2_shift = 8, /* SQ_CF_INDEX_NONE = 0x00, */ /* SQ_CF_INDEX_0 = 0x01, */ /* SQ_CF_INDEX_1 = 0x02, */ /* SQ_CF_INVALID = 0x03, */ KCACHE_BANK_INDEX_MODE3_mask = 0x03 << 10, KCACHE_BANK_INDEX_MODE3_shift = 10, /* SQ_CF_INDEX_NONE = 0x00, */ /* SQ_CF_INDEX_0 = 0x01, */ /* SQ_CF_INDEX_1 = 0x02, */ /* SQ_CF_INVALID = 0x03, */ KCACHE_BANK2_mask = 0x0f << 22, KCACHE_BANK2_shift = 22, KCACHE_BANK3_mask = 0x0f << 26, KCACHE_BANK3_shift = 26, KCACHE_MODE2_mask = 0x03 << 30, KCACHE_MODE2_shift = 30, /* SQ_CF_KCACHE_NOP = 0x00, */ /* SQ_CF_KCACHE_LOCK_1 = 0x01, */ /* SQ_CF_KCACHE_LOCK_2 = 0x02, */ /* SQ_CF_KCACHE_LOCK_LOOP_INDEX = 0x03, */ SQ_ALU_WORD0_LDS_IDX_OP = 0x00008dfc, SRC0_SEL_mask = 0x1ff << 0, SRC0_SEL_shift = 0, /* SQ_ALU_SRC_LDS_OQ_A = 0xdb, */ /* SQ_ALU_SRC_LDS_OQ_B = 0xdc, */ /* SQ_ALU_SRC_LDS_OQ_A_POP = 0xdd, */ /* SQ_ALU_SRC_LDS_OQ_B_POP = 0xde, */ /* SQ_ALU_SRC_LDS_DIRECT_A = 0xdf, */ /* SQ_ALU_SRC_LDS_DIRECT_B = 0xe0, */ /* SQ_ALU_SRC_TIME_HI = 0xe3, */ /* SQ_ALU_SRC_TIME_LO = 0xe4, */ /* SQ_ALU_SRC_MASK_HI = 0xe5, */ /* SQ_ALU_SRC_MASK_LO = 0xe6, */ /* SQ_ALU_SRC_HW_WAVE_ID = 0xe7, */ /* SQ_ALU_SRC_SIMD_ID = 0xe8, */ /* SQ_ALU_SRC_SE_ID = 0xe9, */ /* SQ_ALU_SRC_HW_THREADGRP_ID = 0xea, */ /* SQ_ALU_SRC_WAVE_ID_IN_GRP = 0xeb, */ /* SQ_ALU_SRC_NUM_THREADGRP_WAVES = 0xec, */ /* SQ_ALU_SRC_HW_ALU_ODD = 0xed, */ /* SQ_ALU_SRC_LOOP_IDX = 0xee, */ /* SQ_ALU_SRC_PARAM_BASE_ADDR = 0xf0, */ /* SQ_ALU_SRC_NEW_PRIM_MASK = 0xf1, */ /* SQ_ALU_SRC_PRIM_MASK_HI = 0xf2, */ /* SQ_ALU_SRC_PRIM_MASK_LO = 0xf3, */ /* SQ_ALU_SRC_1_DBL_L = 0xf4, */ /* SQ_ALU_SRC_1_DBL_M = 0xf5, */ /* SQ_ALU_SRC_0_5_DBL_L = 0xf6, */ /* SQ_ALU_SRC_0_5_DBL_M = 0xf7, */ /* SQ_ALU_SRC_0 = 0xf8, */ /* SQ_ALU_SRC_1 = 0xf9, */ /* SQ_ALU_SRC_1_INT = 0xfa, */ /* SQ_ALU_SRC_M_1_INT = 0xfb, */ /* SQ_ALU_SRC_0_5 = 0xfc, */ /* SQ_ALU_SRC_LITERAL = 0xfd, */ /* SQ_ALU_SRC_PV = 0xfe, */ /* SQ_ALU_SRC_PS = 0xff, */ SRC0_REL_bit = 1 << 9, SRC0_CHAN_mask = 0x03 << 10, SRC0_CHAN_shift = 10, /* SQ_CHAN_X = 0x00, */ /* SQ_CHAN_Y = 0x01, */ /* SQ_CHAN_Z = 0x02, */ /* SQ_CHAN_W = 0x03, */ IDX_OFFSET_4_bit = 1 << 12, SRC1_SEL_mask = 0x1ff << 13, SRC1_SEL_shift = 13, /* SQ_ALU_SRC_LDS_OQ_A = 0xdb, */ /* SQ_ALU_SRC_LDS_OQ_B = 0xdc, */ /* SQ_ALU_SRC_LDS_OQ_A_POP = 0xdd, */ /* SQ_ALU_SRC_LDS_OQ_B_POP = 0xde, */ /* SQ_ALU_SRC_LDS_DIRECT_A = 0xdf, */ /* SQ_ALU_SRC_LDS_DIRECT_B = 0xe0, */ /* SQ_ALU_SRC_TIME_HI = 0xe3, */ /* SQ_ALU_SRC_TIME_LO = 0xe4, */ /* SQ_ALU_SRC_MASK_HI = 0xe5, */ /* SQ_ALU_SRC_MASK_LO = 0xe6, */ /* SQ_ALU_SRC_HW_WAVE_ID = 0xe7, */ /* SQ_ALU_SRC_SIMD_ID = 0xe8, */ /* SQ_ALU_SRC_SE_ID = 0xe9, */ /* SQ_ALU_SRC_HW_THREADGRP_ID = 0xea, */ /* SQ_ALU_SRC_WAVE_ID_IN_GRP = 0xeb, */ /* SQ_ALU_SRC_NUM_THREADGRP_WAVES = 0xec, */ /* SQ_ALU_SRC_HW_ALU_ODD = 0xed, */ /* SQ_ALU_SRC_LOOP_IDX = 0xee, */ /* SQ_ALU_SRC_PARAM_BASE_ADDR = 0xf0, */ /* SQ_ALU_SRC_NEW_PRIM_MASK = 0xf1, */ /* SQ_ALU_SRC_PRIM_MASK_HI = 0xf2, */ /* SQ_ALU_SRC_PRIM_MASK_LO = 0xf3, */ /* SQ_ALU_SRC_1_DBL_L = 0xf4, */ /* SQ_ALU_SRC_1_DBL_M = 0xf5, */ /* SQ_ALU_SRC_0_5_DBL_L = 0xf6, */ /* SQ_ALU_SRC_0_5_DBL_M = 0xf7, */ /* SQ_ALU_SRC_0 = 0xf8, */ /* SQ_ALU_SRC_1 = 0xf9, */ /* SQ_ALU_SRC_1_INT = 0xfa, */ /* SQ_ALU_SRC_M_1_INT = 0xfb, */ /* SQ_ALU_SRC_0_5 = 0xfc, */ /* SQ_ALU_SRC_LITERAL = 0xfd, */ /* SQ_ALU_SRC_PV = 0xfe, */ /* SQ_ALU_SRC_PS = 0xff, */ SRC1_REL_bit = 1 << 22, SRC1_CHAN_mask = 0x03 << 23, SRC1_CHAN_shift = 23, /* SQ_CHAN_X = 0x00, */ /* SQ_CHAN_Y = 0x01, */ /* SQ_CHAN_Z = 0x02, */ /* SQ_CHAN_W = 0x03, */ IDX_OFFSET_5_bit = 1 << 25, INDEX_MODE_mask = 0x07 << 26, INDEX_MODE_shift = 26, SQ_INDEX_AR_X = 0x00, SQ_INDEX_LOOP = 0x04, SQ_INDEX_GLOBAL = 0x05, SQ_INDEX_GLOBAL_AR_X = 0x06, PRED_SEL_mask = 0x03 << 29, PRED_SEL_shift = 29, SQ_PRED_SEL_OFF = 0x00, SQ_PRED_SEL_ZERO = 0x02, SQ_PRED_SEL_ONE = 0x03, LAST_bit = 1 << 31, SQ_MEM_GDS_WORD2 = 0x00008dfc, SQ_MEM_GDS_WORD2__DST_SEL_X_mask = 0x07 << 0, SQ_MEM_GDS_WORD2__DST_SEL_X_shift = 0, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_MEM_GDS_WORD2__DST_SEL_Y_mask = 0x07 << 3, SQ_MEM_GDS_WORD2__DST_SEL_Y_shift = 3, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_MEM_GDS_WORD2__DST_SEL_Z_mask = 0x07 << 6, SQ_MEM_GDS_WORD2__DST_SEL_Z_shift = 6, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_MEM_GDS_WORD2__DST_SEL_W_mask = 0x07 << 9, SQ_MEM_GDS_WORD2__DST_SEL_W_shift = 9, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_CF_ALLOC_EXPORT_WORD0_RAT = 0x00008dfc, RAT_ID_mask = 0x0f << 0, RAT_ID_shift = 0, RAT_INST_mask = 0x3f << 4, RAT_INST_shift = 4, SQ_EXPORT_RAT_INST_NOP = 0x00, SQ_EXPORT_RAT_INST_STORE_TYPED = 0x01, SQ_EXPORT_RAT_INST_STORE_RAW = 0x02, SQ_EXPORT_RAT_INST_STORE_RAW_FDENORM = 0x03, SQ_EXPORT_RAT_INST_CMPXCHG_INT = 0x04, SQ_EXPORT_RAT_INST_CMPXCHG_FLT = 0x05, SQ_EXPORT_RAT_INST_CMPXCHG_FDENORM = 0x06, SQ_EXPORT_RAT_INST_ADD = 0x07, SQ_EXPORT_RAT_INST_SUB = 0x08, SQ_EXPORT_RAT_INST_RSUB = 0x09, SQ_EXPORT_RAT_INST_MIN_INT = 0x0a, SQ_EXPORT_RAT_INST_MIN_UINT = 0x0b, SQ_EXPORT_RAT_INST_MAX_INT = 0x0c, SQ_EXPORT_RAT_INST_MAX_UINT = 0x0d, SQ_EXPORT_RAT_INST_AND = 0x0e, SQ_EXPORT_RAT_INST_OR = 0x0f, SQ_EXPORT_RAT_INST_XOR = 0x10, SQ_EXPORT_RAT_INST_MSKOR = 0x11, SQ_EXPORT_RAT_INST_INC_UINT = 0x12, SQ_EXPORT_RAT_INST_DEC_UINT = 0x13, SQ_EXPORT_RAT_INST_NOP_RTN = 0x20, SQ_EXPORT_RAT_INST_XCHG_RTN = 0x22, SQ_EXPORT_RAT_INST_XCHG_FDENORM_RTN = 0x23, SQ_EXPORT_RAT_INST_CMPXCHG_INT_RTN = 0x24, SQ_EXPORT_RAT_INST_CMPXCHG_FLT_RTN = 0x25, SQ_EXPORT_RAT_INST_CMPXCHG_FDENORM_RTN = 0x26, SQ_EXPORT_RAT_INST_ADD_RTN = 0x27, SQ_EXPORT_RAT_INST_SUB_RTN = 0x28, SQ_EXPORT_RAT_INST_RSUB_RTN = 0x29, SQ_EXPORT_RAT_INST_MIN_INT_RTN = 0x2a, SQ_EXPORT_RAT_INST_MIN_UINT_RTN = 0x2b, SQ_EXPORT_RAT_INST_MAX_INT_RTN = 0x2c, SQ_EXPORT_RAT_INST_MAX_UINT_RTN = 0x2d, SQ_EXPORT_RAT_INST_AND_RTN = 0x2e, SQ_EXPORT_RAT_INST_OR_RTN = 0x2f, SQ_EXPORT_RAT_INST_XOR_RTN = 0x30, SQ_EXPORT_RAT_INST_MSKOR_RTN = 0x31, SQ_EXPORT_RAT_INST_INC_UINT_RTN = 0x32, SQ_EXPORT_RAT_INST_DEC_UINT_RTN = 0x33, RAT_INDEX_MODE_mask = 0x03 << 11, RAT_INDEX_MODE_shift = 11, /* SQ_CF_INDEX_NONE = 0x00, */ /* SQ_CF_INDEX_0 = 0x01, */ /* SQ_CF_INDEX_1 = 0x02, */ /* SQ_CF_INVALID = 0x03, */ SQ_CF_ALLOC_EXPORT_WORD0_RAT__TYPE_mask = 0x03 << 13, SQ_CF_ALLOC_EXPORT_WORD0_RAT__TYPE_shift = 13, SQ_EXPORT_PIXEL = 0x00, SQ_EXPORT_POS = 0x01, SQ_EXPORT_PARAM = 0x02, X_UNUSED_FOR_SX_EXPORTS = 0x03, RW_GPR_mask = 0x7f << 15, RW_GPR_shift = 15, RW_REL_bit = 1 << 22, INDEX_GPR_mask = 0x7f << 23, INDEX_GPR_shift = 23, SQ_CF_ALLOC_EXPORT_WORD0_RAT__ELEM_SIZE_mask = 0x03 << 30, SQ_CF_ALLOC_EXPORT_WORD0_RAT__ELEM_SIZE_shift = 30, SQ_CF_ALU_WORD0 = 0x00008dfc, SQ_CF_ALU_WORD0__ADDR_mask = 0x3fffff << 0, SQ_CF_ALU_WORD0__ADDR_shift = 0, KCACHE_BANK0_mask = 0x0f << 22, KCACHE_BANK0_shift = 22, KCACHE_BANK1_mask = 0x0f << 26, KCACHE_BANK1_shift = 26, KCACHE_MODE0_mask = 0x03 << 30, KCACHE_MODE0_shift = 30, /* SQ_CF_KCACHE_NOP = 0x00, */ /* SQ_CF_KCACHE_LOCK_1 = 0x01, */ /* SQ_CF_KCACHE_LOCK_2 = 0x02, */ /* SQ_CF_KCACHE_LOCK_LOOP_INDEX = 0x03, */ SQ_MEM_GDS_WORD1 = 0x00008dfc, SQ_MEM_GDS_WORD1__DST_GPR_mask = 0x7f << 0, SQ_MEM_GDS_WORD1__DST_GPR_shift = 0, DST_REL_MODE_mask = 0x03 << 7, DST_REL_MODE_shift = 7, SQ_REL_NONE = 0x00, SQ_REL_LOOP = 0x01, SQ_REL_GLOBAL = 0x02, GDS_OP_mask = 0x3f << 9, GDS_OP_shift = 9, SQ_DS_INST_ADD = 0x00, SQ_DS_INST_SUB = 0x01, SQ_DS_INST_RSUB = 0x02, SQ_DS_INST_INC = 0x03, SQ_DS_INST_DEC = 0x04, SQ_DS_INST_MIN_INT = 0x05, SQ_DS_INST_MAX_INT = 0x06, SQ_DS_INST_MIN_UINT = 0x07, SQ_DS_INST_MAX_UINT = 0x08, SQ_DS_INST_AND = 0x09, SQ_DS_INST_OR = 0x0a, SQ_DS_INST_XOR = 0x0b, SQ_DS_INST_MSKOR = 0x0c, SQ_DS_INST_WRITE = 0x0d, SQ_DS_INST_WRITE_REL = 0x0e, SQ_DS_INST_WRITE2 = 0x0f, SQ_DS_INST_CMP_STORE = 0x10, SQ_DS_INST_CMP_STORE_SPF = 0x11, SQ_DS_INST_BYTE_WRITE = 0x12, SQ_DS_INST_SHORT_WRITE = 0x13, SQ_DS_INST_ADD_RET = 0x20, SQ_DS_INST_SUB_RET = 0x21, SQ_DS_INST_RSUB_RET = 0x22, SQ_DS_INST_INC_RET = 0x23, SQ_DS_INST_DEC_RET = 0x24, SQ_DS_INST_MIN_INT_RET = 0x25, SQ_DS_INST_MAX_INT_RET = 0x26, SQ_DS_INST_MIN_UINT_RET = 0x27, SQ_DS_INST_MAX_UINT_RET = 0x28, SQ_DS_INST_AND_RET = 0x29, SQ_DS_INST_OR_RET = 0x2a, SQ_DS_INST_XOR_RET = 0x2b, SQ_DS_INST_MSKOR_RET = 0x2c, SQ_DS_INST_XCHG_RET = 0x2d, SQ_DS_INST_XCHG_REL_RET = 0x2e, SQ_DS_INST_XCHG2_RET = 0x2f, SQ_DS_INST_CMP_XCHG_RET = 0x30, SQ_DS_INST_CMP_XCHG_SPF_RET = 0x31, SQ_DS_INST_READ_RET = 0x32, SQ_DS_INST_READ_REL_RET = 0x33, SQ_DS_INST_READ2_RET = 0x34, SQ_DS_INST_READWRITE_RET = 0x35, SQ_DS_INST_BYTE_READ_RET = 0x36, SQ_DS_INST_UBYTE_READ_RET = 0x37, SQ_DS_INST_SHORT_READ_RET = 0x38, SQ_DS_INST_USHORT_READ_RET = 0x39, SQ_DS_INST_ATOMIC_ORDERED_ALLOC_RET = 0x3f, DS_OFFSET_mask = 0x7f << 16, DS_OFFSET_shift = 16, UAV_INDEX_MODE_mask = 0x03 << 24, UAV_INDEX_MODE_shift = 24, /* SQ_CF_INDEX_NONE = 0x00, */ /* SQ_CF_INDEX_0 = 0x01, */ /* SQ_CF_INDEX_1 = 0x02, */ /* SQ_CF_INVALID = 0x03, */ UAV_ID_mask = 0x0f << 26, UAV_ID_shift = 26, ALLOC_CONSUME_bit = 1 << 30, BCAST_FIRST_REQ_bit = 1 << 31, SQ_MEM_RD_WORD2 = 0x00008dfc, ARRAY_BASE_mask = 0x1fff << 0, ARRAY_BASE_shift = 0, SQ_MEM_RD_WORD2__ENDIAN_SWAP_mask = 0x03 << 16, SQ_MEM_RD_WORD2__ENDIAN_SWAP_shift = 16, SQ_ENDIAN_NONE = 0x00, SQ_ENDIAN_8IN16 = 0x01, SQ_ENDIAN_8IN32 = 0x02, SQ_MEM_RD_WORD2__ARRAY_SIZE_mask = 0xfff << 20, SQ_MEM_RD_WORD2__ARRAY_SIZE_shift = 20, SQ_CF_ALU_WORD1_EXT = 0x00008dfc, KCACHE_MODE3_mask = 0x03 << 0, KCACHE_MODE3_shift = 0, /* SQ_CF_KCACHE_NOP = 0x00, */ /* SQ_CF_KCACHE_LOCK_1 = 0x01, */ /* SQ_CF_KCACHE_LOCK_2 = 0x02, */ /* SQ_CF_KCACHE_LOCK_LOOP_INDEX = 0x03, */ KCACHE_ADDR2_mask = 0xff << 2, KCACHE_ADDR2_shift = 2, KCACHE_ADDR3_mask = 0xff << 10, KCACHE_ADDR3_shift = 10, SQ_CF_ALU_WORD1_EXT__CF_INST_mask = 0x0f << 26, SQ_CF_ALU_WORD1_EXT__CF_INST_shift = 26, /* SQ_CF_INST_ALU = 0x08, */ /* SQ_CF_INST_ALU_PUSH_BEFORE = 0x09, */ /* SQ_CF_INST_ALU_POP_AFTER = 0x0a, */ /* SQ_CF_INST_ALU_POP2_AFTER = 0x0b, */ /* SQ_CF_INST_ALU_EXTENDED = 0x0c, */ /* SQ_CF_INST_ALU_CONTINUE = 0x0d, */ /* SQ_CF_INST_ALU_BREAK = 0x0e, */ /* SQ_CF_INST_ALU_ELSE_AFTER = 0x0f, */ /* BARRIER_bit = 1 << 31, */ SQ_CF_GWS_WORD0 = 0x00008dfc, VALUE_mask = 0x3ff << 0, VALUE_shift = 0, RESOURCE_mask = 0x1f << 16, RESOURCE_shift = 16, SIGN_bit = 1 << 25, VAL_INDEX_MODE_mask = 0x03 << 26, VAL_INDEX_MODE_shift = 26, SQ_GWS_INDEX_NONE = 0x00, SQ_GWS_INDEX_0 = 0x01, SQ_GWS_INDEX_1 = 0x02, SQ_GWS_INDEX_MIX = 0x03, RSRC_INDEX_MODE_mask = 0x03 << 28, RSRC_INDEX_MODE_shift = 28, /* SQ_CF_INDEX_NONE = 0x00, */ /* SQ_CF_INDEX_0 = 0x01, */ /* SQ_CF_INDEX_1 = 0x02, */ /* SQ_CF_INVALID = 0x03, */ GWS_OPCODE_mask = 0x03 << 30, GWS_OPCODE_shift = 30, SQ_GWS_SEMA_V = 0x00, SQ_GWS_SEMA_P = 0x01, SQ_GWS_BARRIER = 0x02, SQ_GWS_INIT = 0x03, SQ_VTX_WORD2 = 0x00008dfc, SQ_VTX_WORD2__OFFSET_mask = 0xffff << 0, SQ_VTX_WORD2__OFFSET_shift = 0, SQ_VTX_WORD2__ENDIAN_SWAP_mask = 0x03 << 16, SQ_VTX_WORD2__ENDIAN_SWAP_shift = 16, /* SQ_ENDIAN_NONE = 0x00, */ /* SQ_ENDIAN_8IN16 = 0x01, */ /* SQ_ENDIAN_8IN32 = 0x02, */ CONST_BUF_NO_STRIDE_bit = 1 << 18, SQ_VTX_WORD2__ALT_CONST_bit = 1 << 20, BUFFER_INDEX_MODE_mask = 0x03 << 21, BUFFER_INDEX_MODE_shift = 21, /* SQ_CF_INDEX_NONE = 0x00, */ /* SQ_CF_INDEX_0 = 0x01, */ /* SQ_CF_INDEX_1 = 0x02, */ /* SQ_CF_INVALID = 0x03, */ SQ_ALU_WORD1_OP2_EXECUTE_MASK = 0x00008dfc, EXECUTE_MASK_OP_mask = 0x03 << 5, EXECUTE_MASK_OP_shift = 5, SQ_ALU_EXECUTE_MASK_OP_DEACTIVATE = 0x00, SQ_ALU_EXECUTE_MASK_OP_BREAK = 0x01, SQ_ALU_EXECUTE_MASK_OP_CONTINUE = 0x02, SQ_ALU_EXECUTE_MASK_OP_KILL = 0x03, SQ_CF_ALLOC_EXPORT_WORD1_BUF = 0x00008dfc, SQ_CF_ALLOC_EXPORT_WORD1_BUF__ARRAY_SIZE_mask = 0xfff << 0, SQ_CF_ALLOC_EXPORT_WORD1_BUF__ARRAY_SIZE_shift = 0, COMP_MASK_mask = 0x0f << 12, COMP_MASK_shift = 12, SQ_CF_WORD0 = 0x00008dfc, SQ_CF_WORD0__ADDR_mask = 0xffffff << 0, SQ_CF_WORD0__ADDR_shift = 0, JUMPTABLE_SEL_mask = 0x07 << 24, JUMPTABLE_SEL_shift = 24, SQ_CF_JUMPTABLE_SEL_CONST_A = 0x00, SQ_CF_JUMPTABLE_SEL_CONST_B = 0x01, SQ_CF_JUMPTABLE_SEL_CONST_C = 0x02, SQ_CF_JUMPTABLE_SEL_CONST_D = 0x03, SQ_CF_JUMPTABLE_SEL_INDEX_0 = 0x04, SQ_CF_JUMPTABLE_SEL_INDEX_1 = 0x05, SQ_CF_ALLOC_EXPORT_WORD0 = 0x00008dfc, /* ARRAY_BASE_mask = 0x1fff << 0, */ /* ARRAY_BASE_shift = 0, */ SQ_CF_ALLOC_EXPORT_WORD0__TYPE_mask = 0x03 << 13, SQ_CF_ALLOC_EXPORT_WORD0__TYPE_shift = 13, /* SQ_EXPORT_PIXEL = 0x00, */ /* SQ_EXPORT_POS = 0x01, */ /* SQ_EXPORT_PARAM = 0x02, */ /* X_UNUSED_FOR_SX_EXPORTS = 0x03, */ /* RW_GPR_mask = 0x7f << 15, */ /* RW_GPR_shift = 15, */ /* RW_REL_bit = 1 << 22, */ /* INDEX_GPR_mask = 0x7f << 23, */ /* INDEX_GPR_shift = 23, */ SQ_CF_ALLOC_EXPORT_WORD0__ELEM_SIZE_mask = 0x03 << 30, SQ_CF_ALLOC_EXPORT_WORD0__ELEM_SIZE_shift = 30, SQ_MEM_GDS_WORD0 = 0x00008dfc, /* MEM_INST_mask = 0x1f << 0, */ /* MEM_INST_shift = 0, */ /* SQ_MEM_INST_MEM = 0x02, */ /* MEM_OP_mask = 0x07 << 8, */ /* MEM_OP_shift = 8, */ /* SQ_MEM_OP_RD_SCRATCH = 0x00, */ /* SQ_MEM_OP_RD_SCATTER = 0x02, */ /* SQ_MEM_OP_GDS = 0x04, */ /* SQ_MEM_OP_TF_WRITE = 0x05, */ SQ_MEM_GDS_WORD0__SRC_GPR_mask = 0x7f << 11, SQ_MEM_GDS_WORD0__SRC_GPR_shift = 11, SRC_REL_MODE_mask = 0x03 << 18, SRC_REL_MODE_shift = 18, /* SQ_REL_NONE = 0x00, */ /* SQ_REL_LOOP = 0x01, */ /* SQ_REL_GLOBAL = 0x02, */ SQ_MEM_GDS_WORD0__SRC_SEL_X_mask = 0x07 << 20, SQ_MEM_GDS_WORD0__SRC_SEL_X_shift = 20, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_MEM_GDS_WORD0__SRC_SEL_Y_mask = 0x07 << 23, SQ_MEM_GDS_WORD0__SRC_SEL_Y_shift = 23, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SRC_SEL_Z_mask = 0x07 << 26, */ /* SRC_SEL_Z_shift = 26, */ /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_ALU_WORD1_LDS_DIRECT_LITERAL_HI = 0x00008dfc, OFFSET_B_mask = 0x1fff << 0, OFFSET_B_shift = 0, STRIDE_B_mask = 0x7f << 13, STRIDE_B_shift = 13, THREAD_REL_B_bit = 1 << 22, DIRECT_READ_32_bit = 1 << 31, SQ_VTX_WORD1 = 0x00008dfc, SQ_VTX_WORD1__DST_SEL_X_mask = 0x07 << 9, SQ_VTX_WORD1__DST_SEL_X_shift = 9, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_VTX_WORD1__DST_SEL_Y_mask = 0x07 << 12, SQ_VTX_WORD1__DST_SEL_Y_shift = 12, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_VTX_WORD1__DST_SEL_Z_mask = 0x07 << 15, SQ_VTX_WORD1__DST_SEL_Z_shift = 15, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_VTX_WORD1__DST_SEL_W_mask = 0x07 << 18, SQ_VTX_WORD1__DST_SEL_W_shift = 18, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ USE_CONST_FIELDS_bit = 1 << 21, SQ_VTX_WORD1__DATA_FORMAT_mask = 0x3f << 22, SQ_VTX_WORD1__DATA_FORMAT_shift = 22, SQ_VTX_WORD1__NUM_FORMAT_ALL_mask = 0x03 << 28, SQ_VTX_WORD1__NUM_FORMAT_ALL_shift = 28, SQ_NUM_FORMAT_NORM = 0x00, SQ_NUM_FORMAT_INT = 0x01, SQ_NUM_FORMAT_SCALED = 0x02, SQ_VTX_WORD1__FORMAT_COMP_ALL_bit = 1 << 30, SQ_VTX_WORD1__SRF_MODE_ALL_bit = 1 << 31, SQ_ALU_WORD1_OP2 = 0x00008dfc, SRC0_ABS_bit = 1 << 0, SRC1_ABS_bit = 1 << 1, UPDATE_EXECUTE_MASK_bit = 1 << 2, UPDATE_PRED_bit = 1 << 3, WRITE_MASK_bit = 1 << 4, OMOD_mask = 0x03 << 5, OMOD_shift = 5, SQ_ALU_OMOD_OFF = 0x00, SQ_ALU_OMOD_M2 = 0x01, SQ_ALU_OMOD_M4 = 0x02, SQ_ALU_OMOD_D2 = 0x03, SQ_ALU_WORD1_OP2__ALU_INST_mask = 0x7ff << 7, SQ_ALU_WORD1_OP2__ALU_INST_shift = 7, SQ_OP2_INST_ADD = 0x00, SQ_OP2_INST_MUL = 0x01, SQ_OP2_INST_MUL_IEEE = 0x02, SQ_OP2_INST_MAX = 0x03, SQ_OP2_INST_MIN = 0x04, SQ_OP2_INST_MAX_DX10 = 0x05, SQ_OP2_INST_MIN_DX10 = 0x06, SQ_OP2_INST_SETE = 0x08, SQ_OP2_INST_SETGT = 0x09, SQ_OP2_INST_SETGE = 0x0a, SQ_OP2_INST_SETNE = 0x0b, SQ_OP2_INST_SETE_DX10 = 0x0c, SQ_OP2_INST_SETGT_DX10 = 0x0d, SQ_OP2_INST_SETGE_DX10 = 0x0e, SQ_OP2_INST_SETNE_DX10 = 0x0f, SQ_OP2_INST_FRACT = 0x10, SQ_OP2_INST_TRUNC = 0x11, SQ_OP2_INST_CEIL = 0x12, SQ_OP2_INST_RNDNE = 0x13, SQ_OP2_INST_FLOOR = 0x14, SQ_OP2_INST_ASHR_INT = 0x15, SQ_OP2_INST_LSHR_INT = 0x16, SQ_OP2_INST_LSHL_INT = 0x17, SQ_OP2_INST_MOV = 0x19, SQ_OP2_INST_NOP = 0x1a, SQ_OP2_INST_PRED_SETGT_UINT = 0x1e, SQ_OP2_INST_PRED_SETGE_UINT = 0x1f, SQ_OP2_INST_PRED_SETE = 0x20, SQ_OP2_INST_PRED_SETGT = 0x21, SQ_OP2_INST_PRED_SETGE = 0x22, SQ_OP2_INST_PRED_SETNE = 0x23, SQ_OP2_INST_PRED_SET_INV = 0x24, SQ_OP2_INST_PRED_SET_POP = 0x25, SQ_OP2_INST_PRED_SET_CLR = 0x26, SQ_OP2_INST_PRED_SET_RESTORE = 0x27, SQ_OP2_INST_PRED_SETE_PUSH = 0x28, SQ_OP2_INST_PRED_SETGT_PUSH = 0x29, SQ_OP2_INST_PRED_SETGE_PUSH = 0x2a, SQ_OP2_INST_PRED_SETNE_PUSH = 0x2b, SQ_OP2_INST_KILLE = 0x2c, SQ_OP2_INST_KILLGT = 0x2d, SQ_OP2_INST_KILLGE = 0x2e, SQ_OP2_INST_KILLNE = 0x2f, SQ_OP2_INST_AND_INT = 0x30, SQ_OP2_INST_OR_INT = 0x31, SQ_OP2_INST_XOR_INT = 0x32, SQ_OP2_INST_NOT_INT = 0x33, SQ_OP2_INST_ADD_INT = 0x34, SQ_OP2_INST_SUB_INT = 0x35, SQ_OP2_INST_MAX_INT = 0x36, SQ_OP2_INST_MIN_INT = 0x37, SQ_OP2_INST_MAX_UINT = 0x38, SQ_OP2_INST_MIN_UINT = 0x39, SQ_OP2_INST_SETE_INT = 0x3a, SQ_OP2_INST_SETGT_INT = 0x3b, SQ_OP2_INST_SETGE_INT = 0x3c, SQ_OP2_INST_SETNE_INT = 0x3d, SQ_OP2_INST_SETGT_UINT = 0x3e, SQ_OP2_INST_SETGE_UINT = 0x3f, SQ_OP2_INST_KILLGT_UINT = 0x40, SQ_OP2_INST_KILLGE_UINT = 0x41, SQ_OP2_INST_PRED_SETE_INT = 0x42, SQ_OP2_INST_PRED_SETGT_INT = 0x43, SQ_OP2_INST_PRED_SETGE_INT = 0x44, SQ_OP2_INST_PRED_SETNE_INT = 0x45, SQ_OP2_INST_KILLE_INT = 0x46, SQ_OP2_INST_KILLGT_INT = 0x47, SQ_OP2_INST_KILLGE_INT = 0x48, SQ_OP2_INST_KILLNE_INT = 0x49, SQ_OP2_INST_PRED_SETE_PUSH_INT = 0x4a, SQ_OP2_INST_PRED_SETGT_PUSH_INT = 0x4b, SQ_OP2_INST_PRED_SETGE_PUSH_INT = 0x4c, SQ_OP2_INST_PRED_SETNE_PUSH_INT = 0x4d, SQ_OP2_INST_PRED_SETLT_PUSH_INT = 0x4e, SQ_OP2_INST_PRED_SETLE_PUSH_INT = 0x4f, SQ_OP2_INST_FLT_TO_INT = 0x50, SQ_OP2_INST_BFREV_INT = 0x51, SQ_OP2_INST_ADDC_UINT = 0x52, SQ_OP2_INST_SUBB_UINT = 0x53, SQ_OP2_INST_GROUP_BARRIER = 0x54, SQ_OP2_INST_GROUP_SEQ_BEGIN = 0x55, SQ_OP2_INST_GROUP_SEQ_END = 0x56, SQ_OP2_INST_SET_MODE = 0x57, SQ_OP2_INST_SET_CF_IDX0 = 0x58, SQ_OP2_INST_SET_CF_IDX1 = 0x59, SQ_OP2_INST_SET_LDS_SIZE = 0x5a, SQ_OP2_INST_EXP_IEEE = 0x81, SQ_OP2_INST_LOG_CLAMPED = 0x82, SQ_OP2_INST_LOG_IEEE = 0x83, SQ_OP2_INST_RECIP_CLAMPED = 0x84, SQ_OP2_INST_RECIP_FF = 0x85, SQ_OP2_INST_RECIP_IEEE = 0x86, SQ_OP2_INST_RECIPSQRT_CLAMPED = 0x87, SQ_OP2_INST_RECIPSQRT_FF = 0x88, SQ_OP2_INST_RECIPSQRT_IEEE = 0x89, SQ_OP2_INST_SQRT_IEEE = 0x8a, SQ_OP2_INST_SIN = 0x8d, SQ_OP2_INST_COS = 0x8e, SQ_OP2_INST_MULLO_INT = 0x8f, SQ_OP2_INST_MULHI_INT = 0x90, SQ_OP2_INST_MULLO_UINT = 0x91, SQ_OP2_INST_MULHI_UINT = 0x92, SQ_OP2_INST_RECIP_INT = 0x93, SQ_OP2_INST_RECIP_UINT = 0x94, SQ_OP2_INST_RECIP_64 = 0x95, SQ_OP2_INST_RECIP_CLAMPED_64 = 0x96, SQ_OP2_INST_RECIPSQRT_64 = 0x97, SQ_OP2_INST_RECIPSQRT_CLAMPED_64 = 0x98, SQ_OP2_INST_SQRT_64 = 0x99, SQ_OP2_INST_FLT_TO_UINT = 0x9a, SQ_OP2_INST_INT_TO_FLT = 0x9b, SQ_OP2_INST_UINT_TO_FLT = 0x9c, SQ_OP2_INST_BFM_INT = 0xa0, SQ_OP2_INST_FLT32_TO_FLT16 = 0xa2, SQ_OP2_INST_FLT16_TO_FLT32 = 0xa3, SQ_OP2_INST_UBYTE0_FLT = 0xa4, SQ_OP2_INST_UBYTE1_FLT = 0xa5, SQ_OP2_INST_UBYTE2_FLT = 0xa6, SQ_OP2_INST_UBYTE3_FLT = 0xa7, SQ_OP2_INST_BCNT_INT = 0xaa, SQ_OP2_INST_FFBH_UINT = 0xab, SQ_OP2_INST_FFBL_INT = 0xac, SQ_OP2_INST_FFBH_INT = 0xad, SQ_OP2_INST_FLT_TO_UINT4 = 0xae, SQ_OP2_INST_DOT_IEEE = 0xaf, SQ_OP2_INST_FLT_TO_INT_RPI = 0xb0, SQ_OP2_INST_FLT_TO_INT_FLOOR = 0xb1, SQ_OP2_INST_MULHI_UINT24 = 0xb2, SQ_OP2_INST_MBCNT_32HI_INT = 0xb3, SQ_OP2_INST_OFFSET_TO_FLT = 0xb4, SQ_OP2_INST_MUL_UINT24 = 0xb5, SQ_OP2_INST_BCNT_ACCUM_PREV_INT = 0xb6, SQ_OP2_INST_MBCNT_32LO_ACCUM_PREV_INT = 0xb7, SQ_OP2_INST_SETE_64 = 0xb8, SQ_OP2_INST_SETNE_64 = 0xb9, SQ_OP2_INST_SETGT_64 = 0xba, SQ_OP2_INST_SETGE_64 = 0xbb, SQ_OP2_INST_MIN_64 = 0xbc, SQ_OP2_INST_MAX_64 = 0xbd, SQ_OP2_INST_DOT4 = 0xbe, SQ_OP2_INST_DOT4_IEEE = 0xbf, SQ_OP2_INST_CUBE = 0xc0, SQ_OP2_INST_MAX4 = 0xc1, SQ_OP2_INST_FREXP_64 = 0xc4, SQ_OP2_INST_LDEXP_64 = 0xc5, SQ_OP2_INST_FRACT_64 = 0xc6, SQ_OP2_INST_PRED_SETGT_64 = 0xc7, SQ_OP2_INST_PRED_SETE_64 = 0xc8, SQ_OP2_INST_PRED_SETGE_64 = 0xc9, SQ_OP2_INST_MUL_64 = 0xca, SQ_OP2_INST_ADD_64 = 0xcb, SQ_OP2_INST_MOVA_INT = 0xcc, SQ_OP2_INST_FLT64_TO_FLT32 = 0xcd, SQ_OP2_INST_FLT32_TO_FLT64 = 0xce, SQ_OP2_INST_SAD_ACCUM_PREV_UINT = 0xcf, SQ_OP2_INST_DOT = 0xd0, SQ_OP2_INST_MUL_PREV = 0xd1, SQ_OP2_INST_MUL_IEEE_PREV = 0xd2, SQ_OP2_INST_ADD_PREV = 0xd3, SQ_OP2_INST_MULADD_PREV = 0xd4, SQ_OP2_INST_MULADD_IEEE_PREV = 0xd5, SQ_OP2_INST_INTERP_XY = 0xd6, SQ_OP2_INST_INTERP_ZW = 0xd7, SQ_OP2_INST_INTERP_X = 0xd8, SQ_OP2_INST_INTERP_Z = 0xd9, SQ_OP2_INST_STORE_FLAGS = 0xda, SQ_OP2_INST_LOAD_STORE_FLAGS = 0xdb, SQ_OP2_INST_INTERP_LOAD_P0 = 0xe0, SQ_OP2_INST_INTERP_LOAD_P10 = 0xe1, SQ_OP2_INST_INTERP_LOAD_P20 = 0xe2, SQ_CF_WORD1 = 0x00008dfc, POP_COUNT_mask = 0x07 << 0, POP_COUNT_shift = 0, CF_CONST_mask = 0x1f << 3, CF_CONST_shift = 3, COND_mask = 0x03 << 8, COND_shift = 8, SQ_CF_COND_ACTIVE = 0x00, SQ_CF_COND_FALSE = 0x01, SQ_CF_COND_BOOL = 0x02, SQ_CF_COND_NOT_BOOL = 0x03, SQ_CF_WORD1__COUNT_mask = 0x3f << 10, SQ_CF_WORD1__COUNT_shift = 10, /* VALID_PIXEL_MODE_bit = 1 << 20, */ SQ_CF_WORD1__CF_INST_mask = 0xff << 22, SQ_CF_WORD1__CF_INST_shift = 22, SQ_CF_INST_NOP = 0x00, SQ_CF_INST_TC = 0x01, SQ_CF_INST_VC = 0x02, SQ_CF_INST_GDS = 0x03, SQ_CF_INST_LOOP_START = 0x04, SQ_CF_INST_LOOP_END = 0x05, SQ_CF_INST_LOOP_START_DX10 = 0x06, SQ_CF_INST_LOOP_START_NO_AL = 0x07, SQ_CF_INST_LOOP_CONTINUE = 0x08, SQ_CF_INST_LOOP_BREAK = 0x09, SQ_CF_INST_JUMP = 0x0a, SQ_CF_INST_PUSH = 0x0b, SQ_CF_INST_ELSE = 0x0d, SQ_CF_INST_POP = 0x0e, SQ_CF_INST_CALL = 0x12, SQ_CF_INST_CALL_FS = 0x13, SQ_CF_INST_RETURN = 0x14, SQ_CF_INST_EMIT_VERTEX = 0x15, SQ_CF_INST_EMIT_CUT_VERTEX = 0x16, SQ_CF_INST_CUT_VERTEX = 0x17, SQ_CF_INST_KILL = 0x18, SQ_CF_INST_WAIT_ACK = 0x1a, SQ_CF_INST_TC_ACK = 0x1b, SQ_CF_INST_VC_ACK = 0x1c, SQ_CF_INST_JUMPTABLE = 0x1d, SQ_CF_INST_GLOBAL_WAVE_SYNC = 0x1e, SQ_CF_INST_HALT = 0x1f, SQ_CF_INST_END = 0x20, SQ_CF_INST_LDS_DEALLOC = 0x21, SQ_CF_INST_PUSH_WQM = 0x22, SQ_CF_INST_POP_WQM = 0x23, SQ_CF_INST_ELSE_WQM = 0x24, SQ_CF_INST_JUMP_ANY = 0x25, SQ_CF_INST_REACTIVATE = 0x26, SQ_CF_INST_REACTIVATE_WQM = 0x27, SQ_CF_INST_INTERRUPT = 0x28, SQ_CF_INST_INTERRUPT_AND_SLEEP = 0x29, SQ_CF_INST_SET_PRIORITY = 0x2a, /* BARRIER_bit = 1 << 31, */ SQ_VTX_WORD1_SEM = 0x00008dfc, SEMANTIC_ID_mask = 0xff << 0, SEMANTIC_ID_shift = 0, SQ_TEX_WORD0 = 0x00008dfc, TEX_INST_mask = 0x1f << 0, TEX_INST_shift = 0, SQ_TEX_INST_LD = 0x03, SQ_TEX_INST_GET_TEXTURE_RESINFO = 0x04, SQ_TEX_INST_GET_NUMBER_OF_SAMPLES = 0x05, SQ_TEX_INST_GET_LOD = 0x06, SQ_TEX_INST_GET_GRADIENTS_H = 0x07, SQ_TEX_INST_GET_GRADIENTS_V = 0x08, SQ_TEX_INST_SET_TEXTURE_OFFSETS = 0x09, SQ_TEX_INST_KEEP_GRADIENTS = 0x0a, SQ_TEX_INST_SET_GRADIENTS_H = 0x0b, SQ_TEX_INST_SET_GRADIENTS_V = 0x0c, SQ_TEX_INST_PASS = 0x0d, SQ_TEX_INST_SAMPLE = 0x10, SQ_TEX_INST_SAMPLE_L = 0x11, SQ_TEX_INST_SAMPLE_LB = 0x12, SQ_TEX_INST_SAMPLE_LZ = 0x13, SQ_TEX_INST_SAMPLE_G = 0x14, SQ_TEX_INST_GATHER4 = 0x15, SQ_TEX_INST_SAMPLE_G_LB = 0x16, SQ_TEX_INST_GATHER4_O = 0x17, SQ_TEX_INST_SAMPLE_C = 0x18, SQ_TEX_INST_SAMPLE_C_L = 0x19, SQ_TEX_INST_SAMPLE_C_LB = 0x1a, SQ_TEX_INST_SAMPLE_C_LZ = 0x1b, SQ_TEX_INST_SAMPLE_C_G = 0x1c, SQ_TEX_INST_GATHER4_C = 0x1d, SQ_TEX_INST_SAMPLE_C_G_LB = 0x1e, SQ_TEX_INST_GATHER4_C_O = 0x1f, INST_MOD_mask = 0x03 << 5, INST_MOD_shift = 5, /* FETCH_WHOLE_QUAD_bit = 1 << 7, */ RESOURCE_ID_mask = 0xff << 8, RESOURCE_ID_shift = 8, SQ_TEX_WORD0__SRC_GPR_mask = 0x7f << 16, SQ_TEX_WORD0__SRC_GPR_shift = 16, /* SRC_REL_bit = 1 << 23, */ SQ_TEX_WORD0__ALT_CONST_bit = 1 << 24, RESOURCE_INDEX_MODE_mask = 0x03 << 25, RESOURCE_INDEX_MODE_shift = 25, /* SQ_CF_INDEX_NONE = 0x00, */ /* SQ_CF_INDEX_0 = 0x01, */ /* SQ_CF_INDEX_1 = 0x02, */ /* SQ_CF_INVALID = 0x03, */ SAMPLER_INDEX_MODE_mask = 0x03 << 27, SAMPLER_INDEX_MODE_shift = 27, /* SQ_CF_INDEX_NONE = 0x00, */ /* SQ_CF_INDEX_0 = 0x01, */ /* SQ_CF_INDEX_1 = 0x02, */ /* SQ_CF_INVALID = 0x03, */ SQ_VTX_WORD1_GPR = 0x00008dfc, SQ_VTX_WORD1_GPR__DST_GPR_mask = 0x7f << 0, SQ_VTX_WORD1_GPR__DST_GPR_shift = 0, SQ_VTX_WORD1_GPR__DST_REL_bit = 1 << 7, SQ_ALU_WORD1_LDS_IDX_OP = 0x00008dfc, /* SRC2_SEL_mask = 0x1ff << 0, */ /* SRC2_SEL_shift = 0, */ /* SQ_ALU_SRC_LDS_OQ_A = 0xdb, */ /* SQ_ALU_SRC_LDS_OQ_B = 0xdc, */ /* SQ_ALU_SRC_LDS_OQ_A_POP = 0xdd, */ /* SQ_ALU_SRC_LDS_OQ_B_POP = 0xde, */ /* SQ_ALU_SRC_LDS_DIRECT_A = 0xdf, */ /* SQ_ALU_SRC_LDS_DIRECT_B = 0xe0, */ /* SQ_ALU_SRC_TIME_HI = 0xe3, */ /* SQ_ALU_SRC_TIME_LO = 0xe4, */ /* SQ_ALU_SRC_MASK_HI = 0xe5, */ /* SQ_ALU_SRC_MASK_LO = 0xe6, */ /* SQ_ALU_SRC_HW_WAVE_ID = 0xe7, */ /* SQ_ALU_SRC_SIMD_ID = 0xe8, */ /* SQ_ALU_SRC_SE_ID = 0xe9, */ /* SQ_ALU_SRC_HW_THREADGRP_ID = 0xea, */ /* SQ_ALU_SRC_WAVE_ID_IN_GRP = 0xeb, */ /* SQ_ALU_SRC_NUM_THREADGRP_WAVES = 0xec, */ /* SQ_ALU_SRC_HW_ALU_ODD = 0xed, */ /* SQ_ALU_SRC_LOOP_IDX = 0xee, */ /* SQ_ALU_SRC_PARAM_BASE_ADDR = 0xf0, */ /* SQ_ALU_SRC_NEW_PRIM_MASK = 0xf1, */ /* SQ_ALU_SRC_PRIM_MASK_HI = 0xf2, */ /* SQ_ALU_SRC_PRIM_MASK_LO = 0xf3, */ /* SQ_ALU_SRC_1_DBL_L = 0xf4, */ /* SQ_ALU_SRC_1_DBL_M = 0xf5, */ /* SQ_ALU_SRC_0_5_DBL_L = 0xf6, */ /* SQ_ALU_SRC_0_5_DBL_M = 0xf7, */ /* SQ_ALU_SRC_0 = 0xf8, */ /* SQ_ALU_SRC_1 = 0xf9, */ /* SQ_ALU_SRC_1_INT = 0xfa, */ /* SQ_ALU_SRC_M_1_INT = 0xfb, */ /* SQ_ALU_SRC_0_5 = 0xfc, */ /* SQ_ALU_SRC_LITERAL = 0xfd, */ /* SQ_ALU_SRC_PV = 0xfe, */ /* SQ_ALU_SRC_PS = 0xff, */ /* SRC2_REL_bit = 1 << 9, */ /* SRC2_CHAN_mask = 0x03 << 10, */ /* SRC2_CHAN_shift = 10, */ /* SQ_CHAN_X = 0x00, */ /* SQ_CHAN_Y = 0x01, */ /* SQ_CHAN_Z = 0x02, */ /* SQ_CHAN_W = 0x03, */ IDX_OFFSET_1_bit = 1 << 12, SQ_ALU_WORD1_LDS_IDX_OP__ALU_INST_mask = 0x1f << 13, SQ_ALU_WORD1_LDS_IDX_OP__ALU_INST_shift = 13, /* SQ_OP3_INST_BFE_UINT = 0x04, */ /* SQ_OP3_INST_BFE_INT = 0x05, */ /* SQ_OP3_INST_BFI_INT = 0x06, */ /* SQ_OP3_INST_FMA = 0x07, */ /* SQ_OP3_INST_CNDNE_64 = 0x09, */ /* SQ_OP3_INST_FMA_64 = 0x0a, */ /* SQ_OP3_INST_LERP_UINT = 0x0b, */ /* SQ_OP3_INST_BIT_ALIGN_INT = 0x0c, */ /* SQ_OP3_INST_BYTE_ALIGN_INT = 0x0d, */ /* SQ_OP3_INST_SAD_ACCUM_UINT = 0x0e, */ /* SQ_OP3_INST_SAD_ACCUM_HI_UINT = 0x0f, */ /* SQ_OP3_INST_MULADD_UINT24 = 0x10, */ /* SQ_OP3_INST_LDS_IDX_OP = 0x11, */ /* SQ_OP3_INST_MULADD = 0x14, */ /* SQ_OP3_INST_MULADD_M2 = 0x15, */ /* SQ_OP3_INST_MULADD_M4 = 0x16, */ /* SQ_OP3_INST_MULADD_D2 = 0x17, */ /* SQ_OP3_INST_MULADD_IEEE = 0x18, */ /* SQ_OP3_INST_CNDE = 0x19, */ /* SQ_OP3_INST_CNDGT = 0x1a, */ /* SQ_OP3_INST_CNDGE = 0x1b, */ /* SQ_OP3_INST_CNDE_INT = 0x1c, */ /* SQ_OP3_INST_CNDGT_INT = 0x1d, */ /* SQ_OP3_INST_CNDGE_INT = 0x1e, */ /* SQ_OP3_INST_MUL_LIT = 0x1f, */ /* BANK_SWIZZLE_mask = 0x07 << 18, */ /* BANK_SWIZZLE_shift = 18, */ /* SQ_ALU_VEC_012 = 0x00, */ /* SQ_ALU_VEC_021 = 0x01, */ /* SQ_ALU_VEC_120 = 0x02, */ /* SQ_ALU_VEC_102 = 0x03, */ /* SQ_ALU_VEC_201 = 0x04, */ /* SQ_ALU_VEC_210 = 0x05, */ LDS_OP_mask = 0x3f << 21, LDS_OP_shift = 21, /* SQ_DS_INST_ADD = 0x00, */ /* SQ_DS_INST_SUB = 0x01, */ /* SQ_DS_INST_RSUB = 0x02, */ /* SQ_DS_INST_INC = 0x03, */ /* SQ_DS_INST_DEC = 0x04, */ /* SQ_DS_INST_MIN_INT = 0x05, */ /* SQ_DS_INST_MAX_INT = 0x06, */ /* SQ_DS_INST_MIN_UINT = 0x07, */ /* SQ_DS_INST_MAX_UINT = 0x08, */ /* SQ_DS_INST_AND = 0x09, */ /* SQ_DS_INST_OR = 0x0a, */ /* SQ_DS_INST_XOR = 0x0b, */ /* SQ_DS_INST_MSKOR = 0x0c, */ /* SQ_DS_INST_WRITE = 0x0d, */ /* SQ_DS_INST_WRITE_REL = 0x0e, */ /* SQ_DS_INST_WRITE2 = 0x0f, */ /* SQ_DS_INST_CMP_STORE = 0x10, */ /* SQ_DS_INST_CMP_STORE_SPF = 0x11, */ /* SQ_DS_INST_BYTE_WRITE = 0x12, */ /* SQ_DS_INST_SHORT_WRITE = 0x13, */ /* SQ_DS_INST_ADD_RET = 0x20, */ /* SQ_DS_INST_SUB_RET = 0x21, */ /* SQ_DS_INST_RSUB_RET = 0x22, */ /* SQ_DS_INST_INC_RET = 0x23, */ /* SQ_DS_INST_DEC_RET = 0x24, */ /* SQ_DS_INST_MIN_INT_RET = 0x25, */ /* SQ_DS_INST_MAX_INT_RET = 0x26, */ /* SQ_DS_INST_MIN_UINT_RET = 0x27, */ /* SQ_DS_INST_MAX_UINT_RET = 0x28, */ /* SQ_DS_INST_AND_RET = 0x29, */ /* SQ_DS_INST_OR_RET = 0x2a, */ /* SQ_DS_INST_XOR_RET = 0x2b, */ /* SQ_DS_INST_MSKOR_RET = 0x2c, */ /* SQ_DS_INST_XCHG_RET = 0x2d, */ /* SQ_DS_INST_XCHG_REL_RET = 0x2e, */ /* SQ_DS_INST_XCHG2_RET = 0x2f, */ /* SQ_DS_INST_CMP_XCHG_RET = 0x30, */ /* SQ_DS_INST_CMP_XCHG_SPF_RET = 0x31, */ /* SQ_DS_INST_READ_RET = 0x32, */ /* SQ_DS_INST_READ_REL_RET = 0x33, */ /* SQ_DS_INST_READ2_RET = 0x34, */ /* SQ_DS_INST_READWRITE_RET = 0x35, */ /* SQ_DS_INST_BYTE_READ_RET = 0x36, */ /* SQ_DS_INST_UBYTE_READ_RET = 0x37, */ /* SQ_DS_INST_SHORT_READ_RET = 0x38, */ /* SQ_DS_INST_USHORT_READ_RET = 0x39, */ /* SQ_DS_INST_ATOMIC_ORDERED_ALLOC_RET = 0x3f, */ IDX_OFFSET_0_bit = 1 << 27, IDX_OFFSET_2_bit = 1 << 28, /* DST_CHAN_mask = 0x03 << 29, */ /* DST_CHAN_shift = 29, */ /* CHAN_X = 0x00, */ /* CHAN_Y = 0x01, */ /* CHAN_Z = 0x02, */ /* CHAN_W = 0x03, */ IDX_OFFSET_3_bit = 1 << 31, SQ_CF_ENCODING_WORD1 = 0x00008dfc, SQ_CF_ENCODING_WORD1__ENCODING_mask = 0x03 << 28, SQ_CF_ENCODING_WORD1__ENCODING_shift = 28, SQ_CF_ENCODING_INST_CF = 0x00, SQ_CF_ENCODING_INST_ALLOC_EXPORT = 0x01, SQ_CF_ENCODING_INST_ALU0 = 0x02, SQ_CF_ENCODING_INST_ALU1 = 0x03, SQ_ALU_WORD0 = 0x00008dfc, /* SRC0_SEL_mask = 0x1ff << 0, */ /* SRC0_SEL_shift = 0, */ /* SQ_ALU_SRC_LDS_OQ_A = 0xdb, */ /* SQ_ALU_SRC_LDS_OQ_B = 0xdc, */ /* SQ_ALU_SRC_LDS_OQ_A_POP = 0xdd, */ /* SQ_ALU_SRC_LDS_OQ_B_POP = 0xde, */ /* SQ_ALU_SRC_LDS_DIRECT_A = 0xdf, */ /* SQ_ALU_SRC_LDS_DIRECT_B = 0xe0, */ /* SQ_ALU_SRC_TIME_HI = 0xe3, */ /* SQ_ALU_SRC_TIME_LO = 0xe4, */ /* SQ_ALU_SRC_MASK_HI = 0xe5, */ /* SQ_ALU_SRC_MASK_LO = 0xe6, */ /* SQ_ALU_SRC_HW_WAVE_ID = 0xe7, */ /* SQ_ALU_SRC_SIMD_ID = 0xe8, */ /* SQ_ALU_SRC_SE_ID = 0xe9, */ /* SQ_ALU_SRC_HW_THREADGRP_ID = 0xea, */ /* SQ_ALU_SRC_WAVE_ID_IN_GRP = 0xeb, */ /* SQ_ALU_SRC_NUM_THREADGRP_WAVES = 0xec, */ /* SQ_ALU_SRC_HW_ALU_ODD = 0xed, */ /* SQ_ALU_SRC_LOOP_IDX = 0xee, */ /* SQ_ALU_SRC_PARAM_BASE_ADDR = 0xf0, */ /* SQ_ALU_SRC_NEW_PRIM_MASK = 0xf1, */ /* SQ_ALU_SRC_PRIM_MASK_HI = 0xf2, */ /* SQ_ALU_SRC_PRIM_MASK_LO = 0xf3, */ /* SQ_ALU_SRC_1_DBL_L = 0xf4, */ /* SQ_ALU_SRC_1_DBL_M = 0xf5, */ /* SQ_ALU_SRC_0_5_DBL_L = 0xf6, */ /* SQ_ALU_SRC_0_5_DBL_M = 0xf7, */ /* SQ_ALU_SRC_0 = 0xf8, */ /* SQ_ALU_SRC_1 = 0xf9, */ /* SQ_ALU_SRC_1_INT = 0xfa, */ /* SQ_ALU_SRC_M_1_INT = 0xfb, */ /* SQ_ALU_SRC_0_5 = 0xfc, */ /* SQ_ALU_SRC_LITERAL = 0xfd, */ /* SQ_ALU_SRC_PV = 0xfe, */ /* SQ_ALU_SRC_PS = 0xff, */ /* SRC0_REL_bit = 1 << 9, */ /* SRC0_CHAN_mask = 0x03 << 10, */ /* SRC0_CHAN_shift = 10, */ /* SQ_CHAN_X = 0x00, */ /* SQ_CHAN_Y = 0x01, */ /* SQ_CHAN_Z = 0x02, */ /* SQ_CHAN_W = 0x03, */ SRC0_NEG_bit = 1 << 12, /* SRC1_SEL_mask = 0x1ff << 13, */ /* SRC1_SEL_shift = 13, */ /* SQ_ALU_SRC_LDS_OQ_A = 0xdb, */ /* SQ_ALU_SRC_LDS_OQ_B = 0xdc, */ /* SQ_ALU_SRC_LDS_OQ_A_POP = 0xdd, */ /* SQ_ALU_SRC_LDS_OQ_B_POP = 0xde, */ /* SQ_ALU_SRC_LDS_DIRECT_A = 0xdf, */ /* SQ_ALU_SRC_LDS_DIRECT_B = 0xe0, */ /* SQ_ALU_SRC_TIME_HI = 0xe3, */ /* SQ_ALU_SRC_TIME_LO = 0xe4, */ /* SQ_ALU_SRC_MASK_HI = 0xe5, */ /* SQ_ALU_SRC_MASK_LO = 0xe6, */ /* SQ_ALU_SRC_HW_WAVE_ID = 0xe7, */ /* SQ_ALU_SRC_SIMD_ID = 0xe8, */ /* SQ_ALU_SRC_SE_ID = 0xe9, */ /* SQ_ALU_SRC_HW_THREADGRP_ID = 0xea, */ /* SQ_ALU_SRC_WAVE_ID_IN_GRP = 0xeb, */ /* SQ_ALU_SRC_NUM_THREADGRP_WAVES = 0xec, */ /* SQ_ALU_SRC_HW_ALU_ODD = 0xed, */ /* SQ_ALU_SRC_LOOP_IDX = 0xee, */ /* SQ_ALU_SRC_PARAM_BASE_ADDR = 0xf0, */ /* SQ_ALU_SRC_NEW_PRIM_MASK = 0xf1, */ /* SQ_ALU_SRC_PRIM_MASK_HI = 0xf2, */ /* SQ_ALU_SRC_PRIM_MASK_LO = 0xf3, */ /* SQ_ALU_SRC_1_DBL_L = 0xf4, */ /* SQ_ALU_SRC_1_DBL_M = 0xf5, */ /* SQ_ALU_SRC_0_5_DBL_L = 0xf6, */ /* SQ_ALU_SRC_0_5_DBL_M = 0xf7, */ /* SQ_ALU_SRC_0 = 0xf8, */ /* SQ_ALU_SRC_1 = 0xf9, */ /* SQ_ALU_SRC_1_INT = 0xfa, */ /* SQ_ALU_SRC_M_1_INT = 0xfb, */ /* SQ_ALU_SRC_0_5 = 0xfc, */ /* SQ_ALU_SRC_LITERAL = 0xfd, */ /* SQ_ALU_SRC_PV = 0xfe, */ /* SQ_ALU_SRC_PS = 0xff, */ /* SRC1_REL_bit = 1 << 22, */ /* SRC1_CHAN_mask = 0x03 << 23, */ /* SRC1_CHAN_shift = 23, */ /* SQ_CHAN_X = 0x00, */ /* SQ_CHAN_Y = 0x01, */ /* SQ_CHAN_Z = 0x02, */ /* SQ_CHAN_W = 0x03, */ SRC1_NEG_bit = 1 << 25, /* INDEX_MODE_mask = 0x07 << 26, */ /* INDEX_MODE_shift = 26, */ /* SQ_INDEX_AR_X = 0x00, */ /* SQ_INDEX_LOOP = 0x04, */ /* SQ_INDEX_GLOBAL = 0x05, */ /* SQ_INDEX_GLOBAL_AR_X = 0x06, */ /* PRED_SEL_mask = 0x03 << 29, */ /* PRED_SEL_shift = 29, */ /* SQ_PRED_SEL_OFF = 0x00, */ /* SQ_PRED_SEL_ZERO = 0x02, */ /* SQ_PRED_SEL_ONE = 0x03, */ /* LAST_bit = 1 << 31, */ SQ_MEM_RD_WORD1 = 0x00008dfc, SQ_MEM_RD_WORD1__DST_GPR_mask = 0x7f << 0, SQ_MEM_RD_WORD1__DST_GPR_shift = 0, SQ_MEM_RD_WORD1__DST_REL_bit = 1 << 7, SQ_MEM_RD_WORD1__DST_SEL_X_mask = 0x07 << 9, SQ_MEM_RD_WORD1__DST_SEL_X_shift = 9, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_MEM_RD_WORD1__DST_SEL_Y_mask = 0x07 << 12, SQ_MEM_RD_WORD1__DST_SEL_Y_shift = 12, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_MEM_RD_WORD1__DST_SEL_Z_mask = 0x07 << 15, SQ_MEM_RD_WORD1__DST_SEL_Z_shift = 15, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_MEM_RD_WORD1__DST_SEL_W_mask = 0x07 << 18, SQ_MEM_RD_WORD1__DST_SEL_W_shift = 18, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_MEM_RD_WORD1__DATA_FORMAT_mask = 0x3f << 22, SQ_MEM_RD_WORD1__DATA_FORMAT_shift = 22, SQ_MEM_RD_WORD1__NUM_FORMAT_ALL_mask = 0x03 << 28, SQ_MEM_RD_WORD1__NUM_FORMAT_ALL_shift = 28, /* SQ_NUM_FORMAT_NORM = 0x00, */ /* SQ_NUM_FORMAT_INT = 0x01, */ /* SQ_NUM_FORMAT_SCALED = 0x02, */ SQ_MEM_RD_WORD1__FORMAT_COMP_ALL_bit = 1 << 30, SQ_MEM_RD_WORD1__SRF_MODE_ALL_bit = 1 << 31, SQ_LSTMP_RING_BASE = 0x00008e10, SQ_LSTMP_RING_SIZE = 0x00008e14, SQ_HSTMP_RING_BASE = 0x00008e18, SQ_HSTMP_RING_SIZE = 0x00008e1c, SQ_EX_ALLOC_TABLE_SLOTS = 0x00008e48, PIX_SLOTS_mask = 0x7f << 0, PIX_SLOTS_shift = 0, POS_SLOTS_mask = 0x7f << 8, POS_SLOTS_shift = 8, SMX_SLOTS_mask = 0x7f << 16, SMX_SLOTS_shift = 16, SX_EXPORT_BUFFER_SIZES = 0x0000900c, COLOR_BUFFER_SIZE_mask = 0xff << 0, COLOR_BUFFER_SIZE_shift = 0, POSITION_BUFFER_SIZE_mask = 0xff << 8, POSITION_BUFFER_SIZE_shift = 8, SMX_BUFFER_SIZE_mask = 0xff << 16, SMX_BUFFER_SIZE_shift = 16, SX_MEMORY_EXPORT_BASE = 0x00009010, SX_MEMORY_EXPORT_SIZE = 0x00009014, SPI_CONFIG_CNTL = 0x00009100, GPR_WRITE_PRIORITY_mask = 0x3ffff << 0, GPR_WRITE_PRIORITY_shift = 0, SPI_CONFIG_CNTL_1 = 0x0000913c, VTX_DONE_DELAY_mask = 0x0f << 0, VTX_DONE_DELAY_shift = 0, X_DELAY_14_CLKS = 0x00, X_DELAY_16_CLKS = 0x01, X_DELAY_18_CLKS = 0x02, X_DELAY_20_CLKS = 0x03, X_DELAY_22_CLKS = 0x04, X_DELAY_24_CLKS = 0x05, X_DELAY_26_CLKS = 0x06, X_DELAY_28_CLKS = 0x07, X_DELAY_30_CLKS = 0x08, X_DELAY_32_CLKS = 0x09, X_DELAY_34_CLKS = 0x0a, X_DELAY_4_CLKS = 0x0b, X_DELAY_6_CLKS = 0x0c, X_DELAY_8_CLKS = 0x0d, X_DELAY_10_CLKS = 0x0e, X_DELAY_12_CLKS = 0x0f, INTERP_ONE_PRIM_PER_ROW_bit = 1 << 4, BC_OPTIMIZE_DISABLE_bit = 1 << 5, PC_LIMIT_ENABLE_bit = 1 << 6, PC_LIMIT_STRICT_bit = 1 << 7, PC_LIMIT_SIZE_mask = 0xffff << 16, PC_LIMIT_SIZE_shift = 16, TD_CNTL = 0x00009494, SYNC_PHASE_SH_mask = 0x03 << 0, SYNC_PHASE_SH_shift = 0, PAD_STALL_EN_bit = 1 << 8, EXTEND_LDS_STALL_mask = 0x03 << 9, EXTEND_LDS_STALL_shift = 9, X_0 = 0x00, EXTEND_LDS_STALL__X_1 = 0x01, X_2 = 0x02, X_3 = 0x03, GATHER4_FLOAT_MODE_bit = 1 << 16, LD_FLOAT_MODE_bit = 1 << 18, GATHER4_DX9_MODE_bit = 1 << 19, TD_STATUS = 0x00009498, BUSY_bit = 1 << 31, DB_SUBTILE_CONTROL = 0x00009858, MSAA1_X_mask = 0x03 << 0, MSAA1_X_shift = 0, MSAA1_Y_mask = 0x03 << 2, MSAA1_Y_shift = 2, MSAA2_X_mask = 0x03 << 4, MSAA2_X_shift = 4, MSAA2_Y_mask = 0x03 << 6, MSAA2_Y_shift = 6, MSAA4_X_mask = 0x03 << 8, MSAA4_X_shift = 8, MSAA4_Y_mask = 0x03 << 10, MSAA4_Y_shift = 10, MSAA8_X_mask = 0x03 << 12, MSAA8_X_shift = 12, MSAA8_Y_mask = 0x03 << 14, MSAA8_Y_shift = 14, MSAA16_X_mask = 0x03 << 16, MSAA16_X_shift = 16, MSAA16_Y_mask = 0x03 << 18, MSAA16_Y_shift = 18, DB_ZPASS_COUNT_LOW = 0x00009870, DB_ZPASS_COUNT_HI = 0x00009874, COUNT_HI_mask = 0x7fffffff << 0, COUNT_HI_shift = 0, TD_PS_BORDER_COLOR_INDEX = 0x0000a400, INDEX_mask = 0x1f << 0, INDEX_shift = 0, TD_PS_BORDER_COLOR_RED = 0x0000a404, TD_PS_BORDER_COLOR_GREEN = 0x0000a408, TD_PS_BORDER_COLOR_BLUE = 0x0000a40c, TD_PS_BORDER_COLOR_ALPHA = 0x0000a410, TD_VS_BORDER_COLOR_INDEX = 0x0000a414, /* INDEX_mask = 0x1f << 0, */ /* INDEX_shift = 0, */ TD_VS_BORDER_COLOR_RED = 0x0000a418, TD_VS_BORDER_COLOR_GREEN = 0x0000a41c, TD_VS_BORDER_COLOR_BLUE = 0x0000a420, TD_VS_BORDER_COLOR_ALPHA = 0x0000a424, TD_GS_BORDER_COLOR_INDEX = 0x0000a428, /* INDEX_mask = 0x1f << 0, */ /* INDEX_shift = 0, */ TD_GS_BORDER_COLOR_RED = 0x0000a42c, TD_GS_BORDER_COLOR_GREEN = 0x0000a430, TD_GS_BORDER_COLOR_BLUE = 0x0000a434, TD_GS_BORDER_COLOR_ALPHA = 0x0000a438, TD_HS_BORDER_COLOR_INDEX = 0x0000a43c, /* INDEX_mask = 0x1f << 0, */ /* INDEX_shift = 0, */ TD_HS_BORDER_COLOR_RED = 0x0000a440, TD_HS_BORDER_COLOR_GREEN = 0x0000a444, TD_HS_BORDER_COLOR_BLUE = 0x0000a448, TD_HS_BORDER_COLOR_ALPHA = 0x0000a44c, TD_LS_BORDER_COLOR_INDEX = 0x0000a450, /* INDEX_mask = 0x1f << 0, */ /* INDEX_shift = 0, */ TD_LS_BORDER_COLOR_RED = 0x0000a454, TD_LS_BORDER_COLOR_GREEN = 0x0000a458, TD_LS_BORDER_COLOR_BLUE = 0x0000a45c, TD_LS_BORDER_COLOR_ALPHA = 0x0000a460, TD_CS_BORDER_COLOR_INDEX = 0x0000a464, /* INDEX_mask = 0x1f << 0, */ /* INDEX_shift = 0, */ TD_CS_BORDER_COLOR_RED = 0x0000a468, TD_CS_BORDER_COLOR_GREEN = 0x0000a46c, TD_CS_BORDER_COLOR_BLUE = 0x0000a470, TD_CS_BORDER_COLOR_ALPHA = 0x0000a474, DB_RENDER_CONTROL = 0x00028000, DEPTH_CLEAR_ENABLE_bit = 1 << 0, STENCIL_CLEAR_ENABLE_bit = 1 << 1, DEPTH_COPY_bit = 1 << 2, STENCIL_COPY_bit = 1 << 3, RESUMMARIZE_ENABLE_bit = 1 << 4, STENCIL_COMPRESS_DISABLE_bit = 1 << 5, DEPTH_COMPRESS_DISABLE_bit = 1 << 6, COPY_CENTROID_bit = 1 << 7, COPY_SAMPLE_mask = 0x0f << 8, COPY_SAMPLE_shift = 8, DB_COUNT_CONTROL = 0x00028004, ZPASS_INCREMENT_DISABLE_bit = 1 << 0, PERFECT_ZPASS_COUNTS_bit = 1 << 1, SAMPLE_RATE_mask = 0x07 << 4, SAMPLE_RATE_shift = 4, DB_DEPTH_VIEW = 0x00028008, SLICE_START_mask = 0x7ff << 0, SLICE_START_shift = 0, SLICE_MAX_mask = 0x7ff << 13, SLICE_MAX_shift = 13, Z_READ_ONLY_bit = 1 << 24, STENCIL_READ_ONLY_bit = 1 << 25, DB_RENDER_OVERRIDE = 0x0002800c, FORCE_HIZ_ENABLE_mask = 0x03 << 0, FORCE_HIZ_ENABLE_shift = 0, FORCE_OFF = 0x00, FORCE_ENABLE = 0x01, FORCE_DISABLE = 0x02, FORCE_RESERVED = 0x03, FORCE_HIS_ENABLE0_mask = 0x03 << 2, FORCE_HIS_ENABLE0_shift = 2, /* FORCE_OFF = 0x00, */ /* FORCE_ENABLE = 0x01, */ /* FORCE_DISABLE = 0x02, */ /* FORCE_RESERVED = 0x03, */ FORCE_HIS_ENABLE1_mask = 0x03 << 4, FORCE_HIS_ENABLE1_shift = 4, /* FORCE_OFF = 0x00, */ /* FORCE_ENABLE = 0x01, */ /* FORCE_DISABLE = 0x02, */ /* FORCE_RESERVED = 0x03, */ FORCE_SHADER_Z_ORDER_bit = 1 << 6, FAST_Z_DISABLE_bit = 1 << 7, FAST_STENCIL_DISABLE_bit = 1 << 8, NOOP_CULL_DISABLE_bit = 1 << 9, FORCE_COLOR_KILL_bit = 1 << 10, FORCE_Z_READ_bit = 1 << 11, FORCE_STENCIL_READ_bit = 1 << 12, FORCE_FULL_Z_RANGE_mask = 0x03 << 13, FORCE_FULL_Z_RANGE_shift = 13, /* FORCE_OFF = 0x00, */ /* FORCE_ENABLE = 0x01, */ /* FORCE_DISABLE = 0x02, */ /* FORCE_RESERVED = 0x03, */ FORCE_QC_SMASK_CONFLICT_bit = 1 << 15, DISABLE_VIEWPORT_CLAMP_bit = 1 << 16, IGNORE_SC_ZRANGE_bit = 1 << 17, DISABLE_FULLY_COVERED_bit = 1 << 18, FORCE_Z_LIMIT_SUMM_mask = 0x03 << 19, FORCE_Z_LIMIT_SUMM_shift = 19, FORCE_SUMM_OFF = 0x00, FORCE_SUMM_MINZ = 0x01, FORCE_SUMM_MAXZ = 0x02, FORCE_SUMM_BOTH = 0x03, MAX_TILES_IN_DTT_mask = 0x1f << 21, MAX_TILES_IN_DTT_shift = 21, DISABLE_TILE_RATE_TILES_bit = 1 << 26, FORCE_Z_DIRTY_bit = 1 << 27, FORCE_STENCIL_DIRTY_bit = 1 << 28, FORCE_Z_VALID_bit = 1 << 29, FORCE_STENCIL_VALID_bit = 1 << 30, PRESERVE_COMPRESSION_bit = 1 << 31, DB_RENDER_OVERRIDE2 = 0x00028010, PARTIAL_SQUAD_LAUNCH_CONTROL_mask = 0x03 << 0, PARTIAL_SQUAD_LAUNCH_CONTROL_shift = 0, PSLC_AUTO = 0x00, PSLC_ON_HANG_ONLY = 0x01, PSLC_ASAP = 0x02, PSLC_COUNTDOWN = 0x03, PARTIAL_SQUAD_LAUNCH_COUNTDOWN_mask = 0x07 << 2, PARTIAL_SQUAD_LAUNCH_COUNTDOWN_shift = 2, DISABLE_ZMASK_EXPCLEAR_OPTIMIZATIO_bit = 1 << 5, DISABLE_SMEM_EXPCLEAR_OPTIMIZATION_bit = 1 << 6, DISABLE_COLOR_ON_VALIDATION_bit = 1 << 7, DECOMPRESS_Z_ON_FLUSH_bit = 1 << 8, DB_HTILE_DATA_BASE = 0x00028014, DB_STENCIL_CLEAR = 0x00028028, DB_STENCIL_CLEAR__CLEAR_mask = 0xff << 0, DB_STENCIL_CLEAR__CLEAR_shift = 0, DB_DEPTH_CLEAR = 0x0002802c, PA_SC_SCREEN_SCISSOR_TL = 0x00028030, PA_SC_SCREEN_SCISSOR_TL__TL_X_mask = 0xffff << 0, PA_SC_SCREEN_SCISSOR_TL__TL_X_shift = 0, PA_SC_SCREEN_SCISSOR_TL__TL_Y_mask = 0xffff << 16, PA_SC_SCREEN_SCISSOR_TL__TL_Y_shift = 16, PA_SC_SCREEN_SCISSOR_BR = 0x00028034, PA_SC_SCREEN_SCISSOR_BR__BR_X_mask = 0xffff << 0, PA_SC_SCREEN_SCISSOR_BR__BR_X_shift = 0, PA_SC_SCREEN_SCISSOR_BR__BR_Y_mask = 0xffff << 16, PA_SC_SCREEN_SCISSOR_BR__BR_Y_shift = 16, DB_DEPTH_INFO = 0x0002803c, ADDR5_SWIZZLE_MASK_mask = 0x0f << 0, ADDR5_SWIZZLE_MASK_shift = 0, DB_Z_INFO = 0x00028040, DB_Z_INFO__FORMAT_mask = 0x03 << 0, DB_Z_INFO__FORMAT_shift = 0, Z_INVALID = 0x00, Z_16 = 0x01, Z_24 = 0x02, Z_32_FLOAT = 0x03, DB_Z_INFO__NUM_SAMPLES_mask = 0x03 << 2, DB_Z_INFO__NUM_SAMPLES_shift = 2, DB_Z_INFO__ARRAY_MODE_mask = 0x0f << 4, DB_Z_INFO__ARRAY_MODE_shift = 4, ARRAY_1D_TILED_THIN1 = 0x02, ARRAY_2D_TILED_THIN1 = 0x04, DB_Z_INFO__TILE_SPLIT_mask = 0x07 << 8, DB_Z_INFO__TILE_SPLIT_shift = 8, ADDR_SURF_TILE_SPLIT_64B = 0x00, ADDR_SURF_TILE_SPLIT_128B = 0x01, ADDR_SURF_TILE_SPLIT_256B = 0x02, ADDR_SURF_TILE_SPLIT_512B = 0x03, ADDR_SURF_TILE_SPLIT_1KB = 0x04, ADDR_SURF_TILE_SPLIT_2KB = 0x05, ADDR_SURF_TILE_SPLIT_4KB = 0x06, DB_Z_INFO__NUM_BANKS_mask = 0x03 << 12, DB_Z_INFO__NUM_BANKS_shift = 12, ADDR_SURF_2_BANK = 0x00, ADDR_SURF_4_BANK = 0x01, ADDR_SURF_8_BANK = 0x02, ADDR_SURF_16_BANK = 0x03, DB_Z_INFO__BANK_WIDTH_mask = 0x03 << 16, DB_Z_INFO__BANK_WIDTH_shift = 16, ADDR_SURF_BANK_WIDTH_1 = 0x00, ADDR_SURF_BANK_WIDTH_2 = 0x01, ADDR_SURF_BANK_WIDTH_4 = 0x02, ADDR_SURF_BANK_WIDTH_8 = 0x03, DB_Z_INFO__BANK_HEIGHT_mask = 0x03 << 20, DB_Z_INFO__BANK_HEIGHT_shift = 20, ADDR_SURF_BANK_HEIGHT_1 = 0x00, ADDR_SURF_BANK_HEIGHT_2 = 0x01, ADDR_SURF_BANK_HEIGHT_4 = 0x02, ADDR_SURF_BANK_HEIGHT_8 = 0x03, DB_Z_INFO__MACRO_TILE_ASPECT_mask = 0x03 << 24, DB_Z_INFO__MACRO_TILE_ASPECT_shift = 24, ADDR_SURF_MACRO_ASPECT_1 = 0x00, ADDR_SURF_MACRO_ASPECT_2 = 0x01, ADDR_SURF_MACRO_ASPECT_4 = 0x02, ADDR_SURF_MACRO_ASPECT_8 = 0x03, ALLOW_EXPCLEAR_bit = 1 << 27, READ_SIZE_bit = 1 << 28, TILE_SURFACE_ENABLE_bit = 1 << 29, ZRANGE_PRECISION_bit = 1 << 31, DB_STENCIL_INFO = 0x00028044, DB_STENCIL_INFO__FORMAT_bit = 1 << 0, DB_STENCIL_INFO__TILE_SPLIT_mask = 0x07 << 8, DB_STENCIL_INFO__TILE_SPLIT_shift = 8, /* ADDR_SURF_TILE_SPLIT_64B = 0x00, */ /* ADDR_SURF_TILE_SPLIT_128B = 0x01, */ /* ADDR_SURF_TILE_SPLIT_256B = 0x02, */ /* ADDR_SURF_TILE_SPLIT_512B = 0x03, */ /* ADDR_SURF_TILE_SPLIT_1KB = 0x04, */ /* ADDR_SURF_TILE_SPLIT_2KB = 0x05, */ /* ADDR_SURF_TILE_SPLIT_4KB = 0x06, */ /* ALLOW_EXPCLEAR_bit = 1 << 27, */ TILE_STENCIL_DISABLE_bit = 1 << 29, DB_Z_READ_BASE = 0x00028048, DB_STENCIL_READ_BASE = 0x0002804c, DB_Z_WRITE_BASE = 0x00028050, DB_STENCIL_WRITE_BASE = 0x00028054, DB_DEPTH_SIZE = 0x00028058, PITCH_TILE_MAX_mask = 0x7ff << 0, PITCH_TILE_MAX_shift = 0, HEIGHT_TILE_MAX_mask = 0x7ff << 11, HEIGHT_TILE_MAX_shift = 11, DB_DEPTH_SLICE = 0x0002805c, SLICE_TILE_MAX_mask = 0x3fffff << 0, SLICE_TILE_MAX_shift = 0, SQ_ALU_CONST_BUFFER_SIZE_PS_0 = 0x00028140, SQ_ALU_CONST_BUFFER_SIZE_PS_0_num = 16, SQ_ALU_CONST_BUFFER_SIZE_PS_0__DATA_mask = 0x1ff << 0, SQ_ALU_CONST_BUFFER_SIZE_PS_0__DATA_shift = 0, SQ_ALU_CONST_BUFFER_SIZE_VS_0 = 0x00028180, SQ_ALU_CONST_BUFFER_SIZE_VS_0_num = 16, SQ_ALU_CONST_BUFFER_SIZE_VS_0__DATA_mask = 0x1ff << 0, SQ_ALU_CONST_BUFFER_SIZE_VS_0__DATA_shift = 0, SQ_ALU_CONST_BUFFER_SIZE_GS_0 = 0x000281c0, SQ_ALU_CONST_BUFFER_SIZE_GS_0_num = 16, SQ_ALU_CONST_BUFFER_SIZE_GS_0__DATA_mask = 0x1ff << 0, SQ_ALU_CONST_BUFFER_SIZE_GS_0__DATA_shift = 0, PA_SC_WINDOW_OFFSET = 0x00028200, WINDOW_X_OFFSET_mask = 0xffff << 0, WINDOW_X_OFFSET_shift = 0, WINDOW_Y_OFFSET_mask = 0xffff << 16, WINDOW_Y_OFFSET_shift = 16, PA_SC_WINDOW_SCISSOR_TL = 0x00028204, PA_SC_WINDOW_SCISSOR_TL__TL_X_mask = 0x7fff << 0, PA_SC_WINDOW_SCISSOR_TL__TL_X_shift = 0, PA_SC_WINDOW_SCISSOR_TL__TL_Y_mask = 0x7fff << 16, PA_SC_WINDOW_SCISSOR_TL__TL_Y_shift = 16, WINDOW_OFFSET_DISABLE_bit = 1 << 31, PA_SC_WINDOW_SCISSOR_BR = 0x00028208, PA_SC_WINDOW_SCISSOR_BR__BR_X_mask = 0x7fff << 0, PA_SC_WINDOW_SCISSOR_BR__BR_X_shift = 0, PA_SC_WINDOW_SCISSOR_BR__BR_Y_mask = 0x7fff << 16, PA_SC_WINDOW_SCISSOR_BR__BR_Y_shift = 16, PA_SC_CLIPRECT_RULE = 0x0002820c, CLIP_RULE_mask = 0xffff << 0, CLIP_RULE_shift = 0, PA_SC_CLIPRECT_0_TL = 0x00028210, PA_SC_CLIPRECT_0_TL_num = 4, PA_SC_CLIPRECT_0_TL_offset = 8, PA_SC_CLIPRECT_0_TL__TL_X_mask = 0x7fff << 0, PA_SC_CLIPRECT_0_TL__TL_X_shift = 0, PA_SC_CLIPRECT_0_TL__TL_Y_mask = 0x7fff << 16, PA_SC_CLIPRECT_0_TL__TL_Y_shift = 16, PA_SC_CLIPRECT_0_BR = 0x00028214, PA_SC_CLIPRECT_0_BR_num = 4, PA_SC_CLIPRECT_0_BR_offset = 8, PA_SC_CLIPRECT_0_BR__BR_X_mask = 0x7fff << 0, PA_SC_CLIPRECT_0_BR__BR_X_shift = 0, PA_SC_CLIPRECT_0_BR__BR_Y_mask = 0x7fff << 16, PA_SC_CLIPRECT_0_BR__BR_Y_shift = 16, PA_SC_EDGERULE = 0x00028230, ER_TRI_mask = 0x0f << 0, ER_TRI_shift = 0, ER_POINT_mask = 0x0f << 4, ER_POINT_shift = 4, ER_RECT_mask = 0x0f << 8, ER_RECT_shift = 8, ER_LINE_LR_mask = 0x3f << 12, ER_LINE_LR_shift = 12, ER_LINE_RL_mask = 0x3f << 18, ER_LINE_RL_shift = 18, ER_LINE_TB_mask = 0x0f << 24, ER_LINE_TB_shift = 24, ER_LINE_BT_mask = 0x0f << 28, ER_LINE_BT_shift = 28, PA_SU_HARDWARE_SCREEN_OFFSET = 0x00028234, HW_SCREEN_OFFSET_X_mask = 0x1f << 0, HW_SCREEN_OFFSET_X_shift = 0, HW_SCREEN_OFFSET_Y_mask = 0x1f << 8, HW_SCREEN_OFFSET_Y_shift = 8, CB_TARGET_MASK = 0x00028238, TARGET0_ENABLE_mask = 0x0f << 0, TARGET0_ENABLE_shift = 0, TARGET1_ENABLE_mask = 0x0f << 4, TARGET1_ENABLE_shift = 4, TARGET2_ENABLE_mask = 0x0f << 8, TARGET2_ENABLE_shift = 8, TARGET3_ENABLE_mask = 0x0f << 12, TARGET3_ENABLE_shift = 12, TARGET4_ENABLE_mask = 0x0f << 16, TARGET4_ENABLE_shift = 16, TARGET5_ENABLE_mask = 0x0f << 20, TARGET5_ENABLE_shift = 20, TARGET6_ENABLE_mask = 0x0f << 24, TARGET6_ENABLE_shift = 24, TARGET7_ENABLE_mask = 0x0f << 28, TARGET7_ENABLE_shift = 28, CB_SHADER_MASK = 0x0002823c, OUTPUT0_ENABLE_mask = 0x0f << 0, OUTPUT0_ENABLE_shift = 0, OUTPUT1_ENABLE_mask = 0x0f << 4, OUTPUT1_ENABLE_shift = 4, OUTPUT2_ENABLE_mask = 0x0f << 8, OUTPUT2_ENABLE_shift = 8, OUTPUT3_ENABLE_mask = 0x0f << 12, OUTPUT3_ENABLE_shift = 12, OUTPUT4_ENABLE_mask = 0x0f << 16, OUTPUT4_ENABLE_shift = 16, OUTPUT5_ENABLE_mask = 0x0f << 20, OUTPUT5_ENABLE_shift = 20, OUTPUT6_ENABLE_mask = 0x0f << 24, OUTPUT6_ENABLE_shift = 24, OUTPUT7_ENABLE_mask = 0x0f << 28, OUTPUT7_ENABLE_shift = 28, PA_SC_GENERIC_SCISSOR_TL = 0x00028240, PA_SC_GENERIC_SCISSOR_TL__TL_X_mask = 0x7fff << 0, PA_SC_GENERIC_SCISSOR_TL__TL_X_shift = 0, PA_SC_GENERIC_SCISSOR_TL__TL_Y_mask = 0x7fff << 16, PA_SC_GENERIC_SCISSOR_TL__TL_Y_shift = 16, /* WINDOW_OFFSET_DISABLE_bit = 1 << 31, */ PA_SC_GENERIC_SCISSOR_BR = 0x00028244, PA_SC_GENERIC_SCISSOR_BR__BR_X_mask = 0x7fff << 0, PA_SC_GENERIC_SCISSOR_BR__BR_X_shift = 0, PA_SC_GENERIC_SCISSOR_BR__BR_Y_mask = 0x7fff << 16, PA_SC_GENERIC_SCISSOR_BR__BR_Y_shift = 16, PA_SC_VPORT_SCISSOR_0_TL = 0x00028250, PA_SC_VPORT_SCISSOR_0_TL_num = 16, PA_SC_VPORT_SCISSOR_0_TL_offset = 8, PA_SC_VPORT_SCISSOR_0_TL__TL_X_mask = 0x7fff << 0, PA_SC_VPORT_SCISSOR_0_TL__TL_X_shift = 0, PA_SC_VPORT_SCISSOR_0_TL__TL_Y_mask = 0x7fff << 16, PA_SC_VPORT_SCISSOR_0_TL__TL_Y_shift = 16, /* WINDOW_OFFSET_DISABLE_bit = 1 << 31, */ PA_SC_VPORT_SCISSOR_0_BR = 0x00028254, PA_SC_VPORT_SCISSOR_0_BR_num = 16, PA_SC_VPORT_SCISSOR_0_BR_offset = 8, PA_SC_VPORT_SCISSOR_0_BR__BR_X_mask = 0x7fff << 0, PA_SC_VPORT_SCISSOR_0_BR__BR_X_shift = 0, PA_SC_VPORT_SCISSOR_0_BR__BR_Y_mask = 0x7fff << 16, PA_SC_VPORT_SCISSOR_0_BR__BR_Y_shift = 16, PA_SC_VPORT_ZMIN_0 = 0x000282d0, PA_SC_VPORT_ZMIN_0_num = 16, PA_SC_VPORT_ZMIN_0_offset = 8, PA_SC_VPORT_ZMAX_0 = 0x000282d4, PA_SC_VPORT_ZMAX_0_num = 16, PA_SC_VPORT_ZMAX_0_offset = 8, SX_MISC = 0x00028350, MULTIPASS_bit = 1 << 0, SX_SURFACE_SYNC = 0x00028354, SURFACE_SYNC_MASK_mask = 0x3ff << 0, SURFACE_SYNC_MASK_shift = 0, SX_SCATTER_EXPORT_BASE = 0x00028358, SX_SCATTER_EXPORT_SIZE = 0x0002835c, SQ_VTX_SEMANTIC_0 = 0x00028380, SQ_VTX_SEMANTIC_0_num = 32, /* SEMANTIC_ID_mask = 0xff << 0, */ /* SEMANTIC_ID_shift = 0, */ VGT_MAX_VTX_INDX = 0x00028400, VGT_MIN_VTX_INDX = 0x00028404, VGT_INDX_OFFSET = 0x00028408, VGT_MULTI_PRIM_IB_RESET_INDX = 0x0002840c, SX_ALPHA_TEST_CONTROL = 0x00028410, ALPHA_FUNC_mask = 0x07 << 0, ALPHA_FUNC_shift = 0, REF_NEVER = 0x00, REF_LESS = 0x01, REF_EQUAL = 0x02, REF_LEQUAL = 0x03, REF_GREATER = 0x04, REF_NOTEQUAL = 0x05, REF_GEQUAL = 0x06, REF_ALWAYS = 0x07, ALPHA_TEST_ENABLE_bit = 1 << 3, ALPHA_TEST_BYPASS_bit = 1 << 8, CB_BLEND_RED = 0x00028414, CB_BLEND_GREEN = 0x00028418, CB_BLEND_BLUE = 0x0002841c, CB_BLEND_ALPHA = 0x00028420, DB_STENCILREFMASK = 0x00028430, STENCILREF_mask = 0xff << 0, STENCILREF_shift = 0, STENCILMASK_mask = 0xff << 8, STENCILMASK_shift = 8, STENCILWRITEMASK_mask = 0xff << 16, STENCILWRITEMASK_shift = 16, DB_STENCILREFMASK_BF = 0x00028434, STENCILREF_BF_mask = 0xff << 0, STENCILREF_BF_shift = 0, STENCILMASK_BF_mask = 0xff << 8, STENCILMASK_BF_shift = 8, STENCILWRITEMASK_BF_mask = 0xff << 16, STENCILWRITEMASK_BF_shift = 16, SX_ALPHA_REF = 0x00028438, PA_CL_VPORT_XSCALE_0 = 0x0002843c, PA_CL_VPORT_XSCALE_0_num = 16, PA_CL_VPORT_XSCALE_0_offset = 24, PA_CL_VPORT_XOFFSET_0 = 0x00028440, PA_CL_VPORT_XOFFSET_0_num = 16, PA_CL_VPORT_XOFFSET_0_offset = 24, PA_CL_VPORT_YSCALE_0 = 0x00028444, PA_CL_VPORT_YSCALE_0_num = 16, PA_CL_VPORT_YSCALE_0_offset = 24, PA_CL_VPORT_YOFFSET_0 = 0x00028448, PA_CL_VPORT_YOFFSET_0_num = 16, PA_CL_VPORT_YOFFSET_0_offset = 24, PA_CL_VPORT_ZSCALE_0 = 0x0002844c, PA_CL_VPORT_ZSCALE_0_num = 16, PA_CL_VPORT_ZSCALE_0_offset = 24, PA_CL_VPORT_ZOFFSET_0 = 0x00028450, PA_CL_VPORT_ZOFFSET_0_num = 16, PA_CL_VPORT_ZOFFSET_0_offset = 24, PA_CL_UCP_0_X = 0x000285bc, PA_CL_UCP_0_X_num = 6, PA_CL_UCP_0_X_offset = 16, PA_CL_UCP_0_Y = 0x000285c0, PA_CL_UCP_0_Y_num = 6, PA_CL_UCP_0_Y_offset = 16, PA_CL_UCP_0_Z = 0x000285c4, PA_CL_UCP_0_Z_num = 6, PA_CL_UCP_0_Z_offset = 16, PA_CL_UCP_0_W = 0x000285c8, PA_CL_UCP_0_W_num = 6, PA_CL_UCP_0_W_offset = 16, SPI_VS_OUT_ID_0 = 0x0002861c, SPI_VS_OUT_ID_0_num = 10, SEMANTIC_0_mask = 0xff << 0, SEMANTIC_0_shift = 0, SEMANTIC_1_mask = 0xff << 8, SEMANTIC_1_shift = 8, SEMANTIC_2_mask = 0xff << 16, SEMANTIC_2_shift = 16, SEMANTIC_3_mask = 0xff << 24, SEMANTIC_3_shift = 24, SPI_PS_INPUT_CNTL_0 = 0x00028644, SPI_PS_INPUT_CNTL_0_num = 32, SEMANTIC_mask = 0xff << 0, SEMANTIC_shift = 0, DEFAULT_VAL_mask = 0x03 << 8, DEFAULT_VAL_shift = 8, X_0_0F = 0x00, FLAT_SHADE_bit = 1 << 10, CYL_WRAP_mask = 0x0f << 13, CYL_WRAP_shift = 13, PT_SPRITE_TEX_bit = 1 << 17, SPI_VS_OUT_CONFIG = 0x000286c4, VS_PER_COMPONENT_bit = 1 << 0, VS_EXPORT_COUNT_mask = 0x1f << 1, VS_EXPORT_COUNT_shift = 1, VS_HALF_PACK_bit = 1 << 6, VS_EXPORTS_FOG_bit = 1 << 8, VS_OUT_FOG_VEC_ADDR_mask = 0x1f << 9, VS_OUT_FOG_VEC_ADDR_shift = 9, SPI_PS_IN_CONTROL_0 = 0x000286cc, NUM_INTERP_mask = 0x3f << 0, NUM_INTERP_shift = 0, POSITION_ENA_bit = 1 << 8, POSITION_CENTROID_bit = 1 << 9, POSITION_ADDR_mask = 0x1f << 10, POSITION_ADDR_shift = 10, PARAM_GEN_mask = 0x0f << 15, PARAM_GEN_shift = 15, PERSP_GRADIENT_ENA_bit = 1 << 28, LINEAR_GRADIENT_ENA_bit = 1 << 29, POSITION_SAMPLE_bit = 1 << 30, SPI_PS_IN_CONTROL_1 = 0x000286d0, FRONT_FACE_ENA_bit = 1 << 8, FRONT_FACE_ALL_BITS_bit = 1 << 11, FRONT_FACE_ADDR_mask = 0x1f << 12, FRONT_FACE_ADDR_shift = 12, FOG_ADDR_mask = 0x7f << 17, FOG_ADDR_shift = 17, FIXED_PT_POSITION_ENA_bit = 1 << 24, FIXED_PT_POSITION_ADDR_mask = 0x1f << 25, FIXED_PT_POSITION_ADDR_shift = 25, POSITION_ULC_bit = 1 << 30, SPI_INTERP_CONTROL_0 = 0x000286d4, FLAT_SHADE_ENA_bit = 1 << 0, PNT_SPRITE_ENA_bit = 1 << 1, PNT_SPRITE_OVRD_X_mask = 0x07 << 2, PNT_SPRITE_OVRD_X_shift = 2, SPI_PNT_SPRITE_SEL_0 = 0x00, SPI_PNT_SPRITE_SEL_1 = 0x01, SPI_PNT_SPRITE_SEL_S = 0x02, SPI_PNT_SPRITE_SEL_T = 0x03, SPI_PNT_SPRITE_SEL_NONE = 0x04, PNT_SPRITE_OVRD_Y_mask = 0x07 << 5, PNT_SPRITE_OVRD_Y_shift = 5, /* SPI_PNT_SPRITE_SEL_0 = 0x00, */ /* SPI_PNT_SPRITE_SEL_1 = 0x01, */ /* SPI_PNT_SPRITE_SEL_S = 0x02, */ /* SPI_PNT_SPRITE_SEL_T = 0x03, */ /* SPI_PNT_SPRITE_SEL_NONE = 0x04, */ PNT_SPRITE_OVRD_Z_mask = 0x07 << 8, PNT_SPRITE_OVRD_Z_shift = 8, /* SPI_PNT_SPRITE_SEL_0 = 0x00, */ /* SPI_PNT_SPRITE_SEL_1 = 0x01, */ /* SPI_PNT_SPRITE_SEL_S = 0x02, */ /* SPI_PNT_SPRITE_SEL_T = 0x03, */ /* SPI_PNT_SPRITE_SEL_NONE = 0x04, */ PNT_SPRITE_OVRD_W_mask = 0x07 << 11, PNT_SPRITE_OVRD_W_shift = 11, /* SPI_PNT_SPRITE_SEL_0 = 0x00, */ /* SPI_PNT_SPRITE_SEL_1 = 0x01, */ /* SPI_PNT_SPRITE_SEL_S = 0x02, */ /* SPI_PNT_SPRITE_SEL_T = 0x03, */ /* SPI_PNT_SPRITE_SEL_NONE = 0x04, */ PNT_SPRITE_TOP_1_bit = 1 << 14, SPI_INPUT_Z = 0x000286d8, PROVIDE_Z_TO_SPI_bit = 1 << 0, SPI_FOG_CNTL = 0x000286dc, PASS_FOG_THROUGH_PS_bit = 1 << 0, SPI_BARYC_CNTL = 0x000286e0, PERSP_CENTER_ENA_mask = 0x03 << 0, PERSP_CENTER_ENA_shift = 0, X_OFF = 0x00, PERSP_CENTER_ENA__X_ON_AT_CENTER = 0x01, PERSP_CENTER_ENA__X_ON_AT_CENTROID = 0x02, PERSP_CENTROID_ENA_mask = 0x03 << 4, PERSP_CENTROID_ENA_shift = 4, /* X_OFF = 0x00, */ PERSP_CENTROID_ENA__X_ON_AT_CENTROID = 0x01, PERSP_CENTROID_ENA__X_ON_AT_CENTER = 0x02, PERSP_SAMPLE_ENA_mask = 0x03 << 8, PERSP_SAMPLE_ENA_shift = 8, /* X_OFF = 0x00, */ PERSP_PULL_MODEL_ENA_mask = 0x03 << 12, PERSP_PULL_MODEL_ENA_shift = 12, /* X_OFF = 0x00, */ LINEAR_CENTER_ENA_mask = 0x03 << 16, LINEAR_CENTER_ENA_shift = 16, /* X_OFF = 0x00, */ LINEAR_CENTER_ENA__X_ON_AT_CENTER = 0x01, LINEAR_CENTER_ENA__X_ON_AT_CENTROID = 0x02, LINEAR_CENTROID_ENA_mask = 0x03 << 20, LINEAR_CENTROID_ENA_shift = 20, /* X_OFF = 0x00, */ LINEAR_CENTROID_ENA__X_ON_AT_CENTROID = 0x01, LINEAR_CENTROID_ENA__X_ON_AT_CENTER = 0x02, LINEAR_SAMPLE_ENA_mask = 0x03 << 24, LINEAR_SAMPLE_ENA_shift = 24, /* X_OFF = 0x00, */ SPI_PS_IN_CONTROL_2 = 0x000286e4, LINE_STIPPLE_TEX_ADDR_mask = 0xff << 0, LINE_STIPPLE_TEX_ADDR_shift = 0, LINE_STIPPLE_TEX_ENA_bit = 1 << 8, SPI_GPR_MGMT = 0x000286f8, SPI_GPR_MGMT__NUM_PS_GPRS_mask = 0x1f << 0, SPI_GPR_MGMT__NUM_PS_GPRS_shift = 0, SPI_GPR_MGMT__NUM_VS_GPRS_mask = 0x1f << 5, SPI_GPR_MGMT__NUM_VS_GPRS_shift = 5, NUM_GS_GPRS_mask = 0x1f << 10, NUM_GS_GPRS_shift = 10, NUM_ES_GPRS_mask = 0x1f << 15, NUM_ES_GPRS_shift = 15, NUM_HS_GPRS_mask = 0x1f << 20, NUM_HS_GPRS_shift = 20, NUM_LS_GPRS_mask = 0x1f << 25, NUM_LS_GPRS_shift = 25, SPI_LDS_MGMT = 0x000286fc, NUM_PS_LDS_mask = 0xff << 0, NUM_PS_LDS_shift = 0, NUM_LS_LDS_mask = 0xff << 8, NUM_LS_LDS_shift = 8, SPI_STACK_MGMT = 0x00028700, NUM_PS_STACK_mask = 0x1f << 0, NUM_PS_STACK_shift = 0, NUM_VS_STACK_mask = 0x1f << 5, NUM_VS_STACK_shift = 5, NUM_GS_STACK_mask = 0x1f << 10, NUM_GS_STACK_shift = 10, NUM_ES_STACK_mask = 0x1f << 15, NUM_ES_STACK_shift = 15, NUM_HS_STACK_mask = 0x1f << 20, NUM_HS_STACK_shift = 20, NUM_LS_STACK_mask = 0x1f << 25, NUM_LS_STACK_shift = 25, SPI_WAVE_MGMT_1 = 0x00028704, NUM_PS_WAVES_mask = 0x1f << 0, NUM_PS_WAVES_shift = 0, NUM_VS_WAVES_mask = 0x1f << 5, NUM_VS_WAVES_shift = 5, NUM_GS_WAVES_mask = 0x1f << 10, NUM_GS_WAVES_shift = 10, NUM_ES_WAVES_mask = 0x1f << 15, NUM_ES_WAVES_shift = 15, NUM_HS_WAVES_mask = 0x1f << 20, NUM_HS_WAVES_shift = 20, NUM_LS_WAVES_mask = 0x1f << 25, NUM_LS_WAVES_shift = 25, SPI_WAVE_MGMT_2 = 0x00028708, NUM_CS_WAVES_ONE_RING_mask = 0x1f << 0, NUM_CS_WAVES_ONE_RING_shift = 0, NUM_CS_WAVES_MULTI_RING_mask = 0x1f << 5, NUM_CS_WAVES_MULTI_RING_shift = 5, CB_BLEND0_CONTROL = 0x00028780, CB_BLEND0_CONTROL_num = 8, COLOR_SRCBLEND_mask = 0x1f << 0, COLOR_SRCBLEND_shift = 0, BLEND_ZERO = 0x00, BLEND_ONE = 0x01, BLEND_SRC_COLOR = 0x02, BLEND_ONE_MINUS_SRC_COLOR = 0x03, BLEND_SRC_ALPHA = 0x04, BLEND_ONE_MINUS_SRC_ALPHA = 0x05, BLEND_DST_ALPHA = 0x06, BLEND_ONE_MINUS_DST_ALPHA = 0x07, BLEND_DST_COLOR = 0x08, BLEND_ONE_MINUS_DST_COLOR = 0x09, BLEND_SRC_ALPHA_SATURATE = 0x0a, BLEND_BOTH_SRC_ALPHA = 0x0b, BLEND_BOTH_INV_SRC_ALPHA = 0x0c, BLEND_CONSTANT_COLOR = 0x0d, BLEND_ONE_MINUS_CONSTANT_COLOR = 0x0e, BLEND_SRC1_COLOR = 0x0f, BLEND_INV_SRC1_COLOR = 0x10, BLEND_SRC1_ALPHA = 0x11, BLEND_INV_SRC1_ALPHA = 0x12, BLEND_CONSTANT_ALPHA = 0x13, BLEND_ONE_MINUS_CONSTANT_ALPHA = 0x14, COLOR_COMB_FCN_mask = 0x07 << 5, COLOR_COMB_FCN_shift = 5, COMB_DST_PLUS_SRC = 0x00, COMB_SRC_MINUS_DST = 0x01, COMB_MIN_DST_SRC = 0x02, COMB_MAX_DST_SRC = 0x03, COMB_DST_MINUS_SRC = 0x04, COLOR_DESTBLEND_mask = 0x1f << 8, COLOR_DESTBLEND_shift = 8, /* BLEND_ZERO = 0x00, */ /* BLEND_ONE = 0x01, */ /* BLEND_SRC_COLOR = 0x02, */ /* BLEND_ONE_MINUS_SRC_COLOR = 0x03, */ /* BLEND_SRC_ALPHA = 0x04, */ /* BLEND_ONE_MINUS_SRC_ALPHA = 0x05, */ /* BLEND_DST_ALPHA = 0x06, */ /* BLEND_ONE_MINUS_DST_ALPHA = 0x07, */ /* BLEND_DST_COLOR = 0x08, */ /* BLEND_ONE_MINUS_DST_COLOR = 0x09, */ /* BLEND_SRC_ALPHA_SATURATE = 0x0a, */ /* BLEND_BOTH_SRC_ALPHA = 0x0b, */ /* BLEND_BOTH_INV_SRC_ALPHA = 0x0c, */ /* BLEND_CONSTANT_COLOR = 0x0d, */ /* BLEND_ONE_MINUS_CONSTANT_COLOR = 0x0e, */ /* BLEND_SRC1_COLOR = 0x0f, */ /* BLEND_INV_SRC1_COLOR = 0x10, */ /* BLEND_SRC1_ALPHA = 0x11, */ /* BLEND_INV_SRC1_ALPHA = 0x12, */ /* BLEND_CONSTANT_ALPHA = 0x13, */ /* BLEND_ONE_MINUS_CONSTANT_ALPHA = 0x14, */ ALPHA_SRCBLEND_mask = 0x1f << 16, ALPHA_SRCBLEND_shift = 16, /* BLEND_ZERO = 0x00, */ /* BLEND_ONE = 0x01, */ /* BLEND_SRC_COLOR = 0x02, */ /* BLEND_ONE_MINUS_SRC_COLOR = 0x03, */ /* BLEND_SRC_ALPHA = 0x04, */ /* BLEND_ONE_MINUS_SRC_ALPHA = 0x05, */ /* BLEND_DST_ALPHA = 0x06, */ /* BLEND_ONE_MINUS_DST_ALPHA = 0x07, */ /* BLEND_DST_COLOR = 0x08, */ /* BLEND_ONE_MINUS_DST_COLOR = 0x09, */ /* BLEND_SRC_ALPHA_SATURATE = 0x0a, */ /* BLEND_BOTH_SRC_ALPHA = 0x0b, */ /* BLEND_BOTH_INV_SRC_ALPHA = 0x0c, */ /* BLEND_CONSTANT_COLOR = 0x0d, */ /* BLEND_ONE_MINUS_CONSTANT_COLOR = 0x0e, */ /* BLEND_SRC1_COLOR = 0x0f, */ /* BLEND_INV_SRC1_COLOR = 0x10, */ /* BLEND_SRC1_ALPHA = 0x11, */ /* BLEND_INV_SRC1_ALPHA = 0x12, */ /* BLEND_CONSTANT_ALPHA = 0x13, */ /* BLEND_ONE_MINUS_CONSTANT_ALPHA = 0x14, */ ALPHA_COMB_FCN_mask = 0x07 << 21, ALPHA_COMB_FCN_shift = 21, /* COMB_DST_PLUS_SRC = 0x00, */ /* COMB_SRC_MINUS_DST = 0x01, */ /* COMB_MIN_DST_SRC = 0x02, */ /* COMB_MAX_DST_SRC = 0x03, */ /* COMB_DST_MINUS_SRC = 0x04, */ ALPHA_DESTBLEND_mask = 0x1f << 24, ALPHA_DESTBLEND_shift = 24, /* BLEND_ZERO = 0x00, */ /* BLEND_ONE = 0x01, */ /* BLEND_SRC_COLOR = 0x02, */ /* BLEND_ONE_MINUS_SRC_COLOR = 0x03, */ /* BLEND_SRC_ALPHA = 0x04, */ /* BLEND_ONE_MINUS_SRC_ALPHA = 0x05, */ /* BLEND_DST_ALPHA = 0x06, */ /* BLEND_ONE_MINUS_DST_ALPHA = 0x07, */ /* BLEND_DST_COLOR = 0x08, */ /* BLEND_ONE_MINUS_DST_COLOR = 0x09, */ /* BLEND_SRC_ALPHA_SATURATE = 0x0a, */ /* BLEND_BOTH_SRC_ALPHA = 0x0b, */ /* BLEND_BOTH_INV_SRC_ALPHA = 0x0c, */ /* BLEND_CONSTANT_COLOR = 0x0d, */ /* BLEND_ONE_MINUS_CONSTANT_COLOR = 0x0e, */ /* BLEND_SRC1_COLOR = 0x0f, */ /* BLEND_INV_SRC1_COLOR = 0x10, */ /* BLEND_SRC1_ALPHA = 0x11, */ /* BLEND_INV_SRC1_ALPHA = 0x12, */ /* BLEND_CONSTANT_ALPHA = 0x13, */ /* BLEND_ONE_MINUS_CONSTANT_ALPHA = 0x14, */ SEPARATE_ALPHA_BLEND_bit = 1 << 29, CB_BLEND0_CONTROL__ENABLE_bit = 1 << 30, PA_CL_POINT_X_RAD = 0x000287d4, PA_CL_POINT_Y_RAD = 0x000287d8, PA_CL_POINT_SIZE = 0x000287dc, PA_CL_POINT_CULL_RAD = 0x000287e0, VGT_DMA_BASE_HI = 0x000287e4, VGT_DMA_BASE_HI__BASE_ADDR_mask = 0xff << 0, VGT_DMA_BASE_HI__BASE_ADDR_shift = 0, VGT_DMA_BASE = 0x000287e8, VGT_DRAW_INITIATOR = 0x000287f0, SOURCE_SELECT_mask = 0x03 << 0, SOURCE_SELECT_shift = 0, DI_SRC_SEL_DMA = 0x00, DI_SRC_SEL_IMMEDIATE = 0x01, DI_SRC_SEL_AUTO_INDEX = 0x02, DI_SRC_SEL_RESERVED = 0x03, MAJOR_MODE_mask = 0x03 << 2, MAJOR_MODE_shift = 2, DI_MAJOR_MODE_0 = 0x00, DI_MAJOR_MODE_1 = 0x01, NOT_EOP_bit = 1 << 5, USE_OPAQUE_bit = 1 << 6, VGT_IMMED_DATA = 0x000287f4, VGT_EVENT_ADDRESS_REG = 0x000287f8, ADDRESS_LOW_mask = 0xfffffff << 0, ADDRESS_LOW_shift = 0, DB_DEPTH_CONTROL = 0x00028800, STENCIL_ENABLE_bit = 1 << 0, Z_ENABLE_bit = 1 << 1, Z_WRITE_ENABLE_bit = 1 << 2, ZFUNC_mask = 0x07 << 4, ZFUNC_shift = 4, FRAG_NEVER = 0x00, FRAG_LESS = 0x01, FRAG_EQUAL = 0x02, FRAG_LEQUAL = 0x03, FRAG_GREATER = 0x04, FRAG_NOTEQUAL = 0x05, FRAG_GEQUAL = 0x06, FRAG_ALWAYS = 0x07, BACKFACE_ENABLE_bit = 1 << 7, STENCILFUNC_mask = 0x07 << 8, STENCILFUNC_shift = 8, /* REF_NEVER = 0x00, */ /* REF_LESS = 0x01, */ /* REF_EQUAL = 0x02, */ /* REF_LEQUAL = 0x03, */ /* REF_GREATER = 0x04, */ /* REF_NOTEQUAL = 0x05, */ /* REF_GEQUAL = 0x06, */ /* REF_ALWAYS = 0x07, */ STENCILFAIL_mask = 0x07 << 11, STENCILFAIL_shift = 11, STENCIL_KEEP = 0x00, STENCIL_ZERO = 0x01, STENCIL_REPLACE = 0x02, STENCIL_INCR_CLAMP = 0x03, STENCIL_DECR_CLAMP = 0x04, STENCIL_INVERT = 0x05, STENCIL_INCR_WRAP = 0x06, STENCIL_DECR_WRAP = 0x07, STENCILZPASS_mask = 0x07 << 14, STENCILZPASS_shift = 14, /* STENCIL_KEEP = 0x00, */ /* STENCIL_ZERO = 0x01, */ /* STENCIL_REPLACE = 0x02, */ /* STENCIL_INCR_CLAMP = 0x03, */ /* STENCIL_DECR_CLAMP = 0x04, */ /* STENCIL_INVERT = 0x05, */ /* STENCIL_INCR_WRAP = 0x06, */ /* STENCIL_DECR_WRAP = 0x07, */ STENCILZFAIL_mask = 0x07 << 17, STENCILZFAIL_shift = 17, /* STENCIL_KEEP = 0x00, */ /* STENCIL_ZERO = 0x01, */ /* STENCIL_REPLACE = 0x02, */ /* STENCIL_INCR_CLAMP = 0x03, */ /* STENCIL_DECR_CLAMP = 0x04, */ /* STENCIL_INVERT = 0x05, */ /* STENCIL_INCR_WRAP = 0x06, */ /* STENCIL_DECR_WRAP = 0x07, */ STENCILFUNC_BF_mask = 0x07 << 20, STENCILFUNC_BF_shift = 20, /* REF_NEVER = 0x00, */ /* REF_LESS = 0x01, */ /* REF_EQUAL = 0x02, */ /* REF_LEQUAL = 0x03, */ /* REF_GREATER = 0x04, */ /* REF_NOTEQUAL = 0x05, */ /* REF_GEQUAL = 0x06, */ /* REF_ALWAYS = 0x07, */ STENCILFAIL_BF_mask = 0x07 << 23, STENCILFAIL_BF_shift = 23, /* STENCIL_KEEP = 0x00, */ /* STENCIL_ZERO = 0x01, */ /* STENCIL_REPLACE = 0x02, */ /* STENCIL_INCR_CLAMP = 0x03, */ /* STENCIL_DECR_CLAMP = 0x04, */ /* STENCIL_INVERT = 0x05, */ /* STENCIL_INCR_WRAP = 0x06, */ /* STENCIL_DECR_WRAP = 0x07, */ STENCILZPASS_BF_mask = 0x07 << 26, STENCILZPASS_BF_shift = 26, /* STENCIL_KEEP = 0x00, */ /* STENCIL_ZERO = 0x01, */ /* STENCIL_REPLACE = 0x02, */ /* STENCIL_INCR_CLAMP = 0x03, */ /* STENCIL_DECR_CLAMP = 0x04, */ /* STENCIL_INVERT = 0x05, */ /* STENCIL_INCR_WRAP = 0x06, */ /* STENCIL_DECR_WRAP = 0x07, */ STENCILZFAIL_BF_mask = 0x07 << 29, STENCILZFAIL_BF_shift = 29, /* STENCIL_KEEP = 0x00, */ /* STENCIL_ZERO = 0x01, */ /* STENCIL_REPLACE = 0x02, */ /* STENCIL_INCR_CLAMP = 0x03, */ /* STENCIL_DECR_CLAMP = 0x04, */ /* STENCIL_INVERT = 0x05, */ /* STENCIL_INCR_WRAP = 0x06, */ /* STENCIL_DECR_WRAP = 0x07, */ DB_EQAA = 0x00028804, CB_COLOR_CONTROL = 0x00028808, DEGAMMA_ENABLE_bit = 1 << 3, CB_COLOR_CONTROL__MODE_mask = 0x07 << 4, CB_COLOR_CONTROL__MODE_shift = 4, CB_DISABLE = 0x00, CB_NORMAL = 0x01, CB_ELIMINATE_FAST_CLEAR = 0x02, CB_RESOLVE = 0x03, CB_DECOMPRESS = 0x04, CB_FMASK_DECOMPRESS = 0x05, ROP3_mask = 0xff << 16, ROP3_shift = 16, X_0X00 = 0x00, X_0X05 = 0x05, X_0X0A = 0x0a, X_0X0F = 0x0f, X_0X11 = 0x11, X_0X22 = 0x22, X_0X33 = 0x33, X_0X44 = 0x44, X_0X50 = 0x50, X_0X55 = 0x55, X_0X5A = 0x5a, X_0X5F = 0x5f, X_0X66 = 0x66, X_0X77 = 0x77, X_0X88 = 0x88, X_0X99 = 0x99, X_0XA0 = 0xa0, X_0XA5 = 0xa5, X_0XAA = 0xaa, X_0XAF = 0xaf, X_0XBB = 0xbb, X_0XCC = 0xcc, X_0XDD = 0xdd, X_0XEE = 0xee, X_0XF0 = 0xf0, X_0XF5 = 0xf5, X_0XFA = 0xfa, X_0XFF = 0xff, DB_SHADER_CONTROL = 0x0002880c, Z_EXPORT_ENABLE_bit = 1 << 0, STENCIL_REF_EXPORT_ENABLE_bit = 1 << 1, Z_ORDER_mask = 0x03 << 4, Z_ORDER_shift = 4, LATE_Z = 0x00, EARLY_Z_THEN_LATE_Z = 0x01, RE_Z = 0x02, EARLY_Z_THEN_RE_Z = 0x03, KILL_ENABLE_bit = 1 << 6, COVERAGE_TO_MASK_ENABLE_bit = 1 << 7, MASK_EXPORT_ENABLE_bit = 1 << 8, DUAL_EXPORT_ENABLE_bit = 1 << 9, EXEC_ON_HIER_FAIL_bit = 1 << 10, EXEC_ON_NOOP_bit = 1 << 11, ALPHA_TO_MASK_DISABLE_bit = 1 << 12, DB_SOURCE_FORMAT_mask = 0x03 << 13, DB_SOURCE_FORMAT_shift = 13, EXPORT_DB_FULL = 0x00, EXPORT_DB_FOUR16 = 0x01, EXPORT_DB_TWO = 0x02, DEPTH_BEFORE_SHADER_bit = 1 << 15, CONSERVATIVE_Z_EXPORT_mask = 0x03 << 16, CONSERVATIVE_Z_EXPORT_shift = 16, EXPORT_ANY_Z = 0x00, EXPORT_LESS_THAN_Z = 0x01, EXPORT_GREATER_THAN_Z = 0x02, EXPORT_RESERVED = 0x03, PA_CL_CLIP_CNTL = 0x00028810, UCP_ENA_0_bit = 1 << 0, UCP_ENA_1_bit = 1 << 1, UCP_ENA_2_bit = 1 << 2, UCP_ENA_3_bit = 1 << 3, UCP_ENA_4_bit = 1 << 4, UCP_ENA_5_bit = 1 << 5, PS_UCP_Y_SCALE_NEG_bit = 1 << 13, PS_UCP_MODE_mask = 0x03 << 14, PS_UCP_MODE_shift = 14, CLIP_DISABLE_bit = 1 << 16, UCP_CULL_ONLY_ENA_bit = 1 << 17, BOUNDARY_EDGE_FLAG_ENA_bit = 1 << 18, DX_CLIP_SPACE_DEF_bit = 1 << 19, DIS_CLIP_ERR_DETECT_bit = 1 << 20, VTX_KILL_OR_bit = 1 << 21, DX_RASTERIZATION_KILL_bit = 1 << 22, DX_LINEAR_ATTR_CLIP_ENA_bit = 1 << 24, VTE_VPORT_PROVOKE_DISABLE_bit = 1 << 25, ZCLIP_NEAR_DISABLE_bit = 1 << 26, ZCLIP_FAR_DISABLE_bit = 1 << 27, PA_SU_SC_MODE_CNTL = 0x00028814, CULL_FRONT_bit = 1 << 0, CULL_BACK_bit = 1 << 1, FACE_bit = 1 << 2, POLY_MODE_mask = 0x03 << 3, POLY_MODE_shift = 3, X_DISABLE_POLY_MODE = 0x00, X_DUAL_MODE = 0x01, POLYMODE_FRONT_PTYPE_mask = 0x07 << 5, POLYMODE_FRONT_PTYPE_shift = 5, X_DRAW_POINTS = 0x00, X_DRAW_LINES = 0x01, X_DRAW_TRIANGLES = 0x02, POLYMODE_BACK_PTYPE_mask = 0x07 << 8, POLYMODE_BACK_PTYPE_shift = 8, /* X_DRAW_POINTS = 0x00, */ /* X_DRAW_LINES = 0x01, */ /* X_DRAW_TRIANGLES = 0x02, */ POLY_OFFSET_FRONT_ENABLE_bit = 1 << 11, POLY_OFFSET_BACK_ENABLE_bit = 1 << 12, POLY_OFFSET_PARA_ENABLE_bit = 1 << 13, VTX_WINDOW_OFFSET_ENABLE_bit = 1 << 16, PROVOKING_VTX_LAST_bit = 1 << 19, PERSP_CORR_DIS_bit = 1 << 20, MULTI_PRIM_IB_ENA_bit = 1 << 21, PA_CL_VTE_CNTL = 0x00028818, VPORT_X_SCALE_ENA_bit = 1 << 0, VPORT_X_OFFSET_ENA_bit = 1 << 1, VPORT_Y_SCALE_ENA_bit = 1 << 2, VPORT_Y_OFFSET_ENA_bit = 1 << 3, VPORT_Z_SCALE_ENA_bit = 1 << 4, VPORT_Z_OFFSET_ENA_bit = 1 << 5, VTX_XY_FMT_bit = 1 << 8, VTX_Z_FMT_bit = 1 << 9, VTX_W0_FMT_bit = 1 << 10, PA_CL_VS_OUT_CNTL = 0x0002881c, CLIP_DIST_ENA_0_bit = 1 << 0, CLIP_DIST_ENA_1_bit = 1 << 1, CLIP_DIST_ENA_2_bit = 1 << 2, CLIP_DIST_ENA_3_bit = 1 << 3, CLIP_DIST_ENA_4_bit = 1 << 4, CLIP_DIST_ENA_5_bit = 1 << 5, CLIP_DIST_ENA_6_bit = 1 << 6, CLIP_DIST_ENA_7_bit = 1 << 7, CULL_DIST_ENA_0_bit = 1 << 8, CULL_DIST_ENA_1_bit = 1 << 9, CULL_DIST_ENA_2_bit = 1 << 10, CULL_DIST_ENA_3_bit = 1 << 11, CULL_DIST_ENA_4_bit = 1 << 12, CULL_DIST_ENA_5_bit = 1 << 13, CULL_DIST_ENA_6_bit = 1 << 14, CULL_DIST_ENA_7_bit = 1 << 15, USE_VTX_POINT_SIZE_bit = 1 << 16, USE_VTX_EDGE_FLAG_bit = 1 << 17, USE_VTX_RENDER_TARGET_INDX_bit = 1 << 18, USE_VTX_VIEWPORT_INDX_bit = 1 << 19, USE_VTX_KILL_FLAG_bit = 1 << 20, VS_OUT_MISC_VEC_ENA_bit = 1 << 21, VS_OUT_CCDIST0_VEC_ENA_bit = 1 << 22, VS_OUT_CCDIST1_VEC_ENA_bit = 1 << 23, PA_CL_NANINF_CNTL = 0x00028820, VTE_XY_INF_DISCARD_bit = 1 << 0, VTE_Z_INF_DISCARD_bit = 1 << 1, VTE_W_INF_DISCARD_bit = 1 << 2, VTE_0XNANINF_IS_0_bit = 1 << 3, VTE_XY_NAN_RETAIN_bit = 1 << 4, VTE_Z_NAN_RETAIN_bit = 1 << 5, VTE_W_NAN_RETAIN_bit = 1 << 6, VTE_W_RECIP_NAN_IS_0_bit = 1 << 7, VS_XY_NAN_TO_INF_bit = 1 << 8, VS_XY_INF_RETAIN_bit = 1 << 9, VS_Z_NAN_TO_INF_bit = 1 << 10, VS_Z_INF_RETAIN_bit = 1 << 11, VS_W_NAN_TO_INF_bit = 1 << 12, VS_W_INF_RETAIN_bit = 1 << 13, VS_CLIP_DIST_INF_DISCARD_bit = 1 << 14, VTE_NO_OUTPUT_NEG_0_bit = 1 << 20, PA_SU_LINE_STIPPLE_CNTL = 0x00028824, LINE_STIPPLE_RESET_mask = 0x03 << 0, LINE_STIPPLE_RESET_shift = 0, EXPAND_FULL_LENGTH_bit = 1 << 2, FRACTIONAL_ACCUM_bit = 1 << 3, DIAMOND_ADJUST_bit = 1 << 4, PA_SU_LINE_STIPPLE_SCALE = 0x00028828, PA_SU_PRIM_FILTER_CNTL = 0x0002882c, TRIANGLE_FILTER_DISABLE_bit = 1 << 0, LINE_FILTER_DISABLE_bit = 1 << 1, POINT_FILTER_DISABLE_bit = 1 << 2, RECTANGLE_FILTER_DISABLE_bit = 1 << 3, TRIANGLE_EXPAND_ENA_bit = 1 << 4, LINE_EXPAND_ENA_bit = 1 << 5, POINT_EXPAND_ENA_bit = 1 << 6, RECTANGLE_EXPAND_ENA_bit = 1 << 7, PRIM_EXPAND_CONSTANT_mask = 0xff << 8, PRIM_EXPAND_CONSTANT_shift = 8, SQ_LSTMP_RING_ITEMSIZE = 0x00028830, ITEMSIZE_mask = 0x7fff << 0, ITEMSIZE_shift = 0, SQ_HSTMP_RING_ITEMSIZE = 0x00028834, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_PGM_START_PS = 0x00028840, SQ_PGM_RESOURCES_PS = 0x00028844, NUM_GPRS_mask = 0xff << 0, NUM_GPRS_shift = 0, STACK_SIZE_mask = 0xff << 8, STACK_SIZE_shift = 8, DX10_CLAMP_bit = 1 << 21, UNCACHED_FIRST_INST_bit = 1 << 28, CLAMP_CONSTS_bit = 1 << 31, SQ_PGM_RESOURCES_2_PS = 0x00028848, SINGLE_ROUND_mask = 0x03 << 0, SINGLE_ROUND_shift = 0, SQ_ROUND_NEAREST_EVEN = 0x00, SQ_ROUND_PLUS_INFINITY = 0x01, SQ_ROUND_MINUS_INFINITY = 0x02, SQ_ROUND_TO_ZERO = 0x03, DOUBLE_ROUND_mask = 0x03 << 2, DOUBLE_ROUND_shift = 2, /* SQ_ROUND_NEAREST_EVEN = 0x00, */ /* SQ_ROUND_PLUS_INFINITY = 0x01, */ /* SQ_ROUND_MINUS_INFINITY = 0x02, */ /* SQ_ROUND_TO_ZERO = 0x03, */ ALLOW_SINGLE_DENORM_IN_bit = 1 << 4, ALLOW_SINGLE_DENORM_OUT_bit = 1 << 5, ALLOW_DOUBLE_DENORM_IN_bit = 1 << 6, ALLOW_DOUBLE_DENORM_OUT_bit = 1 << 7, SINGLE_IEEE_MODE_bit = 1 << 8, DOUBLE_IEEE_MODE_bit = 1 << 9, SQ_PGM_EXPORTS_PS = 0x0002884c, EXPORT_MODE_mask = 0x1f << 0, EXPORT_MODE_shift = 0, SQ_PGM_START_VS = 0x0002885c, SQ_PGM_RESOURCES_VS = 0x00028860, /* NUM_GPRS_mask = 0xff << 0, */ /* NUM_GPRS_shift = 0, */ /* STACK_SIZE_mask = 0xff << 8, */ /* STACK_SIZE_shift = 8, */ USE_LS_CONSTS_bit = 1 << 16, /* DX10_CLAMP_bit = 1 << 21, */ /* UNCACHED_FIRST_INST_bit = 1 << 28, */ SQ_PGM_RESOURCES_2_VS = 0x00028864, /* SINGLE_ROUND_mask = 0x03 << 0, */ /* SINGLE_ROUND_shift = 0, */ /* SQ_ROUND_NEAREST_EVEN = 0x00, */ /* SQ_ROUND_PLUS_INFINITY = 0x01, */ /* SQ_ROUND_MINUS_INFINITY = 0x02, */ /* SQ_ROUND_TO_ZERO = 0x03, */ /* DOUBLE_ROUND_mask = 0x03 << 2, */ /* DOUBLE_ROUND_shift = 2, */ /* SQ_ROUND_NEAREST_EVEN = 0x00, */ /* SQ_ROUND_PLUS_INFINITY = 0x01, */ /* SQ_ROUND_MINUS_INFINITY = 0x02, */ /* SQ_ROUND_TO_ZERO = 0x03, */ /* ALLOW_SINGLE_DENORM_IN_bit = 1 << 4, */ /* ALLOW_SINGLE_DENORM_OUT_bit = 1 << 5, */ /* ALLOW_DOUBLE_DENORM_IN_bit = 1 << 6, */ /* ALLOW_DOUBLE_DENORM_OUT_bit = 1 << 7, */ /* SINGLE_IEEE_MODE_bit = 1 << 8, */ /* DOUBLE_IEEE_MODE_bit = 1 << 9, */ SQ_PGM_START_GS = 0x00028874, SQ_PGM_RESOURCES_GS = 0x00028878, /* NUM_GPRS_mask = 0xff << 0, */ /* NUM_GPRS_shift = 0, */ /* STACK_SIZE_mask = 0xff << 8, */ /* STACK_SIZE_shift = 8, */ /* DX10_CLAMP_bit = 1 << 21, */ /* UNCACHED_FIRST_INST_bit = 1 << 28, */ SQ_PGM_RESOURCES_2_GS = 0x0002887c, /* SINGLE_ROUND_mask = 0x03 << 0, */ /* SINGLE_ROUND_shift = 0, */ /* SQ_ROUND_NEAREST_EVEN = 0x00, */ /* SQ_ROUND_PLUS_INFINITY = 0x01, */ /* SQ_ROUND_MINUS_INFINITY = 0x02, */ /* SQ_ROUND_TO_ZERO = 0x03, */ /* DOUBLE_ROUND_mask = 0x03 << 2, */ /* DOUBLE_ROUND_shift = 2, */ /* SQ_ROUND_NEAREST_EVEN = 0x00, */ /* SQ_ROUND_PLUS_INFINITY = 0x01, */ /* SQ_ROUND_MINUS_INFINITY = 0x02, */ /* SQ_ROUND_TO_ZERO = 0x03, */ /* ALLOW_SINGLE_DENORM_IN_bit = 1 << 4, */ /* ALLOW_SINGLE_DENORM_OUT_bit = 1 << 5, */ /* ALLOW_DOUBLE_DENORM_IN_bit = 1 << 6, */ /* ALLOW_DOUBLE_DENORM_OUT_bit = 1 << 7, */ /* SINGLE_IEEE_MODE_bit = 1 << 8, */ /* DOUBLE_IEEE_MODE_bit = 1 << 9, */ SQ_PGM_START_ES = 0x0002888c, SQ_PGM_RESOURCES_ES = 0x00028890, /* NUM_GPRS_mask = 0xff << 0, */ /* NUM_GPRS_shift = 0, */ /* STACK_SIZE_mask = 0xff << 8, */ /* STACK_SIZE_shift = 8, */ /* USE_LS_CONSTS_bit = 1 << 16, */ /* DX10_CLAMP_bit = 1 << 21, */ /* UNCACHED_FIRST_INST_bit = 1 << 28, */ SQ_PGM_RESOURCES_2_ES = 0x00028894, /* SINGLE_ROUND_mask = 0x03 << 0, */ /* SINGLE_ROUND_shift = 0, */ /* SQ_ROUND_NEAREST_EVEN = 0x00, */ /* SQ_ROUND_PLUS_INFINITY = 0x01, */ /* SQ_ROUND_MINUS_INFINITY = 0x02, */ /* SQ_ROUND_TO_ZERO = 0x03, */ /* DOUBLE_ROUND_mask = 0x03 << 2, */ /* DOUBLE_ROUND_shift = 2, */ /* SQ_ROUND_NEAREST_EVEN = 0x00, */ /* SQ_ROUND_PLUS_INFINITY = 0x01, */ /* SQ_ROUND_MINUS_INFINITY = 0x02, */ /* SQ_ROUND_TO_ZERO = 0x03, */ /* ALLOW_SINGLE_DENORM_IN_bit = 1 << 4, */ /* ALLOW_SINGLE_DENORM_OUT_bit = 1 << 5, */ /* ALLOW_DOUBLE_DENORM_IN_bit = 1 << 6, */ /* ALLOW_DOUBLE_DENORM_OUT_bit = 1 << 7, */ /* SINGLE_IEEE_MODE_bit = 1 << 8, */ /* DOUBLE_IEEE_MODE_bit = 1 << 9, */ SQ_PGM_START_FS = 0x000288a4, SQ_PGM_RESOURCES_FS = 0x000288a8, /* NUM_GPRS_mask = 0xff << 0, */ /* NUM_GPRS_shift = 0, */ /* STACK_SIZE_mask = 0xff << 8, */ /* STACK_SIZE_shift = 8, */ /* DX10_CLAMP_bit = 1 << 21, */ SQ_PGM_START_HS = 0x000288b8, SQ_PGM_RESOURCES_HS = 0x000288bc, /* NUM_GPRS_mask = 0xff << 0, */ /* NUM_GPRS_shift = 0, */ /* STACK_SIZE_mask = 0xff << 8, */ /* STACK_SIZE_shift = 8, */ /* DX10_CLAMP_bit = 1 << 21, */ /* UNCACHED_FIRST_INST_bit = 1 << 28, */ SQ_PGM_RESOURCES_2_HS = 0x000288c0, /* SINGLE_ROUND_mask = 0x03 << 0, */ /* SINGLE_ROUND_shift = 0, */ /* SQ_ROUND_NEAREST_EVEN = 0x00, */ /* SQ_ROUND_PLUS_INFINITY = 0x01, */ /* SQ_ROUND_MINUS_INFINITY = 0x02, */ /* SQ_ROUND_TO_ZERO = 0x03, */ /* DOUBLE_ROUND_mask = 0x03 << 2, */ /* DOUBLE_ROUND_shift = 2, */ /* SQ_ROUND_NEAREST_EVEN = 0x00, */ /* SQ_ROUND_PLUS_INFINITY = 0x01, */ /* SQ_ROUND_MINUS_INFINITY = 0x02, */ /* SQ_ROUND_TO_ZERO = 0x03, */ /* ALLOW_SINGLE_DENORM_IN_bit = 1 << 4, */ /* ALLOW_SINGLE_DENORM_OUT_bit = 1 << 5, */ /* ALLOW_DOUBLE_DENORM_IN_bit = 1 << 6, */ /* ALLOW_DOUBLE_DENORM_OUT_bit = 1 << 7, */ /* SINGLE_IEEE_MODE_bit = 1 << 8, */ /* DOUBLE_IEEE_MODE_bit = 1 << 9, */ SQ_PGM_START_LS = 0x000288d0, SQ_PGM_RESOURCES_LS = 0x000288d4, /* NUM_GPRS_mask = 0xff << 0, */ /* NUM_GPRS_shift = 0, */ /* STACK_SIZE_mask = 0xff << 8, */ /* STACK_SIZE_shift = 8, */ USE_VS_CONSTS_bit = 1 << 16, /* DX10_CLAMP_bit = 1 << 21, */ /* UNCACHED_FIRST_INST_bit = 1 << 28, */ SQ_PGM_RESOURCES_2_LS = 0x000288d8, /* SINGLE_ROUND_mask = 0x03 << 0, */ /* SINGLE_ROUND_shift = 0, */ /* SQ_ROUND_NEAREST_EVEN = 0x00, */ /* SQ_ROUND_PLUS_INFINITY = 0x01, */ /* SQ_ROUND_MINUS_INFINITY = 0x02, */ /* SQ_ROUND_TO_ZERO = 0x03, */ /* DOUBLE_ROUND_mask = 0x03 << 2, */ /* DOUBLE_ROUND_shift = 2, */ /* SQ_ROUND_NEAREST_EVEN = 0x00, */ /* SQ_ROUND_PLUS_INFINITY = 0x01, */ /* SQ_ROUND_MINUS_INFINITY = 0x02, */ /* SQ_ROUND_TO_ZERO = 0x03, */ /* ALLOW_SINGLE_DENORM_IN_bit = 1 << 4, */ /* ALLOW_SINGLE_DENORM_OUT_bit = 1 << 5, */ /* ALLOW_DOUBLE_DENORM_IN_bit = 1 << 6, */ /* ALLOW_DOUBLE_DENORM_OUT_bit = 1 << 7, */ /* SINGLE_IEEE_MODE_bit = 1 << 8, */ /* DOUBLE_IEEE_MODE_bit = 1 << 9, */ SQ_VTX_SEMANTIC_CLEAR = 0x000288f0, SQ_ESGS_RING_ITEMSIZE = 0x00028900, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_GSVS_RING_ITEMSIZE = 0x00028904, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_ESTMP_RING_ITEMSIZE = 0x00028908, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_GSTMP_RING_ITEMSIZE = 0x0002890c, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_VSTMP_RING_ITEMSIZE = 0x00028910, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_PSTMP_RING_ITEMSIZE = 0x00028914, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_GS_VERT_ITEMSIZE = 0x0002891c, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_GS_VERT_ITEMSIZE_1 = 0x00028920, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_GS_VERT_ITEMSIZE_2 = 0x00028924, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_GS_VERT_ITEMSIZE_3 = 0x00028928, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_GSVS_RING_OFFSET_1 = 0x0002892c, SQ_GSVS_RING_OFFSET_1__OFFSET_mask = 0x7fff << 0, SQ_GSVS_RING_OFFSET_1__OFFSET_shift = 0, SQ_GSVS_RING_OFFSET_2 = 0x00028930, SQ_GSVS_RING_OFFSET_2__OFFSET_mask = 0x7fff << 0, SQ_GSVS_RING_OFFSET_2__OFFSET_shift = 0, SQ_GSVS_RING_OFFSET_3 = 0x00028934, SQ_GSVS_RING_OFFSET_3__OFFSET_mask = 0x7fff << 0, SQ_GSVS_RING_OFFSET_3__OFFSET_shift = 0, SQ_ALU_CONST_CACHE_PS_0 = 0x00028940, SQ_ALU_CONST_CACHE_PS_0_num = 16, SQ_ALU_CONST_CACHE_VS_0 = 0x00028980, SQ_ALU_CONST_CACHE_VS_0_num = 16, SQ_ALU_CONST_CACHE_GS_0 = 0x000289c0, SQ_ALU_CONST_CACHE_GS_0_num = 16, PA_SU_POINT_SIZE = 0x00028a00, HEIGHT_mask = 0xffff << 0, HEIGHT_shift = 0, PA_SU_POINT_SIZE__WIDTH_mask = 0xffff << 16, PA_SU_POINT_SIZE__WIDTH_shift = 16, PA_SU_POINT_MINMAX = 0x00028a04, MIN_SIZE_mask = 0xffff << 0, MIN_SIZE_shift = 0, PA_SU_POINT_MINMAX__MAX_SIZE_mask = 0xffff << 16, PA_SU_POINT_MINMAX__MAX_SIZE_shift = 16, PA_SU_LINE_CNTL = 0x00028a08, PA_SU_LINE_CNTL__WIDTH_mask = 0xffff << 0, PA_SU_LINE_CNTL__WIDTH_shift = 0, PA_SC_LINE_STIPPLE = 0x00028a0c, LINE_PATTERN_mask = 0xffff << 0, LINE_PATTERN_shift = 0, REPEAT_COUNT_mask = 0xff << 16, REPEAT_COUNT_shift = 16, PATTERN_BIT_ORDER_bit = 1 << 28, AUTO_RESET_CNTL_mask = 0x03 << 29, AUTO_RESET_CNTL_shift = 29, VGT_OUTPUT_PATH_CNTL = 0x00028a10, PATH_SELECT_mask = 0x07 << 0, PATH_SELECT_shift = 0, VGT_OUTPATH_VTX_REUSE = 0x00, VGT_OUTPATH_TESS_EN = 0x01, VGT_OUTPATH_PASSTHRU = 0x02, VGT_OUTPATH_GS_BLOCK = 0x03, VGT_OUTPATH_HS_BLOCK = 0x04, VGT_HOS_CNTL = 0x00028a14, TESS_MODE_mask = 0x03 << 0, TESS_MODE_shift = 0, VGT_HOS_MAX_TESS_LEVEL = 0x00028a18, VGT_HOS_MIN_TESS_LEVEL = 0x00028a1c, VGT_HOS_REUSE_DEPTH = 0x00028a20, REUSE_DEPTH_mask = 0xff << 0, REUSE_DEPTH_shift = 0, VGT_GROUP_PRIM_TYPE = 0x00028a24, VGT_GROUP_PRIM_TYPE__PRIM_TYPE_mask = 0x1f << 0, VGT_GROUP_PRIM_TYPE__PRIM_TYPE_shift = 0, VGT_GRP_3D_POINT = 0x00, VGT_GRP_3D_LINE = 0x01, VGT_GRP_3D_TRI = 0x02, VGT_GRP_3D_RECT = 0x03, VGT_GRP_3D_QUAD = 0x04, VGT_GRP_2D_COPY_RECT_V0 = 0x05, VGT_GRP_2D_COPY_RECT_V1 = 0x06, VGT_GRP_2D_COPY_RECT_V2 = 0x07, VGT_GRP_2D_COPY_RECT_V3 = 0x08, VGT_GRP_2D_FILL_RECT = 0x09, VGT_GRP_2D_LINE = 0x0a, VGT_GRP_2D_TRI = 0x0b, VGT_GRP_PRIM_INDEX_LINE = 0x0c, VGT_GRP_PRIM_INDEX_TRI = 0x0d, VGT_GRP_PRIM_INDEX_QUAD = 0x0e, VGT_GRP_3D_LINE_ADJ = 0x0f, VGT_GRP_3D_TRI_ADJ = 0x10, VGT_GRP_3D_PATCH = 0x11, RETAIN_ORDER_bit = 1 << 14, RETAIN_QUADS_bit = 1 << 15, PRIM_ORDER_mask = 0x07 << 16, PRIM_ORDER_shift = 16, VGT_GRP_LIST = 0x00, VGT_GRP_STRIP = 0x01, VGT_GRP_FAN = 0x02, VGT_GRP_LOOP = 0x03, VGT_GRP_POLYGON = 0x04, VGT_GROUP_FIRST_DECR = 0x00028a28, FIRST_DECR_mask = 0x0f << 0, FIRST_DECR_shift = 0, VGT_GROUP_DECR = 0x00028a2c, DECR_mask = 0x0f << 0, DECR_shift = 0, VGT_GROUP_VECT_0_CNTL = 0x00028a30, COMP_X_EN_bit = 1 << 0, COMP_Y_EN_bit = 1 << 1, COMP_Z_EN_bit = 1 << 2, COMP_W_EN_bit = 1 << 3, VGT_GROUP_VECT_0_CNTL__STRIDE_mask = 0xff << 8, VGT_GROUP_VECT_0_CNTL__STRIDE_shift = 8, SHIFT_mask = 0xff << 16, SHIFT_shift = 16, VGT_GROUP_VECT_1_CNTL = 0x00028a34, /* COMP_X_EN_bit = 1 << 0, */ /* COMP_Y_EN_bit = 1 << 1, */ /* COMP_Z_EN_bit = 1 << 2, */ /* COMP_W_EN_bit = 1 << 3, */ VGT_GROUP_VECT_1_CNTL__STRIDE_mask = 0xff << 8, VGT_GROUP_VECT_1_CNTL__STRIDE_shift = 8, /* SHIFT_mask = 0xff << 16, */ /* SHIFT_shift = 16, */ VGT_GROUP_VECT_0_FMT_CNTL = 0x00028a38, X_CONV_mask = 0x0f << 0, X_CONV_shift = 0, VGT_GRP_INDEX_16 = 0x00, VGT_GRP_INDEX_32 = 0x01, VGT_GRP_UINT_16 = 0x02, VGT_GRP_UINT_32 = 0x03, VGT_GRP_SINT_16 = 0x04, VGT_GRP_SINT_32 = 0x05, VGT_GRP_FLOAT_32 = 0x06, VGT_GRP_AUTO_PRIM = 0x07, VGT_GRP_FIX_1_23_TO_FLOAT = 0x08, X_OFFSET_mask = 0x0f << 4, X_OFFSET_shift = 4, Y_CONV_mask = 0x0f << 8, Y_CONV_shift = 8, /* VGT_GRP_INDEX_16 = 0x00, */ /* VGT_GRP_INDEX_32 = 0x01, */ /* VGT_GRP_UINT_16 = 0x02, */ /* VGT_GRP_UINT_32 = 0x03, */ /* VGT_GRP_SINT_16 = 0x04, */ /* VGT_GRP_SINT_32 = 0x05, */ /* VGT_GRP_FLOAT_32 = 0x06, */ /* VGT_GRP_AUTO_PRIM = 0x07, */ /* VGT_GRP_FIX_1_23_TO_FLOAT = 0x08, */ Y_OFFSET_mask = 0x0f << 12, Y_OFFSET_shift = 12, Z_CONV_mask = 0x0f << 16, Z_CONV_shift = 16, /* VGT_GRP_INDEX_16 = 0x00, */ /* VGT_GRP_INDEX_32 = 0x01, */ /* VGT_GRP_UINT_16 = 0x02, */ /* VGT_GRP_UINT_32 = 0x03, */ /* VGT_GRP_SINT_16 = 0x04, */ /* VGT_GRP_SINT_32 = 0x05, */ /* VGT_GRP_FLOAT_32 = 0x06, */ /* VGT_GRP_AUTO_PRIM = 0x07, */ /* VGT_GRP_FIX_1_23_TO_FLOAT = 0x08, */ Z_OFFSET_mask = 0x0f << 20, Z_OFFSET_shift = 20, W_CONV_mask = 0x0f << 24, W_CONV_shift = 24, /* VGT_GRP_INDEX_16 = 0x00, */ /* VGT_GRP_INDEX_32 = 0x01, */ /* VGT_GRP_UINT_16 = 0x02, */ /* VGT_GRP_UINT_32 = 0x03, */ /* VGT_GRP_SINT_16 = 0x04, */ /* VGT_GRP_SINT_32 = 0x05, */ /* VGT_GRP_FLOAT_32 = 0x06, */ /* VGT_GRP_AUTO_PRIM = 0x07, */ /* VGT_GRP_FIX_1_23_TO_FLOAT = 0x08, */ W_OFFSET_mask = 0x0f << 28, W_OFFSET_shift = 28, VGT_GROUP_VECT_1_FMT_CNTL = 0x00028a3c, /* X_CONV_mask = 0x0f << 0, */ /* X_CONV_shift = 0, */ /* VGT_GRP_INDEX_16 = 0x00, */ /* VGT_GRP_INDEX_32 = 0x01, */ /* VGT_GRP_UINT_16 = 0x02, */ /* VGT_GRP_UINT_32 = 0x03, */ /* VGT_GRP_SINT_16 = 0x04, */ /* VGT_GRP_SINT_32 = 0x05, */ /* VGT_GRP_FLOAT_32 = 0x06, */ /* VGT_GRP_AUTO_PRIM = 0x07, */ /* VGT_GRP_FIX_1_23_TO_FLOAT = 0x08, */ /* X_OFFSET_mask = 0x0f << 4, */ /* X_OFFSET_shift = 4, */ /* Y_CONV_mask = 0x0f << 8, */ /* Y_CONV_shift = 8, */ /* VGT_GRP_INDEX_16 = 0x00, */ /* VGT_GRP_INDEX_32 = 0x01, */ /* VGT_GRP_UINT_16 = 0x02, */ /* VGT_GRP_UINT_32 = 0x03, */ /* VGT_GRP_SINT_16 = 0x04, */ /* VGT_GRP_SINT_32 = 0x05, */ /* VGT_GRP_FLOAT_32 = 0x06, */ /* VGT_GRP_AUTO_PRIM = 0x07, */ /* VGT_GRP_FIX_1_23_TO_FLOAT = 0x08, */ /* Y_OFFSET_mask = 0x0f << 12, */ /* Y_OFFSET_shift = 12, */ /* Z_CONV_mask = 0x0f << 16, */ /* Z_CONV_shift = 16, */ /* VGT_GRP_INDEX_16 = 0x00, */ /* VGT_GRP_INDEX_32 = 0x01, */ /* VGT_GRP_UINT_16 = 0x02, */ /* VGT_GRP_UINT_32 = 0x03, */ /* VGT_GRP_SINT_16 = 0x04, */ /* VGT_GRP_SINT_32 = 0x05, */ /* VGT_GRP_FLOAT_32 = 0x06, */ /* VGT_GRP_AUTO_PRIM = 0x07, */ /* VGT_GRP_FIX_1_23_TO_FLOAT = 0x08, */ /* Z_OFFSET_mask = 0x0f << 20, */ /* Z_OFFSET_shift = 20, */ /* W_CONV_mask = 0x0f << 24, */ /* W_CONV_shift = 24, */ /* VGT_GRP_INDEX_16 = 0x00, */ /* VGT_GRP_INDEX_32 = 0x01, */ /* VGT_GRP_UINT_16 = 0x02, */ /* VGT_GRP_UINT_32 = 0x03, */ /* VGT_GRP_SINT_16 = 0x04, */ /* VGT_GRP_SINT_32 = 0x05, */ /* VGT_GRP_FLOAT_32 = 0x06, */ /* VGT_GRP_AUTO_PRIM = 0x07, */ /* VGT_GRP_FIX_1_23_TO_FLOAT = 0x08, */ /* W_OFFSET_mask = 0x0f << 28, */ /* W_OFFSET_shift = 28, */ VGT_GS_MODE = 0x00028a40, VGT_GS_MODE__MODE_mask = 0x03 << 0, VGT_GS_MODE__MODE_shift = 0, GS_OFF = 0x00, GS_SCENARIO_A = 0x01, GS_SCENARIO_B = 0x02, GS_SCENARIO_G = 0x03, GS_SCENARIO_C = 0x04, SPRITE_EN = 0x05, ES_PASSTHRU_bit = 1 << 2, CUT_MODE_mask = 0x03 << 3, CUT_MODE_shift = 3, GS_CUT_1024 = 0x00, GS_CUT_512 = 0x01, GS_CUT_256 = 0x02, GS_CUT_128 = 0x03, MODE_HI_bit = 1 << 8, PA_SC_MODE_CNTL_0 = 0x00028a48, MSAA_ENABLE_bit = 1 << 0, VPORT_SCISSOR_ENABLE_bit = 1 << 1, LINE_STIPPLE_ENABLE_bit = 1 << 2, VGT_ENHANCE = 0x00028a50, VGT_GS_PER_ES = 0x00028a54, GS_PER_ES_mask = 0x7ff << 0, GS_PER_ES_shift = 0, VGT_ES_PER_GS = 0x00028a58, ES_PER_GS_mask = 0x7ff << 0, ES_PER_GS_shift = 0, VGT_GS_PER_VS = 0x00028a5c, GS_PER_VS_mask = 0x0f << 0, GS_PER_VS_shift = 0, VGT_GS_OUT_PRIM_TYPE = 0x00028a6c, OUTPRIM_TYPE_mask = 0x3f << 0, OUTPRIM_TYPE_shift = 0, POINTLIST = 0x00, LINESTRIP = 0x01, TRISTRIP = 0x02, VGT_DMA_SIZE = 0x00028a74, VGT_DMA_MAX_SIZE = 0x00028a78, VGT_DMA_INDEX_TYPE = 0x00028a7c, /* INDEX_TYPE_mask = 0x03 << 0, */ /* INDEX_TYPE_shift = 0, */ VGT_INDEX_16 = 0x00, VGT_INDEX_32 = 0x01, SWAP_MODE_mask = 0x03 << 2, SWAP_MODE_shift = 2, VGT_DMA_SWAP_NONE = 0x00, VGT_DMA_SWAP_16_BIT = 0x01, VGT_DMA_SWAP_32_BIT = 0x02, VGT_DMA_SWAP_WORD = 0x03, VGT_PRIMITIVEID_EN = 0x00028a84, PRIMITIVEID_EN_bit = 1 << 0, VGT_DMA_NUM_INSTANCES = 0x00028a88, VGT_EVENT_INITIATOR = 0x00028a90, EVENT_TYPE_mask = 0x3f << 0, EVENT_TYPE_shift = 0, SAMPLE_STREAMOUTSTATS1 = 0x01, SAMPLE_STREAMOUTSTATS2 = 0x02, SAMPLE_STREAMOUTSTATS3 = 0x03, CACHE_FLUSH_TS = 0x04, CONTEXT_DONE = 0x05, CACHE_FLUSH = 0x06, CS_PARTIAL_FLUSH = 0x07, VGT_STREAMOUT_SYNC = 0x08, RST_PIX_CNT = 0x0d, VS_PARTIAL_FLUSH = 0x0f, PS_PARTIAL_FLUSH = 0x10, FLUSH_HS_OUTPUT = 0x11, FLUSH_LS_OUTPUT = 0x12, CACHE_FLUSH_AND_INV_TS_EVENT = 0x14, ZPASS_DONE = 0x15, CACHE_FLUSH_AND_INV_EVENT = 0x16, PERFCOUNTER_START = 0x17, PERFCOUNTER_STOP = 0x18, PIPELINESTAT_START = 0x19, PIPELINESTAT_STOP = 0x1a, PERFCOUNTER_SAMPLE = 0x1b, FLUSH_ES_OUTPUT = 0x1c, FLUSH_GS_OUTPUT = 0x1d, SAMPLE_PIPELINESTAT = 0x1e, SO_VGTSTREAMOUT_FLUSH = 0x1f, SAMPLE_STREAMOUTSTATS = 0x20, RESET_VTX_CNT = 0x21, BLOCK_CONTEXT_DONE = 0x22, CS_CONTEXT_DONE = 0x23, VGT_FLUSH = 0x24, SQ_NON_EVENT = 0x26, SC_SEND_DB_VPZ = 0x27, BOTTOM_OF_PIPE_TS = 0x28, FLUSH_SX_TS = 0x29, DB_CACHE_FLUSH_AND_INV = 0x2a, FLUSH_AND_INV_DB_DATA_TS = 0x2b, FLUSH_AND_INV_DB_META = 0x2c, FLUSH_AND_INV_CB_DATA_TS = 0x2d, FLUSH_AND_INV_CB_META = 0x2e, CS_DONE = 0x2f, PS_DONE = 0x30, FLUSH_AND_INV_CB_PIXEL_DATA = 0x31, SX_CB_RAT_ACK_REQUEST = 0x32, ADDRESS_HI_mask = 0x1ff << 18, ADDRESS_HI_shift = 18, EXTENDED_EVENT_bit = 1 << 27, VGT_MULTI_PRIM_IB_RESET_EN = 0x00028a94, RESET_EN_bit = 1 << 0, VGT_INSTANCE_STEP_RATE_0 = 0x00028aa0, VGT_INSTANCE_STEP_RATE_1 = 0x00028aa4, VGT_REUSE_OFF = 0x00028ab4, REUSE_OFF_bit = 1 << 0, VGT_VTX_CNT_EN = 0x00028ab8, VTX_CNT_EN_bit = 1 << 0, DB_HTILE_SURFACE = 0x00028abc, HTILE_WIDTH_bit = 1 << 0, HTILE_HEIGHT_bit = 1 << 1, LINEAR_bit = 1 << 2, FULL_CACHE_bit = 1 << 3, HTILE_USES_PRELOAD_WIN_bit = 1 << 4, PRELOAD_bit = 1 << 5, PREFETCH_WIDTH_mask = 0x3f << 6, PREFETCH_WIDTH_shift = 6, PREFETCH_HEIGHT_mask = 0x3f << 12, PREFETCH_HEIGHT_shift = 12, DB_SRESULTS_COMPARE_STATE0 = 0x00028ac0, COMPAREFUNC0_mask = 0x07 << 0, COMPAREFUNC0_shift = 0, /* REF_NEVER = 0x00, */ /* REF_LESS = 0x01, */ /* REF_EQUAL = 0x02, */ /* REF_LEQUAL = 0x03, */ /* REF_GREATER = 0x04, */ /* REF_NOTEQUAL = 0x05, */ /* REF_GEQUAL = 0x06, */ /* REF_ALWAYS = 0x07, */ COMPAREVALUE0_mask = 0xff << 4, COMPAREVALUE0_shift = 4, COMPAREMASK0_mask = 0xff << 12, COMPAREMASK0_shift = 12, ENABLE0_bit = 1 << 24, DB_SRESULTS_COMPARE_STATE1 = 0x00028ac4, COMPAREFUNC1_mask = 0x07 << 0, COMPAREFUNC1_shift = 0, /* REF_NEVER = 0x00, */ /* REF_LESS = 0x01, */ /* REF_EQUAL = 0x02, */ /* REF_LEQUAL = 0x03, */ /* REF_GREATER = 0x04, */ /* REF_NOTEQUAL = 0x05, */ /* REF_GEQUAL = 0x06, */ /* REF_ALWAYS = 0x07, */ COMPAREVALUE1_mask = 0xff << 4, COMPAREVALUE1_shift = 4, COMPAREMASK1_mask = 0xff << 12, COMPAREMASK1_shift = 12, ENABLE1_bit = 1 << 24, DB_PRELOAD_CONTROL = 0x00028ac8, START_X_mask = 0xff << 0, START_X_shift = 0, START_Y_mask = 0xff << 8, START_Y_shift = 8, MAX_X_mask = 0xff << 16, MAX_X_shift = 16, MAX_Y_mask = 0xff << 24, MAX_Y_shift = 24, VGT_STRMOUT_BUFFER_SIZE_0 = 0x00028ad0, VGT_STRMOUT_VTX_STRIDE_0 = 0x00028ad4, VGT_STRMOUT_VTX_STRIDE_0__STRIDE_mask = 0x3ff << 0, VGT_STRMOUT_VTX_STRIDE_0__STRIDE_shift = 0, VGT_STRMOUT_BUFFER_BASE_0 = 0x00028ad8, VGT_STRMOUT_BUFFER_OFFSET_0 = 0x00028adc, VGT_STRMOUT_BUFFER_SIZE_1 = 0x00028ae0, VGT_STRMOUT_VTX_STRIDE_1 = 0x00028ae4, VGT_STRMOUT_VTX_STRIDE_1__STRIDE_mask = 0x3ff << 0, VGT_STRMOUT_VTX_STRIDE_1__STRIDE_shift = 0, VGT_STRMOUT_BUFFER_BASE_1 = 0x00028ae8, VGT_STRMOUT_BUFFER_OFFSET_1 = 0x00028aec, VGT_STRMOUT_BUFFER_SIZE_2 = 0x00028af0, VGT_STRMOUT_VTX_STRIDE_2 = 0x00028af4, VGT_STRMOUT_VTX_STRIDE_2__STRIDE_mask = 0x3ff << 0, VGT_STRMOUT_VTX_STRIDE_2__STRIDE_shift = 0, VGT_STRMOUT_BUFFER_BASE_2 = 0x00028af8, VGT_STRMOUT_BUFFER_OFFSET_2 = 0x00028afc, VGT_STRMOUT_BUFFER_SIZE_3 = 0x00028b00, VGT_STRMOUT_VTX_STRIDE_3 = 0x00028b04, VGT_STRMOUT_VTX_STRIDE_3__STRIDE_mask = 0x3ff << 0, VGT_STRMOUT_VTX_STRIDE_3__STRIDE_shift = 0, VGT_STRMOUT_BUFFER_BASE_3 = 0x00028b08, VGT_STRMOUT_BUFFER_OFFSET_3 = 0x00028b0c, VGT_STRMOUT_BASE_OFFSET_0 = 0x00028b10, VGT_STRMOUT_BASE_OFFSET_1 = 0x00028b14, VGT_STRMOUT_BASE_OFFSET_2 = 0x00028b18, VGT_STRMOUT_BASE_OFFSET_3 = 0x00028b1c, VGT_STRMOUT_DRAW_OPAQUE_OFFSET = 0x00028b28, VGT_STRMOUT_DRAW_OPAQUE_BUFFER_FILLED_SIZE = 0x00028b2c, VGT_STRMOUT_DRAW_OPAQUE_VERTEX_STRIDE = 0x00028b30, VERTEX_STRIDE_mask = 0x1ff << 0, VERTEX_STRIDE_shift = 0, VGT_GS_MAX_VERT_OUT = 0x00028b38, MAX_VERT_OUT_mask = 0x7ff << 0, MAX_VERT_OUT_shift = 0, VGT_STRMOUT_BASE_OFFSET_HI_0 = 0x00028b44, VGT_STRMOUT_BASE_OFFSET_HI_0__BASE_OFFSET_mask = 0x3f << 0, VGT_STRMOUT_BASE_OFFSET_HI_0__BASE_OFFSET_shift = 0, VGT_STRMOUT_BASE_OFFSET_HI_1 = 0x00028b48, VGT_STRMOUT_BASE_OFFSET_HI_1__BASE_OFFSET_mask = 0x3f << 0, VGT_STRMOUT_BASE_OFFSET_HI_1__BASE_OFFSET_shift = 0, VGT_STRMOUT_BASE_OFFSET_HI_2 = 0x00028b4c, VGT_STRMOUT_BASE_OFFSET_HI_2__BASE_OFFSET_mask = 0x3f << 0, VGT_STRMOUT_BASE_OFFSET_HI_2__BASE_OFFSET_shift = 0, VGT_STRMOUT_BASE_OFFSET_HI_3 = 0x00028b50, VGT_STRMOUT_BASE_OFFSET_HI_3__BASE_OFFSET_mask = 0x3f << 0, VGT_STRMOUT_BASE_OFFSET_HI_3__BASE_OFFSET_shift = 0, VGT_SHADER_STAGES_EN = 0x00028b54, LS_EN_mask = 0x03 << 0, LS_EN_shift = 0, LS_STAGE_OFF = 0x00, LS_STAGE_ON = 0x01, CS_STAGE_ON = 0x02, HS_EN_bit = 1 << 2, ES_EN_mask = 0x03 << 3, ES_EN_shift = 3, ES_STAGE_OFF = 0x00, ES_STAGE_DS = 0x01, ES_STAGE_REAL = 0x02, GS_EN_bit = 1 << 5, VS_EN_mask = 0x03 << 6, VS_EN_shift = 6, VS_STAGE_REAL = 0x00, VS_STAGE_DS = 0x01, VS_STAGE_COPY_SHADER = 0x02, DYNAMIC_HS_bit = 1 << 8, VGT_LS_HS_CONFIG = 0x00028b58, NUM_PATCHES_mask = 0xff << 0, NUM_PATCHES_shift = 0, HS_NUM_INPUT_CP_mask = 0x3f << 8, HS_NUM_INPUT_CP_shift = 8, HS_NUM_OUTPUT_CP_mask = 0x3f << 14, HS_NUM_OUTPUT_CP_shift = 14, DB_ALPHA_TO_MASK = 0x00028b70, ALPHA_TO_MASK_ENABLE_bit = 1 << 0, ALPHA_TO_MASK_OFFSET0_mask = 0x03 << 8, ALPHA_TO_MASK_OFFSET0_shift = 8, ALPHA_TO_MASK_OFFSET1_mask = 0x03 << 10, ALPHA_TO_MASK_OFFSET1_shift = 10, ALPHA_TO_MASK_OFFSET2_mask = 0x03 << 12, ALPHA_TO_MASK_OFFSET2_shift = 12, ALPHA_TO_MASK_OFFSET3_mask = 0x03 << 14, ALPHA_TO_MASK_OFFSET3_shift = 14, OFFSET_ROUND_bit = 1 << 16, PA_SU_POLY_OFFSET_DB_FMT_CNTL = 0x00028b78, POLY_OFFSET_NEG_NUM_DB_BITS_mask = 0xff << 0, POLY_OFFSET_NEG_NUM_DB_BITS_shift = 0, POLY_OFFSET_DB_IS_FLOAT_FMT_bit = 1 << 8, PA_SU_POLY_OFFSET_CLAMP = 0x00028b7c, PA_SU_POLY_OFFSET_FRONT_SCALE = 0x00028b80, PA_SU_POLY_OFFSET_FRONT_OFFSET = 0x00028b84, PA_SU_POLY_OFFSET_BACK_SCALE = 0x00028b88, PA_SU_POLY_OFFSET_BACK_OFFSET = 0x00028b8c, VGT_GS_INSTANCE_CNT = 0x00028b90, VGT_GS_INSTANCE_CNT__ENABLE_bit = 1 << 0, CNT_mask = 0x7f << 2, CNT_shift = 2, VGT_STRMOUT_CONFIG = 0x00028b94, STREAMOUT_0_EN_bit = 1 << 0, STREAMOUT_1_EN_bit = 1 << 1, STREAMOUT_2_EN_bit = 1 << 2, STREAMOUT_3_EN_bit = 1 << 3, RAST_STREAM_mask = 0x07 << 4, RAST_STREAM_shift = 4, VGT_STRMOUT_BUFFER_CONFIG = 0x00028b98, STREAM_0_BUFFER_EN_mask = 0x0f << 0, STREAM_0_BUFFER_EN_shift = 0, STREAM_1_BUFFER_EN_mask = 0x0f << 4, STREAM_1_BUFFER_EN_shift = 4, STREAM_2_BUFFER_EN_mask = 0x0f << 8, STREAM_2_BUFFER_EN_shift = 8, STREAM_3_BUFFER_EN_mask = 0x0f << 12, STREAM_3_BUFFER_EN_shift = 12, CB_IMMED0_BASE = 0x00028b9c, CB_IMMED0_BASE_num = 12, PA_SC_CENTROID_PRIORITY_0 = 0x00028bd4, DISTANCE_0_mask = 0x0f << 0, DISTANCE_0_shift = 0, DISTANCE_1_mask = 0x0f << 4, DISTANCE_1_shift = 4, DISTANCE_2_mask = 0x0f << 8, DISTANCE_2_shift = 8, DISTANCE_3_mask = 0x0f << 12, DISTANCE_3_shift = 12, DISTANCE_4_mask = 0x0f << 16, DISTANCE_4_shift = 16, DISTANCE_5_mask = 0x0f << 20, DISTANCE_5_shift = 20, DISTANCE_6_mask = 0x0f << 24, DISTANCE_6_shift = 24, DISTANCE_7_mask = 0x0f << 28, DISTANCE_7_shift = 28, PA_SC_CENTROID_PRIORITY_1 = 0x00028bd8, DISTANCE_8_mask = 0x0f << 0, DISTANCE_8_shift = 0, DISTANCE_9_mask = 0x0f << 4, DISTANCE_9_shift = 4, DISTANCE_10_mask = 0x0f << 8, DISTANCE_10_shift = 8, DISTANCE_11_mask = 0x0f << 12, DISTANCE_11_shift = 12, DISTANCE_12_mask = 0x0f << 16, DISTANCE_12_shift = 16, DISTANCE_13_mask = 0x0f << 20, DISTANCE_13_shift = 20, DISTANCE_14_mask = 0x0f << 24, DISTANCE_14_shift = 24, DISTANCE_15_mask = 0x0f << 28, DISTANCE_15_shift = 28, PA_SC_LINE_CNTL = 0x00028bdc, EXPAND_LINE_WIDTH_bit = 1 << 9, LAST_PIXEL_bit = 1 << 10, PERPENDICULAR_ENDCAP_ENA_bit = 1 << 11, DX10_DIAMOND_TEST_ENA_bit = 1 << 12, PA_SC_AA_CONFIG = 0x00028be0, MSAA_NUM_SAMPLES_mask = 0x07 << 0, MSAA_NUM_SAMPLES_shift = 0, AA_MASK_CENTROID_DTMN_bit = 1 << 4, MAX_SAMPLE_DIST_mask = 0x0f << 13, MAX_SAMPLE_DIST_shift = 13, MSAA_EXPOSED_SAMPLES_mask = 0x07 << 20, MSAA_EXPOSED_SAMPLES_shift = 20, DETAIL_TO_EXPOSED_MODE_mask = 0x03 << 24, DETAIL_TO_EXPOSED_MODE_shift = 24, PA_SU_VTX_CNTL = 0x00028be4, PIX_CENTER_bit = 1 << 0, PA_SU_VTX_CNTL__ROUND_MODE_mask = 0x03 << 1, PA_SU_VTX_CNTL__ROUND_MODE_shift = 1, X_TRUNCATE = 0x00, X_ROUND = 0x01, X_ROUND_TO_EVEN = 0x02, X_ROUND_TO_ODD = 0x03, QUANT_MODE_mask = 0x07 << 3, QUANT_MODE_shift = 3, X_1_16TH = 0x00, X_1_8TH = 0x01, X_1_4TH = 0x02, X_1_2 = 0x03, QUANT_MODE__X_1 = 0x04, X_1_256TH = 0x05, X_1_1024TH = 0x06, X_1_4096TH = 0x07, PA_CL_GB_VERT_CLIP_ADJ = 0x00028be8, PA_CL_GB_HORZ_CLIP_ADJ = 0x00028bf0, PA_CL_GB_HORZ_DISC_ADJ = 0x00028bf4, PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_0 = 0x00028bf8, S0_X_mask = 0x0f << 0, S0_X_shift = 0, S0_Y_mask = 0x0f << 4, S0_Y_shift = 4, S1_X_mask = 0x0f << 8, S1_X_shift = 8, S1_Y_mask = 0x0f << 12, S1_Y_shift = 12, S2_X_mask = 0x0f << 16, S2_X_shift = 16, S2_Y_mask = 0x0f << 20, S2_Y_shift = 20, S3_X_mask = 0x0f << 24, S3_X_shift = 24, S3_Y_mask = 0x0f << 28, S3_Y_shift = 28, PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_1 = 0x00028bfc, S4_X_mask = 0x0f << 0, S4_X_shift = 0, S4_Y_mask = 0x0f << 4, S4_Y_shift = 4, S5_X_mask = 0x0f << 8, S5_X_shift = 8, S5_Y_mask = 0x0f << 12, S5_Y_shift = 12, S6_X_mask = 0x0f << 16, S6_X_shift = 16, S6_Y_mask = 0x0f << 20, S6_Y_shift = 20, S7_X_mask = 0x0f << 24, S7_X_shift = 24, S7_Y_mask = 0x0f << 28, S7_Y_shift = 28, PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_2 = 0x00028c00, S8_X_mask = 0x0f << 0, S8_X_shift = 0, S8_Y_mask = 0x0f << 4, S8_Y_shift = 4, S9_X_mask = 0x0f << 8, S9_X_shift = 8, S9_Y_mask = 0x0f << 12, S9_Y_shift = 12, S10_X_mask = 0x0f << 16, S10_X_shift = 16, S10_Y_mask = 0x0f << 20, S10_Y_shift = 20, S11_X_mask = 0x0f << 24, S11_X_shift = 24, S11_Y_mask = 0x0f << 28, S11_Y_shift = 28, PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y0_3 = 0x00028c04, S12_X_mask = 0x0f << 0, S12_X_shift = 0, S12_Y_mask = 0x0f << 4, S12_Y_shift = 4, S13_X_mask = 0x0f << 8, S13_X_shift = 8, S13_Y_mask = 0x0f << 12, S13_Y_shift = 12, S14_X_mask = 0x0f << 16, S14_X_shift = 16, S14_Y_mask = 0x0f << 20, S14_Y_shift = 20, S15_X_mask = 0x0f << 24, S15_X_shift = 24, S15_Y_mask = 0x0f << 28, S15_Y_shift = 28, PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_0 = 0x00028c08, /* S0_X_mask = 0x0f << 0, */ /* S0_X_shift = 0, */ /* S0_Y_mask = 0x0f << 4, */ /* S0_Y_shift = 4, */ /* S1_X_mask = 0x0f << 8, */ /* S1_X_shift = 8, */ /* S1_Y_mask = 0x0f << 12, */ /* S1_Y_shift = 12, */ /* S2_X_mask = 0x0f << 16, */ /* S2_X_shift = 16, */ /* S2_Y_mask = 0x0f << 20, */ /* S2_Y_shift = 20, */ /* S3_X_mask = 0x0f << 24, */ /* S3_X_shift = 24, */ /* S3_Y_mask = 0x0f << 28, */ /* S3_Y_shift = 28, */ PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_1 = 0x00028c0c, /* S4_X_mask = 0x0f << 0, */ /* S4_X_shift = 0, */ /* S4_Y_mask = 0x0f << 4, */ /* S4_Y_shift = 4, */ /* S5_X_mask = 0x0f << 8, */ /* S5_X_shift = 8, */ /* S5_Y_mask = 0x0f << 12, */ /* S5_Y_shift = 12, */ /* S6_X_mask = 0x0f << 16, */ /* S6_X_shift = 16, */ /* S6_Y_mask = 0x0f << 20, */ /* S6_Y_shift = 20, */ /* S7_X_mask = 0x0f << 24, */ /* S7_X_shift = 24, */ /* S7_Y_mask = 0x0f << 28, */ /* S7_Y_shift = 28, */ PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_2 = 0x00028c10, /* S8_X_mask = 0x0f << 0, */ /* S8_X_shift = 0, */ /* S8_Y_mask = 0x0f << 4, */ /* S8_Y_shift = 4, */ /* S9_X_mask = 0x0f << 8, */ /* S9_X_shift = 8, */ /* S9_Y_mask = 0x0f << 12, */ /* S9_Y_shift = 12, */ /* S10_X_mask = 0x0f << 16, */ /* S10_X_shift = 16, */ /* S10_Y_mask = 0x0f << 20, */ /* S10_Y_shift = 20, */ /* S11_X_mask = 0x0f << 24, */ /* S11_X_shift = 24, */ /* S11_Y_mask = 0x0f << 28, */ /* S11_Y_shift = 28, */ PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y0_3 = 0x00028c14, /* S12_X_mask = 0x0f << 0, */ /* S12_X_shift = 0, */ /* S12_Y_mask = 0x0f << 4, */ /* S12_Y_shift = 4, */ /* S13_X_mask = 0x0f << 8, */ /* S13_X_shift = 8, */ /* S13_Y_mask = 0x0f << 12, */ /* S13_Y_shift = 12, */ /* S14_X_mask = 0x0f << 16, */ /* S14_X_shift = 16, */ /* S14_Y_mask = 0x0f << 20, */ /* S14_Y_shift = 20, */ /* S15_X_mask = 0x0f << 24, */ /* S15_X_shift = 24, */ /* S15_Y_mask = 0x0f << 28, */ /* S15_Y_shift = 28, */ PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_0 = 0x00028c18, /* S0_X_mask = 0x0f << 0, */ /* S0_X_shift = 0, */ /* S0_Y_mask = 0x0f << 4, */ /* S0_Y_shift = 4, */ /* S1_X_mask = 0x0f << 8, */ /* S1_X_shift = 8, */ /* S1_Y_mask = 0x0f << 12, */ /* S1_Y_shift = 12, */ /* S2_X_mask = 0x0f << 16, */ /* S2_X_shift = 16, */ /* S2_Y_mask = 0x0f << 20, */ /* S2_Y_shift = 20, */ /* S3_X_mask = 0x0f << 24, */ /* S3_X_shift = 24, */ /* S3_Y_mask = 0x0f << 28, */ /* S3_Y_shift = 28, */ PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_1 = 0x00028c1c, /* S4_X_mask = 0x0f << 0, */ /* S4_X_shift = 0, */ /* S4_Y_mask = 0x0f << 4, */ /* S4_Y_shift = 4, */ /* S5_X_mask = 0x0f << 8, */ /* S5_X_shift = 8, */ /* S5_Y_mask = 0x0f << 12, */ /* S5_Y_shift = 12, */ /* S6_X_mask = 0x0f << 16, */ /* S6_X_shift = 16, */ /* S6_Y_mask = 0x0f << 20, */ /* S6_Y_shift = 20, */ /* S7_X_mask = 0x0f << 24, */ /* S7_X_shift = 24, */ /* S7_Y_mask = 0x0f << 28, */ /* S7_Y_shift = 28, */ PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_2 = 0x00028c20, /* S8_X_mask = 0x0f << 0, */ /* S8_X_shift = 0, */ /* S8_Y_mask = 0x0f << 4, */ /* S8_Y_shift = 4, */ /* S9_X_mask = 0x0f << 8, */ /* S9_X_shift = 8, */ /* S9_Y_mask = 0x0f << 12, */ /* S9_Y_shift = 12, */ /* S10_X_mask = 0x0f << 16, */ /* S10_X_shift = 16, */ /* S10_Y_mask = 0x0f << 20, */ /* S10_Y_shift = 20, */ /* S11_X_mask = 0x0f << 24, */ /* S11_X_shift = 24, */ /* S11_Y_mask = 0x0f << 28, */ /* S11_Y_shift = 28, */ PA_SC_AA_SAMPLE_LOCS_PIXEL_X0Y1_3 = 0x00028c24, /* S12_X_mask = 0x0f << 0, */ /* S12_X_shift = 0, */ /* S12_Y_mask = 0x0f << 4, */ /* S12_Y_shift = 4, */ /* S13_X_mask = 0x0f << 8, */ /* S13_X_shift = 8, */ /* S13_Y_mask = 0x0f << 12, */ /* S13_Y_shift = 12, */ /* S14_X_mask = 0x0f << 16, */ /* S14_X_shift = 16, */ /* S14_Y_mask = 0x0f << 20, */ /* S14_Y_shift = 20, */ /* S15_X_mask = 0x0f << 24, */ /* S15_X_shift = 24, */ /* S15_Y_mask = 0x0f << 28, */ /* S15_Y_shift = 28, */ PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_0 = 0x00028c28, /* S0_X_mask = 0x0f << 0, */ /* S0_X_shift = 0, */ /* S0_Y_mask = 0x0f << 4, */ /* S0_Y_shift = 4, */ /* S1_X_mask = 0x0f << 8, */ /* S1_X_shift = 8, */ /* S1_Y_mask = 0x0f << 12, */ /* S1_Y_shift = 12, */ /* S2_X_mask = 0x0f << 16, */ /* S2_X_shift = 16, */ /* S2_Y_mask = 0x0f << 20, */ /* S2_Y_shift = 20, */ /* S3_X_mask = 0x0f << 24, */ /* S3_X_shift = 24, */ /* S3_Y_mask = 0x0f << 28, */ /* S3_Y_shift = 28, */ PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_1 = 0x00028c2c, /* S4_X_mask = 0x0f << 0, */ /* S4_X_shift = 0, */ /* S4_Y_mask = 0x0f << 4, */ /* S4_Y_shift = 4, */ /* S5_X_mask = 0x0f << 8, */ /* S5_X_shift = 8, */ /* S5_Y_mask = 0x0f << 12, */ /* S5_Y_shift = 12, */ /* S6_X_mask = 0x0f << 16, */ /* S6_X_shift = 16, */ /* S6_Y_mask = 0x0f << 20, */ /* S6_Y_shift = 20, */ /* S7_X_mask = 0x0f << 24, */ /* S7_X_shift = 24, */ /* S7_Y_mask = 0x0f << 28, */ /* S7_Y_shift = 28, */ PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_2 = 0x00028c30, /* S8_X_mask = 0x0f << 0, */ /* S8_X_shift = 0, */ /* S8_Y_mask = 0x0f << 4, */ /* S8_Y_shift = 4, */ /* S9_X_mask = 0x0f << 8, */ /* S9_X_shift = 8, */ /* S9_Y_mask = 0x0f << 12, */ /* S9_Y_shift = 12, */ /* S10_X_mask = 0x0f << 16, */ /* S10_X_shift = 16, */ /* S10_Y_mask = 0x0f << 20, */ /* S10_Y_shift = 20, */ /* S11_X_mask = 0x0f << 24, */ /* S11_X_shift = 24, */ /* S11_Y_mask = 0x0f << 28, */ /* S11_Y_shift = 28, */ PA_SC_AA_SAMPLE_LOCS_PIXEL_X1Y1_3 = 0x00028c34, /* S12_X_mask = 0x0f << 0, */ /* S12_X_shift = 0, */ /* S12_Y_mask = 0x0f << 4, */ /* S12_Y_shift = 4, */ /* S13_X_mask = 0x0f << 8, */ /* S13_X_shift = 8, */ /* S13_Y_mask = 0x0f << 12, */ /* S13_Y_shift = 12, */ /* S14_X_mask = 0x0f << 16, */ /* S14_X_shift = 16, */ /* S14_Y_mask = 0x0f << 20, */ /* S14_Y_shift = 20, */ /* S15_X_mask = 0x0f << 24, */ /* S15_X_shift = 24, */ /* S15_Y_mask = 0x0f << 28, */ /* S15_Y_shift = 28, */ PA_SC_AA_MASK_X0Y0_X1Y0 = 0x00028c38, AA_MASK_X0Y0_mask = 0xffff << 0, AA_MASK_X0Y0_shift = 0, AA_MASK_X1Y0_mask = 0xffff << 16, AA_MASK_X1Y0_shift = 16, PA_SC_AA_MASK_X0Y1_X1Y1 = 0x00028c3c, AA_MASK_X0Y1_mask = 0xffff << 0, AA_MASK_X0Y1_shift = 0, AA_MASK_X1Y1_mask = 0xffff << 16, AA_MASK_X1Y1_shift = 16, VGT_VERTEX_REUSE_BLOCK_CNTL = 0x00028c58, VTX_REUSE_DEPTH_mask = 0xff << 0, VTX_REUSE_DEPTH_shift = 0, VGT_OUT_DEALLOC_CNTL = 0x00028c5c, DEALLOC_DIST_mask = 0x7f << 0, DEALLOC_DIST_shift = 0, CB_COLOR0_BASE = 0x00028c60, CB_COLOR0_BASE_num = 12, CB_COLOR0_BASE_offset = 51, CB_COLOR0_PITCH = 0x00028c64, CB_COLOR0_PITCH_num = 12, CB_COLOR0_PITCH_offset = 51, CB_COLOR0_PITCH__TILE_MAX_mask = 0x7ff << 0, CB_COLOR0_PITCH__TILE_MAX_shift = 0, CB_COLOR0_SLICE = 0x00028c68, CB_COLOR0_SLICE_num = 12, CB_COLOR0_SLICE_offset = 51, CB_COLOR0_SLICE__TILE_MAX_mask = 0x3fffff << 0, CB_COLOR0_SLICE__TILE_MAX_shift = 0, CB_COLOR0_VIEW = 0x00028c6c, CB_COLOR0_VIEW_num = 12, CB_COLOR0_VIEW_offset = 51, /* SLICE_START_mask = 0x7ff << 0, */ /* SLICE_START_shift = 0, */ /* SLICE_MAX_mask = 0x7ff << 13, */ /* SLICE_MAX_shift = 13, */ CB_COLOR0_INFO = 0x00028c70, CB_COLOR0_INFO_num = 12, CB_COLOR0_INFO_offset = 51, ENDIAN_mask = 0x03 << 0, ENDIAN_shift = 0, ENDIAN_NONE = 0x00, ENDIAN_8IN16 = 0x01, ENDIAN_8IN32 = 0x02, ENDIAN_8IN64 = 0x03, CB_COLOR0_INFO__FORMAT_mask = 0x3f << 2, CB_COLOR0_INFO__FORMAT_shift = 2, COLOR_INVALID = 0x00, COLOR_8 = 0x01, COLOR_16 = 0x05, COLOR_16_FLOAT = 0x06, COLOR_8_8 = 0x07, COLOR_5_6_5 = 0x08, COLOR_1_5_5_5 = 0x0a, COLOR_4_4_4_4 = 0x0b, COLOR_5_5_5_1 = 0x0c, COLOR_32 = 0x0d, COLOR_32_FLOAT = 0x0e, COLOR_16_16 = 0x0f, COLOR_16_16_FLOAT = 0x10, COLOR_8_24 = 0x11, COLOR_24_8 = 0x13, COLOR_10_11_11 = 0x15, COLOR_10_11_11_FLOAT = 0x16, COLOR_2_10_10_10 = 0x19, COLOR_8_8_8_8 = 0x1a, COLOR_10_10_10_2 = 0x1b, COLOR_X24_8_32_FLOAT = 0x1c, COLOR_32_32 = 0x1d, COLOR_32_32_FLOAT = 0x1e, COLOR_16_16_16_16 = 0x1f, COLOR_16_16_16_16_FLOAT = 0x20, COLOR_32_32_32_32 = 0x22, COLOR_32_32_32_32_FLOAT = 0x23, CB_COLOR0_INFO__ARRAY_MODE_mask = 0x0f << 8, CB_COLOR0_INFO__ARRAY_MODE_shift = 8, ARRAY_LINEAR_GENERAL = 0x00, ARRAY_LINEAR_ALIGNED = 0x01, /* ARRAY_1D_TILED_THIN1 = 0x02, */ /* ARRAY_2D_TILED_THIN1 = 0x04, */ NUMBER_TYPE_mask = 0x07 << 12, NUMBER_TYPE_shift = 12, NUMBER_UNORM = 0x00, NUMBER_SNORM = 0x01, NUMBER_UINT = 0x04, NUMBER_SINT = 0x05, NUMBER_SRGB = 0x06, NUMBER_FLOAT = 0x07, COMP_SWAP_mask = 0x03 << 15, COMP_SWAP_shift = 15, SWAP_STD = 0x00, SWAP_ALT = 0x01, SWAP_STD_REV = 0x02, SWAP_ALT_REV = 0x03, FAST_CLEAR_bit = 1 << 17, COMPRESSION_bit = 1 << 18, BLEND_CLAMP_bit = 1 << 19, BLEND_BYPASS_bit = 1 << 20, SIMPLE_FLOAT_bit = 1 << 21, CB_COLOR0_INFO__ROUND_MODE_bit = 1 << 22, TILE_COMPACT_bit = 1 << 23, SOURCE_FORMAT_mask = 0x03 << 24, SOURCE_FORMAT_shift = 24, EXPORT_4C_32BPC = 0x00, EXPORT_4C_16BPC = 0x01, EXPORT_2C_32BPC_GR = 0x02, EXPORT_2C_32BPC_AR = 0x03, RAT_bit = 1 << 26, RESOURCE_TYPE_mask = 0x07 << 27, RESOURCE_TYPE_shift = 27, BUFFER = 0x00, TEXTURE1D = 0x01, TEXTURE1DARRAY = 0x02, TEXTURE2D = 0x03, TEXTURE2DARRAY = 0x04, TEXTURE3D = 0x05, STRUCTUREDBUFFER = 0x06, SOURCE_NUMBER_TYPE_mask = 0x03 << 30, SOURCE_NUMBER_TYPE_shift = 30, EXPORT_FLOAT = 0x00, EXPORT_INT = 0x01, EXPORT_UNORM = 0x02, EXPORT_SNORM = 0x03, CB_COLOR0_ATTRIB = 0x00028c74, CB_COLOR0_ATTRIB_num = 12, CB_COLOR0_ATTRIB_offset = 51, IGNORE_SHADER_ENGINE_TILING_bit = 1 << 3, CB_COLOR0_ATTRIB__NON_DISP_TILING_ORDER_bit = 1 << 4, CB_COLOR0_ATTRIB__TILE_SPLIT_mask = 0x0f << 5, CB_COLOR0_ATTRIB__TILE_SPLIT_shift = 5, /* ADDR_SURF_TILE_SPLIT_64B = 0x00, */ /* ADDR_SURF_TILE_SPLIT_128B = 0x01, */ /* ADDR_SURF_TILE_SPLIT_256B = 0x02, */ /* ADDR_SURF_TILE_SPLIT_512B = 0x03, */ /* ADDR_SURF_TILE_SPLIT_1KB = 0x04, */ /* ADDR_SURF_TILE_SPLIT_2KB = 0x05, */ /* ADDR_SURF_TILE_SPLIT_4KB = 0x06, */ CB_COLOR0_ATTRIB__NUM_BANKS_mask = 0x03 << 10, CB_COLOR0_ATTRIB__NUM_BANKS_shift = 10, /* ADDR_SURF_2_BANK = 0x00, */ /* ADDR_SURF_4_BANK = 0x01, */ /* ADDR_SURF_8_BANK = 0x02, */ /* ADDR_SURF_16_BANK = 0x03, */ CB_COLOR0_ATTRIB__BANK_WIDTH_mask = 0x03 << 13, CB_COLOR0_ATTRIB__BANK_WIDTH_shift = 13, /* ADDR_SURF_BANK_WIDTH_1 = 0x00, */ /* ADDR_SURF_BANK_WIDTH_2 = 0x01, */ /* ADDR_SURF_BANK_WIDTH_4 = 0x02, */ /* ADDR_SURF_BANK_WIDTH_8 = 0x03, */ CB_COLOR0_ATTRIB__BANK_HEIGHT_mask = 0x03 << 16, CB_COLOR0_ATTRIB__BANK_HEIGHT_shift = 16, /* ADDR_SURF_BANK_HEIGHT_1 = 0x00, */ /* ADDR_SURF_BANK_HEIGHT_2 = 0x01, */ /* ADDR_SURF_BANK_HEIGHT_4 = 0x02, */ /* ADDR_SURF_BANK_HEIGHT_8 = 0x03, */ CB_COLOR0_ATTRIB__MACRO_TILE_ASPECT_mask = 0x03 << 19, CB_COLOR0_ATTRIB__MACRO_TILE_ASPECT_shift = 19, /* ADDR_SURF_MACRO_ASPECT_1 = 0x00, */ /* ADDR_SURF_MACRO_ASPECT_2 = 0x01, */ /* ADDR_SURF_MACRO_ASPECT_4 = 0x02, */ /* ADDR_SURF_MACRO_ASPECT_8 = 0x03, */ FMASK_BANK_HEIGHT_mask = 0x03 << 22, FMASK_BANK_HEIGHT_shift = 22, /* ADDR_SURF_BANK_HEIGHT_1 = 0x00, */ /* ADDR_SURF_BANK_HEIGHT_2 = 0x01, */ /* ADDR_SURF_BANK_HEIGHT_4 = 0x02, */ /* ADDR_SURF_BANK_HEIGHT_8 = 0x03, */ CB_COLOR0_ATTRIB__NUM_SAMPLES_mask = 0x07 << 24, CB_COLOR0_ATTRIB__NUM_SAMPLES_shift = 24, NUM_FRAGMENTS_mask = 0x03 << 27, NUM_FRAGMENTS_shift = 27, FORCE_DST_ALPHA_1_bit = 1 << 31, CB_COLOR0_DIM = 0x00028c78, CB_COLOR0_DIM_num = 12, CB_COLOR0_DIM_offset = 51, WIDTH_MAX_mask = 0xffff << 0, WIDTH_MAX_shift = 0, HEIGHT_MAX_mask = 0xffff << 16, HEIGHT_MAX_shift = 16, CB_COLOR0_CMASK = 0x00028c7c, CB_COLOR0_CMASK_num = 8, CB_COLOR0_CMASK_offset = 60, CB_COLOR0_CMASK_SLICE = 0x00028c80, CB_COLOR0_CMASK_SLICE_num = 8, CB_COLOR0_CMASK_SLICE_offset = 60, CB_COLOR0_CMASK_SLICE__TILE_MAX_mask = 0x3fff << 0, CB_COLOR0_CMASK_SLICE__TILE_MAX_shift = 0, CB_COLOR0_FMASK = 0x00028c84, CB_COLOR0_FMASK_num = 8, CB_COLOR0_FMASK_offset = 60, CB_COLOR0_FMASK_SLICE = 0x00028c88, CB_COLOR0_FMASK_SLICE_num = 8, CB_COLOR0_FMASK_SLICE_offset = 60, CB_COLOR0_FMASK_SLICE__TILE_MAX_mask = 0x3fffff << 0, CB_COLOR0_FMASK_SLICE__TILE_MAX_shift = 0, CB_COLOR0_CLEAR_WORD0 = 0x00028c8c, CB_COLOR0_CLEAR_WORD0_num = 8, CB_COLOR0_CLEAR_WORD0_offset = 60, CB_COLOR0_CLEAR_WORD1 = 0x00028c90, CB_COLOR0_CLEAR_WORD1_num = 8, CB_COLOR0_CLEAR_WORD1_offset = 60, CB_COLOR0_CLEAR_WORD2 = 0x00028c94, CB_COLOR0_CLEAR_WORD2_num = 8, CB_COLOR0_CLEAR_WORD2_offset = 60, CB_COLOR0_CLEAR_WORD3 = 0x00028c98, CB_COLOR0_CLEAR_WORD3_num = 8, CB_COLOR0_CLEAR_WORD3_offset = 60, SQ_ALU_CONST_CACHE_HS_0 = 0x00028f00, SQ_ALU_CONST_CACHE_HS_0_num = 16, SQ_ALU_CONST_CACHE_LS_0 = 0x00028f40, SQ_ALU_CONST_CACHE_LS_0_num = 16, SQ_ALU_CONST_BUFFER_SIZE_HS_0 = 0x00028f80, SQ_ALU_CONST_BUFFER_SIZE_HS_0_num = 16, SQ_ALU_CONST_BUFFER_SIZE_HS_0__DATA_mask = 0x1ff << 0, SQ_ALU_CONST_BUFFER_SIZE_HS_0__DATA_shift = 0, SQ_ALU_CONST_BUFFER_SIZE_LS_0 = 0x00028fc0, SQ_ALU_CONST_BUFFER_SIZE_LS_0_num = 16, SQ_ALU_CONST_BUFFER_SIZE_LS_0__DATA_mask = 0x1ff << 0, SQ_ALU_CONST_BUFFER_SIZE_LS_0__DATA_shift = 0, SQ_VTX_CONSTANT_WORD0_0 = 0x00030000, SQ_TEX_RESOURCE_WORD0_0 = 0x00030000, DIM_mask = 0x07 << 0, DIM_shift = 0, SQ_TEX_DIM_1D = 0x00, SQ_TEX_DIM_2D = 0x01, SQ_TEX_DIM_3D = 0x02, SQ_TEX_DIM_CUBEMAP = 0x03, SQ_TEX_DIM_1D_ARRAY = 0x04, SQ_TEX_DIM_2D_ARRAY = 0x05, SQ_TEX_DIM_2D_MSAA = 0x06, SQ_TEX_DIM_2D_ARRAY_MSAA = 0x07, /* IGNORE_SHADER_ENGINE_TILING_bit = 1 << 3, */ SQ_TEX_RESOURCE_WORD0_0__NON_DISP_TILING_ORDER_mask= 0x03 << 4, SQ_TEX_RESOURCE_WORD0_0__NON_DISP_TILING_ORDER_shift= 4, PITCH_mask = 0xfff << 6, PITCH_shift = 6, TEX_WIDTH_mask = 0x3fff << 18, TEX_WIDTH_shift = 18, SQ_VTX_CONSTANT_WORD1_0 = 0x00030004, SQ_TEX_RESOURCE_WORD1_0 = 0x00030004, TEX_HEIGHT_mask = 0x3fff << 0, TEX_HEIGHT_shift = 0, TEX_DEPTH_mask = 0x1fff << 14, TEX_DEPTH_shift = 14, SQ_TEX_RESOURCE_WORD1_0__ARRAY_MODE_mask = 0x0f << 28, SQ_TEX_RESOURCE_WORD1_0__ARRAY_MODE_shift = 28, SQ_VTX_CONSTANT_WORD2_0 = 0x00030008, BASE_ADDRESS_HI_mask = 0xff << 0, BASE_ADDRESS_HI_shift = 0, SQ_VTX_CONSTANT_WORD2_0__STRIDE_mask = 0xfff << 8, SQ_VTX_CONSTANT_WORD2_0__STRIDE_shift = 8, SQ_VTX_CONSTANT_WORD2_0__DATA_FORMAT_mask = 0x3f << 20, SQ_VTX_CONSTANT_WORD2_0__DATA_FORMAT_shift = 20, SQ_VTX_CONSTANT_WORD2_0__NUM_FORMAT_ALL_mask = 0x03 << 26, SQ_VTX_CONSTANT_WORD2_0__NUM_FORMAT_ALL_shift = 26, /* SQ_NUM_FORMAT_NORM = 0x00, */ /* SQ_NUM_FORMAT_INT = 0x01, */ /* SQ_NUM_FORMAT_SCALED = 0x02, */ SQ_VTX_CONSTANT_WORD2_0__FORMAT_COMP_ALL_bit = 1 << 28, SQ_VTX_CONSTANT_WORD2_0__SRF_MODE_ALL_bit = 1 << 29, SQ_VTX_CONSTANT_WORD2_0__ENDIAN_SWAP_mask = 0x03 << 30, SQ_VTX_CONSTANT_WORD2_0__ENDIAN_SWAP_shift = 30, /* SQ_ENDIAN_NONE = 0x00, */ /* SQ_ENDIAN_8IN16 = 0x01, */ /* SQ_ENDIAN_8IN32 = 0x02, */ SQ_TEX_RESOURCE_WORD2_0 = 0x00030008, SQ_VTX_CONSTANT_WORD3_0 = 0x0003000c, CACHE_SWIZZLE_bit = 1 << 0, SQ_VTX_CONSTANT_WORD3_0__UNCACHED_bit = 1 << 2, SQ_VTX_CONSTANT_WORD3_0__DST_SEL_X_mask = 0x07 << 3, SQ_VTX_CONSTANT_WORD3_0__DST_SEL_X_shift = 3, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_VTX_CONSTANT_WORD3_0__DST_SEL_Y_mask = 0x07 << 6, SQ_VTX_CONSTANT_WORD3_0__DST_SEL_Y_shift = 6, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_VTX_CONSTANT_WORD3_0__DST_SEL_Z_mask = 0x07 << 9, SQ_VTX_CONSTANT_WORD3_0__DST_SEL_Z_shift = 9, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_VTX_CONSTANT_WORD3_0__DST_SEL_W_mask = 0x07 << 12, SQ_VTX_CONSTANT_WORD3_0__DST_SEL_W_shift = 12, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_TEX_RESOURCE_WORD3_0 = 0x0003000c, SQ_TEX_RESOURCE_WORD4_0 = 0x00030010, FORMAT_COMP_X_mask = 0x03 << 0, FORMAT_COMP_X_shift = 0, SQ_FORMAT_COMP_UNSIGNED = 0x00, SQ_FORMAT_COMP_SIGNED = 0x01, SQ_FORMAT_COMP_UNSIGNED_BIASED = 0x02, FORMAT_COMP_Y_mask = 0x03 << 2, FORMAT_COMP_Y_shift = 2, /* SQ_FORMAT_COMP_UNSIGNED = 0x00, */ /* SQ_FORMAT_COMP_SIGNED = 0x01, */ /* SQ_FORMAT_COMP_UNSIGNED_BIASED = 0x02, */ FORMAT_COMP_Z_mask = 0x03 << 4, FORMAT_COMP_Z_shift = 4, /* SQ_FORMAT_COMP_UNSIGNED = 0x00, */ /* SQ_FORMAT_COMP_SIGNED = 0x01, */ /* SQ_FORMAT_COMP_UNSIGNED_BIASED = 0x02, */ FORMAT_COMP_W_mask = 0x03 << 6, FORMAT_COMP_W_shift = 6, /* SQ_FORMAT_COMP_UNSIGNED = 0x00, */ /* SQ_FORMAT_COMP_SIGNED = 0x01, */ /* SQ_FORMAT_COMP_UNSIGNED_BIASED = 0x02, */ SQ_TEX_RESOURCE_WORD4_0__NUM_FORMAT_ALL_mask = 0x03 << 8, SQ_TEX_RESOURCE_WORD4_0__NUM_FORMAT_ALL_shift = 8, /* SQ_NUM_FORMAT_NORM = 0x00, */ /* SQ_NUM_FORMAT_INT = 0x01, */ /* SQ_NUM_FORMAT_SCALED = 0x02, */ SQ_TEX_RESOURCE_WORD4_0__SRF_MODE_ALL_bit = 1 << 10, SQ_TEX_RESOURCE_WORD4_0__FORCE_DEGAMMA_bit = 1 << 11, SQ_TEX_RESOURCE_WORD4_0__ENDIAN_SWAP_mask = 0x03 << 12, SQ_TEX_RESOURCE_WORD4_0__ENDIAN_SWAP_shift = 12, /* SQ_ENDIAN_NONE = 0x00, */ /* SQ_ENDIAN_8IN16 = 0x01, */ /* SQ_ENDIAN_8IN32 = 0x02, */ LOG2_NUM_FRAGMENTS_mask = 0x03 << 14, LOG2_NUM_FRAGMENTS_shift = 14, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask = 0x07 << 16, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift = 16, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask = 0x07 << 19, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift = 19, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask = 0x07 << 22, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift = 22, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask = 0x07 << 25, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift = 25, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ BASE_LEVEL_mask = 0x0f << 28, BASE_LEVEL_shift = 28, SQ_VTX_CONSTANT_WORD4_0 = 0x00030010, SQ_TEX_RESOURCE_WORD5_0 = 0x00030014, LAST_LEVEL_mask = 0x0f << 0, LAST_LEVEL_shift = 0, BASE_ARRAY_mask = 0x1fff << 4, BASE_ARRAY_shift = 4, LAST_ARRAY_mask = 0x1fff << 17, LAST_ARRAY_shift = 17, SQ_TEX_RESOURCE_WORD6_0 = 0x00030018, PERF_MODULATION_mask = 0x07 << 3, PERF_MODULATION_shift = 3, INTERLACED_bit = 1 << 6, SQ_TEX_RESOURCE_WORD6_0__MIN_LOD_mask = 0xfff << 8, SQ_TEX_RESOURCE_WORD6_0__MIN_LOD_shift = 8, SQ_TEX_RESOURCE_WORD6_0__TILE_SPLIT_mask = 0x07 << 29, SQ_TEX_RESOURCE_WORD6_0__TILE_SPLIT_shift = 29, SQ_ADDR_SURF_TILE_SPLIT_64B = 0x00, SQ_ADDR_SURF_TILE_SPLIT_128B = 0x01, SQ_ADDR_SURF_TILE_SPLIT_256B = 0x02, SQ_ADDR_SURF_TILE_SPLIT_512B = 0x03, SQ_ADDR_SURF_TILE_SPLIT_1KB = 0x04, SQ_ADDR_SURF_TILE_SPLIT_2KB = 0x05, SQ_ADDR_SURF_TILE_SPLIT_4KB = 0x06, SQ_VTX_CONSTANT_WORD7_0 = 0x0003001c, SQ_VTX_CONSTANT_WORD7_0__TYPE_mask = 0x03 << 30, SQ_VTX_CONSTANT_WORD7_0__TYPE_shift = 30, SQ_TEX_VTX_INVALID_TEXTURE = 0x00, SQ_TEX_VTX_INVALID_BUFFER = 0x01, SQ_TEX_VTX_VALID_TEXTURE = 0x02, SQ_TEX_VTX_VALID_BUFFER = 0x03, SQ_TEX_RESOURCE_WORD7_0 = 0x0003001c, SQ_TEX_RESOURCE_WORD7_0__DATA_FORMAT_mask = 0x3f << 0, SQ_TEX_RESOURCE_WORD7_0__DATA_FORMAT_shift = 0, SQ_TEX_RESOURCE_WORD7_0__MACRO_TILE_ASPECT_mask = 0x03 << 6, SQ_TEX_RESOURCE_WORD7_0__MACRO_TILE_ASPECT_shift = 6, SQ_ADDR_SURF_MACRO_ASPECT_1 = 0x00, SQ_ADDR_SURF_MACRO_ASPECT_2 = 0x01, SQ_ADDR_SURF_MACRO_ASPECT_4 = 0x02, SQ_ADDR_SURF_MACRO_ASPECT_8 = 0x03, SQ_TEX_RESOURCE_WORD7_0__BANK_WIDTH_mask = 0x03 << 8, SQ_TEX_RESOURCE_WORD7_0__BANK_WIDTH_shift = 8, SQ_ADDR_SURF_BANK_WH_1 = 0x00, SQ_ADDR_SURF_BANK_WH_2 = 0x01, SQ_ADDR_SURF_BANK_WH_4 = 0x02, SQ_ADDR_SURF_BANK_WH_8 = 0x03, SQ_TEX_RESOURCE_WORD7_0__BANK_HEIGHT_mask = 0x03 << 10, SQ_TEX_RESOURCE_WORD7_0__BANK_HEIGHT_shift = 10, /* SQ_ADDR_SURF_BANK_WH_1 = 0x00, */ /* SQ_ADDR_SURF_BANK_WH_2 = 0x01, */ /* SQ_ADDR_SURF_BANK_WH_4 = 0x02, */ /* SQ_ADDR_SURF_BANK_WH_8 = 0x03, */ DEPTH_SAMPLE_ORDER_bit = 1 << 15, SQ_TEX_RESOURCE_WORD7_0__NUM_BANKS_mask = 0x03 << 16, SQ_TEX_RESOURCE_WORD7_0__NUM_BANKS_shift = 16, SQ_ADDR_SURF_2_BANK = 0x00, SQ_ADDR_SURF_4_BANK = 0x01, SQ_ADDR_SURF_8_BANK = 0x02, SQ_ADDR_SURF_16_BANK = 0x03, SQ_TEX_RESOURCE_WORD7_0__TYPE_mask = 0x03 << 30, SQ_TEX_RESOURCE_WORD7_0__TYPE_shift = 30, /* SQ_TEX_VTX_INVALID_TEXTURE = 0x00, */ /* SQ_TEX_VTX_INVALID_BUFFER = 0x01, */ /* SQ_TEX_VTX_VALID_TEXTURE = 0x02, */ /* SQ_TEX_VTX_VALID_BUFFER = 0x03, */ SQ_LOOP_CONST_DX10_0 = 0x0003a200, SQ_LOOP_CONST_0 = 0x0003a200, SQ_LOOP_CONST_0__COUNT_mask = 0xfff << 0, SQ_LOOP_CONST_0__COUNT_shift = 0, INIT_mask = 0xfff << 12, INIT_shift = 12, INC_mask = 0xff << 24, INC_shift = 24, SQ_JUMPTABLE_CONST_0 = 0x0003a200, CONST_A_mask = 0xff << 0, CONST_A_shift = 0, CONST_B_mask = 0xff << 8, CONST_B_shift = 8, CONST_C_mask = 0xff << 16, CONST_C_shift = 16, CONST_D_mask = 0xff << 24, CONST_D_shift = 24, SQ_BOOL_CONST_0 = 0x0003a500, SQ_BOOL_CONST_0_num = 6, SQ_TEX_SAMPLER_WORD0_0 = 0x0003c000, CLAMP_X_mask = 0x07 << 0, CLAMP_X_shift = 0, SQ_TEX_WRAP = 0x00, SQ_TEX_MIRROR = 0x01, SQ_TEX_CLAMP_LAST_TEXEL = 0x02, SQ_TEX_MIRROR_ONCE_LAST_TEXEL = 0x03, SQ_TEX_CLAMP_HALF_BORDER = 0x04, SQ_TEX_MIRROR_ONCE_HALF_BORDER = 0x05, SQ_TEX_CLAMP_BORDER = 0x06, SQ_TEX_MIRROR_ONCE_BORDER = 0x07, CLAMP_Y_mask = 0x07 << 3, CLAMP_Y_shift = 3, /* SQ_TEX_WRAP = 0x00, */ /* SQ_TEX_MIRROR = 0x01, */ /* SQ_TEX_CLAMP_LAST_TEXEL = 0x02, */ /* SQ_TEX_MIRROR_ONCE_LAST_TEXEL = 0x03, */ /* SQ_TEX_CLAMP_HALF_BORDER = 0x04, */ /* SQ_TEX_MIRROR_ONCE_HALF_BORDER = 0x05, */ /* SQ_TEX_CLAMP_BORDER = 0x06, */ /* SQ_TEX_MIRROR_ONCE_BORDER = 0x07, */ CLAMP_Z_mask = 0x07 << 6, CLAMP_Z_shift = 6, /* SQ_TEX_WRAP = 0x00, */ /* SQ_TEX_MIRROR = 0x01, */ /* SQ_TEX_CLAMP_LAST_TEXEL = 0x02, */ /* SQ_TEX_MIRROR_ONCE_LAST_TEXEL = 0x03, */ /* SQ_TEX_CLAMP_HALF_BORDER = 0x04, */ /* SQ_TEX_MIRROR_ONCE_HALF_BORDER = 0x05, */ /* SQ_TEX_CLAMP_BORDER = 0x06, */ /* SQ_TEX_MIRROR_ONCE_BORDER = 0x07, */ XY_MAG_FILTER_mask = 0x03 << 9, XY_MAG_FILTER_shift = 9, SQ_TEX_XY_FILTER_POINT = 0x00, SQ_TEX_XY_FILTER_BILINEAR = 0x01, XY_MIN_FILTER_mask = 0x03 << 11, XY_MIN_FILTER_shift = 11, /* SQ_TEX_XY_FILTER_POINT = 0x00, */ /* SQ_TEX_XY_FILTER_BILINEAR = 0x01, */ Z_FILTER_mask = 0x03 << 13, Z_FILTER_shift = 13, SQ_TEX_Z_FILTER_NONE = 0x00, SQ_TEX_Z_FILTER_POINT = 0x01, SQ_TEX_Z_FILTER_LINEAR = 0x02, MIP_FILTER_mask = 0x03 << 15, MIP_FILTER_shift = 15, /* SQ_TEX_Z_FILTER_NONE = 0x00, */ /* SQ_TEX_Z_FILTER_POINT = 0x01, */ /* SQ_TEX_Z_FILTER_LINEAR = 0x02, */ BORDER_COLOR_TYPE_mask = 0x03 << 20, BORDER_COLOR_TYPE_shift = 20, SQ_TEX_BORDER_COLOR_TRANS_BLACK = 0x00, SQ_TEX_BORDER_COLOR_OPAQUE_BLACK = 0x01, SQ_TEX_BORDER_COLOR_OPAQUE_WHITE = 0x02, SQ_TEX_BORDER_COLOR_REGISTER = 0x03, DEPTH_COMPARE_FUNCTION_mask = 0x07 << 22, DEPTH_COMPARE_FUNCTION_shift = 22, SQ_TEX_DEPTH_COMPARE_NEVER = 0x00, SQ_TEX_DEPTH_COMPARE_LESS = 0x01, SQ_TEX_DEPTH_COMPARE_EQUAL = 0x02, SQ_TEX_DEPTH_COMPARE_LESSEQUAL = 0x03, SQ_TEX_DEPTH_COMPARE_GREATER = 0x04, SQ_TEX_DEPTH_COMPARE_NOTEQUAL = 0x05, SQ_TEX_DEPTH_COMPARE_GREATEREQUAL = 0x06, SQ_TEX_DEPTH_COMPARE_ALWAYS = 0x07, FORCE_UNNORMALIZED_bit = 1 << 25, SQ_TEX_SAMPLER_WORD1_0 = 0x0003c004, SQ_TEX_SAMPLER_WORD1_0__MIN_LOD_mask = 0xfff << 0, SQ_TEX_SAMPLER_WORD1_0__MIN_LOD_shift = 0, MAX_LOD_mask = 0xfff << 12, MAX_LOD_shift = 12, PERF_MIP_mask = 0x0f << 24, PERF_MIP_shift = 24, PERF_Z_mask = 0x0f << 28, PERF_Z_shift = 28, SQ_TEX_SAMPLER_WORD2_0 = 0x0003c008, SQ_TEX_SAMPLER_WORD2_0__LOD_BIAS_mask = 0x3fff << 0, SQ_TEX_SAMPLER_WORD2_0__LOD_BIAS_shift = 0, LOD_BIAS_SEC_mask = 0x3f << 14, LOD_BIAS_SEC_shift = 14, MC_COORD_TRUNCATE_bit = 1 << 20, SQ_TEX_SAMPLER_WORD2_0__FORCE_DEGAMMA_bit = 1 << 21, TRUNCATE_COORD_bit = 1 << 28, SQ_TEX_SAMPLER_WORD2_0__DISABLE_CUBE_WRAP_bit = 1 << 29, SQ_TEX_SAMPLER_WORD2_0__TYPE_bit = 1 << 31, SQ_VTX_BASE_VTX_LOC = 0x0003cff0, SQ_VTX_START_INST_LOC = 0x0003cff4, SQ_TEX_SAMPLER_CLEAR = 0x0003ff00, SQ_TEX_RESOURCE_CLEAR = 0x0003ff04, SQ_LOOP_BOOL_CLEAR = 0x0003ff08, PA_CL_GB_VERT_DISC_ADJ = 0x0028be8c, } ; #endif /* _CAYMAN_REG_AUTO */ xf86-video-ati-7.3.0/src/bicubic_table.py0000775000175000017500000000236612177731114015044 00000000000000#!/usr/bin/python import struct def half(i): fs, fe, fm = ((i >> 31) & 0x1, (i >> 23) & 0xff, i & 0x7fffff) s, e, m = (fs, 0, 0) if (fe == 0x0): pass if ((fe == 0xff) and (fm == 0x0)): e = 31 elif (fe == 0xff): m = 1 e = 31 else: exp = fe - 127; if (exp < -24): pass elif (exp < -14): temp = 10 - (-14 - exp) m = 2**temp + (m >> (23 - temp)) elif (exp > 15): e = 31 else: e = exp + 15 m = fm >> 13 return ((s << 15) | (e << 10) | m) def texgen(pix): tex = [] for i in range(0,pix,4): a = i / float(pix) a2 = a ** 2 a3 = a ** 3 w0 = 1 / 6.0 * (-a3 + 3 * a2 + -3 * a + 1) w1 = 1 / 6.0 * (3 * a3 + -6 * a2 + 4) w2 = 1 / 6.0 * (-3 * a3 + 3 * a2 + 3 * a + 1) w3 = 1 / 6.0 * a3 tex.append(-(1 - (w1 / (w0 + w1)) + a)) tex.append(1 + (w3 / (w2 + w3)) - a) tex.append(w0 + w1) tex.append(w2 + w3) return tex def printrow(l, offset): seq = [ struct.unpack(' * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "xf86.h" #include #include "radeon.h" #include "radeon_reg.h" #include "cayman_reg.h" #include "evergreen_state.h" #include "radeon_drm.h" #include "radeon_vbo.h" #include "radeon_exa_shared.h" /* * Setup of default state */ void cayman_set_default_state(ScrnInfoPtr pScrn) { tex_resource_t tex_res; shader_config_t fs_conf; int i; RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; if (accel_state->XInited3D) return; memset(&tex_res, 0, sizeof(tex_resource_t)); memset(&fs_conf, 0, sizeof(shader_config_t)); accel_state->XInited3D = TRUE; evergreen_start_3d(pScrn); BEGIN_BATCH(21); EREG(SQ_LDS_ALLOC_PS, 0); PACK0(SQ_ESGS_RING_ITEMSIZE, 6); E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); PACK0(SQ_GS_VERT_ITEMSIZE, 4); E32(0); E32(0); E32(0); E32(0); PACK0(SQ_VTX_BASE_VTX_LOC, 2); E32(0); E32(0); END_BATCH(); /* DB */ BEGIN_BATCH(3 + 2); EREG(DB_Z_INFO, 0); RELOC_BATCH(accel_state->shaders_bo, RADEON_GEM_DOMAIN_VRAM, 0); END_BATCH(); BEGIN_BATCH(3 + 2); EREG(DB_STENCIL_INFO, 0); RELOC_BATCH(accel_state->shaders_bo, RADEON_GEM_DOMAIN_VRAM, 0); END_BATCH(); BEGIN_BATCH(3 + 2); EREG(DB_HTILE_DATA_BASE, 0); RELOC_BATCH(accel_state->shaders_bo, RADEON_GEM_DOMAIN_VRAM, 0); END_BATCH(); BEGIN_BATCH(52); EREG(DB_DEPTH_INFO, 0); EREG(DB_DEPTH_CONTROL, 0); PACK0(PA_SC_VPORT_ZMIN_0, 2); EFLOAT(0.0); // PA_SC_VPORT_ZMIN_0 EFLOAT(1.0); // PA_SC_VPORT_ZMAX_0 PACK0(DB_RENDER_CONTROL, 5); E32(STENCIL_COMPRESS_DISABLE_bit | DEPTH_COMPRESS_DISABLE_bit); // DB_RENDER_CONTROL E32(0); // DB_COUNT_CONTROL E32(0); // DB_DEPTH_VIEW E32(0x2a); // DB_RENDER_OVERRIDE E32(0); // DB_RENDER_OVERRIDE2 PACK0(DB_STENCIL_CLEAR, 2); E32(0); // DB_STENCIL_CLEAR E32(0); // DB_DEPTH_CLEAR EREG(DB_ALPHA_TO_MASK, ((2 << ALPHA_TO_MASK_OFFSET0_shift) | (2 << ALPHA_TO_MASK_OFFSET1_shift) | (2 << ALPHA_TO_MASK_OFFSET2_shift) | (2 << ALPHA_TO_MASK_OFFSET3_shift))); EREG(DB_SHADER_CONTROL, ((EARLY_Z_THEN_LATE_Z << Z_ORDER_shift) | DUAL_EXPORT_ENABLE_bit)); /* Only useful if no depth export */ // SX EREG(SX_MISC, 0); // CB PACK0(SX_ALPHA_TEST_CONTROL, 5); E32(0); // SX_ALPHA_TEST_CONTROL E32(0x00000000); //CB_BLEND_RED E32(0x00000000); //CB_BLEND_GREEN E32(0x00000000); //CB_BLEND_BLUE E32(0x00000000); //CB_BLEND_ALPHA EREG(CB_SHADER_MASK, OUTPUT0_ENABLE_mask); // SC EREG(PA_SC_WINDOW_OFFSET, ((0 << WINDOW_X_OFFSET_shift) | (0 << WINDOW_Y_OFFSET_shift))); EREG(PA_SC_CLIPRECT_RULE, CLIP_RULE_mask); EREG(PA_SC_EDGERULE, 0xAAAAAAAA); EREG(PA_SU_HARDWARE_SCREEN_OFFSET, 0); END_BATCH(); /* clip boolean is set to always visible -> doesn't matter */ for (i = 0; i < PA_SC_CLIPRECT_0_TL_num; i++) evergreen_set_clip_rect (pScrn, i, 0, 0, 8192, 8192); for (i = 0; i < PA_SC_VPORT_SCISSOR_0_TL_num; i++) evergreen_set_vport_scissor (pScrn, i, 0, 0, 8192, 8192); BEGIN_BATCH(73); PACK0(PA_SC_MODE_CNTL_0, 2); E32(0); // PA_SC_MODE_CNTL_0 E32(0); // PA_SC_MODE_CNTL_1 PACK0(PA_SC_CENTROID_PRIORITY_0, 27); E32((0 << DISTANCE_0_shift) | (1 << DISTANCE_1_shift) | (2 << DISTANCE_2_shift) | (3 << DISTANCE_3_shift) | (4 << DISTANCE_4_shift) | (5 << DISTANCE_5_shift) | (6 << DISTANCE_6_shift) | (7 << DISTANCE_7_shift)); // PA_SC_CENTROID_PRIORITY_0 E32((8 << DISTANCE_8_shift) | (9 << DISTANCE_9_shift) | (10 << DISTANCE_10_shift) | (11 << DISTANCE_11_shift) | (12 << DISTANCE_12_shift) | (13 << DISTANCE_13_shift) | (14 << DISTANCE_14_shift) | (15 << DISTANCE_15_shift)); // PA_SC_CENTROID_PRIORITY_1 E32(0); // PA_SC_LINE_CNTL E32(0); // PA_SC_AA_CONFIG E32(((X_ROUND_TO_EVEN << PA_SU_VTX_CNTL__ROUND_MODE_shift) | PIX_CENTER_bit)); // PA_SU_VTX_CNTL EFLOAT(1.0); // PA_CL_GB_VERT_CLIP_ADJ EFLOAT(1.0); // PA_CL_GB_VERT_DISC_ADJ EFLOAT(1.0); // PA_CL_GB_HORZ_CLIP_ADJ EFLOAT(1.0); // PA_CL_GB_HORZ_DISC_ADJ E32(0); // PA_SC_AA_SAMPLE_LOCS_PIXEL_* E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); // PA_SC_AA_SAMPLE_LOCS__PIXEL_* E32(0xFFFFFFFF); // PA_SC_AA_MASK_* E32(0xFFFFFFFF); // PA_SC_AA_MASK_* // CL PACK0(PA_CL_CLIP_CNTL, 8); E32(CLIP_DISABLE_bit); // PA_CL_CLIP_CNTL E32(FACE_bit); // PA_SU_SC_MODE_CNTL E32(VTX_XY_FMT_bit); // PA_CL_VTE_CNTL E32(0); // PA_CL_VS_OUT_CNTL E32(0); // PA_CL_NANINF_CNTL E32(0); // PA_SU_LINE_STIPPLE_CNTL E32(0); // PA_SU_LINE_STIPPLE_SCALE E32(0); // PA_SU_PRIM_FILTER_CNTL // SU PACK0(PA_SU_POLY_OFFSET_DB_FMT_CNTL, 6); E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); /* src = semantic id 0; mask = semantic id 1 */ EREG(SPI_VS_OUT_ID_0, ((0 << SEMANTIC_0_shift) | (1 << SEMANTIC_1_shift))); PACK0(SPI_PS_INPUT_CNTL_0 + (0 << 2), 2); /* SPI_PS_INPUT_CNTL_0 maps to GPR[0] - load with semantic id 0 */ E32(((0 << SEMANTIC_shift) | (0x01 << DEFAULT_VAL_shift))); /* SPI_PS_INPUT_CNTL_1 maps to GPR[1] - load with semantic id 1 */ E32(((1 << SEMANTIC_shift) | (0x01 << DEFAULT_VAL_shift))); PACK0(SPI_INPUT_Z, 13); E32(0); // SPI_INPUT_Z E32(0); // SPI_FOG_CNTL E32(LINEAR_CENTROID_ENA__X_ON_AT_CENTROID << LINEAR_CENTROID_ENA_shift); // SPI_BARYC_CNTL E32(0); // SPI_PS_IN_CONTROL_2 E32(0); E32(0); E32(0); E32(0); E32(0); // SPI_GPR_MGMT E32(0); // SPI_LDS_MGMT E32(0); // SPI_STACK_MGMT E32(0); // SPI_WAVE_MGMT_1 E32(0); // SPI_WAVE_MGMT_2 END_BATCH(); // clear FS fs_conf.bo = accel_state->shaders_bo; evergreen_fs_setup(pScrn, &fs_conf, RADEON_GEM_DOMAIN_VRAM); // VGT BEGIN_BATCH(46); PACK0(VGT_MAX_VTX_INDX, 4); E32(0xffffff); E32(0); E32(0); E32(0); PACK0(VGT_INSTANCE_STEP_RATE_0, 2); E32(0); E32(0); PACK0(VGT_REUSE_OFF, 2); E32(0); E32(0); PACK0(PA_SU_POINT_SIZE, 17); E32(0); // PA_SU_POINT_SIZE E32(0); // PA_SU_POINT_MINMAX E32((8 << PA_SU_LINE_CNTL__WIDTH_shift)); /* Line width 1 pixel */ // PA_SU_LINE_CNTL E32(0); // PA_SC_LINE_STIPPLE E32(0); // VGT_OUTPUT_PATH_CNTL E32(0); // VGT_HOS_CNTL E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); // VGT_GS_MODE EREG(VGT_PRIMITIVEID_EN, 0); EREG(VGT_MULTI_PRIM_IB_RESET_EN, 0); EREG(VGT_SHADER_STAGES_EN, 0); PACK0(VGT_STRMOUT_CONFIG, 2); E32(0); E32(0); END_BATCH(); } xf86-video-ati-7.3.0/src/radeon_exa_shared.c0000664000175000017500000001336512177731114015520 00000000000000/* * Copyright 2005 Eric Anholt * Copyright 2005 Benjamin Herrenschmidt * Copyright 2008 Advanced Micro Devices, 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. * * Authors: * Eric Anholt * Zack Rusin * Benjamin Herrenschmidt * Alex Deucher * Matthias Hopf */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "radeon.h" #include "radeon_probe.h" #include "radeon_version.h" #include "radeon_vbo.h" PixmapPtr RADEONGetDrawablePixmap(DrawablePtr pDrawable) { if (pDrawable->type == DRAWABLE_WINDOW) return pDrawable->pScreen->GetWindowPixmap((WindowPtr)pDrawable); else return (PixmapPtr)pDrawable; } void RADEONVlineHelperClear(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; accel_state->vline_crtc = NULL; accel_state->vline_y1 = -1; accel_state->vline_y2 = 0; } void RADEONVlineHelperSet(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; accel_state->vline_crtc = radeon_pick_best_crtc(pScrn, FALSE, x1, x2, y1, y2); if (accel_state->vline_y1 == -1) accel_state->vline_y1 = y1; if (y1 < accel_state->vline_y1) accel_state->vline_y1 = y1; if (y2 > accel_state->vline_y2) accel_state->vline_y2 = y2; } Bool RADEONValidPM(uint32_t pm, int bpp) { uint8_t r, g, b, a; Bool ret = FALSE; switch (bpp) { case 8: a = pm & 0xff; if ((a == 0) || (a == 0xff)) ret = TRUE; break; case 16: r = (pm >> 11) & 0x1f; g = (pm >> 5) & 0x3f; b = (pm >> 0) & 0x1f; if (((r == 0) || (r == 0x1f)) && ((g == 0) || (g == 0x3f)) && ((b == 0) || (b == 0x1f))) ret = TRUE; break; case 32: a = (pm >> 24) & 0xff; r = (pm >> 16) & 0xff; g = (pm >> 8) & 0xff; b = (pm >> 0) & 0xff; if (((a == 0) || (a == 0xff)) && ((r == 0) || (r == 0xff)) && ((g == 0) || (g == 0xff)) && ((b == 0) || (b == 0xff))) ret = TRUE; break; default: break; } return ret; } Bool RADEONCheckBPP(int bpp) { switch (bpp) { case 8: case 16: case 32: return TRUE; default: break; } return FALSE; } PixmapPtr RADEONSolidPixmap(ScreenPtr pScreen, uint32_t solid) { PixmapPtr pPix = pScreen->CreatePixmap(pScreen, 1, 1, 32, 0); struct radeon_bo *bo; exaMoveInPixmap(pPix); bo = radeon_get_pixmap_bo(pPix); if (radeon_bo_map(bo, 1)) { pScreen->DestroyPixmap(pPix); return NULL; } memcpy(bo->ptr, &solid, 4); radeon_bo_unmap(bo); return pPix; } int radeon_cp_start(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; if (CS_FULL(info->cs)) { radeon_cs_flush_indirect(pScrn); } accel_state->ib_reset_op = info->cs->cdw; accel_state->vbo.vb_start_op = accel_state->vbo.vb_offset; accel_state->cbuf.vb_start_op = accel_state->cbuf.vb_offset; return 0; } void radeon_vb_no_space(ScrnInfoPtr pScrn, struct radeon_vbo_object *vbo, int vert_size) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; if (vbo->vb_bo) { if (vbo->vb_start_op != vbo->vb_offset) { accel_state->finish_op(pScrn, vert_size); accel_state->ib_reset_op = info->cs->cdw; } /* release the current VBO */ radeon_vbo_put(pScrn, vbo); } /* get a new one */ radeon_vbo_get(pScrn, vbo); return; } void radeon_ib_discard(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); int ret; if (info->accel_state->ib_reset_op) { /* if we have data just reset the CS and ignore the operation */ info->cs->cdw = info->accel_state->ib_reset_op; info->accel_state->ib_reset_op = 0; goto out; } info->accel_state->vbo.vb_offset = 0; info->accel_state->vbo.vb_start_op = -1; info->accel_state->cbuf.vb_offset = 0; info->accel_state->cbuf.vb_start_op = -1; if (CS_FULL(info->cs)) { radeon_cs_flush_indirect(pScrn); return; } radeon_cs_erase(info->cs); ret = radeon_cs_space_check_with_bo(info->cs, info->accel_state->vbo.vb_bo, RADEON_GEM_DOMAIN_GTT, 0); if (ret) ErrorF("space check failed in flush\n"); if (info->accel_state->cbuf.vb_bo) { ret = radeon_cs_space_check_with_bo(info->cs, info->accel_state->cbuf.vb_bo, RADEON_GEM_DOMAIN_GTT, 0); if (ret) ErrorF("space check failed in flush\n"); } out: if (info->dri2.enabled) { info->accel_state->XInited3D = FALSE; info->accel_state->engineMode = EXA_ENGINEMODE_UNKNOWN; } } xf86-video-ati-7.3.0/src/radeon_accel.c0000664000175000017500000011712512177731114014463 00000000000000/* * Copyright 2000 ATI Technologies Inc., Markham, Ontario, and * VA Linux Systems Inc., Fremont, California. * * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation on the rights to use, copy, modify, merge, * publish, distribute, 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 * NON-INFRINGEMENT. IN NO EVENT SHALL ATI, VA LINUX SYSTEMS AND/OR * THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* * Authors: * Kevin E. Martin * Rickard E. Faith * Alan Hourihane * * Credits: * * Thanks to Ani Joshi for providing source * code to his Radeon driver. Portions of this file are based on the * initialization code for that driver. * * References: * * !!!! FIXME !!!! * RAGE 128 VR/ RAGE 128 GL Register Reference Manual (Technical * Reference Manual P/N RRG-G04100-C Rev. 0.04), ATI Technologies: April * 1999. * * RAGE 128 Software Development Manual (Technical Reference Manual P/N * SDK-G04000 Rev. 0.01), ATI Technologies: June 1999. * * Notes on unimplemented XAA optimizations: * * SetClipping: This has been removed as XAA expects 16bit registers * for full clipping. * TwoPointLine: The Radeon supports this. Not Bresenham. * DashedLine with non-power-of-two pattern length: Apparently, there is * no way to set the length of the pattern -- it is always * assumed to be 8 or 32 (or 1024?). * ScreenToScreenColorExpandFill: See p. 4-17 of the Technical Reference * Manual where it states that monochrome expansion of frame * buffer data is not supported. * CPUToScreenColorExpandFill, direct: The implementation here uses a hybrid * direct/indirect method. If we had more data registers, * then we could do better. If XAA supported a trigger write * address, the code would be simpler. * Color8x8PatternFill: Apparently, an 8x8 color brush cannot take an 8x8 * pattern from frame buffer memory. * ImageWrites: Same as CPUToScreenColorExpandFill * */ #include #include #include /* Driver data structures */ #include "radeon.h" #include "radeon_reg.h" #include "r600_reg.h" #include "radeon_probe.h" #include "radeon_version.h" #include "ati_pciids_gen.h" /* Line support */ #include "miline.h" /* X and server generic header files */ #include "xf86.h" static int RADEONDRMGetNumPipes(ScrnInfoPtr pScrn, int *num_pipes) { RADEONInfoPtr info = RADEONPTR(pScrn); struct drm_radeon_info np2; np2.value = (unsigned long)num_pipes; np2.request = RADEON_INFO_NUM_GB_PIPES; return drmCommandWriteRead(info->dri2.drm_fd, DRM_RADEON_INFO, &np2, sizeof(np2)); } /* Initialize the acceleration hardware */ void RADEONEngineInit(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); info->accel_state->num_gb_pipes = 0; if (info->directRenderingEnabled && (IS_R300_3D || IS_R500_3D)) { int num_pipes; if(RADEONDRMGetNumPipes(pScrn, &num_pipes) < 0) { xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Failed to determine num pipes from DRM, falling back to " "manual look-up!\n"); info->accel_state->num_gb_pipes = 0; } else { info->accel_state->num_gb_pipes = num_pipes; } } } int radeon_cs_space_remaining(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); return (info->cs->ndw - info->cs->cdw); } void RADEONCopySwap(uint8_t *dst, uint8_t *src, unsigned int size, int swap) { switch(swap) { case RADEON_HOST_DATA_SWAP_HDW: { unsigned int *d = (unsigned int *)dst; unsigned int *s = (unsigned int *)src; unsigned int nwords = size >> 2; for (; nwords > 0; --nwords, ++d, ++s) *d = ((*s & 0xffff) << 16) | ((*s >> 16) & 0xffff); return; } case RADEON_HOST_DATA_SWAP_32BIT: { unsigned int *d = (unsigned int *)dst; unsigned int *s = (unsigned int *)src; unsigned int nwords = size >> 2; for (; nwords > 0; --nwords, ++d, ++s) #ifdef __powerpc__ asm volatile("stwbrx %0,0,%1" : : "r" (*s), "r" (d)); #else *d = ((*s >> 24) & 0xff) | ((*s >> 8) & 0xff00) | ((*s & 0xff00) << 8) | ((*s & 0xff) << 24); #endif return; } case RADEON_HOST_DATA_SWAP_16BIT: { unsigned short *d = (unsigned short *)dst; unsigned short *s = (unsigned short *)src; unsigned int nwords = size >> 1; for (; nwords > 0; --nwords, ++d, ++s) #ifdef __powerpc__ asm volatile("sthbrx %0,0,%1" : : "r" (*s), "r" (d)); #else *d = (*s >> 8) | (*s << 8); #endif return; } } if (src != dst) memcpy(dst, src, size); } Bool RADEONAccelInit(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); if (info->directRenderingEnabled) { if (info->use_glamor) { if (!radeon_glamor_init(pScreen)) { info->use_glamor = FALSE; return FALSE; } } else if (info->ChipFamily >= CHIP_FAMILY_CEDAR) { if (!EVERGREENDrawInit(pScreen)) return FALSE; } else if (info->ChipFamily >= CHIP_FAMILY_R600) { if (!R600DrawInit(pScreen)) return FALSE; } else { if (!RADEONDrawInit(pScreen)) return FALSE; } } return TRUE; } static void RADEONInit3DEngineInternal(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); uint32_t gb_tile_config, vap_cntl; info->accel_state->texW[0] = info->accel_state->texH[0] = info->accel_state->texW[1] = info->accel_state->texH[1] = 1; if (IS_R300_3D || IS_R500_3D) { gb_tile_config = (R300_ENABLE_TILING | R300_TILE_SIZE_16); switch(info->accel_state->num_gb_pipes) { case 2: gb_tile_config |= R300_PIPE_COUNT_R300; break; case 3: gb_tile_config |= R300_PIPE_COUNT_R420_3P; break; case 4: gb_tile_config |= R300_PIPE_COUNT_R420; break; default: case 1: gb_tile_config |= R300_PIPE_COUNT_RV350; break; } BEGIN_RING(2*3); OUT_RING_REG(R300_RB3D_DSTCACHE_CTLSTAT, R300_DC_FLUSH_3D | R300_DC_FREE_3D); OUT_RING_REG(R300_RB3D_ZCACHE_CTLSTAT, R300_ZC_FLUSH | R300_ZC_FREE); OUT_RING_REG(RADEON_WAIT_UNTIL, RADEON_WAIT_2D_IDLECLEAN | RADEON_WAIT_3D_IDLECLEAN); ADVANCE_RING(); BEGIN_RING(2*3); OUT_RING_REG(R300_GB_AA_CONFIG, 0); OUT_RING_REG(R300_RB3D_DSTCACHE_CTLSTAT, R300_DC_FLUSH_3D | R300_DC_FREE_3D); OUT_RING_REG(R300_RB3D_ZCACHE_CTLSTAT, R300_ZC_FLUSH | R300_ZC_FREE); ADVANCE_RING(); BEGIN_RING(2*4); OUT_RING_REG(R300_GA_POLY_MODE, R300_FRONT_PTYPE_TRIANGE | R300_BACK_PTYPE_TRIANGE); OUT_RING_REG(R300_GA_ROUND_MODE, (R300_GEOMETRY_ROUND_NEAREST | R300_COLOR_ROUND_NEAREST)); OUT_RING_REG(R300_GA_COLOR_CONTROL, (R300_RGB0_SHADING_GOURAUD | R300_ALPHA0_SHADING_GOURAUD | R300_RGB1_SHADING_GOURAUD | R300_ALPHA1_SHADING_GOURAUD | R300_RGB2_SHADING_GOURAUD | R300_ALPHA2_SHADING_GOURAUD | R300_RGB3_SHADING_GOURAUD | R300_ALPHA3_SHADING_GOURAUD)); OUT_RING_REG(R300_GA_OFFSET, 0); ADVANCE_RING(); BEGIN_RING(2*5); OUT_RING_REG(R300_SU_TEX_WRAP, 0); OUT_RING_REG(R300_SU_POLY_OFFSET_ENABLE, 0); OUT_RING_REG(R300_SU_CULL_MODE, R300_FACE_NEG); OUT_RING_REG(R300_SU_DEPTH_SCALE, 0x4b7fffff); OUT_RING_REG(R300_SU_DEPTH_OFFSET, 0); ADVANCE_RING(); /* setup the VAP */ if (info->accel_state->has_tcl) vap_cntl = ((5 << R300_PVS_NUM_SLOTS_SHIFT) | (5 << R300_PVS_NUM_CNTLRS_SHIFT) | (9 << R300_VF_MAX_VTX_NUM_SHIFT)); else vap_cntl = ((10 << R300_PVS_NUM_SLOTS_SHIFT) | (5 << R300_PVS_NUM_CNTLRS_SHIFT) | (5 << R300_VF_MAX_VTX_NUM_SHIFT)); if ((info->ChipFamily == CHIP_FAMILY_R300) || (info->ChipFamily == CHIP_FAMILY_R350)) vap_cntl |= (4 << R300_PVS_NUM_FPUS_SHIFT); else if (info->ChipFamily == CHIP_FAMILY_RV530) vap_cntl |= (5 << R300_PVS_NUM_FPUS_SHIFT); else if ((info->ChipFamily == CHIP_FAMILY_RV410) || (info->ChipFamily == CHIP_FAMILY_R420)) vap_cntl |= (6 << R300_PVS_NUM_FPUS_SHIFT); else if ((info->ChipFamily == CHIP_FAMILY_R520) || (info->ChipFamily == CHIP_FAMILY_R580) || (info->ChipFamily == CHIP_FAMILY_RV560) || (info->ChipFamily == CHIP_FAMILY_RV570)) vap_cntl |= (8 << R300_PVS_NUM_FPUS_SHIFT); else vap_cntl |= (2 << R300_PVS_NUM_FPUS_SHIFT); if (info->accel_state->has_tcl) BEGIN_RING(2*15); else BEGIN_RING(2*9); OUT_RING_REG(R300_VAP_VTX_STATE_CNTL, 0); OUT_RING_REG(R300_VAP_PVS_STATE_FLUSH_REG, 0); if (info->accel_state->has_tcl) OUT_RING_REG(R300_VAP_CNTL_STATUS, 0); else OUT_RING_REG(R300_VAP_CNTL_STATUS, R300_PVS_BYPASS); OUT_RING_REG(R300_VAP_CNTL, vap_cntl); OUT_RING_REG(R300_VAP_PVS_STATE_FLUSH_REG, 0); OUT_RING_REG(R300_VAP_VTE_CNTL, R300_VTX_XY_FMT | R300_VTX_Z_FMT); OUT_RING_REG(R300_VAP_PSC_SGN_NORM_CNTL, 0); OUT_RING_REG(R300_VAP_PROG_STREAM_CNTL_EXT_0, ((R300_SWIZZLE_SELECT_X << R300_SWIZZLE_SELECT_X_0_SHIFT) | (R300_SWIZZLE_SELECT_Y << R300_SWIZZLE_SELECT_Y_0_SHIFT) | (R300_SWIZZLE_SELECT_Z << R300_SWIZZLE_SELECT_Z_0_SHIFT) | (R300_SWIZZLE_SELECT_W << R300_SWIZZLE_SELECT_W_0_SHIFT) | ((R300_WRITE_ENA_X | R300_WRITE_ENA_Y | R300_WRITE_ENA_Z | R300_WRITE_ENA_W) << R300_WRITE_ENA_0_SHIFT) | (R300_SWIZZLE_SELECT_X << R300_SWIZZLE_SELECT_X_1_SHIFT) | (R300_SWIZZLE_SELECT_Y << R300_SWIZZLE_SELECT_Y_1_SHIFT) | (R300_SWIZZLE_SELECT_Z << R300_SWIZZLE_SELECT_Z_1_SHIFT) | (R300_SWIZZLE_SELECT_W << R300_SWIZZLE_SELECT_W_1_SHIFT) | ((R300_WRITE_ENA_X | R300_WRITE_ENA_Y | R300_WRITE_ENA_Z | R300_WRITE_ENA_W) << R300_WRITE_ENA_1_SHIFT))); OUT_RING_REG(R300_VAP_PROG_STREAM_CNTL_EXT_1, ((R300_SWIZZLE_SELECT_X << R300_SWIZZLE_SELECT_X_2_SHIFT) | (R300_SWIZZLE_SELECT_Y << R300_SWIZZLE_SELECT_Y_2_SHIFT) | (R300_SWIZZLE_SELECT_Z << R300_SWIZZLE_SELECT_Z_2_SHIFT) | (R300_SWIZZLE_SELECT_W << R300_SWIZZLE_SELECT_W_2_SHIFT) | ((R300_WRITE_ENA_X | R300_WRITE_ENA_Y | R300_WRITE_ENA_Z | R300_WRITE_ENA_W) << R300_WRITE_ENA_2_SHIFT))); if (info->accel_state->has_tcl) { OUT_RING_REG(R300_VAP_PVS_FLOW_CNTL_OPC, 0); OUT_RING_REG(R300_VAP_GB_VERT_CLIP_ADJ, 0x3f800000); OUT_RING_REG(R300_VAP_GB_VERT_DISC_ADJ, 0x3f800000); OUT_RING_REG(R300_VAP_GB_HORZ_CLIP_ADJ, 0x3f800000); OUT_RING_REG(R300_VAP_GB_HORZ_DISC_ADJ, 0x3f800000); OUT_RING_REG(R300_VAP_CLIP_CNTL, R300_CLIP_DISABLE); } ADVANCE_RING(); /* pre-load the vertex shaders */ if (info->accel_state->has_tcl) { BEGIN_RING(2*37); /* exa composite shader program */ OUT_RING_REG(R300_VAP_PVS_VECTOR_INDX_REG, R300_PVS_VECTOR_INST_INDEX(0)); /* PVS inst 0 - dst X,Y */ OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_DST_OPCODE(R300_VE_ADD) | R300_PVS_DST_REG_TYPE(R300_PVS_DST_REG_OUT) | R300_PVS_DST_OFFSET(0) | R300_PVS_DST_WE_X | R300_PVS_DST_WE_Y | R300_PVS_DST_WE_Z | R300_PVS_DST_WE_W)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(0) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_X) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_Y) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_1))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(0) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(0) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); /* PVS inst 1 - src X */ OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_DST_OPCODE(R300_VE_DOT_PRODUCT) | R300_PVS_DST_REG_TYPE(R300_PVS_DST_REG_TEMPORARY) | R300_PVS_DST_OFFSET(0) | R300_PVS_DST_WE_X)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(6) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_X) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_Y) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_1) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_CONSTANT) | R300_PVS_SRC_OFFSET(0) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_X) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_Y) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_Z) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(6) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); /* PVS inst 2 - src Y */ OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_DST_OPCODE(R300_VE_DOT_PRODUCT) | R300_PVS_DST_REG_TYPE(R300_PVS_DST_REG_TEMPORARY) | R300_PVS_DST_OFFSET(0) | R300_PVS_DST_WE_Y)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(6) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_X) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_Y) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_1) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_CONSTANT) | R300_PVS_SRC_OFFSET(1) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_X) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_Y) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_Z) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(6) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); /* PVS inst 3 - src X / w */ OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_DST_OPCODE(R300_VE_MULTIPLY) | R300_PVS_DST_REG_TYPE(R300_PVS_DST_REG_OUT) | R300_PVS_DST_OFFSET(1) | R300_PVS_DST_WE_X)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_TEMPORARY) | R300_PVS_SRC_OFFSET(0) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_X) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_CONSTANT) | R300_PVS_SRC_OFFSET(0) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_W) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(6) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); /* PVS inst 4 - src y / h */ OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_DST_OPCODE(R300_VE_MULTIPLY) | R300_PVS_DST_REG_TYPE(R300_PVS_DST_REG_OUT) | R300_PVS_DST_OFFSET(1) | R300_PVS_DST_WE_Y)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_TEMPORARY) | R300_PVS_SRC_OFFSET(0) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_Y) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_CONSTANT) | R300_PVS_SRC_OFFSET(1) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_W) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(6) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); /* PVS inst 5 - mask X */ OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_DST_OPCODE(R300_VE_DOT_PRODUCT) | R300_PVS_DST_REG_TYPE(R300_PVS_DST_REG_TEMPORARY) | R300_PVS_DST_OFFSET(0) | R300_PVS_DST_WE_Z)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(7) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_X) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_Y) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_1) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_CONSTANT) | R300_PVS_SRC_OFFSET(2) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_X) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_Y) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_Z) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(7) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); /* PVS inst 6 - mask Y */ OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_DST_OPCODE(R300_VE_DOT_PRODUCT) | R300_PVS_DST_REG_TYPE(R300_PVS_DST_REG_TEMPORARY) | R300_PVS_DST_OFFSET(0) | R300_PVS_DST_WE_W)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(7) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_X) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_Y) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_1) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_CONSTANT) | R300_PVS_SRC_OFFSET(3) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_X) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_Y) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_Z) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(7) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); /* PVS inst 7 - mask X / w */ OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_DST_OPCODE(R300_VE_MULTIPLY) | R300_PVS_DST_REG_TYPE(R300_PVS_DST_REG_OUT) | R300_PVS_DST_OFFSET(2) | R300_PVS_DST_WE_X)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_TEMPORARY) | R300_PVS_SRC_OFFSET(0) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_Z) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_CONSTANT) | R300_PVS_SRC_OFFSET(2) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_W) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(6) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); /* PVS inst 8 - mask y / h */ OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_DST_OPCODE(R300_VE_MULTIPLY) | R300_PVS_DST_REG_TYPE(R300_PVS_DST_REG_OUT) | R300_PVS_DST_OFFSET(2) | R300_PVS_DST_WE_Y)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_TEMPORARY) | R300_PVS_SRC_OFFSET(0) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_W) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_CONSTANT) | R300_PVS_SRC_OFFSET(3) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_W) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(6) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); ADVANCE_RING(); /* Xv shader program */ BEGIN_RING(2*9); OUT_RING_REG(R300_VAP_PVS_VECTOR_INDX_REG, R300_PVS_VECTOR_INST_INDEX(9)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_DST_OPCODE(R300_VE_ADD) | R300_PVS_DST_REG_TYPE(R300_PVS_DST_REG_OUT) | R300_PVS_DST_OFFSET(0) | R300_PVS_DST_WE_X | R300_PVS_DST_WE_Y | R300_PVS_DST_WE_Z | R300_PVS_DST_WE_W)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(0) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_X) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_Y) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_1))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(0) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(0) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_DST_OPCODE(R300_VE_ADD) | R300_PVS_DST_REG_TYPE(R300_PVS_DST_REG_OUT) | R300_PVS_DST_OFFSET(1) | R300_PVS_DST_WE_X | R300_PVS_DST_WE_Y)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(6) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_X) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_Y) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_1))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(6) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(6) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); ADVANCE_RING(); /* Xv bicubic shader program */ BEGIN_RING(2*13); OUT_RING_REG(R300_VAP_PVS_VECTOR_INDX_REG, R300_PVS_VECTOR_INST_INDEX(11)); /* PVS inst 0 */ OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_DST_OPCODE(R300_VE_ADD) | R300_PVS_DST_REG_TYPE(R300_PVS_DST_REG_OUT) | R300_PVS_DST_OFFSET(0) | R300_PVS_DST_WE_X | R300_PVS_DST_WE_Y | R300_PVS_DST_WE_Z | R300_PVS_DST_WE_W)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(0) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_X) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_Y) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_1))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(0) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(0) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); /* PVS inst 1 */ OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_DST_OPCODE(R300_VE_ADD) | R300_PVS_DST_REG_TYPE(R300_PVS_DST_REG_OUT) | R300_PVS_DST_OFFSET(1) | R300_PVS_DST_WE_X | R300_PVS_DST_WE_Y | R300_PVS_DST_WE_Z | R300_PVS_DST_WE_W)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(6) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_X) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_Y) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_1))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(6) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(6) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); /* PVS inst 2 */ OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_DST_OPCODE(R300_VE_ADD) | R300_PVS_DST_REG_TYPE(R300_PVS_DST_REG_OUT) | R300_PVS_DST_OFFSET(2) | R300_PVS_DST_WE_X | R300_PVS_DST_WE_Y | R300_PVS_DST_WE_Z | R300_PVS_DST_WE_W)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(7) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_X) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_Y) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_1))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(7) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, (R300_PVS_SRC_REG_TYPE(R300_PVS_SRC_REG_INPUT) | R300_PVS_SRC_OFFSET(7) | R300_PVS_SRC_SWIZZLE_X(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Y(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_Z(R300_PVS_SRC_SELECT_FORCE_0) | R300_PVS_SRC_SWIZZLE_W(R300_PVS_SRC_SELECT_FORCE_0))); ADVANCE_RING(); } /* pre-load the RS instructions */ BEGIN_RING(2*4); if (IS_R300_3D) { /* rasterizer source table * R300_RS_TEX_PTR is the offset into the input RS stream * 0,1 are tex0 * 2,3 are tex1 */ OUT_RING_REG(R300_RS_IP_0, (R300_RS_TEX_PTR(0) | R300_RS_SEL_S(R300_RS_SEL_C0) | R300_RS_SEL_T(R300_RS_SEL_C1) | R300_RS_SEL_R(R300_RS_SEL_K0) | R300_RS_SEL_Q(R300_RS_SEL_K1))); OUT_RING_REG(R300_RS_IP_1, (R300_RS_TEX_PTR(2) | R300_RS_SEL_S(R300_RS_SEL_C0) | R300_RS_SEL_T(R300_RS_SEL_C1) | R300_RS_SEL_R(R300_RS_SEL_K0) | R300_RS_SEL_Q(R300_RS_SEL_K1))); /* src tex */ /* R300_INST_TEX_ID - select the RS source table entry * R300_INST_TEX_ADDR - the FS temp register for the texture data */ OUT_RING_REG(R300_RS_INST_0, (R300_INST_TEX_ID(0) | R300_RS_INST_TEX_CN_WRITE | R300_INST_TEX_ADDR(0))); /* mask tex */ OUT_RING_REG(R300_RS_INST_1, (R300_INST_TEX_ID(1) | R300_RS_INST_TEX_CN_WRITE | R300_INST_TEX_ADDR(1))); } else { /* rasterizer source table * R300_RS_TEX_PTR is the offset into the input RS stream * 0,1 are tex0 * 2,3 are tex1 */ OUT_RING_REG(R500_RS_IP_0, ((0 << R500_RS_IP_TEX_PTR_S_SHIFT) | (1 << R500_RS_IP_TEX_PTR_T_SHIFT) | (R500_RS_IP_PTR_K0 << R500_RS_IP_TEX_PTR_R_SHIFT) | (R500_RS_IP_PTR_K1 << R500_RS_IP_TEX_PTR_Q_SHIFT))); OUT_RING_REG(R500_RS_IP_1, ((2 << R500_RS_IP_TEX_PTR_S_SHIFT) | (3 << R500_RS_IP_TEX_PTR_T_SHIFT) | (R500_RS_IP_PTR_K0 << R500_RS_IP_TEX_PTR_R_SHIFT) | (R500_RS_IP_PTR_K1 << R500_RS_IP_TEX_PTR_Q_SHIFT))); /* src tex */ /* R500_RS_INST_TEX_ID_SHIFT - select the RS source table entry * R500_RS_INST_TEX_ADDR_SHIFT - the FS temp register for the texture data */ OUT_RING_REG(R500_RS_INST_0, ((0 << R500_RS_INST_TEX_ID_SHIFT) | R500_RS_INST_TEX_CN_WRITE | (0 << R500_RS_INST_TEX_ADDR_SHIFT))); /* mask tex */ OUT_RING_REG(R500_RS_INST_1, ((1 << R500_RS_INST_TEX_ID_SHIFT) | R500_RS_INST_TEX_CN_WRITE | (1 << R500_RS_INST_TEX_ADDR_SHIFT))); } ADVANCE_RING(); if (IS_R300_3D) BEGIN_RING(2*4); else { BEGIN_RING(2*6); OUT_RING_REG(R300_US_CONFIG, R500_ZERO_TIMES_ANYTHING_EQUALS_ZERO); OUT_RING_REG(R500_US_FC_CTRL, 0); } OUT_RING_REG(R300_US_W_FMT, 0); OUT_RING_REG(R300_US_OUT_FMT_1, (R300_OUT_FMT_UNUSED | R300_OUT_FMT_C0_SEL_BLUE | R300_OUT_FMT_C1_SEL_GREEN | R300_OUT_FMT_C2_SEL_RED | R300_OUT_FMT_C3_SEL_ALPHA)); OUT_RING_REG(R300_US_OUT_FMT_2, (R300_OUT_FMT_UNUSED | R300_OUT_FMT_C0_SEL_BLUE | R300_OUT_FMT_C1_SEL_GREEN | R300_OUT_FMT_C2_SEL_RED | R300_OUT_FMT_C3_SEL_ALPHA)); OUT_RING_REG(R300_US_OUT_FMT_3, (R300_OUT_FMT_UNUSED | R300_OUT_FMT_C0_SEL_BLUE | R300_OUT_FMT_C1_SEL_GREEN | R300_OUT_FMT_C2_SEL_RED | R300_OUT_FMT_C3_SEL_ALPHA)); ADVANCE_RING(); BEGIN_RING(2*3); OUT_RING_REG(R300_FG_DEPTH_SRC, 0); OUT_RING_REG(R300_FG_FOG_BLEND, 0); OUT_RING_REG(R300_FG_ALPHA_FUNC, 0); ADVANCE_RING(); BEGIN_RING(2*13); OUT_RING_REG(R300_RB3D_ABLENDCNTL, 0); OUT_RING_REG(R300_RB3D_ZSTENCILCNTL, 0); OUT_RING_REG(R300_RB3D_ZCACHE_CTLSTAT, R300_ZC_FLUSH | R300_ZC_FREE); OUT_RING_REG(R300_RB3D_BW_CNTL, 0); OUT_RING_REG(R300_RB3D_ZCNTL, 0); OUT_RING_REG(R300_RB3D_ZTOP, 0); OUT_RING_REG(R300_RB3D_ROPCNTL, 0); OUT_RING_REG(R300_RB3D_AARESOLVE_CTL, 0); OUT_RING_REG(R300_RB3D_COLOR_CHANNEL_MASK, (R300_BLUE_MASK_EN | R300_GREEN_MASK_EN | R300_RED_MASK_EN | R300_ALPHA_MASK_EN)); OUT_RING_REG(R300_RB3D_DSTCACHE_CTLSTAT, R300_DC_FLUSH_3D | R300_DC_FREE_3D); OUT_RING_REG(R300_RB3D_CCTL, 0); OUT_RING_REG(R300_RB3D_DITHER_CTL, 0); OUT_RING_REG(R300_RB3D_DSTCACHE_CTLSTAT, R300_DC_FLUSH_3D | R300_DC_FREE_3D); ADVANCE_RING(); BEGIN_RING(2*5); OUT_RING_REG(R300_SC_EDGERULE, 0xA5294A5); if (IS_R300_3D) { /* clip has offset 1440 */ OUT_RING_REG(R300_SC_CLIP_0_A, ((1440 << R300_CLIP_X_SHIFT) | (1440 << R300_CLIP_Y_SHIFT))); OUT_RING_REG(R300_SC_CLIP_0_B, ((4080 << R300_CLIP_X_SHIFT) | (4080 << R300_CLIP_Y_SHIFT))); } else { OUT_RING_REG(R300_SC_CLIP_0_A, ((0 << R300_CLIP_X_SHIFT) | (0 << R300_CLIP_Y_SHIFT))); OUT_RING_REG(R300_SC_CLIP_0_B, ((4080 << R300_CLIP_X_SHIFT) | (4080 << R300_CLIP_Y_SHIFT))); } OUT_RING_REG(R300_SC_CLIP_RULE, 0xAAAA); OUT_RING_REG(R300_SC_SCREENDOOR, 0xffffff); ADVANCE_RING(); } else if (IS_R200_3D) { BEGIN_RING(2*6); if (info->ChipFamily == CHIP_FAMILY_RS300) { OUT_RING_REG(R200_SE_VAP_CNTL_STATUS, RADEON_TCL_BYPASS); } else { OUT_RING_REG(R200_SE_VAP_CNTL_STATUS, 0); } OUT_RING_REG(R200_PP_CNTL_X, 0); OUT_RING_REG(R200_PP_TXMULTI_CTL_0, 0); OUT_RING_REG(R200_SE_VTX_STATE_CNTL, 0); OUT_RING_REG(R200_SE_VTE_CNTL, 0); OUT_RING_REG(R200_SE_VAP_CNTL, R200_VAP_FORCE_W_TO_ONE | R200_VAP_VF_MAX_VTX_NUM); ADVANCE_RING(); BEGIN_RING(2*4); OUT_RING_REG(R200_RE_AUX_SCISSOR_CNTL, 0); OUT_RING_REG(R200_RE_CNTL, 0); OUT_RING_REG(RADEON_RB3D_PLANEMASK, 0xffffffff); OUT_RING_REG(RADEON_SE_CNTL, (RADEON_DIFFUSE_SHADE_GOURAUD | RADEON_BFACE_SOLID | RADEON_FFACE_SOLID | RADEON_VTX_PIX_CENTER_OGL | RADEON_ROUND_MODE_ROUND | RADEON_ROUND_PREC_4TH_PIX)); ADVANCE_RING(); } else { BEGIN_RING(2*2); if ((info->ChipFamily == CHIP_FAMILY_RADEON) || (info->ChipFamily == CHIP_FAMILY_RV200)) OUT_RING_REG(RADEON_SE_CNTL_STATUS, 0); else OUT_RING_REG(RADEON_SE_CNTL_STATUS, RADEON_TCL_BYPASS); OUT_RING_REG(RADEON_SE_COORD_FMT, RADEON_VTX_XY_PRE_MULT_1_OVER_W0 | RADEON_VTX_ST0_PRE_MULT_1_OVER_W0 | RADEON_VTX_ST1_PRE_MULT_1_OVER_W0 | RADEON_TEX1_W_ROUTING_USE_W0); ADVANCE_RING(); BEGIN_RING(2*2); OUT_RING_REG(RADEON_RB3D_PLANEMASK, 0xffffffff); OUT_RING_REG(RADEON_SE_CNTL, (RADEON_DIFFUSE_SHADE_GOURAUD | RADEON_BFACE_SOLID | RADEON_FFACE_SOLID | RADEON_VTX_PIX_CENTER_OGL | RADEON_ROUND_MODE_ROUND | RADEON_ROUND_PREC_4TH_PIX)); ADVANCE_RING(); } } /* inserts a wait for vline in the command stream */ void RADEONWaitForVLine(ScrnInfoPtr pScrn, PixmapPtr pPix, xf86CrtcPtr crtc, int start, int stop) { RADEONInfoPtr info = RADEONPTR(pScrn); drmmode_crtc_private_ptr drmmode_crtc; if (!crtc) return; if (!crtc->enabled) return; if (pPix != pScrn->pScreen->GetScreenPixmap(pScrn->pScreen)) return; start = max(start, crtc->y); stop = min(stop, crtc->y + crtc->mode.VDisplay); if (start >= stop) return; if (!IS_AVIVO_VARIANT) { /* on pre-r5xx vline starts at CRTC scanout */ start -= crtc->y; stop -= crtc->y; } drmmode_crtc = crtc->driver_private; BEGIN_RING(2*3); if (IS_AVIVO_VARIANT) { OUT_RING_REG(AVIVO_D1MODE_VLINE_START_END, /* this is just a marker */ ((start << AVIVO_D1MODE_VLINE_START_SHIFT) | (stop << AVIVO_D1MODE_VLINE_END_SHIFT) | AVIVO_D1MODE_VLINE_INV)); } else { OUT_RING_REG(RADEON_CRTC_GUI_TRIG_VLINE, /* another placeholder */ ((start << RADEON_CRTC_GUI_TRIG_VLINE_START_SHIFT) | (stop << RADEON_CRTC_GUI_TRIG_VLINE_END_SHIFT) | RADEON_CRTC_GUI_TRIG_VLINE_INV | RADEON_CRTC_GUI_TRIG_VLINE_STALL)); } OUT_RING_REG(RADEON_WAIT_UNTIL, (RADEON_WAIT_CRTC_VLINE | RADEON_ENG_DISPLAY_SELECT_CRTC0)); OUT_RING(CP_PACKET3(RADEON_CP_PACKET3_NOP, 0)); OUT_RING(drmmode_crtc->mode_crtc->crtc_id); ADVANCE_RING(); } void RADEONInit3DEngine(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR (pScrn); if (info->directRenderingEnabled) { RADEONInit3DEngineInternal(pScrn); } info->accel_state->XInited3D = TRUE; } xf86-video-ati-7.3.0/src/radeon_chipinfo_gen.h0000644000175000017500000007626712256365422016065 00000000000000/* This file is autogenerated please do not edit */ static RADEONCardInfo RADEONCards[] = { { 0x3150, CHIP_FAMILY_RV380, 1, 0, 0, 0, 0 }, { 0x3151, CHIP_FAMILY_RV380, 0, 0, 0, 0, 0 }, { 0x3152, CHIP_FAMILY_RV380, 1, 0, 0, 0, 0 }, { 0x3154, CHIP_FAMILY_RV380, 1, 0, 0, 0, 0 }, { 0x3155, CHIP_FAMILY_RV380, 1, 0, 0, 0, 0 }, { 0x3E50, CHIP_FAMILY_RV380, 0, 0, 0, 0, 0 }, { 0x3E54, CHIP_FAMILY_RV380, 0, 0, 0, 0, 0 }, { 0x4136, CHIP_FAMILY_RS100, 0, 1, 0, 0, 1 }, { 0x4137, CHIP_FAMILY_RS200, 0, 1, 0, 0, 1 }, { 0x4144, CHIP_FAMILY_R300, 0, 0, 0, 0, 0 }, { 0x4145, CHIP_FAMILY_R300, 0, 0, 0, 0, 0 }, { 0x4146, CHIP_FAMILY_R300, 0, 0, 0, 0, 0 }, { 0x4147, CHIP_FAMILY_R300, 0, 0, 0, 0, 0 }, { 0x4148, CHIP_FAMILY_R350, 0, 0, 0, 0, 0 }, { 0x4149, CHIP_FAMILY_R350, 0, 0, 0, 0, 0 }, { 0x414A, CHIP_FAMILY_R350, 0, 0, 0, 0, 0 }, { 0x414B, CHIP_FAMILY_R350, 0, 0, 0, 0, 0 }, { 0x4150, CHIP_FAMILY_RV350, 0, 0, 0, 0, 0 }, { 0x4151, CHIP_FAMILY_RV350, 0, 0, 0, 0, 0 }, { 0x4152, CHIP_FAMILY_RV350, 0, 0, 0, 0, 0 }, { 0x4153, CHIP_FAMILY_RV350, 0, 0, 0, 0, 0 }, { 0x4154, CHIP_FAMILY_RV350, 0, 0, 0, 0, 0 }, { 0x4155, CHIP_FAMILY_RV350, 0, 0, 0, 0, 0 }, { 0x4156, CHIP_FAMILY_RV350, 0, 0, 0, 0, 0 }, { 0x4237, CHIP_FAMILY_RS200, 0, 1, 0, 0, 1 }, { 0x4242, CHIP_FAMILY_R200, 0, 0, 0, 1, 0 }, { 0x4336, CHIP_FAMILY_RS100, 1, 1, 0, 0, 1 }, { 0x4337, CHIP_FAMILY_RS200, 1, 1, 0, 0, 1 }, { 0x4437, CHIP_FAMILY_RS200, 1, 1, 0, 0, 1 }, { 0x4966, CHIP_FAMILY_RV250, 0, 0, 0, 0, 0 }, { 0x4967, CHIP_FAMILY_RV250, 0, 0, 0, 0, 0 }, { 0x4A48, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x4A49, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x4A4A, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x4A4B, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x4A4C, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x4A4D, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x4A4E, CHIP_FAMILY_R420, 1, 0, 0, 0, 0 }, { 0x4A4F, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x4A50, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x4A54, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x4B48, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x4B49, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x4B4A, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x4B4B, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x4B4C, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x4C57, CHIP_FAMILY_RV200, 1, 0, 0, 0, 0 }, { 0x4C58, CHIP_FAMILY_RV200, 1, 0, 0, 0, 0 }, { 0x4C59, CHIP_FAMILY_RV100, 1, 0, 0, 0, 0 }, { 0x4C5A, CHIP_FAMILY_RV100, 1, 0, 0, 0, 0 }, { 0x4C64, CHIP_FAMILY_RV250, 1, 0, 0, 0, 0 }, { 0x4C66, CHIP_FAMILY_RV250, 1, 0, 0, 0, 0 }, { 0x4C67, CHIP_FAMILY_RV250, 1, 0, 0, 0, 0 }, { 0x4C6E, CHIP_FAMILY_RV280, 1, 0, 0, 0, 0 }, { 0x4E44, CHIP_FAMILY_R300, 0, 0, 0, 0, 0 }, { 0x4E45, CHIP_FAMILY_R300, 0, 0, 0, 0, 0 }, { 0x4E46, CHIP_FAMILY_R300, 0, 0, 0, 0, 0 }, { 0x4E47, CHIP_FAMILY_R300, 0, 0, 0, 0, 0 }, { 0x4E48, CHIP_FAMILY_R350, 0, 0, 0, 0, 0 }, { 0x4E49, CHIP_FAMILY_R350, 0, 0, 0, 0, 0 }, { 0x4E4A, CHIP_FAMILY_R350, 0, 0, 0, 0, 0 }, { 0x4E4B, CHIP_FAMILY_R350, 0, 0, 0, 0, 0 }, { 0x4E50, CHIP_FAMILY_RV350, 1, 0, 0, 0, 0 }, { 0x4E51, CHIP_FAMILY_RV350, 1, 0, 0, 0, 0 }, { 0x4E52, CHIP_FAMILY_RV350, 1, 0, 0, 0, 0 }, { 0x4E53, CHIP_FAMILY_RV350, 1, 0, 0, 0, 0 }, { 0x4E54, CHIP_FAMILY_RV350, 1, 0, 0, 0, 0 }, { 0x4E56, CHIP_FAMILY_RV350, 1, 0, 0, 0, 0 }, { 0x5144, CHIP_FAMILY_RADEON, 0, 0, 1, 1, 0 }, { 0x5145, CHIP_FAMILY_RADEON, 0, 0, 1, 1, 0 }, { 0x5146, CHIP_FAMILY_RADEON, 0, 0, 1, 1, 0 }, { 0x5147, CHIP_FAMILY_RADEON, 0, 0, 1, 1, 0 }, { 0x5148, CHIP_FAMILY_R200, 0, 0, 0, 1, 0 }, { 0x514C, CHIP_FAMILY_R200, 0, 0, 0, 1, 0 }, { 0x514D, CHIP_FAMILY_R200, 0, 0, 0, 1, 0 }, { 0x5157, CHIP_FAMILY_RV200, 0, 0, 0, 0, 0 }, { 0x5158, CHIP_FAMILY_RV200, 0, 0, 0, 0, 0 }, { 0x5159, CHIP_FAMILY_RV100, 0, 0, 0, 0, 0 }, { 0x515A, CHIP_FAMILY_RV100, 0, 0, 0, 0, 0 }, { 0x515E, CHIP_FAMILY_RV100, 0, 0, 1, 0, 0 }, { 0x5460, CHIP_FAMILY_RV380, 1, 0, 0, 0, 0 }, { 0x5462, CHIP_FAMILY_RV380, 1, 0, 0, 0, 0 }, { 0x5464, CHIP_FAMILY_RV380, 1, 0, 0, 0, 0 }, { 0x5548, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x5549, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x554A, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x554B, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x554C, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x554D, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x554E, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x554F, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x5550, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x5551, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x5552, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x5554, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x564A, CHIP_FAMILY_RV410, 1, 0, 0, 0, 0 }, { 0x564B, CHIP_FAMILY_RV410, 1, 0, 0, 0, 0 }, { 0x564F, CHIP_FAMILY_RV410, 1, 0, 0, 0, 0 }, { 0x5652, CHIP_FAMILY_RV410, 1, 0, 0, 0, 0 }, { 0x5653, CHIP_FAMILY_RV410, 1, 0, 0, 0, 0 }, { 0x5657, CHIP_FAMILY_RV410, 0, 0, 0, 0, 0 }, { 0x5834, CHIP_FAMILY_RS300, 0, 1, 0, 0, 1 }, { 0x5835, CHIP_FAMILY_RS300, 1, 1, 0, 0, 1 }, { 0x5954, CHIP_FAMILY_RS480, 0, 1, 0, 0, 1 }, { 0x5955, CHIP_FAMILY_RS480, 1, 1, 0, 0, 1 }, { 0x5960, CHIP_FAMILY_RV280, 0, 0, 0, 0, 0 }, { 0x5961, CHIP_FAMILY_RV280, 0, 0, 0, 0, 0 }, { 0x5962, CHIP_FAMILY_RV280, 0, 0, 0, 0, 0 }, { 0x5964, CHIP_FAMILY_RV280, 0, 0, 0, 0, 0 }, { 0x5965, CHIP_FAMILY_RV280, 0, 0, 0, 0, 0 }, { 0x5969, CHIP_FAMILY_RV100, 0, 0, 1, 0, 0 }, { 0x5974, CHIP_FAMILY_RS480, 1, 1, 0, 0, 1 }, { 0x5975, CHIP_FAMILY_RS480, 1, 1, 0, 0, 1 }, { 0x5A41, CHIP_FAMILY_RS400, 0, 1, 0, 0, 1 }, { 0x5A42, CHIP_FAMILY_RS400, 1, 1, 0, 0, 1 }, { 0x5A61, CHIP_FAMILY_RS400, 0, 1, 0, 0, 1 }, { 0x5A62, CHIP_FAMILY_RS400, 1, 1, 0, 0, 1 }, { 0x5B60, CHIP_FAMILY_RV380, 0, 0, 0, 0, 0 }, { 0x5B62, CHIP_FAMILY_RV380, 0, 0, 0, 0, 0 }, { 0x5B63, CHIP_FAMILY_RV380, 0, 0, 0, 0, 0 }, { 0x5B64, CHIP_FAMILY_RV380, 0, 0, 0, 0, 0 }, { 0x5B65, CHIP_FAMILY_RV380, 0, 0, 0, 0, 0 }, { 0x5C61, CHIP_FAMILY_RV280, 1, 0, 0, 0, 0 }, { 0x5C63, CHIP_FAMILY_RV280, 1, 0, 0, 0, 0 }, { 0x5D48, CHIP_FAMILY_R420, 1, 0, 0, 0, 0 }, { 0x5D49, CHIP_FAMILY_R420, 1, 0, 0, 0, 0 }, { 0x5D4A, CHIP_FAMILY_R420, 1, 0, 0, 0, 0 }, { 0x5D4C, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x5D4D, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x5D4E, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x5D4F, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x5D50, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x5D52, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x5D57, CHIP_FAMILY_R420, 0, 0, 0, 0, 0 }, { 0x5E48, CHIP_FAMILY_RV410, 0, 0, 0, 0, 0 }, { 0x5E4A, CHIP_FAMILY_RV410, 0, 0, 0, 0, 0 }, { 0x5E4B, CHIP_FAMILY_RV410, 0, 0, 0, 0, 0 }, { 0x5E4C, CHIP_FAMILY_RV410, 0, 0, 0, 0, 0 }, { 0x5E4D, CHIP_FAMILY_RV410, 0, 0, 0, 0, 0 }, { 0x5E4F, CHIP_FAMILY_RV410, 0, 0, 0, 0, 0 }, { 0x7100, CHIP_FAMILY_R520, 0, 0, 0, 0, 0 }, { 0x7101, CHIP_FAMILY_R520, 1, 0, 0, 0, 0 }, { 0x7102, CHIP_FAMILY_R520, 1, 0, 0, 0, 0 }, { 0x7103, CHIP_FAMILY_R520, 1, 0, 0, 0, 0 }, { 0x7104, CHIP_FAMILY_R520, 0, 0, 0, 0, 0 }, { 0x7105, CHIP_FAMILY_R520, 0, 0, 0, 0, 0 }, { 0x7106, CHIP_FAMILY_R520, 1, 0, 0, 0, 0 }, { 0x7108, CHIP_FAMILY_R520, 0, 0, 0, 0, 0 }, { 0x7109, CHIP_FAMILY_R520, 0, 0, 0, 0, 0 }, { 0x710A, CHIP_FAMILY_R520, 0, 0, 0, 0, 0 }, { 0x710B, CHIP_FAMILY_R520, 0, 0, 0, 0, 0 }, { 0x710C, CHIP_FAMILY_R520, 0, 0, 0, 0, 0 }, { 0x710E, CHIP_FAMILY_R520, 0, 0, 0, 0, 0 }, { 0x710F, CHIP_FAMILY_R520, 0, 0, 0, 0, 0 }, { 0x7140, CHIP_FAMILY_RV515, 0, 0, 0, 0, 0 }, { 0x7141, CHIP_FAMILY_RV515, 0, 0, 0, 0, 0 }, { 0x7142, CHIP_FAMILY_RV515, 0, 0, 0, 0, 0 }, { 0x7143, CHIP_FAMILY_RV515, 0, 0, 0, 0, 0 }, { 0x7144, CHIP_FAMILY_RV515, 1, 0, 0, 0, 0 }, { 0x7145, CHIP_FAMILY_RV515, 1, 0, 0, 0, 0 }, { 0x7146, CHIP_FAMILY_RV515, 0, 0, 0, 0, 0 }, { 0x7147, CHIP_FAMILY_RV515, 0, 0, 0, 0, 0 }, { 0x7149, CHIP_FAMILY_RV515, 1, 0, 0, 0, 0 }, { 0x714A, CHIP_FAMILY_RV515, 1, 0, 0, 0, 0 }, { 0x714B, CHIP_FAMILY_RV515, 1, 0, 0, 0, 0 }, { 0x714C, CHIP_FAMILY_RV515, 1, 0, 0, 0, 0 }, { 0x714D, CHIP_FAMILY_RV515, 0, 0, 0, 0, 0 }, { 0x714E, CHIP_FAMILY_RV515, 0, 0, 0, 0, 0 }, { 0x714F, CHIP_FAMILY_RV515, 0, 0, 0, 0, 0 }, { 0x7151, CHIP_FAMILY_RV515, 0, 0, 0, 0, 0 }, { 0x7152, CHIP_FAMILY_RV515, 0, 0, 0, 0, 0 }, { 0x7153, CHIP_FAMILY_RV515, 0, 0, 0, 0, 0 }, { 0x715E, CHIP_FAMILY_RV515, 0, 0, 0, 0, 0 }, { 0x715F, CHIP_FAMILY_RV515, 0, 0, 0, 0, 0 }, { 0x7180, CHIP_FAMILY_RV515, 0, 0, 0, 0, 0 }, { 0x7181, CHIP_FAMILY_RV515, 0, 0, 0, 0, 0 }, { 0x7183, CHIP_FAMILY_RV515, 0, 0, 0, 0, 0 }, { 0x7186, CHIP_FAMILY_RV515, 1, 0, 0, 0, 0 }, { 0x7187, CHIP_FAMILY_RV515, 0, 0, 0, 0, 0 }, { 0x7188, CHIP_FAMILY_RV515, 1, 0, 0, 0, 0 }, { 0x718A, CHIP_FAMILY_RV515, 1, 0, 0, 0, 0 }, { 0x718B, CHIP_FAMILY_RV515, 1, 0, 0, 0, 0 }, { 0x718C, CHIP_FAMILY_RV515, 1, 0, 0, 0, 0 }, { 0x718D, CHIP_FAMILY_RV515, 1, 0, 0, 0, 0 }, { 0x718F, CHIP_FAMILY_RV515, 0, 0, 0, 0, 0 }, { 0x7193, CHIP_FAMILY_RV515, 0, 0, 0, 0, 0 }, { 0x7196, CHIP_FAMILY_RV515, 1, 0, 0, 0, 0 }, { 0x719B, CHIP_FAMILY_RV515, 0, 0, 0, 0, 0 }, { 0x719F, CHIP_FAMILY_RV515, 0, 0, 0, 0, 0 }, { 0x71C0, CHIP_FAMILY_RV530, 0, 0, 0, 0, 0 }, { 0x71C1, CHIP_FAMILY_RV530, 0, 0, 0, 0, 0 }, { 0x71C2, CHIP_FAMILY_RV530, 0, 0, 0, 0, 0 }, { 0x71C3, CHIP_FAMILY_RV530, 0, 0, 0, 0, 0 }, { 0x71C4, CHIP_FAMILY_RV530, 1, 0, 0, 0, 0 }, { 0x71C5, CHIP_FAMILY_RV530, 1, 0, 0, 0, 0 }, { 0x71C6, CHIP_FAMILY_RV530, 0, 0, 0, 0, 0 }, { 0x71C7, CHIP_FAMILY_RV530, 0, 0, 0, 0, 0 }, { 0x71CD, CHIP_FAMILY_RV530, 0, 0, 0, 0, 0 }, { 0x71CE, CHIP_FAMILY_RV530, 0, 0, 0, 0, 0 }, { 0x71D2, CHIP_FAMILY_RV530, 0, 0, 0, 0, 0 }, { 0x71D4, CHIP_FAMILY_RV530, 1, 0, 0, 0, 0 }, { 0x71D5, CHIP_FAMILY_RV530, 1, 0, 0, 0, 0 }, { 0x71D6, CHIP_FAMILY_RV530, 1, 0, 0, 0, 0 }, { 0x71DA, CHIP_FAMILY_RV530, 0, 0, 0, 0, 0 }, { 0x71DE, CHIP_FAMILY_RV530, 1, 0, 0, 0, 0 }, { 0x7200, CHIP_FAMILY_RV515, 0, 0, 0, 0, 0 }, { 0x7210, CHIP_FAMILY_RV515, 1, 0, 0, 0, 0 }, { 0x7211, CHIP_FAMILY_RV515, 1, 0, 0, 0, 0 }, { 0x7240, CHIP_FAMILY_R580, 0, 0, 0, 0, 0 }, { 0x7243, CHIP_FAMILY_R580, 0, 0, 0, 0, 0 }, { 0x7244, CHIP_FAMILY_R580, 0, 0, 0, 0, 0 }, { 0x7245, CHIP_FAMILY_R580, 0, 0, 0, 0, 0 }, { 0x7246, CHIP_FAMILY_R580, 0, 0, 0, 0, 0 }, { 0x7247, CHIP_FAMILY_R580, 0, 0, 0, 0, 0 }, { 0x7248, CHIP_FAMILY_R580, 0, 0, 0, 0, 0 }, { 0x7249, CHIP_FAMILY_R580, 0, 0, 0, 0, 0 }, { 0x724A, CHIP_FAMILY_R580, 0, 0, 0, 0, 0 }, { 0x724B, CHIP_FAMILY_R580, 0, 0, 0, 0, 0 }, { 0x724C, CHIP_FAMILY_R580, 0, 0, 0, 0, 0 }, { 0x724D, CHIP_FAMILY_R580, 0, 0, 0, 0, 0 }, { 0x724E, CHIP_FAMILY_R580, 0, 0, 0, 0, 0 }, { 0x724F, CHIP_FAMILY_R580, 0, 0, 0, 0, 0 }, { 0x7280, CHIP_FAMILY_RV570, 0, 0, 0, 0, 0 }, { 0x7281, CHIP_FAMILY_RV560, 0, 0, 0, 0, 0 }, { 0x7283, CHIP_FAMILY_RV560, 0, 0, 0, 0, 0 }, { 0x7284, CHIP_FAMILY_R580, 1, 0, 0, 0, 0 }, { 0x7287, CHIP_FAMILY_RV560, 0, 0, 0, 0, 0 }, { 0x7288, CHIP_FAMILY_RV570, 0, 0, 0, 0, 0 }, { 0x7289, CHIP_FAMILY_RV570, 0, 0, 0, 0, 0 }, { 0x728B, CHIP_FAMILY_RV570, 0, 0, 0, 0, 0 }, { 0x728C, CHIP_FAMILY_RV570, 0, 0, 0, 0, 0 }, { 0x7290, CHIP_FAMILY_RV560, 0, 0, 0, 0, 0 }, { 0x7291, CHIP_FAMILY_RV560, 0, 0, 0, 0, 0 }, { 0x7293, CHIP_FAMILY_RV560, 0, 0, 0, 0, 0 }, { 0x7297, CHIP_FAMILY_RV560, 0, 0, 0, 0, 0 }, { 0x7834, CHIP_FAMILY_RS300, 0, 1, 0, 0, 1 }, { 0x7835, CHIP_FAMILY_RS300, 1, 1, 0, 0, 1 }, { 0x791E, CHIP_FAMILY_RS690, 0, 1, 0, 0, 1 }, { 0x791F, CHIP_FAMILY_RS690, 0, 1, 0, 0, 1 }, { 0x793F, CHIP_FAMILY_RS600, 0, 1, 0, 0, 1 }, { 0x7941, CHIP_FAMILY_RS600, 0, 1, 0, 0, 1 }, { 0x7942, CHIP_FAMILY_RS600, 0, 1, 0, 0, 1 }, { 0x796C, CHIP_FAMILY_RS740, 0, 1, 0, 0, 1 }, { 0x796D, CHIP_FAMILY_RS740, 0, 1, 0, 0, 1 }, { 0x796E, CHIP_FAMILY_RS740, 0, 1, 0, 0, 1 }, { 0x796F, CHIP_FAMILY_RS740, 0, 1, 0, 0, 1 }, { 0x9400, CHIP_FAMILY_R600, 0, 0, 0, 0, 0 }, { 0x9401, CHIP_FAMILY_R600, 0, 0, 0, 0, 0 }, { 0x9402, CHIP_FAMILY_R600, 0, 0, 0, 0, 0 }, { 0x9403, CHIP_FAMILY_R600, 0, 0, 0, 0, 0 }, { 0x9405, CHIP_FAMILY_R600, 0, 0, 0, 0, 0 }, { 0x940A, CHIP_FAMILY_R600, 0, 0, 0, 0, 0 }, { 0x940B, CHIP_FAMILY_R600, 0, 0, 0, 0, 0 }, { 0x940F, CHIP_FAMILY_R600, 0, 0, 0, 0, 0 }, { 0x9440, CHIP_FAMILY_RV770, 0, 0, 0, 0, 0 }, { 0x9441, CHIP_FAMILY_RV770, 0, 0, 0, 0, 0 }, { 0x9442, CHIP_FAMILY_RV770, 0, 0, 0, 0, 0 }, { 0x9443, CHIP_FAMILY_RV770, 0, 0, 0, 0, 0 }, { 0x9444, CHIP_FAMILY_RV770, 0, 0, 0, 0, 0 }, { 0x9446, CHIP_FAMILY_RV770, 0, 0, 0, 0, 0 }, { 0x944A, CHIP_FAMILY_RV770, 1, 0, 0, 0, 0 }, { 0x944B, CHIP_FAMILY_RV770, 1, 0, 0, 0, 0 }, { 0x944C, CHIP_FAMILY_RV770, 0, 0, 0, 0, 0 }, { 0x944E, CHIP_FAMILY_RV770, 0, 0, 0, 0, 0 }, { 0x9450, CHIP_FAMILY_RV770, 0, 0, 0, 0, 0 }, { 0x9452, CHIP_FAMILY_RV770, 0, 0, 0, 0, 0 }, { 0x9456, CHIP_FAMILY_RV770, 0, 0, 0, 0, 0 }, { 0x945A, CHIP_FAMILY_RV770, 1, 0, 0, 0, 0 }, { 0x945B, CHIP_FAMILY_RV770, 1, 0, 0, 0, 0 }, { 0x945E, CHIP_FAMILY_RV770, 1, 0, 0, 0, 0 }, { 0x9460, CHIP_FAMILY_RV770, 0, 0, 0, 0, 0 }, { 0x9462, CHIP_FAMILY_RV770, 0, 0, 0, 0, 0 }, { 0x946A, CHIP_FAMILY_RV770, 1, 0, 0, 0, 0 }, { 0x946B, CHIP_FAMILY_RV770, 1, 0, 0, 0, 0 }, { 0x947A, CHIP_FAMILY_RV770, 1, 0, 0, 0, 0 }, { 0x947B, CHIP_FAMILY_RV770, 1, 0, 0, 0, 0 }, { 0x9480, CHIP_FAMILY_RV730, 1, 0, 0, 0, 0 }, { 0x9487, CHIP_FAMILY_RV730, 0, 0, 0, 0, 0 }, { 0x9488, CHIP_FAMILY_RV730, 1, 0, 0, 0, 0 }, { 0x9489, CHIP_FAMILY_RV730, 1, 0, 0, 0, 0 }, { 0x948A, CHIP_FAMILY_RV730, 1, 0, 0, 0, 0 }, { 0x948F, CHIP_FAMILY_RV730, 0, 0, 0, 0, 0 }, { 0x9490, CHIP_FAMILY_RV730, 0, 0, 0, 0, 0 }, { 0x9491, CHIP_FAMILY_RV730, 0, 0, 0, 0, 0 }, { 0x9495, CHIP_FAMILY_RV730, 0, 0, 0, 0, 0 }, { 0x9498, CHIP_FAMILY_RV730, 0, 0, 0, 0, 0 }, { 0x949C, CHIP_FAMILY_RV730, 0, 0, 0, 0, 0 }, { 0x949E, CHIP_FAMILY_RV730, 0, 0, 0, 0, 0 }, { 0x949F, CHIP_FAMILY_RV730, 0, 0, 0, 0, 0 }, { 0x94A0, CHIP_FAMILY_RV740, 1, 0, 0, 0, 0 }, { 0x94A1, CHIP_FAMILY_RV740, 1, 0, 0, 0, 0 }, { 0x94A3, CHIP_FAMILY_RV740, 1, 0, 0, 0, 0 }, { 0x94B1, CHIP_FAMILY_RV740, 0, 0, 0, 0, 0 }, { 0x94B3, CHIP_FAMILY_RV740, 0, 0, 0, 0, 0 }, { 0x94B4, CHIP_FAMILY_RV740, 0, 0, 0, 0, 0 }, { 0x94B5, CHIP_FAMILY_RV740, 0, 0, 0, 0, 0 }, { 0x94B9, CHIP_FAMILY_RV740, 1, 0, 0, 0, 0 }, { 0x94C0, CHIP_FAMILY_RV610, 0, 0, 0, 0, 0 }, { 0x94C1, CHIP_FAMILY_RV610, 0, 0, 0, 0, 0 }, { 0x94C3, CHIP_FAMILY_RV610, 0, 0, 0, 0, 0 }, { 0x94C4, CHIP_FAMILY_RV610, 0, 0, 0, 0, 0 }, { 0x94C5, CHIP_FAMILY_RV610, 0, 0, 0, 0, 0 }, { 0x94C6, CHIP_FAMILY_RV610, 0, 0, 0, 0, 0 }, { 0x94C7, CHIP_FAMILY_RV610, 0, 0, 0, 0, 0 }, { 0x94C8, CHIP_FAMILY_RV610, 1, 0, 0, 0, 0 }, { 0x94C9, CHIP_FAMILY_RV610, 1, 0, 0, 0, 0 }, { 0x94CB, CHIP_FAMILY_RV610, 1, 0, 0, 0, 0 }, { 0x94CC, CHIP_FAMILY_RV610, 0, 0, 0, 0, 0 }, { 0x94CD, CHIP_FAMILY_RV610, 0, 0, 0, 0, 0 }, { 0x9500, CHIP_FAMILY_RV670, 0, 0, 0, 0, 0 }, { 0x9501, CHIP_FAMILY_RV670, 0, 0, 0, 0, 0 }, { 0x9504, CHIP_FAMILY_RV670, 1, 0, 0, 0, 0 }, { 0x9505, CHIP_FAMILY_RV670, 0, 0, 0, 0, 0 }, { 0x9506, CHIP_FAMILY_RV670, 1, 0, 0, 0, 0 }, { 0x9507, CHIP_FAMILY_RV670, 0, 0, 0, 0, 0 }, { 0x9508, CHIP_FAMILY_RV670, 1, 0, 0, 0, 0 }, { 0x9509, CHIP_FAMILY_RV670, 1, 0, 0, 0, 0 }, { 0x950F, CHIP_FAMILY_RV670, 0, 0, 0, 0, 0 }, { 0x9511, CHIP_FAMILY_RV670, 0, 0, 0, 0, 0 }, { 0x9515, CHIP_FAMILY_RV670, 0, 0, 0, 0, 0 }, { 0x9517, CHIP_FAMILY_RV670, 0, 0, 0, 0, 0 }, { 0x9519, CHIP_FAMILY_RV670, 0, 0, 0, 0, 0 }, { 0x9540, CHIP_FAMILY_RV710, 0, 0, 0, 0, 0 }, { 0x9541, CHIP_FAMILY_RV710, 0, 0, 0, 0, 0 }, { 0x9542, CHIP_FAMILY_RV710, 0, 0, 0, 0, 0 }, { 0x954E, CHIP_FAMILY_RV710, 0, 0, 0, 0, 0 }, { 0x954F, CHIP_FAMILY_RV710, 0, 0, 0, 0, 0 }, { 0x9552, CHIP_FAMILY_RV710, 1, 0, 0, 0, 0 }, { 0x9553, CHIP_FAMILY_RV710, 1, 0, 0, 0, 0 }, { 0x9555, CHIP_FAMILY_RV710, 1, 0, 0, 0, 0 }, { 0x9557, CHIP_FAMILY_RV710, 1, 0, 0, 0, 0 }, { 0x955F, CHIP_FAMILY_RV710, 1, 0, 0, 0, 0 }, { 0x9580, CHIP_FAMILY_RV630, 0, 0, 0, 0, 0 }, { 0x9581, CHIP_FAMILY_RV630, 1, 0, 0, 0, 0 }, { 0x9583, CHIP_FAMILY_RV630, 1, 0, 0, 0, 0 }, { 0x9586, CHIP_FAMILY_RV630, 0, 0, 0, 0, 0 }, { 0x9587, CHIP_FAMILY_RV630, 0, 0, 0, 0, 0 }, { 0x9588, CHIP_FAMILY_RV630, 0, 0, 0, 0, 0 }, { 0x9589, CHIP_FAMILY_RV630, 0, 0, 0, 0, 0 }, { 0x958A, CHIP_FAMILY_RV630, 0, 0, 0, 0, 0 }, { 0x958B, CHIP_FAMILY_RV630, 1, 0, 0, 0, 0 }, { 0x958C, CHIP_FAMILY_RV630, 0, 0, 0, 0, 0 }, { 0x958D, CHIP_FAMILY_RV630, 0, 0, 0, 0, 0 }, { 0x958E, CHIP_FAMILY_RV630, 0, 0, 0, 0, 0 }, { 0x958F, CHIP_FAMILY_RV630, 1, 0, 0, 0, 0 }, { 0x95C0, CHIP_FAMILY_RV620, 0, 0, 0, 0, 0 }, { 0x95C2, CHIP_FAMILY_RV620, 1, 0, 0, 0, 0 }, { 0x95C4, CHIP_FAMILY_RV620, 1, 0, 0, 0, 0 }, { 0x95C5, CHIP_FAMILY_RV620, 0, 0, 0, 0, 0 }, { 0x95C6, CHIP_FAMILY_RV620, 0, 0, 0, 0, 0 }, { 0x95C7, CHIP_FAMILY_RV620, 0, 0, 0, 0, 0 }, { 0x95C9, CHIP_FAMILY_RV620, 0, 0, 0, 0, 0 }, { 0x95CC, CHIP_FAMILY_RV620, 0, 0, 0, 0, 0 }, { 0x95CD, CHIP_FAMILY_RV620, 0, 0, 0, 0, 0 }, { 0x95CE, CHIP_FAMILY_RV620, 0, 0, 0, 0, 0 }, { 0x95CF, CHIP_FAMILY_RV620, 0, 0, 0, 0, 0 }, { 0x9590, CHIP_FAMILY_RV635, 0, 0, 0, 0, 0 }, { 0x9596, CHIP_FAMILY_RV635, 0, 0, 0, 0, 0 }, { 0x9597, CHIP_FAMILY_RV635, 0, 0, 0, 0, 0 }, { 0x9598, CHIP_FAMILY_RV635, 0, 0, 0, 0, 0 }, { 0x9599, CHIP_FAMILY_RV635, 0, 0, 0, 0, 0 }, { 0x9591, CHIP_FAMILY_RV635, 1, 0, 0, 0, 0 }, { 0x9593, CHIP_FAMILY_RV635, 1, 0, 0, 0, 0 }, { 0x9595, CHIP_FAMILY_RV635, 1, 0, 0, 0, 0 }, { 0x959B, CHIP_FAMILY_RV635, 1, 0, 0, 0, 0 }, { 0x9610, CHIP_FAMILY_RS780, 0, 1, 0, 0, 1 }, { 0x9611, CHIP_FAMILY_RS780, 0, 1, 0, 0, 1 }, { 0x9612, CHIP_FAMILY_RS780, 0, 1, 0, 0, 1 }, { 0x9613, CHIP_FAMILY_RS780, 0, 1, 0, 0, 1 }, { 0x9614, CHIP_FAMILY_RS780, 0, 1, 0, 0, 1 }, { 0x9615, CHIP_FAMILY_RS780, 0, 1, 0, 0, 1 }, { 0x9616, CHIP_FAMILY_RS780, 0, 1, 0, 0, 1 }, { 0x9640, CHIP_FAMILY_SUMO, 0, 1, 0, 0, 1 }, { 0x9641, CHIP_FAMILY_SUMO, 1, 1, 0, 0, 1 }, { 0x9642, CHIP_FAMILY_SUMO2, 0, 1, 0, 0, 1 }, { 0x9643, CHIP_FAMILY_SUMO2, 1, 1, 0, 0, 1 }, { 0x9644, CHIP_FAMILY_SUMO2, 0, 1, 0, 0, 1 }, { 0x9645, CHIP_FAMILY_SUMO2, 1, 1, 0, 0, 1 }, { 0x9647, CHIP_FAMILY_SUMO, 1, 1, 0, 0, 1 }, { 0x9648, CHIP_FAMILY_SUMO, 1, 1, 0, 0, 1 }, { 0x9649, CHIP_FAMILY_SUMO2, 1, 1, 0, 0, 1 }, { 0x964A, CHIP_FAMILY_SUMO, 0, 1, 0, 0, 1 }, { 0x964B, CHIP_FAMILY_SUMO, 0, 1, 0, 0, 1 }, { 0x964C, CHIP_FAMILY_SUMO, 0, 1, 0, 0, 1 }, { 0x964E, CHIP_FAMILY_SUMO, 1, 1, 0, 0, 1 }, { 0x964F, CHIP_FAMILY_SUMO, 1, 1, 0, 0, 1 }, { 0x9710, CHIP_FAMILY_RS880, 0, 1, 0, 0, 1 }, { 0x9711, CHIP_FAMILY_RS880, 0, 1, 0, 0, 1 }, { 0x9712, CHIP_FAMILY_RS880, 1, 1, 0, 0, 1 }, { 0x9713, CHIP_FAMILY_RS880, 1, 1, 0, 0, 1 }, { 0x9714, CHIP_FAMILY_RS880, 0, 1, 0, 0, 1 }, { 0x9715, CHIP_FAMILY_RS880, 0, 1, 0, 0, 1 }, { 0x9802, CHIP_FAMILY_PALM, 0, 1, 0, 0, 1 }, { 0x9803, CHIP_FAMILY_PALM, 0, 1, 0, 0, 1 }, { 0x9804, CHIP_FAMILY_PALM, 0, 1, 0, 0, 1 }, { 0x9805, CHIP_FAMILY_PALM, 0, 1, 0, 0, 1 }, { 0x9806, CHIP_FAMILY_PALM, 0, 1, 0, 0, 1 }, { 0x9807, CHIP_FAMILY_PALM, 0, 1, 0, 0, 1 }, { 0x9808, CHIP_FAMILY_PALM, 0, 1, 0, 0, 1 }, { 0x9809, CHIP_FAMILY_PALM, 0, 1, 0, 0, 1 }, { 0x980A, CHIP_FAMILY_PALM, 0, 1, 0, 0, 1 }, { 0x6880, CHIP_FAMILY_CYPRESS, 1, 0, 0, 0, 0 }, { 0x6888, CHIP_FAMILY_CYPRESS, 0, 0, 0, 0, 0 }, { 0x6889, CHIP_FAMILY_CYPRESS, 0, 0, 0, 0, 0 }, { 0x688A, CHIP_FAMILY_CYPRESS, 0, 0, 0, 0, 0 }, { 0x688C, CHIP_FAMILY_CYPRESS, 0, 0, 0, 0, 0 }, { 0x688D, CHIP_FAMILY_CYPRESS, 0, 0, 0, 0, 0 }, { 0x6898, CHIP_FAMILY_CYPRESS, 0, 0, 0, 0, 0 }, { 0x6899, CHIP_FAMILY_CYPRESS, 0, 0, 0, 0, 0 }, { 0x689B, CHIP_FAMILY_CYPRESS, 0, 0, 0, 0, 0 }, { 0x689E, CHIP_FAMILY_CYPRESS, 0, 0, 0, 0, 0 }, { 0x689C, CHIP_FAMILY_HEMLOCK, 0, 0, 0, 0, 0 }, { 0x689D, CHIP_FAMILY_HEMLOCK, 0, 0, 0, 0, 0 }, { 0x68A0, CHIP_FAMILY_JUNIPER, 1, 0, 0, 0, 0 }, { 0x68A1, CHIP_FAMILY_JUNIPER, 1, 0, 0, 0, 0 }, { 0x68A8, CHIP_FAMILY_JUNIPER, 0, 0, 0, 0, 0 }, { 0x68A9, CHIP_FAMILY_JUNIPER, 0, 0, 0, 0, 0 }, { 0x68B0, CHIP_FAMILY_JUNIPER, 1, 0, 0, 0, 0 }, { 0x68B8, CHIP_FAMILY_JUNIPER, 0, 0, 0, 0, 0 }, { 0x68B9, CHIP_FAMILY_JUNIPER, 0, 0, 0, 0, 0 }, { 0x68BA, CHIP_FAMILY_JUNIPER, 0, 0, 0, 0, 0 }, { 0x68BE, CHIP_FAMILY_JUNIPER, 0, 0, 0, 0, 0 }, { 0x68BF, CHIP_FAMILY_JUNIPER, 0, 0, 0, 0, 0 }, { 0x68C0, CHIP_FAMILY_REDWOOD, 1, 0, 0, 0, 0 }, { 0x68C1, CHIP_FAMILY_REDWOOD, 1, 0, 0, 0, 0 }, { 0x68C7, CHIP_FAMILY_REDWOOD, 1, 0, 0, 0, 0 }, { 0x68C8, CHIP_FAMILY_REDWOOD, 0, 0, 0, 0, 0 }, { 0x68C9, CHIP_FAMILY_REDWOOD, 0, 0, 0, 0, 0 }, { 0x68D8, CHIP_FAMILY_REDWOOD, 0, 0, 0, 0, 0 }, { 0x68D9, CHIP_FAMILY_REDWOOD, 0, 0, 0, 0, 0 }, { 0x68DA, CHIP_FAMILY_REDWOOD, 0, 0, 0, 0, 0 }, { 0x68DE, CHIP_FAMILY_REDWOOD, 0, 0, 0, 0, 0 }, { 0x68E0, CHIP_FAMILY_CEDAR, 1, 0, 0, 0, 0 }, { 0x68E1, CHIP_FAMILY_CEDAR, 1, 0, 0, 0, 0 }, { 0x68E4, CHIP_FAMILY_CEDAR, 1, 0, 0, 0, 0 }, { 0x68E5, CHIP_FAMILY_CEDAR, 1, 0, 0, 0, 0 }, { 0x68E8, CHIP_FAMILY_CEDAR, 0, 0, 0, 0, 0 }, { 0x68E9, CHIP_FAMILY_CEDAR, 0, 0, 0, 0, 0 }, { 0x68F1, CHIP_FAMILY_CEDAR, 0, 0, 0, 0, 0 }, { 0x68F2, CHIP_FAMILY_CEDAR, 0, 0, 0, 0, 0 }, { 0x68F8, CHIP_FAMILY_CEDAR, 0, 0, 0, 0, 0 }, { 0x68F9, CHIP_FAMILY_CEDAR, 0, 0, 0, 0, 0 }, { 0x68FA, CHIP_FAMILY_CEDAR, 0, 0, 0, 0, 0 }, { 0x68FE, CHIP_FAMILY_CEDAR, 0, 0, 0, 0, 0 }, { 0x6700, CHIP_FAMILY_CAYMAN, 0, 0, 0, 0, 0 }, { 0x6701, CHIP_FAMILY_CAYMAN, 0, 0, 0, 0, 0 }, { 0x6702, CHIP_FAMILY_CAYMAN, 0, 0, 0, 0, 0 }, { 0x6703, CHIP_FAMILY_CAYMAN, 0, 0, 0, 0, 0 }, { 0x6704, CHIP_FAMILY_CAYMAN, 0, 0, 0, 0, 0 }, { 0x6705, CHIP_FAMILY_CAYMAN, 0, 0, 0, 0, 0 }, { 0x6706, CHIP_FAMILY_CAYMAN, 0, 0, 0, 0, 0 }, { 0x6707, CHIP_FAMILY_CAYMAN, 0, 0, 0, 0, 0 }, { 0x6708, CHIP_FAMILY_CAYMAN, 0, 0, 0, 0, 0 }, { 0x6709, CHIP_FAMILY_CAYMAN, 0, 0, 0, 0, 0 }, { 0x6718, CHIP_FAMILY_CAYMAN, 0, 0, 0, 0, 0 }, { 0x6719, CHIP_FAMILY_CAYMAN, 0, 0, 0, 0, 0 }, { 0x671C, CHIP_FAMILY_CAYMAN, 0, 0, 0, 0, 0 }, { 0x671D, CHIP_FAMILY_CAYMAN, 0, 0, 0, 0, 0 }, { 0x671F, CHIP_FAMILY_CAYMAN, 0, 0, 0, 0, 0 }, { 0x6720, CHIP_FAMILY_BARTS, 1, 0, 0, 0, 0 }, { 0x6721, CHIP_FAMILY_BARTS, 1, 0, 0, 0, 0 }, { 0x6722, CHIP_FAMILY_BARTS, 0, 0, 0, 0, 0 }, { 0x6723, CHIP_FAMILY_BARTS, 0, 0, 0, 0, 0 }, { 0x6724, CHIP_FAMILY_BARTS, 1, 0, 0, 0, 0 }, { 0x6725, CHIP_FAMILY_BARTS, 1, 0, 0, 0, 0 }, { 0x6726, CHIP_FAMILY_BARTS, 0, 0, 0, 0, 0 }, { 0x6727, CHIP_FAMILY_BARTS, 0, 0, 0, 0, 0 }, { 0x6728, CHIP_FAMILY_BARTS, 0, 0, 0, 0, 0 }, { 0x6729, CHIP_FAMILY_BARTS, 0, 0, 0, 0, 0 }, { 0x6738, CHIP_FAMILY_BARTS, 0, 0, 0, 0, 0 }, { 0x6739, CHIP_FAMILY_BARTS, 0, 0, 0, 0, 0 }, { 0x673E, CHIP_FAMILY_BARTS, 0, 0, 0, 0, 0 }, { 0x6740, CHIP_FAMILY_TURKS, 1, 0, 0, 0, 0 }, { 0x6741, CHIP_FAMILY_TURKS, 1, 0, 0, 0, 0 }, { 0x6742, CHIP_FAMILY_TURKS, 1, 0, 0, 0, 0 }, { 0x6743, CHIP_FAMILY_TURKS, 1, 0, 0, 0, 0 }, { 0x6744, CHIP_FAMILY_TURKS, 1, 0, 0, 0, 0 }, { 0x6745, CHIP_FAMILY_TURKS, 1, 0, 0, 0, 0 }, { 0x6746, CHIP_FAMILY_TURKS, 0, 0, 0, 0, 0 }, { 0x6747, CHIP_FAMILY_TURKS, 0, 0, 0, 0, 0 }, { 0x6748, CHIP_FAMILY_TURKS, 0, 0, 0, 0, 0 }, { 0x6749, CHIP_FAMILY_TURKS, 0, 0, 0, 0, 0 }, { 0x674A, CHIP_FAMILY_TURKS, 0, 0, 0, 0, 0 }, { 0x6750, CHIP_FAMILY_TURKS, 0, 0, 0, 0, 0 }, { 0x6751, CHIP_FAMILY_TURKS, 0, 0, 0, 0, 0 }, { 0x6758, CHIP_FAMILY_TURKS, 0, 0, 0, 0, 0 }, { 0x6759, CHIP_FAMILY_TURKS, 0, 0, 0, 0, 0 }, { 0x675B, CHIP_FAMILY_TURKS, 0, 0, 0, 0, 0 }, { 0x675D, CHIP_FAMILY_TURKS, 0, 0, 0, 0, 0 }, { 0x675F, CHIP_FAMILY_TURKS, 0, 0, 0, 0, 0 }, { 0x6840, CHIP_FAMILY_TURKS, 1, 0, 0, 0, 0 }, { 0x6841, CHIP_FAMILY_TURKS, 1, 0, 0, 0, 0 }, { 0x6842, CHIP_FAMILY_TURKS, 1, 0, 0, 0, 0 }, { 0x6843, CHIP_FAMILY_TURKS, 1, 0, 0, 0, 0 }, { 0x6849, CHIP_FAMILY_TURKS, 0, 0, 0, 0, 0 }, { 0x6850, CHIP_FAMILY_TURKS, 0, 0, 0, 0, 0 }, { 0x6858, CHIP_FAMILY_TURKS, 0, 0, 0, 0, 0 }, { 0x6859, CHIP_FAMILY_TURKS, 0, 0, 0, 0, 0 }, { 0x6760, CHIP_FAMILY_CAICOS, 1, 0, 0, 0, 0 }, { 0x6761, CHIP_FAMILY_CAICOS, 1, 0, 0, 0, 0 }, { 0x6762, CHIP_FAMILY_CAICOS, 0, 0, 0, 0, 0 }, { 0x6763, CHIP_FAMILY_CAICOS, 0, 0, 0, 0, 0 }, { 0x6764, CHIP_FAMILY_CAICOS, 1, 0, 0, 0, 0 }, { 0x6765, CHIP_FAMILY_CAICOS, 1, 0, 0, 0, 0 }, { 0x6766, CHIP_FAMILY_CAICOS, 0, 0, 0, 0, 0 }, { 0x6767, CHIP_FAMILY_CAICOS, 0, 0, 0, 0, 0 }, { 0x6768, CHIP_FAMILY_CAICOS, 0, 0, 0, 0, 0 }, { 0x6770, CHIP_FAMILY_CAICOS, 0, 0, 0, 0, 0 }, { 0x6771, CHIP_FAMILY_CAICOS, 0, 0, 0, 0, 0 }, { 0x6772, CHIP_FAMILY_CAICOS, 0, 0, 0, 0, 0 }, { 0x6778, CHIP_FAMILY_CAICOS, 0, 0, 0, 0, 0 }, { 0x6779, CHIP_FAMILY_CAICOS, 0, 0, 0, 0, 0 }, { 0x677B, CHIP_FAMILY_CAICOS, 0, 0, 0, 0, 0 }, { 0x9900, CHIP_FAMILY_ARUBA, 1, 1, 0, 0, 0 }, { 0x9901, CHIP_FAMILY_ARUBA, 0, 1, 0, 0, 0 }, { 0x9903, CHIP_FAMILY_ARUBA, 1, 1, 0, 0, 0 }, { 0x9904, CHIP_FAMILY_ARUBA, 0, 1, 0, 0, 0 }, { 0x9905, CHIP_FAMILY_ARUBA, 0, 1, 0, 0, 0 }, { 0x9906, CHIP_FAMILY_ARUBA, 0, 1, 0, 0, 0 }, { 0x9907, CHIP_FAMILY_ARUBA, 1, 1, 0, 0, 0 }, { 0x9908, CHIP_FAMILY_ARUBA, 1, 1, 0, 0, 0 }, { 0x9909, CHIP_FAMILY_ARUBA, 1, 1, 0, 0, 0 }, { 0x990A, CHIP_FAMILY_ARUBA, 1, 1, 0, 0, 0 }, { 0x990B, CHIP_FAMILY_ARUBA, 1, 1, 0, 0, 0 }, { 0x990C, CHIP_FAMILY_ARUBA, 0, 1, 0, 0, 0 }, { 0x990D, CHIP_FAMILY_ARUBA, 1, 1, 0, 0, 0 }, { 0x990E, CHIP_FAMILY_ARUBA, 0, 1, 0, 0, 0 }, { 0x990F, CHIP_FAMILY_ARUBA, 1, 1, 0, 0, 0 }, { 0x9910, CHIP_FAMILY_ARUBA, 1, 1, 0, 0, 0 }, { 0x9913, CHIP_FAMILY_ARUBA, 1, 1, 0, 0, 0 }, { 0x9917, CHIP_FAMILY_ARUBA, 0, 1, 0, 0, 0 }, { 0x9918, CHIP_FAMILY_ARUBA, 0, 1, 0, 0, 0 }, { 0x9919, CHIP_FAMILY_ARUBA, 0, 1, 0, 0, 0 }, { 0x9990, CHIP_FAMILY_ARUBA, 1, 1, 0, 0, 0 }, { 0x9991, CHIP_FAMILY_ARUBA, 0, 1, 0, 0, 0 }, { 0x9992, CHIP_FAMILY_ARUBA, 1, 1, 0, 0, 0 }, { 0x9993, CHIP_FAMILY_ARUBA, 0, 1, 0, 0, 0 }, { 0x9994, CHIP_FAMILY_ARUBA, 1, 1, 0, 0, 0 }, { 0x9995, CHIP_FAMILY_ARUBA, 1, 1, 0, 0, 0 }, { 0x9996, CHIP_FAMILY_ARUBA, 0, 1, 0, 0, 0 }, { 0x9997, CHIP_FAMILY_ARUBA, 1, 1, 0, 0, 0 }, { 0x9998, CHIP_FAMILY_ARUBA, 0, 1, 0, 0, 0 }, { 0x9999, CHIP_FAMILY_ARUBA, 1, 1, 0, 0, 0 }, { 0x999A, CHIP_FAMILY_ARUBA, 1, 1, 0, 0, 0 }, { 0x999B, CHIP_FAMILY_ARUBA, 1, 1, 0, 0, 0 }, { 0x999C, CHIP_FAMILY_ARUBA, 0, 1, 0, 0, 0 }, { 0x999D, CHIP_FAMILY_ARUBA, 0, 1, 0, 0, 0 }, { 0x99A0, CHIP_FAMILY_ARUBA, 1, 1, 0, 0, 0 }, { 0x99A2, CHIP_FAMILY_ARUBA, 1, 1, 0, 0, 0 }, { 0x99A4, CHIP_FAMILY_ARUBA, 0, 1, 0, 0, 0 }, { 0x6780, CHIP_FAMILY_TAHITI, 0, 0, 0, 0, 0 }, { 0x6784, CHIP_FAMILY_TAHITI, 0, 0, 0, 0, 0 }, { 0x6788, CHIP_FAMILY_TAHITI, 0, 0, 0, 0, 0 }, { 0x678A, CHIP_FAMILY_TAHITI, 0, 0, 0, 0, 0 }, { 0x6790, CHIP_FAMILY_TAHITI, 0, 0, 0, 0, 0 }, { 0x6791, CHIP_FAMILY_TAHITI, 0, 0, 0, 0, 0 }, { 0x6792, CHIP_FAMILY_TAHITI, 0, 0, 0, 0, 0 }, { 0x6798, CHIP_FAMILY_TAHITI, 0, 0, 0, 0, 0 }, { 0x6799, CHIP_FAMILY_TAHITI, 0, 0, 0, 0, 0 }, { 0x679A, CHIP_FAMILY_TAHITI, 0, 0, 0, 0, 0 }, { 0x679B, CHIP_FAMILY_TAHITI, 0, 0, 0, 0, 0 }, { 0x679E, CHIP_FAMILY_TAHITI, 0, 0, 0, 0, 0 }, { 0x679F, CHIP_FAMILY_TAHITI, 0, 0, 0, 0, 0 }, { 0x6800, CHIP_FAMILY_PITCAIRN, 1, 0, 0, 0, 0 }, { 0x6801, CHIP_FAMILY_PITCAIRN, 1, 0, 0, 0, 0 }, { 0x6802, CHIP_FAMILY_PITCAIRN, 1, 0, 0, 0, 0 }, { 0x6806, CHIP_FAMILY_PITCAIRN, 0, 0, 0, 0, 0 }, { 0x6808, CHIP_FAMILY_PITCAIRN, 0, 0, 0, 0, 0 }, { 0x6809, CHIP_FAMILY_PITCAIRN, 0, 0, 0, 0, 0 }, { 0x6810, CHIP_FAMILY_PITCAIRN, 0, 0, 0, 0, 0 }, { 0x6811, CHIP_FAMILY_PITCAIRN, 0, 0, 0, 0, 0 }, { 0x6816, CHIP_FAMILY_PITCAIRN, 0, 0, 0, 0, 0 }, { 0x6817, CHIP_FAMILY_PITCAIRN, 0, 0, 0, 0, 0 }, { 0x6818, CHIP_FAMILY_PITCAIRN, 0, 0, 0, 0, 0 }, { 0x6819, CHIP_FAMILY_PITCAIRN, 0, 0, 0, 0, 0 }, { 0x684C, CHIP_FAMILY_PITCAIRN, 0, 0, 0, 0, 0 }, { 0x6820, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 }, { 0x6821, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 }, { 0x6822, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 }, { 0x6823, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 }, { 0x6824, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 }, { 0x6825, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 }, { 0x6826, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 }, { 0x6827, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 }, { 0x6828, CHIP_FAMILY_VERDE, 0, 0, 0, 0, 0 }, { 0x6829, CHIP_FAMILY_VERDE, 0, 0, 0, 0, 0 }, { 0x682A, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 }, { 0x682B, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 }, { 0x682D, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 }, { 0x682F, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 }, { 0x6830, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 }, { 0x6831, CHIP_FAMILY_VERDE, 1, 0, 0, 0, 0 }, { 0x6835, CHIP_FAMILY_VERDE, 0, 0, 0, 0, 0 }, { 0x6837, CHIP_FAMILY_VERDE, 0, 0, 0, 0, 0 }, { 0x6838, CHIP_FAMILY_VERDE, 0, 0, 0, 0, 0 }, { 0x6839, CHIP_FAMILY_VERDE, 0, 0, 0, 0, 0 }, { 0x683B, CHIP_FAMILY_VERDE, 0, 0, 0, 0, 0 }, { 0x683D, CHIP_FAMILY_VERDE, 0, 0, 0, 0, 0 }, { 0x683F, CHIP_FAMILY_VERDE, 0, 0, 0, 0, 0 }, { 0x6600, CHIP_FAMILY_OLAND, 1, 0, 0, 0, 0 }, { 0x6601, CHIP_FAMILY_OLAND, 1, 0, 0, 0, 0 }, { 0x6602, CHIP_FAMILY_OLAND, 1, 0, 0, 0, 0 }, { 0x6603, CHIP_FAMILY_OLAND, 1, 0, 0, 0, 0 }, { 0x6606, CHIP_FAMILY_OLAND, 1, 0, 0, 0, 0 }, { 0x6607, CHIP_FAMILY_OLAND, 1, 0, 0, 0, 0 }, { 0x6610, CHIP_FAMILY_OLAND, 0, 0, 0, 0, 0 }, { 0x6611, CHIP_FAMILY_OLAND, 0, 0, 0, 0, 0 }, { 0x6613, CHIP_FAMILY_OLAND, 0, 0, 0, 0, 0 }, { 0x6620, CHIP_FAMILY_OLAND, 1, 0, 0, 0, 0 }, { 0x6621, CHIP_FAMILY_OLAND, 1, 0, 0, 0, 0 }, { 0x6623, CHIP_FAMILY_OLAND, 1, 0, 0, 0, 0 }, { 0x6631, CHIP_FAMILY_OLAND, 0, 0, 0, 0, 0 }, { 0x6660, CHIP_FAMILY_HAINAN, 1, 0, 0, 0, 0 }, { 0x6663, CHIP_FAMILY_HAINAN, 1, 0, 0, 0, 0 }, { 0x6664, CHIP_FAMILY_HAINAN, 1, 0, 0, 0, 0 }, { 0x6665, CHIP_FAMILY_HAINAN, 1, 0, 0, 0, 0 }, { 0x6667, CHIP_FAMILY_HAINAN, 1, 0, 0, 0, 0 }, { 0x666F, CHIP_FAMILY_HAINAN, 1, 0, 0, 0, 0 }, { 0x6640, CHIP_FAMILY_BONAIRE, 1, 0, 0, 0, 0 }, { 0x6641, CHIP_FAMILY_BONAIRE, 1, 0, 0, 0, 0 }, { 0x6649, CHIP_FAMILY_BONAIRE, 0, 0, 0, 0, 0 }, { 0x6650, CHIP_FAMILY_BONAIRE, 0, 0, 0, 0, 0 }, { 0x6651, CHIP_FAMILY_BONAIRE, 0, 0, 0, 0, 0 }, { 0x6658, CHIP_FAMILY_BONAIRE, 0, 0, 0, 0, 0 }, { 0x665C, CHIP_FAMILY_BONAIRE, 0, 0, 0, 0, 0 }, { 0x665D, CHIP_FAMILY_BONAIRE, 0, 0, 0, 0, 0 }, { 0x9830, CHIP_FAMILY_KABINI, 1, 1, 0, 0, 1 }, { 0x9831, CHIP_FAMILY_KABINI, 0, 1, 0, 0, 1 }, { 0x9832, CHIP_FAMILY_KABINI, 1, 1, 0, 0, 1 }, { 0x9833, CHIP_FAMILY_KABINI, 0, 1, 0, 0, 1 }, { 0x9834, CHIP_FAMILY_KABINI, 1, 1, 0, 0, 1 }, { 0x9835, CHIP_FAMILY_KABINI, 0, 1, 0, 0, 1 }, { 0x9836, CHIP_FAMILY_KABINI, 1, 1, 0, 0, 1 }, { 0x9837, CHIP_FAMILY_KABINI, 0, 1, 0, 0, 1 }, { 0x9838, CHIP_FAMILY_KABINI, 1, 1, 0, 0, 1 }, { 0x9839, CHIP_FAMILY_KABINI, 1, 1, 0, 0, 1 }, { 0x983A, CHIP_FAMILY_KABINI, 0, 1, 0, 0, 1 }, { 0x983B, CHIP_FAMILY_KABINI, 1, 1, 0, 0, 1 }, { 0x983C, CHIP_FAMILY_KABINI, 0, 1, 0, 0, 1 }, { 0x983D, CHIP_FAMILY_KABINI, 0, 1, 0, 0, 1 }, { 0x983E, CHIP_FAMILY_KABINI, 0, 1, 0, 0, 1 }, { 0x983F, CHIP_FAMILY_KABINI, 0, 1, 0, 0, 1 }, { 0x1304, CHIP_FAMILY_KAVERI, 1, 1, 0, 0, 1 }, { 0x1305, CHIP_FAMILY_KAVERI, 0, 1, 0, 0, 1 }, { 0x1306, CHIP_FAMILY_KAVERI, 1, 1, 0, 0, 1 }, { 0x1307, CHIP_FAMILY_KAVERI, 0, 1, 0, 0, 1 }, { 0x1309, CHIP_FAMILY_KAVERI, 1, 1, 0, 0, 1 }, { 0x130A, CHIP_FAMILY_KAVERI, 1, 1, 0, 0, 1 }, { 0x130B, CHIP_FAMILY_KAVERI, 1, 1, 0, 0, 1 }, { 0x130C, CHIP_FAMILY_KAVERI, 1, 1, 0, 0, 1 }, { 0x130D, CHIP_FAMILY_KAVERI, 1, 1, 0, 0, 1 }, { 0x130E, CHIP_FAMILY_KAVERI, 1, 1, 0, 0, 1 }, { 0x130F, CHIP_FAMILY_KAVERI, 0, 1, 0, 0, 1 }, { 0x1310, CHIP_FAMILY_KAVERI, 0, 1, 0, 0, 1 }, { 0x1311, CHIP_FAMILY_KAVERI, 0, 1, 0, 0, 1 }, { 0x1312, CHIP_FAMILY_KAVERI, 0, 1, 0, 0, 1 }, { 0x1313, CHIP_FAMILY_KAVERI, 0, 1, 0, 0, 1 }, { 0x1315, CHIP_FAMILY_KAVERI, 0, 1, 0, 0, 1 }, { 0x1316, CHIP_FAMILY_KAVERI, 0, 1, 0, 0, 1 }, { 0x1317, CHIP_FAMILY_KAVERI, 1, 1, 0, 0, 1 }, { 0x131B, CHIP_FAMILY_KAVERI, 0, 1, 0, 0, 1 }, { 0x131C, CHIP_FAMILY_KAVERI, 0, 1, 0, 0, 1 }, { 0x131D, CHIP_FAMILY_KAVERI, 0, 1, 0, 0, 1 }, { 0x67A0, CHIP_FAMILY_HAWAII, 0, 0, 0, 0, 0 }, { 0x67A1, CHIP_FAMILY_HAWAII, 0, 0, 0, 0, 0 }, { 0x67A2, CHIP_FAMILY_HAWAII, 0, 0, 0, 0, 0 }, { 0x67A8, CHIP_FAMILY_HAWAII, 0, 0, 0, 0, 0 }, { 0x67A9, CHIP_FAMILY_HAWAII, 0, 0, 0, 0, 0 }, { 0x67AA, CHIP_FAMILY_HAWAII, 0, 0, 0, 0, 0 }, { 0x67B0, CHIP_FAMILY_HAWAII, 0, 0, 0, 0, 0 }, { 0x67B1, CHIP_FAMILY_HAWAII, 0, 0, 0, 0, 0 }, { 0x67B8, CHIP_FAMILY_HAWAII, 0, 0, 0, 0, 0 }, { 0x67B9, CHIP_FAMILY_HAWAII, 0, 0, 0, 0, 0 }, { 0x67BA, CHIP_FAMILY_HAWAII, 0, 0, 0, 0, 0 }, { 0x67BE, CHIP_FAMILY_HAWAII, 0, 0, 0, 0, 0 }, }; xf86-video-ati-7.3.0/src/radeon_dri2.c0000664000175000017500000014243712265270717014265 00000000000000/* * Copyright 2008 Kristian Høgsberg * Copyright 2008 Jérôme Glisse * * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation on the rights to use, copy, modify, merge, * publish, distribute, 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 * NON-INFRINGEMENT. IN NO EVENT SHALL ATI, VA LINUX SYSTEMS AND/OR * THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "radeon.h" #include "radeon_dri2.h" #include "radeon_video.h" #ifdef DRI2 #include #include #include #include #include "radeon_version.h" #if HAVE_LIST_H #include "list.h" #if !HAVE_XORG_LIST #define xorg_list list #define xorg_list_init list_init #define xorg_list_add list_add #define xorg_list_del list_del #define xorg_list_for_each_entry list_for_each_entry #endif #endif #include "radeon_bo_gem.h" #if DRI2INFOREC_VERSION >= 4 && HAVE_LIST_H #define USE_DRI2_SCHEDULING #endif #if DRI2INFOREC_VERSION >= 9 #define USE_DRI2_PRIME #endif #define FALLBACK_SWAP_DELAY 16 #ifdef USE_GLAMOR #include #endif typedef DRI2BufferPtr BufferPtr; struct dri2_buffer_priv { PixmapPtr pixmap; unsigned int attachment; unsigned int refcnt; }; static PixmapPtr get_drawable_pixmap(DrawablePtr drawable) { if (drawable->type == DRAWABLE_PIXMAP) return (PixmapPtr)drawable; else return (*drawable->pScreen->GetWindowPixmap)((WindowPtr)drawable); } static PixmapPtr fixup_glamor(DrawablePtr drawable, PixmapPtr pixmap) { PixmapPtr old = get_drawable_pixmap(drawable); #ifdef USE_GLAMOR ScreenPtr screen = drawable->pScreen; struct radeon_pixmap *priv = radeon_get_pixmap_private(pixmap); GCPtr gc; /* With a glamor pixmap, 2D pixmaps are created in texture * and without a static BO attached to it. To support DRI, * we need to create a new textured-drm pixmap and * need to copy the original content to this new textured-drm * pixmap, and then convert the old pixmap to a coherent * textured-drm pixmap which has a valid BO attached to it * and also has a valid texture, thus both glamor and DRI2 * can access it. * */ /* Copy the current contents of the pixmap to the bo. */ gc = GetScratchGC(drawable->depth, screen); if (gc) { ValidateGC(&pixmap->drawable, gc); gc->ops->CopyArea(&old->drawable, &pixmap->drawable, gc, 0, 0, old->drawable.width, old->drawable.height, 0, 0); FreeScratchGC(gc); } radeon_set_pixmap_private(pixmap, NULL); /* And redirect the pixmap to the new bo (for 3D). */ glamor_egl_exchange_buffers(old, pixmap); radeon_set_pixmap_private(old, priv); screen->DestroyPixmap(pixmap); old->refcnt++; screen->ModifyPixmapHeader(old, old->drawable.width, old->drawable.height, 0, 0, priv->stride, NULL); #endif /* USE_GLAMOR*/ return old; } static BufferPtr radeon_dri2_create_buffer2(ScreenPtr pScreen, DrawablePtr drawable, unsigned int attachment, unsigned int format) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); BufferPtr buffers; struct dri2_buffer_priv *privates; PixmapPtr pixmap, depth_pixmap; struct radeon_bo *bo; int flags; unsigned front_width; uint32_t tiling = 0; unsigned aligned_width = drawable->width; unsigned height = drawable->height; Bool is_glamor_pixmap = FALSE; int depth; int cpp; if (format) { depth = format; switch (depth) { case 15: cpp = 2; break; case 24: cpp = 4; break; default: cpp = depth / 8; } } else { depth = drawable->depth; cpp = drawable->bitsPerPixel / 8; } pixmap = pScreen->GetScreenPixmap(pScreen); front_width = pixmap->drawable.width; pixmap = depth_pixmap = NULL; if (attachment == DRI2BufferFrontLeft) { pixmap = get_drawable_pixmap(drawable); if (pScreen != pixmap->drawable.pScreen) pixmap = NULL; else if (info->use_glamor && !radeon_get_pixmap_bo(pixmap)) { is_glamor_pixmap = TRUE; aligned_width = pixmap->drawable.width; height = pixmap->drawable.height; pixmap = NULL; } else pixmap->refcnt++; } else if (attachment == DRI2BufferStencil && depth_pixmap) { pixmap = depth_pixmap; pixmap->refcnt++; } if (!pixmap && (is_glamor_pixmap || attachment != DRI2BufferFrontLeft)) { /* tile the back buffer */ switch(attachment) { case DRI2BufferDepth: /* macro is the preferred setting, but the 2D detiling for software * fallbacks in mesa still has issues on some configurations */ if (info->ChipFamily >= CHIP_FAMILY_R600) { if (info->allowColorTiling2D) { flags = RADEON_CREATE_PIXMAP_TILING_MACRO; } else { flags = RADEON_CREATE_PIXMAP_TILING_MICRO; } if (info->ChipFamily >= CHIP_FAMILY_CEDAR) flags |= RADEON_CREATE_PIXMAP_SZBUFFER; } else if (cpp == 2 && info->ChipFamily >= CHIP_FAMILY_R300) flags = RADEON_CREATE_PIXMAP_TILING_MACRO | RADEON_CREATE_PIXMAP_TILING_MICRO_SQUARE; else flags = RADEON_CREATE_PIXMAP_TILING_MACRO | RADEON_CREATE_PIXMAP_TILING_MICRO; if (IS_R200_3D || info->ChipFamily == CHIP_FAMILY_RV200 || info->ChipFamily == CHIP_FAMILY_RADEON) flags |= RADEON_CREATE_PIXMAP_DEPTH; break; case DRI2BufferDepthStencil: /* macro is the preferred setting, but the 2D detiling for software * fallbacks in mesa still has issues on some configurations */ if (info->ChipFamily >= CHIP_FAMILY_R600) { if (info->allowColorTiling2D) { flags = RADEON_CREATE_PIXMAP_TILING_MACRO; } else { flags = RADEON_CREATE_PIXMAP_TILING_MICRO; } if (info->ChipFamily >= CHIP_FAMILY_CEDAR) flags |= RADEON_CREATE_PIXMAP_SZBUFFER; } else if (cpp == 2 && info->ChipFamily >= CHIP_FAMILY_R300) flags = RADEON_CREATE_PIXMAP_TILING_MACRO | RADEON_CREATE_PIXMAP_TILING_MICRO_SQUARE; else flags = RADEON_CREATE_PIXMAP_TILING_MACRO | RADEON_CREATE_PIXMAP_TILING_MICRO; if (IS_R200_3D || info->ChipFamily == CHIP_FAMILY_RV200 || info->ChipFamily == CHIP_FAMILY_RADEON) flags |= RADEON_CREATE_PIXMAP_DEPTH; break; case DRI2BufferBackLeft: case DRI2BufferBackRight: case DRI2BufferFrontLeft: case DRI2BufferFrontRight: case DRI2BufferFakeFrontLeft: case DRI2BufferFakeFrontRight: if (info->ChipFamily >= CHIP_FAMILY_R600) { if (info->allowColorTiling2D) { flags = RADEON_CREATE_PIXMAP_TILING_MACRO; } else { flags = RADEON_CREATE_PIXMAP_TILING_MICRO; } } else flags = RADEON_CREATE_PIXMAP_TILING_MACRO; break; default: flags = 0; } if (flags & RADEON_CREATE_PIXMAP_TILING_MICRO) tiling |= RADEON_TILING_MICRO; if (flags & RADEON_CREATE_PIXMAP_TILING_MICRO_SQUARE) tiling |= RADEON_TILING_MICRO_SQUARE; if (flags & RADEON_CREATE_PIXMAP_TILING_MACRO) tiling |= RADEON_TILING_MACRO; if (aligned_width == front_width) aligned_width = pScrn->virtualX; pixmap = (*pScreen->CreatePixmap)(pScreen, aligned_width, height, depth, flags | RADEON_CREATE_PIXMAP_DRI2); } buffers = calloc(1, sizeof *buffers); if (buffers == NULL) goto error; if (attachment == DRI2BufferDepth) { depth_pixmap = pixmap; } if (pixmap) { if (!info->use_glamor) { info->exa_force_create = TRUE; exaMoveInPixmap(pixmap); info->exa_force_create = FALSE; if (exaGetPixmapDriverPrivate(pixmap) == NULL) { /* this happen if pixmap is non accelerable */ goto error; } } if (is_glamor_pixmap) pixmap = fixup_glamor(drawable, pixmap); bo = radeon_get_pixmap_bo(pixmap); if (!bo || radeon_gem_get_kernel_name(bo, &buffers->name) != 0) goto error; } privates = calloc(1, sizeof(struct dri2_buffer_priv)); if (privates == NULL) goto error; buffers->attachment = attachment; if (pixmap) { buffers->pitch = pixmap->devKind; buffers->cpp = cpp; } buffers->driverPrivate = privates; buffers->format = format; buffers->flags = 0; /* not tiled */ privates->pixmap = pixmap; privates->attachment = attachment; privates->refcnt = 1; return buffers; error: free(buffers); if (pixmap) (*pScreen->DestroyPixmap)(pixmap); return NULL; } DRI2BufferPtr radeon_dri2_create_buffer(DrawablePtr pDraw, unsigned int attachment, unsigned int format) { return radeon_dri2_create_buffer2(pDraw->pScreen, pDraw, attachment, format); } static void radeon_dri2_destroy_buffer2(ScreenPtr pScreen, DrawablePtr drawable, BufferPtr buffers) { if(buffers) { struct dri2_buffer_priv *private = buffers->driverPrivate; /* Trying to free an already freed buffer is unlikely to end well */ if (private->refcnt == 0) { ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); xf86DrvMsg(scrn->scrnIndex, X_WARNING, "Attempted to destroy previously destroyed buffer.\ This is a programming error\n"); return; } private->refcnt--; if (private->refcnt == 0) { if (private->pixmap) (*pScreen->DestroyPixmap)(private->pixmap); free(buffers->driverPrivate); free(buffers); } } } void radeon_dri2_destroy_buffer(DrawablePtr pDraw, DRI2BufferPtr buf) { radeon_dri2_destroy_buffer2(pDraw->pScreen, pDraw, buf); } static inline PixmapPtr GetDrawablePixmap(DrawablePtr drawable) { if (drawable->type == DRAWABLE_PIXMAP) return (PixmapPtr)drawable; else { struct _Window *pWin = (struct _Window *)drawable; return drawable->pScreen->GetWindowPixmap(pWin); } } static void radeon_dri2_copy_region2(ScreenPtr pScreen, DrawablePtr drawable, RegionPtr region, BufferPtr dest_buffer, BufferPtr src_buffer) { struct dri2_buffer_priv *src_private = src_buffer->driverPrivate; struct dri2_buffer_priv *dst_private = dest_buffer->driverPrivate; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); DrawablePtr src_drawable; DrawablePtr dst_drawable; RegionPtr copy_clip; GCPtr gc; RADEONInfoPtr info = RADEONPTR(pScrn); Bool vsync; Bool translate = FALSE; int off_x = 0, off_y = 0; PixmapPtr dst_ppix; dst_ppix = dst_private->pixmap; src_drawable = &src_private->pixmap->drawable; dst_drawable = &dst_private->pixmap->drawable; if (src_private->attachment == DRI2BufferFrontLeft) { src_drawable = drawable; } if (dst_private->attachment == DRI2BufferFrontLeft) { #ifdef USE_DRI2_PRIME if (drawable->pScreen != pScreen) { dst_drawable = DRI2UpdatePrime(drawable, dest_buffer); if (!dst_drawable) return; dst_ppix = (PixmapPtr)dst_drawable; if (dst_drawable != drawable) translate = TRUE; } else #endif dst_drawable = drawable; } if (translate && drawable->type == DRAWABLE_WINDOW) { PixmapPtr pPix = GetDrawablePixmap(drawable); off_x = drawable->x - pPix->screen_x; off_y = drawable->y - pPix->screen_y; } gc = GetScratchGC(dst_drawable->depth, pScreen); copy_clip = REGION_CREATE(pScreen, NULL, 0); REGION_COPY(pScreen, copy_clip, region); if (translate) { REGION_TRANSLATE(pScreen, copy_clip, off_x, off_y); } (*gc->funcs->ChangeClip) (gc, CT_REGION, copy_clip, 0); ValidateGC(dst_drawable, gc); /* If this is a full buffer swap or frontbuffer flush, throttle on the * previous one */ if (dst_private->attachment == DRI2BufferFrontLeft) { if (REGION_NUM_RECTS(region) == 1) { BoxPtr extents = REGION_EXTENTS(pScreen, region); if (extents->x1 == 0 && extents->y1 == 0 && extents->x2 == drawable->width && extents->y2 == drawable->height) { struct radeon_bo *bo = radeon_get_pixmap_bo(dst_ppix); if (bo) radeon_bo_wait(bo); } } } vsync = info->accel_state->vsync; /* Driver option "SwapbuffersWait" defines if we vsync DRI2 copy-swaps. */ info->accel_state->vsync = info->swapBuffersWait; info->accel_state->force = TRUE; (*gc->ops->CopyArea)(src_drawable, dst_drawable, gc, 0, 0, drawable->width, drawable->height, off_x, off_y); info->accel_state->force = FALSE; info->accel_state->vsync = vsync; FreeScratchGC(gc); } void radeon_dri2_copy_region(DrawablePtr pDraw, RegionPtr pRegion, DRI2BufferPtr pDstBuffer, DRI2BufferPtr pSrcBuffer) { return radeon_dri2_copy_region2(pDraw->pScreen, pDraw, pRegion, pDstBuffer, pSrcBuffer); } #ifdef USE_DRI2_SCHEDULING enum DRI2FrameEventType { DRI2_SWAP, DRI2_FLIP, DRI2_WAITMSC, }; typedef struct _DRI2FrameEvent { XID drawable_id; ClientPtr client; enum DRI2FrameEventType type; int frame; xf86CrtcPtr crtc; /* for swaps & flips only */ DRI2SwapEventPtr event_complete; void *event_data; DRI2BufferPtr front; DRI2BufferPtr back; Bool valid; struct xorg_list link; } DRI2FrameEventRec, *DRI2FrameEventPtr; typedef struct _DRI2ClientEvents { struct xorg_list reference_list; } DRI2ClientEventsRec, *DRI2ClientEventsPtr; #if HAS_DEVPRIVATEKEYREC static int DRI2InfoCnt; static DevPrivateKeyRec DRI2ClientEventsPrivateKeyRec; #define DRI2ClientEventsPrivateKey (&DRI2ClientEventsPrivateKeyRec) #else static int DRI2ClientEventsPrivateKeyIndex; DevPrivateKey DRI2ClientEventsPrivateKey = &DRI2ClientEventsPrivateKeyIndex; #endif /* HAS_DEVPRIVATEKEYREC */ #define GetDRI2ClientEvents(pClient) ((DRI2ClientEventsPtr) \ dixLookupPrivate(&(pClient)->devPrivates, DRI2ClientEventsPrivateKey)) static int ListAddDRI2ClientEvents(ClientPtr client, struct xorg_list *entry) { DRI2ClientEventsPtr pClientPriv; pClientPriv = GetDRI2ClientEvents(client); if (!pClientPriv) { return BadAlloc; } xorg_list_add(entry, &pClientPriv->reference_list); return 0; } static void ListDelDRI2ClientEvents(ClientPtr client, struct xorg_list *entry) { DRI2ClientEventsPtr pClientPriv; pClientPriv = GetDRI2ClientEvents(client); if (!pClientPriv) { return; } xorg_list_del(entry); } static void radeon_dri2_ref_buffer(BufferPtr buffer) { struct dri2_buffer_priv *private = buffer->driverPrivate; private->refcnt++; } static void radeon_dri2_unref_buffer(BufferPtr buffer) { if (buffer) { struct dri2_buffer_priv *private = buffer->driverPrivate; radeon_dri2_destroy_buffer(&(private->pixmap->drawable), buffer); } } static void radeon_dri2_client_state_changed(CallbackListPtr *ClientStateCallback, pointer data, pointer calldata) { DRI2ClientEventsPtr pClientEventsPriv; DRI2FrameEventPtr ref; NewClientInfoRec *clientinfo = calldata; ClientPtr pClient = clientinfo->client; pClientEventsPriv = GetDRI2ClientEvents(pClient); switch (pClient->clientState) { case ClientStateInitial: xorg_list_init(&pClientEventsPriv->reference_list); break; case ClientStateRunning: break; case ClientStateRetained: case ClientStateGone: if (pClientEventsPriv) { xorg_list_for_each_entry(ref, &pClientEventsPriv->reference_list, link) { ref->valid = FALSE; radeon_dri2_unref_buffer(ref->front); radeon_dri2_unref_buffer(ref->back); } } break; default: break; } } static xf86CrtcPtr radeon_dri2_drawable_crtc(DrawablePtr pDraw, Bool consider_disabled) { ScreenPtr pScreen = pDraw->pScreen; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); xf86CrtcPtr crtc; crtc = radeon_pick_best_crtc(pScrn, consider_disabled, pDraw->x, pDraw->x + pDraw->width, pDraw->y, pDraw->y + pDraw->height); /* Make sure the CRTC is valid and this is the real front buffer */ if (crtc != NULL && !crtc->rotatedData) return crtc; else return NULL; } static Bool radeon_dri2_schedule_flip(ScrnInfoPtr scrn, ClientPtr client, DrawablePtr draw, DRI2BufferPtr front, DRI2BufferPtr back, DRI2SwapEventPtr func, void *data, unsigned int target_msc) { struct dri2_buffer_priv *back_priv; struct radeon_bo *bo; DRI2FrameEventPtr flip_info; /* Main crtc for this drawable shall finally deliver pageflip event. */ xf86CrtcPtr crtc = radeon_dri2_drawable_crtc(draw, FALSE); int ref_crtc_hw_id = crtc ? drmmode_get_crtc_id(crtc) : -1; flip_info = calloc(1, sizeof(DRI2FrameEventRec)); if (!flip_info) return FALSE; flip_info->drawable_id = draw->id; flip_info->client = client; flip_info->type = DRI2_SWAP; flip_info->event_complete = func; flip_info->event_data = data; flip_info->frame = target_msc; flip_info->crtc = crtc; xf86DrvMsgVerb(scrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, "%s:%d fevent[%p]\n", __func__, __LINE__, flip_info); /* Page flip the full screen buffer */ back_priv = back->driverPrivate; bo = radeon_get_pixmap_bo(back_priv->pixmap); return radeon_do_pageflip(scrn, bo, flip_info, ref_crtc_hw_id); } static Bool update_front(DrawablePtr draw, DRI2BufferPtr front) { int r; PixmapPtr pixmap; RADEONInfoPtr info = RADEONPTR(xf86ScreenToScrn(draw->pScreen)); struct dri2_buffer_priv *priv = front->driverPrivate; struct radeon_bo *bo; pixmap = get_drawable_pixmap(draw); pixmap->refcnt++; if (!info->use_glamor) exaMoveInPixmap(pixmap); bo = radeon_get_pixmap_bo(pixmap); r = radeon_gem_get_kernel_name(bo, &front->name); if (r) { (*draw->pScreen->DestroyPixmap)(pixmap); return FALSE; } (*draw->pScreen->DestroyPixmap)(priv->pixmap); front->pitch = pixmap->devKind; front->cpp = pixmap->drawable.bitsPerPixel / 8; priv->pixmap = pixmap; return TRUE; } static Bool can_exchange(ScrnInfoPtr pScrn, DrawablePtr draw, DRI2BufferPtr front, DRI2BufferPtr back) { struct dri2_buffer_priv *front_priv = front->driverPrivate; struct dri2_buffer_priv *back_priv = back->driverPrivate; PixmapPtr front_pixmap; PixmapPtr back_pixmap = back_priv->pixmap; xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); int i; for (i = 0; i < xf86_config->num_crtc; i++) { xf86CrtcPtr crtc = xf86_config->crtc[i]; if (crtc->enabled && crtc->rotatedData) return FALSE; } if (!update_front(draw, front)) return FALSE; front_pixmap = front_priv->pixmap; if (front_pixmap->drawable.width != back_pixmap->drawable.width) return FALSE; if (front_pixmap->drawable.height != back_pixmap->drawable.height) return FALSE; if (front_pixmap->drawable.bitsPerPixel != back_pixmap->drawable.bitsPerPixel) return FALSE; if (front_pixmap->devKind != back_pixmap->devKind) return FALSE; return TRUE; } static Bool can_flip(ScrnInfoPtr pScrn, DrawablePtr draw, DRI2BufferPtr front, DRI2BufferPtr back) { return draw->type == DRAWABLE_WINDOW && RADEONPTR(pScrn)->allowPageFlip && pScrn->vtSema && DRI2CanFlip(draw) && can_exchange(pScrn, draw, front, back); } static void radeon_dri2_exchange_buffers(DrawablePtr draw, DRI2BufferPtr front, DRI2BufferPtr back) { struct dri2_buffer_priv *front_priv = front->driverPrivate; struct dri2_buffer_priv *back_priv = back->driverPrivate; struct radeon_bo *front_bo, *back_bo; ScreenPtr screen; RADEONInfoPtr info; RegionRec region; int tmp; region.extents.x1 = region.extents.y1 = 0; region.extents.x2 = front_priv->pixmap->drawable.width; region.extents.y2 = front_priv->pixmap->drawable.width; region.data = NULL; DamageRegionAppend(&front_priv->pixmap->drawable, ®ion); /* Swap BO names so DRI works */ tmp = front->name; front->name = back->name; back->name = tmp; /* Swap pixmap bos */ front_bo = radeon_get_pixmap_bo(front_priv->pixmap); back_bo = radeon_get_pixmap_bo(back_priv->pixmap); radeon_set_pixmap_bo(front_priv->pixmap, back_bo); radeon_set_pixmap_bo(back_priv->pixmap, front_bo); /* Do we need to update the Screen? */ screen = draw->pScreen; info = RADEONPTR(xf86ScreenToScrn(screen)); if (front_bo == info->front_bo) { radeon_bo_ref(back_bo); radeon_bo_unref(info->front_bo); info->front_bo = back_bo; radeon_set_pixmap_bo(screen->GetScreenPixmap(screen), back_bo); } radeon_glamor_exchange_buffers(front_priv->pixmap, back_priv->pixmap); DamageRegionProcessPending(&front_priv->pixmap->drawable); } void radeon_dri2_frame_event_handler(unsigned int frame, unsigned int tv_sec, unsigned int tv_usec, void *event_data) { DRI2FrameEventPtr event = event_data; DrawablePtr drawable; ScreenPtr screen; ScrnInfoPtr scrn; int status; int swap_type; BoxRec box; RegionRec region; if (!event->valid) goto cleanup; status = dixLookupDrawable(&drawable, event->drawable_id, serverClient, M_ANY, DixWriteAccess); if (status != Success) goto cleanup; if (!event->crtc) goto cleanup; frame += radeon_get_interpolated_vblanks(event->crtc); screen = drawable->pScreen; scrn = xf86ScreenToScrn(screen); switch (event->type) { case DRI2_FLIP: if (can_flip(scrn, drawable, event->front, event->back) && radeon_dri2_schedule_flip(scrn, event->client, drawable, event->front, event->back, event->event_complete, event->event_data, event->frame)) { radeon_dri2_exchange_buffers(drawable, event->front, event->back); break; } /* else fall through to exchange/blit */ case DRI2_SWAP: if (DRI2CanExchange(drawable) && can_exchange(scrn, drawable, event->front, event->back)) { radeon_dri2_exchange_buffers(drawable, event->front, event->back); swap_type = DRI2_EXCHANGE_COMPLETE; } else { box.x1 = 0; box.y1 = 0; box.x2 = drawable->width; box.y2 = drawable->height; REGION_INIT(pScreen, ®ion, &box, 0); radeon_dri2_copy_region(drawable, ®ion, event->front, event->back); swap_type = DRI2_BLIT_COMPLETE; } DRI2SwapComplete(event->client, drawable, frame, tv_sec, tv_usec, swap_type, event->event_complete, event->event_data); break; case DRI2_WAITMSC: DRI2WaitMSCComplete(event->client, drawable, frame, tv_sec, tv_usec); break; default: /* Unknown type */ xf86DrvMsg(scrn->scrnIndex, X_WARNING, "%s: unknown vblank event received\n", __func__); break; } cleanup: if (event->valid) { radeon_dri2_unref_buffer(event->front); radeon_dri2_unref_buffer(event->back); ListDelDRI2ClientEvents(event->client, &event->link); } free(event); } drmVBlankSeqType radeon_populate_vbl_request_type(xf86CrtcPtr crtc) { drmVBlankSeqType type = 0; int crtc_id = drmmode_get_crtc_id(crtc); if (crtc_id == 1) type |= DRM_VBLANK_SECONDARY; else if (crtc_id > 1) #ifdef DRM_VBLANK_HIGH_CRTC_SHIFT type |= (crtc_id << DRM_VBLANK_HIGH_CRTC_SHIFT) & DRM_VBLANK_HIGH_CRTC_MASK; #else ErrorF("radeon driver bug: %s called for CRTC %d > 1, but " "DRM_VBLANK_HIGH_CRTC_MASK not defined at build time\n", __func__, crtc_id); #endif return type; } /* * This function should be called on a disabled CRTC only (i.e., CRTC * in DPMS-off state). It will calculate the delay necessary to reach * target_msc from present time if the CRTC were running. */ static CARD32 radeon_dri2_extrapolate_msc_delay(xf86CrtcPtr crtc, CARD64 *target_msc, CARD64 divisor, CARD64 remainder) { drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; ScrnInfoPtr pScrn = crtc->scrn; RADEONInfoPtr info = RADEONPTR(pScrn); int nominal_frame_rate = drmmode_crtc->dpms_last_fps; CARD64 last_vblank_ust = drmmode_crtc->dpms_last_ust; uint32_t last_vblank_seq = drmmode_crtc->dpms_last_seq; int interpolated_vblanks = drmmode_crtc->interpolated_vblanks; int target_seq; CARD64 now, target_time, delta_t; int64_t d, delta_seq; int ret; CARD32 d_ms; if (!last_vblank_ust) { *target_msc = 0; return FALLBACK_SWAP_DELAY; } ret = drmmode_get_current_ust(info->dri2.drm_fd, &now); if (ret) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "%s cannot get current time\n", __func__); *target_msc = 0; return FALLBACK_SWAP_DELAY; } target_seq = (int)*target_msc - interpolated_vblanks; delta_seq = (int64_t)target_seq - (int64_t)last_vblank_seq; delta_seq *= 1000000; target_time = last_vblank_ust; target_time += delta_seq / nominal_frame_rate; d = target_time - now; if (d < 0) { /* we missed the event, adjust target_msc, do the divisor magic */ CARD64 current_msc; current_msc = last_vblank_seq + interpolated_vblanks; delta_t = now - last_vblank_ust; delta_seq = delta_t * nominal_frame_rate; current_msc += delta_seq / 1000000; current_msc &= 0xffffffff; if (divisor == 0) { *target_msc = current_msc; d = 0; } else { *target_msc = current_msc - (current_msc % divisor) + remainder; if ((current_msc % divisor) >= remainder) *target_msc += divisor; *target_msc &= 0xffffffff; target_seq = (int)*target_msc - interpolated_vblanks; delta_seq = (int64_t)target_seq - (int64_t)last_vblank_seq; delta_seq *= 1000000; target_time = last_vblank_ust; target_time += delta_seq / nominal_frame_rate; d = target_time - now; } } /* * convert delay to milliseconds and add margin to prevent the client * from coming back early (due to timer granularity and rounding * errors) and getting the same MSC it just got */ d_ms = (CARD32)d / 1000; if ((CARD32)d - d_ms * 1000 > 0) d_ms += 2; else d_ms++; return d_ms; } /* * Get current frame count and frame count timestamp, based on drawable's * crtc. */ static int radeon_dri2_get_msc(DrawablePtr draw, CARD64 *ust, CARD64 *msc) { ScreenPtr screen = draw->pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); RADEONInfoPtr info = RADEONPTR(scrn); drmVBlank vbl; int ret; xf86CrtcPtr crtc = radeon_dri2_drawable_crtc(draw, TRUE); /* Drawable not displayed, make up a value */ if (crtc == NULL) { *ust = 0; *msc = 0; return TRUE; } if (radeon_crtc_is_enabled(crtc)) { /* CRTC is running, read vblank counter and timestamp */ vbl.request.type = DRM_VBLANK_RELATIVE; vbl.request.type |= radeon_populate_vbl_request_type(crtc); vbl.request.sequence = 0; ret = drmWaitVBlank(info->dri2.drm_fd, &vbl); if (ret) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "get vblank counter failed: %s\n", strerror(errno)); return FALSE; } *ust = ((CARD64)vbl.reply.tval_sec * 1000000) + vbl.reply.tval_usec; *msc = vbl.reply.sequence + radeon_get_interpolated_vblanks(crtc); *msc &= 0xffffffff; } else { /* CRTC is not running, extrapolate MSC and timestamp */ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; CARD64 now, delta_t, delta_seq; if (!drmmode_crtc->dpms_last_ust) return FALSE; ret = drmmode_get_current_ust(info->dri2.drm_fd, &now); if (ret) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "%s cannot get current time\n", __func__); return FALSE; } delta_t = now - drmmode_crtc->dpms_last_ust; delta_seq = delta_t * drmmode_crtc->dpms_last_fps; delta_seq /= 1000000; *ust = drmmode_crtc->dpms_last_ust; delta_t = delta_seq * 1000000; delta_t /= drmmode_crtc->dpms_last_fps; *ust += delta_t; *msc = drmmode_crtc->dpms_last_seq; *msc += drmmode_crtc->interpolated_vblanks; *msc += delta_seq; *msc &= 0xffffffff; } return TRUE; } static CARD32 radeon_dri2_deferred_event(OsTimerPtr timer, CARD32 now, pointer data) { DRI2FrameEventPtr event_info = (DRI2FrameEventPtr)data; DrawablePtr drawable; ScreenPtr screen; ScrnInfoPtr scrn; RADEONInfoPtr info; int status; CARD64 drm_now; int ret; unsigned int tv_sec, tv_usec; CARD64 delta_t, delta_seq, frame; drmmode_crtc_private_ptr drmmode_crtc; TimerFree(timer); /* * This is emulated event, so its time is current time, which we * have to get in DRM-compatible form (which is a bit messy given * the information that we have at this point). Can't use now argument * because DRM event time may come from monotonic clock, while * DIX timer facility uses real-time clock. */ if (!event_info->crtc) { ErrorF("%s no crtc\n", __func__); radeon_dri2_frame_event_handler(0, 0, 0, data); return 0; } status = dixLookupDrawable(&drawable, event_info->drawable_id, serverClient, M_ANY, DixWriteAccess); if (status != Success) { ErrorF("%s cannot lookup drawable\n", __func__); radeon_dri2_frame_event_handler(0, 0, 0, data); return 0; } screen = drawable->pScreen; scrn = xf86ScreenToScrn(screen); info = RADEONPTR(scrn); ret = drmmode_get_current_ust(info->dri2.drm_fd, &drm_now); if (ret) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "%s cannot get current time\n", __func__); radeon_dri2_frame_event_handler(0, 0, 0, data); return 0; } tv_sec = (unsigned int)(drm_now / 1000000); tv_usec = (unsigned int)(drm_now - (CARD64)tv_sec * 1000000); /* * calculate the frame number from current time * that would come from CRTC if it were running */ drmmode_crtc = event_info->crtc->driver_private; delta_t = drm_now - (CARD64)drmmode_crtc->dpms_last_ust; delta_seq = delta_t * drmmode_crtc->dpms_last_fps; delta_seq /= 1000000; frame = (CARD64)drmmode_crtc->dpms_last_seq + delta_seq; frame &= 0xffffffff; radeon_dri2_frame_event_handler((unsigned int)frame, tv_sec, tv_usec, data); return 0; } static void radeon_dri2_schedule_event(CARD32 delay, pointer arg) { OsTimerPtr timer; timer = TimerSet(NULL, 0, delay, radeon_dri2_deferred_event, arg); if (delay == 0) { CARD32 now = GetTimeInMillis(); radeon_dri2_deferred_event(timer, now, arg); } } /* * Request a DRM event when the requested conditions will be satisfied. * * We need to handle the event and ask the server to wake up the client when * we receive it. */ static int radeon_dri2_schedule_wait_msc(ClientPtr client, DrawablePtr draw, CARD64 target_msc, CARD64 divisor, CARD64 remainder) { ScreenPtr screen = draw->pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); RADEONInfoPtr info = RADEONPTR(scrn); DRI2FrameEventPtr wait_info = NULL; xf86CrtcPtr crtc = radeon_dri2_drawable_crtc(draw, TRUE); drmVBlank vbl; int ret; CARD64 current_msc; /* Truncate to match kernel interfaces; means occasional overflow * misses, but that's generally not a big deal */ target_msc &= 0xffffffff; divisor &= 0xffffffff; remainder &= 0xffffffff; /* Drawable not visible, return immediately */ if (crtc == NULL) goto out_complete; wait_info = calloc(1, sizeof(DRI2FrameEventRec)); if (!wait_info) goto out_complete; wait_info->drawable_id = draw->id; wait_info->client = client; wait_info->type = DRI2_WAITMSC; wait_info->valid = TRUE; wait_info->crtc = crtc; if (ListAddDRI2ClientEvents(client, &wait_info->link)) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "add events to client private failed.\n"); free(wait_info); wait_info = NULL; goto out_complete; } /* * CRTC is in DPMS off state, calculate wait time from current time, * target_msc and last vblank time/sequence when CRTC was turned off */ if (!radeon_crtc_is_enabled(crtc)) { CARD32 delay; delay = radeon_dri2_extrapolate_msc_delay(crtc, &target_msc, divisor, remainder); wait_info->frame = target_msc; radeon_dri2_schedule_event(delay, wait_info); DRI2BlockClient(client, draw); return TRUE; } /* Get current count */ vbl.request.type = DRM_VBLANK_RELATIVE; vbl.request.type |= radeon_populate_vbl_request_type(crtc); vbl.request.sequence = 0; ret = drmWaitVBlank(info->dri2.drm_fd, &vbl); if (ret) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "get vblank counter failed: %s\n", strerror(errno)); goto out_complete; } current_msc = vbl.reply.sequence + radeon_get_interpolated_vblanks(crtc); current_msc &= 0xffffffff; /* * If divisor is zero, or current_msc is smaller than target_msc, * we just need to make sure target_msc passes before waking up the * client. */ if (divisor == 0 || current_msc < target_msc) { /* If target_msc already reached or passed, set it to * current_msc to ensure we return a reasonable value back * to the caller. This keeps the client from continually * sending us MSC targets from the past by forcibly updating * their count on this call. */ if (current_msc >= target_msc) target_msc = current_msc; vbl.request.type = DRM_VBLANK_ABSOLUTE | DRM_VBLANK_EVENT; vbl.request.type |= radeon_populate_vbl_request_type(crtc); vbl.request.sequence = target_msc; vbl.request.sequence -= radeon_get_interpolated_vblanks(crtc); vbl.request.signal = (unsigned long)wait_info; ret = drmWaitVBlank(info->dri2.drm_fd, &vbl); if (ret) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "get vblank counter failed: %s\n", strerror(errno)); goto out_complete; } wait_info->frame = vbl.reply.sequence; wait_info->frame += radeon_get_interpolated_vblanks(crtc); DRI2BlockClient(client, draw); return TRUE; } /* * If we get here, target_msc has already passed or we don't have one, * so we queue an event that will satisfy the divisor/remainder equation. */ vbl.request.type = DRM_VBLANK_ABSOLUTE | DRM_VBLANK_EVENT; vbl.request.type |= radeon_populate_vbl_request_type(crtc); vbl.request.sequence = current_msc - (current_msc % divisor) + remainder; /* * If calculated remainder is larger than requested remainder, * it means we've passed the last point where * seq % divisor == remainder, so we need to wait for the next time * that will happen. */ if ((current_msc % divisor) >= remainder) vbl.request.sequence += divisor; vbl.request.sequence -= radeon_get_interpolated_vblanks(crtc); vbl.request.signal = (unsigned long)wait_info; ret = drmWaitVBlank(info->dri2.drm_fd, &vbl); if (ret) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "get vblank counter failed: %s\n", strerror(errno)); goto out_complete; } wait_info->frame = vbl.reply.sequence; wait_info->frame += radeon_get_interpolated_vblanks(crtc); DRI2BlockClient(client, draw); return TRUE; out_complete: if (wait_info) { ListDelDRI2ClientEvents(wait_info->client, &wait_info->link); free(wait_info); } DRI2WaitMSCComplete(client, draw, target_msc, 0, 0); return TRUE; } void radeon_dri2_flip_event_handler(unsigned int frame, unsigned int tv_sec, unsigned int tv_usec, void *event_data) { DRI2FrameEventPtr flip = event_data; DrawablePtr drawable; ScreenPtr screen; ScrnInfoPtr scrn; int status; PixmapPtr pixmap; status = dixLookupDrawable(&drawable, flip->drawable_id, serverClient, M_ANY, DixWriteAccess); if (status != Success) { free(flip); return; } if (!flip->crtc) { free(flip); return; } frame += radeon_get_interpolated_vblanks(flip->crtc); screen = drawable->pScreen; scrn = xf86ScreenToScrn(screen); pixmap = screen->GetScreenPixmap(screen); xf86DrvMsgVerb(scrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, "%s:%d fevent[%p] width %d pitch %d (/4 %d)\n", __func__, __LINE__, flip, pixmap->drawable.width, pixmap->devKind, pixmap->devKind/4); /* We assume our flips arrive in order, so we don't check the frame */ switch (flip->type) { case DRI2_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. */ if ((frame < flip->frame) && (flip->frame - frame < 5)) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "%s: Pageflip completion event 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, drawable, frame, tv_sec, tv_usec, DRI2_FLIP_COMPLETE, flip->event_complete, flip->event_data); break; default: xf86DrvMsg(scrn->scrnIndex, X_WARNING, "%s: unknown vblank event received\n", __func__); /* Unknown type */ break; } free(flip); } /* * ScheduleSwap is responsible for requesting a DRM vblank event for the * appropriate frame. * * In the case of a blit (e.g. for a windowed swap) or buffer exchange, * the vblank requested can simply be the last queued swap frame + the swap * interval for the drawable. * * In the case of a page flip, we request an event for the last queued swap * frame + swap interval - 1, since we'll need to queue the flip for the frame * immediately following the received event. * * The client will be blocked if it tries to perform further GL commands * after queueing a swap, though in the Intel case after queueing a flip, the * client is free to queue more commands; they'll block in the kernel if * they access buffers busy with the flip. * * When the swap is complete, the driver should call into the server so it * can send any swap complete events that have been requested. */ static int radeon_dri2_schedule_swap(ClientPtr client, DrawablePtr draw, DRI2BufferPtr front, DRI2BufferPtr back, CARD64 *target_msc, CARD64 divisor, CARD64 remainder, DRI2SwapEventPtr func, void *data) { ScreenPtr screen = draw->pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); RADEONInfoPtr info = RADEONPTR(scrn); xf86CrtcPtr crtc = radeon_dri2_drawable_crtc(draw, TRUE); drmVBlank vbl; int ret, flip = 0; DRI2FrameEventPtr swap_info = NULL; enum DRI2FrameEventType swap_type = DRI2_SWAP; CARD64 current_msc; BoxRec box; RegionRec region; /* Truncate to match kernel interfaces; means occasional overflow * misses, but that's generally not a big deal */ *target_msc &= 0xffffffff; divisor &= 0xffffffff; remainder &= 0xffffffff; /* radeon_dri2_frame_event_handler will get called some unknown time in the * future with these buffers. Take a reference to ensure that they won't * get destroyed before then. */ radeon_dri2_ref_buffer(front); radeon_dri2_ref_buffer(back); /* either off-screen or CRTC not usable... just complete the swap */ if (crtc == NULL) goto blit_fallback; swap_info = calloc(1, sizeof(DRI2FrameEventRec)); if (!swap_info) goto blit_fallback; swap_info->drawable_id = draw->id; swap_info->client = client; swap_info->event_complete = func; swap_info->event_data = data; swap_info->front = front; swap_info->back = back; swap_info->valid = TRUE; swap_info->crtc = crtc; if (ListAddDRI2ClientEvents(client, &swap_info->link)) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "add events to client private failed.\n"); free(swap_info); swap_info = NULL; goto blit_fallback; } /* * CRTC is in DPMS off state, fallback to blit, but calculate * wait time from current time, target_msc and last vblank * time/sequence when CRTC was turned off */ if (!radeon_crtc_is_enabled(crtc)) { CARD32 delay; delay = radeon_dri2_extrapolate_msc_delay(crtc, target_msc, divisor, remainder); swap_info->frame = *target_msc; radeon_dri2_schedule_event(delay, swap_info); return TRUE; } /* Get current count */ vbl.request.type = DRM_VBLANK_RELATIVE; vbl.request.type |= radeon_populate_vbl_request_type(crtc); vbl.request.sequence = 0; ret = drmWaitVBlank(info->dri2.drm_fd, &vbl); if (ret) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "first get vblank counter failed: %s\n", strerror(errno)); *target_msc = 0; radeon_dri2_schedule_event(FALLBACK_SWAP_DELAY, swap_info); return TRUE; } current_msc = vbl.reply.sequence + radeon_get_interpolated_vblanks(crtc); current_msc &= 0xffffffff; /* Flips need to be submitted one frame before */ if (can_flip(scrn, draw, front, back)) { swap_type = DRI2_FLIP; flip = 1; } swap_info->type = swap_type; /* Correct target_msc by 'flip' if swap_type == DRI2_FLIP. * Do it early, so handling of different timing constraints * for divisor, remainder and msc vs. target_msc works. */ if (*target_msc > 0) *target_msc -= flip; /* * If divisor is zero, or current_msc is smaller than target_msc * we just need to make sure target_msc passes before initiating * the swap. */ if (divisor == 0 || current_msc < *target_msc) { vbl.request.type = DRM_VBLANK_ABSOLUTE | DRM_VBLANK_EVENT; /* If non-pageflipping, but blitting/exchanging, we need to use * DRM_VBLANK_NEXTONMISS to avoid unreliable timestamping later * on. */ if (flip == 0) vbl.request.type |= DRM_VBLANK_NEXTONMISS; vbl.request.type |= radeon_populate_vbl_request_type(crtc); /* If target_msc already reached or passed, set it to * current_msc to ensure we return a reasonable value back * to the caller. This makes swap_interval logic more robust. */ if (current_msc >= *target_msc) *target_msc = current_msc; vbl.request.sequence = *target_msc; vbl.request.sequence -= radeon_get_interpolated_vblanks(crtc); vbl.request.signal = (unsigned long)swap_info; ret = drmWaitVBlank(info->dri2.drm_fd, &vbl); if (ret) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "divisor 0 get vblank counter failed: %s\n", strerror(errno)); *target_msc = 0; radeon_dri2_schedule_event(FALLBACK_SWAP_DELAY, swap_info); return TRUE; } *target_msc = vbl.reply.sequence + flip; *target_msc += radeon_get_interpolated_vblanks(crtc); swap_info->frame = *target_msc; return TRUE; } /* * If we get here, target_msc has already passed or we don't have one, * and we need to queue an event that will satisfy the divisor/remainder * equation. */ vbl.request.type = DRM_VBLANK_ABSOLUTE | DRM_VBLANK_EVENT; if (flip == 0) vbl.request.type |= DRM_VBLANK_NEXTONMISS; vbl.request.type |= radeon_populate_vbl_request_type(crtc); vbl.request.sequence = current_msc - (current_msc % divisor) + remainder; /* * If the calculated deadline vbl.request.sequence is smaller than * or equal to current_msc, it means we've passed the last point * when effective onset frame seq could satisfy * seq % divisor == remainder, so we need to wait for the next time * this will happen. * This comparison takes the 1 frame swap delay in pageflipping mode * into account, as well as a potential DRM_VBLANK_NEXTONMISS delay * if we are blitting/exchanging instead of flipping. */ if (vbl.request.sequence <= current_msc) vbl.request.sequence += divisor; vbl.request.sequence -= radeon_get_interpolated_vblanks(crtc); /* Account for 1 frame extra pageflip delay if flip > 0 */ vbl.request.sequence -= flip; vbl.request.signal = (unsigned long)swap_info; ret = drmWaitVBlank(info->dri2.drm_fd, &vbl); if (ret) { xf86DrvMsg(scrn->scrnIndex, X_WARNING, "final get vblank counter failed: %s\n", strerror(errno)); *target_msc = 0; radeon_dri2_schedule_event(FALLBACK_SWAP_DELAY, swap_info); return TRUE; } /* Adjust returned value for 1 fame pageflip offset of flip > 0 */ *target_msc = vbl.reply.sequence + flip; *target_msc += radeon_get_interpolated_vblanks(crtc); swap_info->frame = *target_msc; return TRUE; blit_fallback: box.x1 = 0; box.y1 = 0; box.x2 = draw->width; box.y2 = draw->height; REGION_INIT(pScreen, ®ion, &box, 0); radeon_dri2_copy_region(draw, ®ion, front, back); DRI2SwapComplete(client, draw, 0, 0, 0, DRI2_BLIT_COMPLETE, func, data); if (swap_info) { ListDelDRI2ClientEvents(swap_info->client, &swap_info->link); free(swap_info); } radeon_dri2_unref_buffer(front); radeon_dri2_unref_buffer(back); *target_msc = 0; /* offscreen, so zero out target vblank count */ return TRUE; } #endif /* USE_DRI2_SCHEDULING */ Bool radeon_dri2_screen_init(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); DRI2InfoRec dri2_info = { 0 }; #ifdef USE_DRI2_SCHEDULING const char *driverNames[2]; Bool scheduling_works = TRUE; #endif if (!info->dri2.available) return FALSE; info->dri2.device_name = drmGetDeviceNameFromFd(info->dri2.drm_fd); if ( (info->ChipFamily >= CHIP_FAMILY_TAHITI) ) { dri2_info.driverName = SI_DRIVER_NAME; } else if ( (info->ChipFamily >= CHIP_FAMILY_R600) ) { dri2_info.driverName = R600_DRIVER_NAME; } else if ( (info->ChipFamily >= CHIP_FAMILY_R300) ) { dri2_info.driverName = R300_DRIVER_NAME; } else if ( info->ChipFamily >= CHIP_FAMILY_R200 ) { dri2_info.driverName = R200_DRIVER_NAME; } else { dri2_info.driverName = RADEON_DRIVER_NAME; } dri2_info.fd = info->dri2.drm_fd; dri2_info.deviceName = info->dri2.device_name; dri2_info.version = DRI2INFOREC_VERSION; dri2_info.CreateBuffer = radeon_dri2_create_buffer; dri2_info.DestroyBuffer = radeon_dri2_destroy_buffer; dri2_info.CopyRegion = radeon_dri2_copy_region; #ifdef USE_DRI2_SCHEDULING if (info->dri2.pKernelDRMVersion->version_minor < 4) { xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "You need a newer kernel for " "sync extension\n"); scheduling_works = FALSE; } if (scheduling_works && info->drmmode.mode_res->count_crtcs > 2) { #ifdef DRM_CAP_VBLANK_HIGH_CRTC uint64_t cap_value; if (drmGetCap(info->dri2.drm_fd, DRM_CAP_VBLANK_HIGH_CRTC, &cap_value)) { xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "You need a newer kernel " "for VBLANKs on CRTC > 1\n"); scheduling_works = FALSE; } else if (!cap_value) { xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Your kernel does not " "handle VBLANKs on CRTC > 1\n"); scheduling_works = FALSE; } #else xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "You need to rebuild against a " "newer libdrm to handle VBLANKs on CRTC > 1\n"); scheduling_works = FALSE; #endif } if (scheduling_works) { dri2_info.version = 4; dri2_info.ScheduleSwap = radeon_dri2_schedule_swap; dri2_info.GetMSC = radeon_dri2_get_msc; dri2_info.ScheduleWaitMSC = radeon_dri2_schedule_wait_msc; dri2_info.numDrivers = RADEON_ARRAY_SIZE(driverNames); dri2_info.driverNames = driverNames; driverNames[0] = driverNames[1] = dri2_info.driverName; if (DRI2InfoCnt == 0) { #if HAS_DIXREGISTERPRIVATEKEY if (!dixRegisterPrivateKey(DRI2ClientEventsPrivateKey, PRIVATE_CLIENT, sizeof(DRI2ClientEventsRec))) { xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "DRI2 registering " "private key to client failed\n"); return FALSE; } #else if (!dixRequestPrivate(DRI2ClientEventsPrivateKey, sizeof(DRI2ClientEventsRec))) { xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "DRI2 requesting " "private key to client failed\n"); return FALSE; } #endif AddCallback(&ClientStateCallback, radeon_dri2_client_state_changed, 0); } DRI2InfoCnt++; } #endif #if DRI2INFOREC_VERSION >= 9 dri2_info.version = 9; dri2_info.CreateBuffer2 = radeon_dri2_create_buffer2; dri2_info.DestroyBuffer2 = radeon_dri2_destroy_buffer2; dri2_info.CopyRegion2 = radeon_dri2_copy_region2; #endif info->dri2.enabled = DRI2ScreenInit(pScreen, &dri2_info); return info->dri2.enabled; } void radeon_dri2_close_screen(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); #ifdef USE_DRI2_SCHEDULING if (--DRI2InfoCnt == 0) DeleteCallback(&ClientStateCallback, radeon_dri2_client_state_changed, 0); #endif DRI2CloseScreen(pScreen); drmFree(info->dri2.device_name); } #endif /* DRI2 */ xf86-video-ati-7.3.0/src/radeon_bo_helper.c0000664000175000017500000002062112236760243015346 00000000000000/* * Copyright 2012 Advanced Micro Devices, 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. */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "radeon.h" #ifdef RADEON_PIXMAP_SHARING #include "radeon_bo_gem.h" #endif static const unsigned MicroBlockTable[5][3][2] = { /*linear tiled square-tiled */ {{32, 1}, {8, 4}, {0, 0}}, /* 8 bits per pixel */ {{16, 1}, {8, 2}, {4, 4}}, /* 16 bits per pixel */ {{ 8, 1}, {4, 2}, {0, 0}}, /* 32 bits per pixel */ {{ 4, 1}, {0, 0}, {2, 2}}, /* 64 bits per pixel */ {{ 2, 1}, {0, 0}, {0, 0}} /* 128 bits per pixel */ }; /* Return true if macrotiling can be enabled */ static Bool RADEONMacroSwitch(int width, int height, int bpp, uint32_t flags, Bool rv350_mode) { unsigned tilew, tileh, microtiled, logbpp; logbpp = RADEONLog2(bpp / 8); if (logbpp > 4) return 0; microtiled = !!(flags & RADEON_TILING_MICRO); tilew = MicroBlockTable[logbpp][microtiled][0] * 8; tileh = MicroBlockTable[logbpp][microtiled][1] * 8; /* See TX_FILTER1_n.MACRO_SWITCH. */ if (rv350_mode) { return width >= tilew && height >= tileh; } else { return width > tilew && height > tileh; } } /* Calculate appropriate tiling and pitch for a pixmap and allocate a BO that * can hold it. */ struct radeon_bo* radeon_alloc_pixmap_bo(ScrnInfoPtr pScrn, int width, int height, int depth, int usage_hint, int bitsPerPixel, int *new_pitch, struct radeon_surface *new_surface, uint32_t *new_tiling) { RADEONInfoPtr info = RADEONPTR(pScrn); int pitch, base_align; uint32_t size, heighta; int cpp = bitsPerPixel / 8; uint32_t tiling = 0; struct radeon_surface surface; struct radeon_bo *bo; int domain = RADEON_GEM_DOMAIN_VRAM; if (usage_hint) { if (info->allowColorTiling) { if (usage_hint & RADEON_CREATE_PIXMAP_TILING_MACRO) tiling |= RADEON_TILING_MACRO; if (usage_hint & RADEON_CREATE_PIXMAP_TILING_MICRO) tiling |= RADEON_TILING_MICRO; } if (usage_hint & RADEON_CREATE_PIXMAP_DEPTH) tiling |= RADEON_TILING_MACRO | RADEON_TILING_MICRO; #ifdef CREATE_PIXMAP_USAGE_SHARED if ((usage_hint & 0xffff) == CREATE_PIXMAP_USAGE_SHARED) { tiling = 0; domain = RADEON_GEM_DOMAIN_GTT; } #endif } /* Small pixmaps must not be macrotiled on R300, hw cannot sample them * correctly because samplers automatically switch to macrolinear. */ if (info->ChipFamily >= CHIP_FAMILY_R300 && info->ChipFamily <= CHIP_FAMILY_RS740 && (tiling & RADEON_TILING_MACRO) && !RADEONMacroSwitch(width, height, bitsPerPixel, tiling, info->ChipFamily >= CHIP_FAMILY_RV350)) { tiling &= ~RADEON_TILING_MACRO; } heighta = RADEON_ALIGN(height, drmmode_get_height_align(pScrn, tiling)); pitch = RADEON_ALIGN(width, drmmode_get_pitch_align(pScrn, cpp, tiling)) * cpp; base_align = drmmode_get_base_align(pScrn, cpp, tiling); size = RADEON_ALIGN(heighta * pitch, RADEON_GPU_PAGE_SIZE); memset(&surface, 0, sizeof(struct radeon_surface)); if (info->ChipFamily >= CHIP_FAMILY_R600 && info->surf_man) { if (width) { surface.npix_x = width; /* need to align height to 8 for old kernel */ surface.npix_y = RADEON_ALIGN(height, 8); surface.npix_z = 1; surface.blk_w = 1; surface.blk_h = 1; surface.blk_d = 1; surface.array_size = 1; surface.last_level = 0; surface.bpe = cpp; surface.nsamples = 1; if (height < 128) { /* disable 2d tiling for small surface to work around * the fact that ddx align height to 8 pixel for old * obscure reason i can't remember */ tiling &= ~RADEON_TILING_MACRO; } surface.flags = RADEON_SURF_SCANOUT; /* we are requiring a recent enough libdrm version */ surface.flags |= RADEON_SURF_HAS_TILE_MODE_INDEX; surface.flags |= RADEON_SURF_SET(RADEON_SURF_TYPE_2D, TYPE); surface.flags |= RADEON_SURF_SET(RADEON_SURF_MODE_LINEAR, MODE); if ((tiling & RADEON_TILING_MICRO)) { surface.flags = RADEON_SURF_CLR(surface.flags, MODE); surface.flags |= RADEON_SURF_SET(RADEON_SURF_MODE_1D, MODE); } if ((tiling & RADEON_TILING_MACRO)) { surface.flags = RADEON_SURF_CLR(surface.flags, MODE); surface.flags |= RADEON_SURF_SET(RADEON_SURF_MODE_2D, MODE); } if (usage_hint & RADEON_CREATE_PIXMAP_SZBUFFER) { surface.flags |= RADEON_SURF_ZBUFFER; surface.flags |= RADEON_SURF_SBUFFER; } if (radeon_surface_best(info->surf_man, &surface)) { return NULL; } if (radeon_surface_init(info->surf_man, &surface)) { return NULL; } size = surface.bo_size; base_align = surface.bo_alignment; pitch = surface.level[0].pitch_bytes; tiling = 0; switch (surface.level[0].mode) { case RADEON_SURF_MODE_2D: tiling |= RADEON_TILING_MACRO; tiling |= surface.bankw << RADEON_TILING_EG_BANKW_SHIFT; tiling |= surface.bankh << RADEON_TILING_EG_BANKH_SHIFT; tiling |= surface.mtilea << RADEON_TILING_EG_MACRO_TILE_ASPECT_SHIFT; tiling |= eg_tile_split(surface.tile_split) << RADEON_TILING_EG_TILE_SPLIT_SHIFT; tiling |= eg_tile_split(surface.stencil_tile_split) << RADEON_TILING_EG_STENCIL_TILE_SPLIT_SHIFT; break; case RADEON_SURF_MODE_1D: tiling |= RADEON_TILING_MICRO; break; default: break; } } } bo = radeon_bo_open(info->bufmgr, 0, size, base_align, domain, 0); if (bo && tiling && radeon_bo_set_tiling(bo, tiling, pitch) == 0) *new_tiling = tiling; *new_surface = surface; *new_pitch = pitch; return bo; } #ifdef RADEON_PIXMAP_SHARING Bool radeon_share_pixmap_backing(struct radeon_bo *bo, void **handle_p) { int handle; if (radeon_gem_prime_share_bo(bo, &handle) != 0) return FALSE; *handle_p = (void *)(long)handle; return TRUE; } Bool radeon_set_shared_pixmap_backing(PixmapPtr ppix, void *fd_handle, struct radeon_surface *surface) { ScrnInfoPtr pScrn = xf86ScreenToScrn(ppix->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_bo *bo; int ihandle = (int)(long)fd_handle; uint32_t size = ppix->devKind * ppix->drawable.height; bo = radeon_gem_bo_open_prime(info->bufmgr, ihandle, size); if (!bo) return FALSE; memset(surface, 0, sizeof(struct radeon_surface)); if (info->ChipFamily >= CHIP_FAMILY_R600 && info->surf_man) { surface->npix_x = ppix->drawable.width; surface->npix_y = ppix->drawable.height; surface->npix_z = 1; surface->blk_w = 1; surface->blk_h = 1; surface->blk_d = 1; surface->array_size = 1; surface->bpe = ppix->drawable.bitsPerPixel / 8; surface->nsamples = 1; /* we are requiring a recent enough libdrm version */ surface->flags |= RADEON_SURF_HAS_TILE_MODE_INDEX; surface->flags |= RADEON_SURF_SET(RADEON_SURF_TYPE_2D, TYPE); surface->flags |= RADEON_SURF_SET(RADEON_SURF_MODE_LINEAR, MODE); if (radeon_surface_best(info->surf_man, surface)) { return FALSE; } if (radeon_surface_init(info->surf_man, surface)) { return FALSE; } /* we have to post hack the surface to reflect the actual size of the shared pixmap */ surface->level[0].pitch_bytes = ppix->devKind; surface->level[0].nblk_x = ppix->devKind / surface->bpe; } radeon_set_pixmap_bo(ppix, bo); close(ihandle); /* we have a reference from the alloc and one from set pixmap bo, drop one */ radeon_bo_unref(bo); return TRUE; } #endif /* RADEON_PIXMAP_SHARING */ xf86-video-ati-7.3.0/src/radeon_reg.h0000664000175000017500000110211512177731114014170 00000000000000/* * Copyright 2000 ATI Technologies Inc., Markham, Ontario, and * VA Linux Systems Inc., Fremont, California. * * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation on the rights to use, copy, modify, merge, * publish, distribute, 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 * NON-INFRINGEMENT. IN NO EVENT SHALL ATI, VA LINUX SYSTEMS AND/OR * THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ /* * Authors: * Kevin E. Martin * Rickard E. Faith * Alan Hourihane * * References: * * !!!! FIXME !!!! * RAGE 128 VR/ RAGE 128 GL Register Reference Manual (Technical * Reference Manual P/N RRG-G04100-C Rev. 0.04), ATI Technologies: April * 1999. * * !!!! FIXME !!!! * RAGE 128 Software Development Manual (Technical Reference Manual P/N * SDK-G04000 Rev. 0.01), ATI Technologies: June 1999. * */ /* !!!! FIXME !!!! NOTE: THIS FILE HAS BEEN CONVERTED FROM r128_reg.h * AND CONTAINS REGISTERS AND REGISTER DEFINITIONS THAT ARE NOT CORRECT * ON THE RADEON. A FULL AUDIT OF THIS CODE IS NEEDED! */ #ifndef _RADEON_REG_H_ #define _RADEON_REG_H_ #define ATI_DATATYPE_VQ 0 #define ATI_DATATYPE_CI4 1 #define ATI_DATATYPE_CI8 2 #define ATI_DATATYPE_ARGB1555 3 #define ATI_DATATYPE_RGB565 4 #define ATI_DATATYPE_RGB888 5 #define ATI_DATATYPE_ARGB8888 6 #define ATI_DATATYPE_RGB332 7 #define ATI_DATATYPE_Y8 8 #define ATI_DATATYPE_RGB8 9 #define ATI_DATATYPE_CI16 10 #define ATI_DATATYPE_VYUY_422 11 #define ATI_DATATYPE_YVYU_422 12 #define ATI_DATATYPE_AYUV_444 14 #define ATI_DATATYPE_ARGB4444 15 /* Registers for 2D/Video/Overlay */ #define RADEON_ADAPTER_ID 0x0f2c /* PCI */ #define RADEON_AGP_BASE 0x0170 #define RADEON_AGP_CNTL 0x0174 # define RADEON_AGP_APER_SIZE_256MB (0x00 << 0) # define RADEON_AGP_APER_SIZE_128MB (0x20 << 0) # define RADEON_AGP_APER_SIZE_64MB (0x30 << 0) # define RADEON_AGP_APER_SIZE_32MB (0x38 << 0) # define RADEON_AGP_APER_SIZE_16MB (0x3c << 0) # define RADEON_AGP_APER_SIZE_8MB (0x3e << 0) # define RADEON_AGP_APER_SIZE_4MB (0x3f << 0) # define RADEON_AGP_APER_SIZE_MASK (0x3f << 0) #define RADEON_STATUS_PCI_CONFIG 0x06 # define RADEON_CAP_LIST 0x100000 #define RADEON_CAPABILITIES_PTR_PCI_CONFIG 0x34 /* offset in PCI config*/ # define RADEON_CAP_PTR_MASK 0xfc /* mask off reserved bits of CAP_PTR */ # define RADEON_CAP_ID_NULL 0x00 /* End of capability list */ # define RADEON_CAP_ID_AGP 0x02 /* AGP capability ID */ # define RADEON_CAP_ID_EXP 0x10 /* PCI Express */ #define RADEON_AGP_COMMAND 0x0f60 /* PCI */ #define RADEON_AGP_COMMAND_PCI_CONFIG 0x0060 /* offset in PCI config*/ # define RADEON_AGP_ENABLE (1<<8) #define RADEON_AGP_PLL_CNTL 0x000b /* PLL */ #define RADEON_AGP_STATUS 0x0f5c /* PCI */ # define RADEON_AGP_1X_MODE 0x01 # define RADEON_AGP_2X_MODE 0x02 # define RADEON_AGP_4X_MODE 0x04 # define RADEON_AGP_FW_MODE 0x10 # define RADEON_AGP_MODE_MASK 0x17 # define RADEON_AGPv3_MODE 0x08 # define RADEON_AGPv3_4X_MODE 0x01 # define RADEON_AGPv3_8X_MODE 0x02 #define RADEON_ATTRDR 0x03c1 /* VGA */ #define RADEON_ATTRDW 0x03c0 /* VGA */ #define RADEON_ATTRX 0x03c0 /* VGA */ #define RADEON_AUX_WINDOW_HORZ_CNTL 0x02d8 #define RADEON_AUX_WINDOW_VERT_CNTL 0x02dc #define RADEON_BASE_CODE 0x0f0b #define RADEON_BIOS_0_SCRATCH 0x0010 # define RADEON_FP_PANEL_SCALABLE (1 << 16) # define RADEON_FP_PANEL_SCALE_EN (1 << 17) # define RADEON_FP_CHIP_SCALE_EN (1 << 18) # define RADEON_DRIVER_BRIGHTNESS_EN (1 << 26) # define RADEON_DISPLAY_ROT_MASK (3 << 28) # define RADEON_DISPLAY_ROT_00 (0 << 28) # define RADEON_DISPLAY_ROT_90 (1 << 28) # define RADEON_DISPLAY_ROT_180 (2 << 28) # define RADEON_DISPLAY_ROT_270 (3 << 28) #define RADEON_BIOS_1_SCRATCH 0x0014 #define RADEON_BIOS_2_SCRATCH 0x0018 #define RADEON_BIOS_3_SCRATCH 0x001c #define RADEON_BIOS_4_SCRATCH 0x0020 # define RADEON_CRT1_ATTACHED_MASK (3 << 0) # define RADEON_CRT1_ATTACHED_MONO (1 << 0) # define RADEON_CRT1_ATTACHED_COLOR (2 << 0) # define RADEON_LCD1_ATTACHED (1 << 2) # define RADEON_DFP1_ATTACHED (1 << 3) # define RADEON_TV1_ATTACHED_MASK (3 << 4) # define RADEON_TV1_ATTACHED_COMP (1 << 4) # define RADEON_TV1_ATTACHED_SVIDEO (2 << 4) # define RADEON_CRT2_ATTACHED_MASK (3 << 8) # define RADEON_CRT2_ATTACHED_MONO (1 << 8) # define RADEON_CRT2_ATTACHED_COLOR (2 << 8) # define RADEON_DFP2_ATTACHED (1 << 11) #define RADEON_BIOS_5_SCRATCH 0x0024 # define RADEON_LCD1_ON (1 << 0) # define RADEON_CRT1_ON (1 << 1) # define RADEON_TV1_ON (1 << 2) # define RADEON_DFP1_ON (1 << 3) # define RADEON_CRT2_ON (1 << 5) # define RADEON_CV1_ON (1 << 6) # define RADEON_DFP2_ON (1 << 7) # define RADEON_LCD1_CRTC_MASK (1 << 8) # define RADEON_LCD1_CRTC_SHIFT 8 # define RADEON_CRT1_CRTC_MASK (1 << 9) # define RADEON_CRT1_CRTC_SHIFT 9 # define RADEON_TV1_CRTC_MASK (1 << 10) # define RADEON_TV1_CRTC_SHIFT 10 # define RADEON_DFP1_CRTC_MASK (1 << 11) # define RADEON_DFP1_CRTC_SHIFT 11 # define RADEON_CRT2_CRTC_MASK (1 << 12) # define RADEON_CRT2_CRTC_SHIFT 12 # define RADEON_CV1_CRTC_MASK (1 << 13) # define RADEON_CV1_CRTC_SHIFT 13 # define RADEON_DFP2_CRTC_MASK (1 << 14) # define RADEON_DFP2_CRTC_SHIFT 14 #define RADEON_BIOS_6_SCRATCH 0x0028 # define RADEON_ACC_MODE_CHANGE (1 << 2) # define RADEON_EXT_DESKTOP_MODE (1 << 3) # define RADEON_LCD_DPMS_ON (1 << 20) # define RADEON_CRT_DPMS_ON (1 << 21) # define RADEON_TV_DPMS_ON (1 << 22) # define RADEON_DFP_DPMS_ON (1 << 23) # define RADEON_DPMS_MASK (3 << 24) # define RADEON_DPMS_ON (0 << 24) # define RADEON_DPMS_STANDBY (1 << 24) # define RADEON_DPMS_SUSPEND (2 << 24) # define RADEON_DPMS_OFF (3 << 24) # define RADEON_SCREEN_BLANKING (1 << 26) # define RADEON_DRIVER_CRITICAL (1 << 27) # define RADEON_DISPLAY_SWITCHING_DIS (1 << 30) #define RADEON_BIOS_7_SCRATCH 0x002c # define RADEON_SYS_HOTKEY (1 << 10) # define RADEON_DRV_LOADED (1 << 12) #define RADEON_BIOS_ROM 0x0f30 /* PCI */ #define RADEON_BIST 0x0f0f /* PCI */ #define RADEON_BRUSH_DATA0 0x1480 #define RADEON_BRUSH_DATA1 0x1484 #define RADEON_BRUSH_DATA10 0x14a8 #define RADEON_BRUSH_DATA11 0x14ac #define RADEON_BRUSH_DATA12 0x14b0 #define RADEON_BRUSH_DATA13 0x14b4 #define RADEON_BRUSH_DATA14 0x14b8 #define RADEON_BRUSH_DATA15 0x14bc #define RADEON_BRUSH_DATA16 0x14c0 #define RADEON_BRUSH_DATA17 0x14c4 #define RADEON_BRUSH_DATA18 0x14c8 #define RADEON_BRUSH_DATA19 0x14cc #define RADEON_BRUSH_DATA2 0x1488 #define RADEON_BRUSH_DATA20 0x14d0 #define RADEON_BRUSH_DATA21 0x14d4 #define RADEON_BRUSH_DATA22 0x14d8 #define RADEON_BRUSH_DATA23 0x14dc #define RADEON_BRUSH_DATA24 0x14e0 #define RADEON_BRUSH_DATA25 0x14e4 #define RADEON_BRUSH_DATA26 0x14e8 #define RADEON_BRUSH_DATA27 0x14ec #define RADEON_BRUSH_DATA28 0x14f0 #define RADEON_BRUSH_DATA29 0x14f4 #define RADEON_BRUSH_DATA3 0x148c #define RADEON_BRUSH_DATA30 0x14f8 #define RADEON_BRUSH_DATA31 0x14fc #define RADEON_BRUSH_DATA32 0x1500 #define RADEON_BRUSH_DATA33 0x1504 #define RADEON_BRUSH_DATA34 0x1508 #define RADEON_BRUSH_DATA35 0x150c #define RADEON_BRUSH_DATA36 0x1510 #define RADEON_BRUSH_DATA37 0x1514 #define RADEON_BRUSH_DATA38 0x1518 #define RADEON_BRUSH_DATA39 0x151c #define RADEON_BRUSH_DATA4 0x1490 #define RADEON_BRUSH_DATA40 0x1520 #define RADEON_BRUSH_DATA41 0x1524 #define RADEON_BRUSH_DATA42 0x1528 #define RADEON_BRUSH_DATA43 0x152c #define RADEON_BRUSH_DATA44 0x1530 #define RADEON_BRUSH_DATA45 0x1534 #define RADEON_BRUSH_DATA46 0x1538 #define RADEON_BRUSH_DATA47 0x153c #define RADEON_BRUSH_DATA48 0x1540 #define RADEON_BRUSH_DATA49 0x1544 #define RADEON_BRUSH_DATA5 0x1494 #define RADEON_BRUSH_DATA50 0x1548 #define RADEON_BRUSH_DATA51 0x154c #define RADEON_BRUSH_DATA52 0x1550 #define RADEON_BRUSH_DATA53 0x1554 #define RADEON_BRUSH_DATA54 0x1558 #define RADEON_BRUSH_DATA55 0x155c #define RADEON_BRUSH_DATA56 0x1560 #define RADEON_BRUSH_DATA57 0x1564 #define RADEON_BRUSH_DATA58 0x1568 #define RADEON_BRUSH_DATA59 0x156c #define RADEON_BRUSH_DATA6 0x1498 #define RADEON_BRUSH_DATA60 0x1570 #define RADEON_BRUSH_DATA61 0x1574 #define RADEON_BRUSH_DATA62 0x1578 #define RADEON_BRUSH_DATA63 0x157c #define RADEON_BRUSH_DATA7 0x149c #define RADEON_BRUSH_DATA8 0x14a0 #define RADEON_BRUSH_DATA9 0x14a4 #define RADEON_BRUSH_SCALE 0x1470 #define RADEON_BRUSH_Y_X 0x1474 #define RADEON_BUS_CNTL 0x0030 # define RADEON_BUS_MASTER_DIS (1 << 6) # define RADEON_BUS_BIOS_DIS_ROM (1 << 12) # define RADEON_BUS_RD_DISCARD_EN (1 << 24) # define RADEON_BUS_RD_ABORT_EN (1 << 25) # define RADEON_BUS_MSTR_DISCONNECT_EN (1 << 28) # define RADEON_BUS_WRT_BURST (1 << 29) # define RADEON_BUS_READ_BURST (1 << 30) #define RADEON_BUS_CNTL1 0x0034 # define RADEON_BUS_WAIT_ON_LOCK_EN (1 << 4) #define RADEON_PCIE_INDEX 0x0030 #define RADEON_PCIE_DATA 0x0034 #define R600_PCIE_PORT_INDEX 0x0038 #define R600_PCIE_PORT_DATA 0x003c /* PCIE_LC_LINK_WIDTH_CNTL is PCIE on r1xx-r5xx, PCIE_PORT on r6xx-r7xx */ #define RADEON_PCIE_LC_LINK_WIDTH_CNTL 0xa2 /* PCIE */ # define RADEON_PCIE_LC_LINK_WIDTH_SHIFT 0 # define RADEON_PCIE_LC_LINK_WIDTH_MASK 0x7 # define RADEON_PCIE_LC_LINK_WIDTH_X0 0 # define RADEON_PCIE_LC_LINK_WIDTH_X1 1 # define RADEON_PCIE_LC_LINK_WIDTH_X2 2 # define RADEON_PCIE_LC_LINK_WIDTH_X4 3 # define RADEON_PCIE_LC_LINK_WIDTH_X8 4 # define RADEON_PCIE_LC_LINK_WIDTH_X12 5 # define RADEON_PCIE_LC_LINK_WIDTH_X16 6 # define RADEON_PCIE_LC_LINK_WIDTH_RD_SHIFT 4 # define RADEON_PCIE_LC_LINK_WIDTH_RD_MASK 0x70 # define R600_PCIE_LC_RECONFIG_ARC_MISSING_ESCAPE (1 << 7) # define RADEON_PCIE_LC_RECONFIG_NOW (1 << 8) # define RADEON_PCIE_LC_RECONFIG_LATER (1 << 9) # define RADEON_PCIE_LC_SHORT_RECONFIG_EN (1 << 10) # define R600_PCIE_LC_RENEGOTIATE_EN (1 << 10) # define R600_PCIE_LC_SHORT_RECONFIG_EN (1 << 11) #define R600_TARGET_AND_CURRENT_PROFILE_INDEX 0x70c #define R700_TARGET_AND_CURRENT_PROFILE_INDEX 0x66c #define RADEON_CACHE_CNTL 0x1724 #define RADEON_CACHE_LINE 0x0f0c /* PCI */ #define RADEON_CAPABILITIES_ID 0x0f50 /* PCI */ #define RADEON_CAPABILITIES_PTR 0x0f34 /* PCI */ #define RADEON_CLK_PIN_CNTL 0x0001 /* PLL */ # define RADEON_DONT_USE_XTALIN (1 << 4) # define RADEON_SCLK_DYN_START_CNTL (1 << 15) #define RADEON_CLOCK_CNTL_DATA 0x000c #define RADEON_CLOCK_CNTL_INDEX 0x0008 # define RADEON_PLL_WR_EN (1 << 7) # define RADEON_PLL_DIV_SEL (3 << 8) # define RADEON_PLL2_DIV_SEL_MASK ~(3 << 8) #define RADEON_M_SPLL_REF_FB_DIV 0x000a /* PLL */ # define RADEON_M_SPLL_REF_DIV_MASK 0xff # define RADEON_M_SPLL_REF_DIV_SHIFT 0 # define RADEON_MPLL_FB_DIV_MASK 0xff # define RADEON_MPLL_FB_DIV_SHIFT 8 # define RADEON_SPLL_FB_DIV_MASK 0xff # define RADEON_SPLL_FB_DIV_SHIFT 16 #define RADEON_SPLL_CNTL 0x000c /* PLL */ # define RADEON_SPLL_SLEEP (1 << 0) # define RADEON_SPLL_RESET (1 << 1) # define RADEON_SPLL_PCP_MASK 0x7 # define RADEON_SPLL_PCP_SHIFT 8 # define RADEON_SPLL_PVG_MASK 0x7 # define RADEON_SPLL_PVG_SHIFT 11 # define RADEON_SPLL_PDC_MASK 0x3 # define RADEON_SPLL_PDC_SHIFT 14 #define RADEON_CLK_PWRMGT_CNTL 0x0014 /* PLL */ # define RADEON_ENGIN_DYNCLK_MODE (1 << 12) # define RADEON_ACTIVE_HILO_LAT_MASK (3 << 13) # define RADEON_ACTIVE_HILO_LAT_SHIFT 13 # define RADEON_DISP_DYN_STOP_LAT_MASK (1 << 12) # define RADEON_MC_BUSY (1 << 16) # define RADEON_DLL_READY (1 << 19) # define RADEON_CG_NO1_DEBUG_0 (1 << 24) # define RADEON_CG_NO1_DEBUG_MASK (0x1f << 24) # define RADEON_DYN_STOP_MODE_MASK (7 << 21) # define RADEON_TVPLL_PWRMGT_OFF (1 << 30) # define RADEON_TVCLK_TURNOFF (1 << 31) #define RADEON_PLL_PWRMGT_CNTL 0x0015 /* PLL */ # define RADEON_TCL_BYPASS_DISABLE (1 << 20) #define RADEON_CLR_CMP_CLR_3D 0x1a24 #define RADEON_CLR_CMP_CLR_DST 0x15c8 #define RADEON_CLR_CMP_CLR_SRC 0x15c4 #define RADEON_CLR_CMP_CNTL 0x15c0 # define RADEON_SRC_CMP_EQ_COLOR (4 << 0) # define RADEON_SRC_CMP_NEQ_COLOR (5 << 0) # define RADEON_CLR_CMP_SRC_SOURCE (1 << 24) #define RADEON_CLR_CMP_MASK 0x15cc # define RADEON_CLR_CMP_MSK 0xffffffff #define RADEON_CLR_CMP_MASK_3D 0x1A28 #define RADEON_COMMAND 0x0f04 /* PCI */ #define RADEON_COMPOSITE_SHADOW_ID 0x1a0c #define RADEON_CONFIG_APER_0_BASE 0x0100 #define RADEON_CONFIG_APER_1_BASE 0x0104 #define RADEON_CONFIG_APER_SIZE 0x0108 #define RADEON_CONFIG_BONDS 0x00e8 #define RADEON_CONFIG_CNTL 0x00e0 # define RADEON_CFG_ATI_REV_A11 (0 << 16) # define RADEON_CFG_ATI_REV_A12 (1 << 16) # define RADEON_CFG_ATI_REV_A13 (2 << 16) # define RADEON_CFG_ATI_REV_ID_MASK (0xf << 16) #define RADEON_CONFIG_MEMSIZE 0x00f8 #define RADEON_CONFIG_MEMSIZE_EMBEDDED 0x0114 #define RADEON_CONFIG_REG_1_BASE 0x010c #define RADEON_CONFIG_REG_APER_SIZE 0x0110 #define RADEON_CONFIG_XSTRAP 0x00e4 #define RADEON_CONSTANT_COLOR_C 0x1d34 # define RADEON_CONSTANT_COLOR_MASK 0x00ffffff # define RADEON_CONSTANT_COLOR_ONE 0x00ffffff # define RADEON_CONSTANT_COLOR_ZERO 0x00000000 #define RADEON_CRC_CMDFIFO_ADDR 0x0740 #define RADEON_CRC_CMDFIFO_DOUT 0x0744 #define RADEON_GRPH_BUFFER_CNTL 0x02f0 # define RADEON_GRPH_START_REQ_MASK (0x7f) # define RADEON_GRPH_START_REQ_SHIFT 0 # define RADEON_GRPH_STOP_REQ_MASK (0x7f<<8) # define RADEON_GRPH_STOP_REQ_SHIFT 8 # define RADEON_GRPH_CRITICAL_POINT_MASK (0x7f<<16) # define RADEON_GRPH_CRITICAL_POINT_SHIFT 16 # define RADEON_GRPH_CRITICAL_CNTL (1<<28) # define RADEON_GRPH_BUFFER_SIZE (1<<29) # define RADEON_GRPH_CRITICAL_AT_SOF (1<<30) # define RADEON_GRPH_STOP_CNTL (1<<31) #define RADEON_GRPH2_BUFFER_CNTL 0x03f0 # define RADEON_GRPH2_START_REQ_MASK (0x7f) # define RADEON_GRPH2_START_REQ_SHIFT 0 # define RADEON_GRPH2_STOP_REQ_MASK (0x7f<<8) # define RADEON_GRPH2_STOP_REQ_SHIFT 8 # define RADEON_GRPH2_CRITICAL_POINT_MASK (0x7f<<16) # define RADEON_GRPH2_CRITICAL_POINT_SHIFT 16 # define RADEON_GRPH2_CRITICAL_CNTL (1<<28) # define RADEON_GRPH2_BUFFER_SIZE (1<<29) # define RADEON_GRPH2_CRITICAL_AT_SOF (1<<30) # define RADEON_GRPH2_STOP_CNTL (1<<31) #define RADEON_CRTC_CRNT_FRAME 0x0214 #define RADEON_CRTC_EXT_CNTL 0x0054 # define RADEON_CRTC_VGA_XOVERSCAN (1 << 0) # define RADEON_VGA_ATI_LINEAR (1 << 3) # define RADEON_XCRT_CNT_EN (1 << 6) # define RADEON_CRTC_HSYNC_DIS (1 << 8) # define RADEON_CRTC_VSYNC_DIS (1 << 9) # define RADEON_CRTC_DISPLAY_DIS (1 << 10) # define RADEON_CRTC_SYNC_TRISTAT (1 << 11) # define RADEON_CRTC_CRT_ON (1 << 15) #define RADEON_CRTC_EXT_CNTL_DPMS_BYTE 0x0055 # define RADEON_CRTC_HSYNC_DIS_BYTE (1 << 0) # define RADEON_CRTC_VSYNC_DIS_BYTE (1 << 1) # define RADEON_CRTC_DISPLAY_DIS_BYTE (1 << 2) #define RADEON_CRTC_GEN_CNTL 0x0050 # define RADEON_CRTC_DBL_SCAN_EN (1 << 0) # define RADEON_CRTC_INTERLACE_EN (1 << 1) # define RADEON_CRTC_CSYNC_EN (1 << 4) # define RADEON_CRTC_ICON_EN (1 << 15) # define RADEON_CRTC_CUR_EN (1 << 16) # define RADEON_CRTC_CUR_MODE_MASK (7 << 20) # define RADEON_CRTC_EXT_DISP_EN (1 << 24) # define RADEON_CRTC_EN (1 << 25) # define RADEON_CRTC_DISP_REQ_EN_B (1 << 26) #define RADEON_CRTC2_GEN_CNTL 0x03f8 # define RADEON_CRTC2_DBL_SCAN_EN (1 << 0) # define RADEON_CRTC2_INTERLACE_EN (1 << 1) # define RADEON_CRTC2_SYNC_TRISTAT (1 << 4) # define RADEON_CRTC2_HSYNC_TRISTAT (1 << 5) # define RADEON_CRTC2_VSYNC_TRISTAT (1 << 6) # define RADEON_CRTC2_CRT2_ON (1 << 7) # define RADEON_CRTC2_PIX_WIDTH_SHIFT 8 # define RADEON_CRTC2_PIX_WIDTH_MASK (0xf << 8) # define RADEON_CRTC2_ICON_EN (1 << 15) # define RADEON_CRTC2_CUR_EN (1 << 16) # define RADEON_CRTC2_CUR_MODE_MASK (7 << 20) # define RADEON_CRTC2_DISP_DIS (1 << 23) # define RADEON_CRTC2_EN (1 << 25) # define RADEON_CRTC2_DISP_REQ_EN_B (1 << 26) # define RADEON_CRTC2_CSYNC_EN (1 << 27) # define RADEON_CRTC2_HSYNC_DIS (1 << 28) # define RADEON_CRTC2_VSYNC_DIS (1 << 29) #define RADEON_CRTC_MORE_CNTL 0x27c # define RADEON_CRTC_AUTO_HORZ_CENTER_EN (1<<2) # define RADEON_CRTC_AUTO_VERT_CENTER_EN (1<<3) # define RADEON_CRTC_H_CUTOFF_ACTIVE_EN (1<<4) # define RADEON_CRTC_V_CUTOFF_ACTIVE_EN (1<<5) #define RADEON_CRTC_GUI_TRIG_VLINE 0x0218 # define RADEON_CRTC_GUI_TRIG_VLINE_START_SHIFT 0 # define RADEON_CRTC_GUI_TRIG_VLINE_INV (1 << 15) # define RADEON_CRTC_GUI_TRIG_VLINE_END_SHIFT 16 # define RADEON_CRTC_GUI_TRIG_VLINE_STALL (1 << 30) #define RADEON_CRTC_H_SYNC_STRT_WID 0x0204 # define RADEON_CRTC_H_SYNC_STRT_PIX (0x07 << 0) # define RADEON_CRTC_H_SYNC_STRT_CHAR (0x3ff << 3) # define RADEON_CRTC_H_SYNC_STRT_CHAR_SHIFT 3 # define RADEON_CRTC_H_SYNC_WID (0x3f << 16) # define RADEON_CRTC_H_SYNC_WID_SHIFT 16 # define RADEON_CRTC_H_SYNC_POL (1 << 23) #define RADEON_CRTC2_H_SYNC_STRT_WID 0x0304 # define RADEON_CRTC2_H_SYNC_STRT_PIX (0x07 << 0) # define RADEON_CRTC2_H_SYNC_STRT_CHAR (0x3ff << 3) # define RADEON_CRTC2_H_SYNC_STRT_CHAR_SHIFT 3 # define RADEON_CRTC2_H_SYNC_WID (0x3f << 16) # define RADEON_CRTC2_H_SYNC_WID_SHIFT 16 # define RADEON_CRTC2_H_SYNC_POL (1 << 23) #define RADEON_CRTC_H_TOTAL_DISP 0x0200 # define RADEON_CRTC_H_TOTAL (0x03ff << 0) # define RADEON_CRTC_H_TOTAL_SHIFT 0 # define RADEON_CRTC_H_DISP (0x01ff << 16) # define RADEON_CRTC_H_DISP_SHIFT 16 #define RADEON_CRTC2_H_TOTAL_DISP 0x0300 # define RADEON_CRTC2_H_TOTAL (0x03ff << 0) # define RADEON_CRTC2_H_TOTAL_SHIFT 0 # define RADEON_CRTC2_H_DISP (0x01ff << 16) # define RADEON_CRTC2_H_DISP_SHIFT 16 #define RADEON_CRTC_OFFSET_RIGHT 0x0220 #define RADEON_CRTC_OFFSET 0x0224 # define RADEON_CRTC_OFFSET__GUI_TRIG_OFFSET (1<<30) # define RADEON_CRTC_OFFSET__OFFSET_LOCK (1<<31) #define RADEON_CRTC2_OFFSET 0x0324 # define RADEON_CRTC2_OFFSET__GUI_TRIG_OFFSET (1<<30) # define RADEON_CRTC2_OFFSET__OFFSET_LOCK (1<<31) #define RADEON_CRTC_OFFSET_CNTL 0x0228 # define RADEON_CRTC_TILE_LINE_SHIFT 0 # define RADEON_CRTC_TILE_LINE_RIGHT_SHIFT 4 # define R300_CRTC_X_Y_MODE_EN_RIGHT (1 << 6) # define R300_CRTC_MICRO_TILE_BUFFER_RIGHT_MASK (3 << 7) # define R300_CRTC_MICRO_TILE_BUFFER_RIGHT_AUTO (0 << 7) # define R300_CRTC_MICRO_TILE_BUFFER_RIGHT_SINGLE (1 << 7) # define R300_CRTC_MICRO_TILE_BUFFER_RIGHT_DOUBLE (2 << 7) # define R300_CRTC_MICRO_TILE_BUFFER_RIGHT_DIS (3 << 7) # define R300_CRTC_X_Y_MODE_EN (1 << 9) # define R300_CRTC_MICRO_TILE_BUFFER_MASK (3 << 10) # define R300_CRTC_MICRO_TILE_BUFFER_AUTO (0 << 10) # define R300_CRTC_MICRO_TILE_BUFFER_SINGLE (1 << 10) # define R300_CRTC_MICRO_TILE_BUFFER_DOUBLE (2 << 10) # define R300_CRTC_MICRO_TILE_BUFFER_DIS (3 << 10) # define R300_CRTC_MICRO_TILE_EN_RIGHT (1 << 12) # define R300_CRTC_MICRO_TILE_EN (1 << 13) # define R300_CRTC_MACRO_TILE_EN_RIGHT (1 << 14) # define R300_CRTC_MACRO_TILE_EN (1 << 15) # define RADEON_CRTC_TILE_EN_RIGHT (1 << 14) # define RADEON_CRTC_TILE_EN (1 << 15) # define RADEON_CRTC_OFFSET_FLIP_CNTL (1 << 16) # define RADEON_CRTC_STEREO_OFFSET_EN (1 << 17) #define R300_CRTC_TILE_X0_Y0 0x0350 #define R300_CRTC2_TILE_X0_Y0 0x0358 #define RADEON_CRTC2_OFFSET_CNTL 0x0328 # define RADEON_CRTC2_OFFSET_FLIP_CNTL (1 << 16) # define RADEON_CRTC2_TILE_EN (1 << 15) #define RADEON_CRTC_PITCH 0x022c # define RADEON_CRTC_PITCH__SHIFT 0 # define RADEON_CRTC_PITCH__RIGHT_SHIFT 16 #define RADEON_CRTC2_PITCH 0x032c #define RADEON_CRTC_STATUS 0x005c # define RADEON_CRTC_VBLANK_SAVE (1 << 1) # define RADEON_CRTC_VBLANK_SAVE_CLEAR (1 << 1) #define RADEON_CRTC2_STATUS 0x03fc # define RADEON_CRTC2_VBLANK_SAVE (1 << 1) # define RADEON_CRTC2_VBLANK_SAVE_CLEAR (1 << 1) #define RADEON_CRTC_V_SYNC_STRT_WID 0x020c # define RADEON_CRTC_V_SYNC_STRT (0x7ff << 0) # define RADEON_CRTC_V_SYNC_STRT_SHIFT 0 # define RADEON_CRTC_V_SYNC_WID (0x1f << 16) # define RADEON_CRTC_V_SYNC_WID_SHIFT 16 # define RADEON_CRTC_V_SYNC_POL (1 << 23) #define RADEON_CRTC2_V_SYNC_STRT_WID 0x030c # define RADEON_CRTC2_V_SYNC_STRT (0x7ff << 0) # define RADEON_CRTC2_V_SYNC_STRT_SHIFT 0 # define RADEON_CRTC2_V_SYNC_WID (0x1f << 16) # define RADEON_CRTC2_V_SYNC_WID_SHIFT 16 # define RADEON_CRTC2_V_SYNC_POL (1 << 23) #define RADEON_CRTC_V_TOTAL_DISP 0x0208 # define RADEON_CRTC_V_TOTAL (0x07ff << 0) # define RADEON_CRTC_V_TOTAL_SHIFT 0 # define RADEON_CRTC_V_DISP (0x07ff << 16) # define RADEON_CRTC_V_DISP_SHIFT 16 #define RADEON_CRTC2_V_TOTAL_DISP 0x0308 # define RADEON_CRTC2_V_TOTAL (0x07ff << 0) # define RADEON_CRTC2_V_TOTAL_SHIFT 0 # define RADEON_CRTC2_V_DISP (0x07ff << 16) # define RADEON_CRTC2_V_DISP_SHIFT 16 #define RADEON_CRTC_VLINE_CRNT_VLINE 0x0210 # define RADEON_CRTC_CRNT_VLINE_MASK (0x7ff << 16) #define RADEON_CRTC2_CRNT_FRAME 0x0314 #define RADEON_CRTC2_GUI_TRIG_VLINE 0x0318 #define RADEON_CRTC2_STATUS 0x03fc #define RADEON_CRTC2_VLINE_CRNT_VLINE 0x0310 #define RADEON_CRTC8_DATA 0x03d5 /* VGA, 0x3b5 */ #define RADEON_CRTC8_IDX 0x03d4 /* VGA, 0x3b4 */ #define RADEON_CUR_CLR0 0x026c #define RADEON_CUR_CLR1 0x0270 #define RADEON_CUR_HORZ_VERT_OFF 0x0268 #define RADEON_CUR_HORZ_VERT_POSN 0x0264 #define RADEON_CUR_OFFSET 0x0260 # define RADEON_CUR_LOCK (1 << 31) #define RADEON_CUR2_CLR0 0x036c #define RADEON_CUR2_CLR1 0x0370 #define RADEON_CUR2_HORZ_VERT_OFF 0x0368 #define RADEON_CUR2_HORZ_VERT_POSN 0x0364 #define RADEON_CUR2_OFFSET 0x0360 # define RADEON_CUR2_LOCK (1 << 31) #define RADEON_DAC_CNTL 0x0058 # define RADEON_DAC_RANGE_CNTL (3 << 0) # define RADEON_DAC_RANGE_CNTL_PS2 (2 << 0) # define RADEON_DAC_RANGE_CNTL_MASK 0x03 # define RADEON_DAC_BLANKING (1 << 2) # define RADEON_DAC_CMP_EN (1 << 3) # define RADEON_DAC_CMP_OUTPUT (1 << 7) # define RADEON_DAC_8BIT_EN (1 << 8) # define RADEON_DAC_TVO_EN (1 << 10) # define RADEON_DAC_VGA_ADR_EN (1 << 13) # define RADEON_DAC_PDWN (1 << 15) # define RADEON_DAC_MASK_ALL (0xff << 24) #define RADEON_DAC_CNTL2 0x007c # define RADEON_DAC2_TV_CLK_SEL (0 << 1) # define RADEON_DAC2_DAC_CLK_SEL (1 << 0) # define RADEON_DAC2_DAC2_CLK_SEL (1 << 1) # define RADEON_DAC2_PALETTE_ACC_CTL (1 << 5) # define RADEON_DAC2_CMP_EN (1 << 7) # define RADEON_DAC2_CMP_OUT_R (1 << 8) # define RADEON_DAC2_CMP_OUT_G (1 << 9) # define RADEON_DAC2_CMP_OUT_B (1 << 10) # define RADEON_DAC2_CMP_OUTPUT (1 << 11) #define RADEON_DAC_EXT_CNTL 0x0280 # define RADEON_DAC2_FORCE_BLANK_OFF_EN (1 << 0) # define RADEON_DAC2_FORCE_DATA_EN (1 << 1) # define RADEON_DAC_FORCE_BLANK_OFF_EN (1 << 4) # define RADEON_DAC_FORCE_DATA_EN (1 << 5) # define RADEON_DAC_FORCE_DATA_SEL_MASK (3 << 6) # define RADEON_DAC_FORCE_DATA_SEL_R (0 << 6) # define RADEON_DAC_FORCE_DATA_SEL_G (1 << 6) # define RADEON_DAC_FORCE_DATA_SEL_B (2 << 6) # define RADEON_DAC_FORCE_DATA_SEL_RGB (3 << 6) # define RADEON_DAC_FORCE_DATA_MASK 0x0003ff00 # define RADEON_DAC_FORCE_DATA_SHIFT 8 #define RADEON_DAC_MACRO_CNTL 0x0d04 # define RADEON_DAC_PDWN_R (1 << 16) # define RADEON_DAC_PDWN_G (1 << 17) # define RADEON_DAC_PDWN_B (1 << 18) #define RADEON_TV_DAC_CNTL 0x088c # define RADEON_TV_DAC_NBLANK (1 << 0) # define RADEON_TV_DAC_NHOLD (1 << 1) # define RADEON_TV_DAC_PEDESTAL (1 << 2) # define RADEON_TV_MONITOR_DETECT_EN (1 << 4) # define RADEON_TV_DAC_CMPOUT (1 << 5) # define RADEON_TV_DAC_STD_MASK (3 << 8) # define RADEON_TV_DAC_STD_PAL (0 << 8) # define RADEON_TV_DAC_STD_NTSC (1 << 8) # define RADEON_TV_DAC_STD_PS2 (2 << 8) # define RADEON_TV_DAC_STD_RS343 (3 << 8) # define RADEON_TV_DAC_BGSLEEP (1 << 6) # define RADEON_TV_DAC_BGADJ_MASK (0xf << 16) # define RADEON_TV_DAC_BGADJ_SHIFT 16 # define RADEON_TV_DAC_DACADJ_MASK (0xf << 20) # define RADEON_TV_DAC_DACADJ_SHIFT 20 # define RADEON_TV_DAC_RDACPD (1 << 24) # define RADEON_TV_DAC_GDACPD (1 << 25) # define RADEON_TV_DAC_BDACPD (1 << 26) # define RADEON_TV_DAC_RDACDET (1 << 29) # define RADEON_TV_DAC_GDACDET (1 << 30) # define RADEON_TV_DAC_BDACDET (1 << 31) # define R420_TV_DAC_DACADJ_MASK (0x1f << 20) # define R420_TV_DAC_RDACPD (1 << 25) # define R420_TV_DAC_GDACPD (1 << 26) # define R420_TV_DAC_BDACPD (1 << 27) # define R420_TV_DAC_TVENABLE (1 << 28) #define RADEON_DISP_HW_DEBUG 0x0d14 # define RADEON_CRT2_DISP1_SEL (1 << 5) #define RADEON_DISP_OUTPUT_CNTL 0x0d64 # define RADEON_DISP_DAC_SOURCE_MASK 0x03 # define RADEON_DISP_DAC2_SOURCE_MASK 0x0c # define RADEON_DISP_DAC_SOURCE_CRTC2 0x01 # define RADEON_DISP_DAC_SOURCE_RMX 0x02 # define RADEON_DISP_DAC_SOURCE_LTU 0x03 # define RADEON_DISP_DAC2_SOURCE_CRTC2 0x04 # define RADEON_DISP_TVDAC_SOURCE_MASK (0x03 << 2) # define RADEON_DISP_TVDAC_SOURCE_CRTC 0x0 # define RADEON_DISP_TVDAC_SOURCE_CRTC2 (0x01 << 2) # define RADEON_DISP_TVDAC_SOURCE_RMX (0x02 << 2) # define RADEON_DISP_TVDAC_SOURCE_LTU (0x03 << 2) # define RADEON_DISP_TRANS_MATRIX_MASK (0x03 << 4) # define RADEON_DISP_TRANS_MATRIX_ALPHA_MSB (0x00 << 4) # define RADEON_DISP_TRANS_MATRIX_GRAPHICS (0x01 << 4) # define RADEON_DISP_TRANS_MATRIX_VIDEO (0x02 << 4) # define RADEON_DISP_TV_SOURCE_CRTC (1 << 16) /* crtc1 or crtc2 */ # define RADEON_DISP_TV_SOURCE_LTU (0 << 16) /* linear transform unit */ #define RADEON_DISP_TV_OUT_CNTL 0x0d6c # define RADEON_DISP_TV_PATH_SRC_CRTC2 (1 << 16) # define RADEON_DISP_TV_PATH_SRC_CRTC1 (0 << 16) #define RADEON_DAC_CRC_SIG 0x02cc #define RADEON_DAC_DATA 0x03c9 /* VGA */ #define RADEON_DAC_MASK 0x03c6 /* VGA */ #define RADEON_DAC_R_INDEX 0x03c7 /* VGA */ #define RADEON_DAC_W_INDEX 0x03c8 /* VGA */ #define RADEON_DDA_CONFIG 0x02e0 #define RADEON_DDA_ON_OFF 0x02e4 #define RADEON_DEFAULT_OFFSET 0x16e0 #define RADEON_DEFAULT_PITCH 0x16e4 #define RADEON_DEFAULT_SC_BOTTOM_RIGHT 0x16e8 # define RADEON_DEFAULT_SC_RIGHT_MAX (0x1fff << 0) # define RADEON_DEFAULT_SC_BOTTOM_MAX (0x1fff << 16) #define RADEON_DESTINATION_3D_CLR_CMP_VAL 0x1820 #define RADEON_DESTINATION_3D_CLR_CMP_MSK 0x1824 #define RADEON_DEVICE_ID 0x0f02 /* PCI */ #define RADEON_DISP_MISC_CNTL 0x0d00 # define RADEON_SOFT_RESET_GRPH_PP (1 << 0) #define RADEON_DISP_MERGE_CNTL 0x0d60 # define RADEON_DISP_ALPHA_MODE_MASK 0x03 # define RADEON_DISP_ALPHA_MODE_KEY 0 # define RADEON_DISP_ALPHA_MODE_PER_PIXEL 1 # define RADEON_DISP_ALPHA_MODE_GLOBAL 2 # define RADEON_DISP_RGB_OFFSET_EN (1 << 8) # define RADEON_DISP_GRPH_ALPHA_MASK (0xff << 16) # define RADEON_DISP_OV0_ALPHA_MASK (0xff << 24) # define RADEON_DISP_LIN_TRANS_BYPASS (0x01 << 9) #define RADEON_DISP2_MERGE_CNTL 0x0d68 # define RADEON_DISP2_RGB_OFFSET_EN (1 << 8) #define RADEON_DISP_LIN_TRANS_GRPH_A 0x0d80 #define RADEON_DISP_LIN_TRANS_GRPH_B 0x0d84 #define RADEON_DISP_LIN_TRANS_GRPH_C 0x0d88 #define RADEON_DISP_LIN_TRANS_GRPH_D 0x0d8c #define RADEON_DISP_LIN_TRANS_GRPH_E 0x0d90 #define RADEON_DISP_LIN_TRANS_GRPH_F 0x0d98 #define RADEON_DP_BRUSH_BKGD_CLR 0x1478 #define RADEON_DP_BRUSH_FRGD_CLR 0x147c #define RADEON_DP_CNTL 0x16c0 # define RADEON_DST_X_LEFT_TO_RIGHT (1 << 0) # define RADEON_DST_Y_TOP_TO_BOTTOM (1 << 1) # define RADEON_DP_DST_TILE_LINEAR (0 << 3) # define RADEON_DP_DST_TILE_MACRO (1 << 3) # define RADEON_DP_DST_TILE_MICRO (2 << 3) # define RADEON_DP_DST_TILE_BOTH (3 << 3) #define RADEON_DP_CNTL_XDIR_YDIR_YMAJOR 0x16d0 # define RADEON_DST_Y_MAJOR (1 << 2) # define RADEON_DST_Y_DIR_TOP_TO_BOTTOM (1 << 15) # define RADEON_DST_X_DIR_LEFT_TO_RIGHT (1 << 31) #define RADEON_DP_DATATYPE 0x16c4 # define RADEON_HOST_BIG_ENDIAN_EN (1 << 29) #define RADEON_DP_GUI_MASTER_CNTL 0x146c # define RADEON_GMC_SRC_PITCH_OFFSET_CNTL (1 << 0) # define RADEON_GMC_DST_PITCH_OFFSET_CNTL (1 << 1) # define RADEON_GMC_SRC_CLIPPING (1 << 2) # define RADEON_GMC_DST_CLIPPING (1 << 3) # define RADEON_GMC_BRUSH_DATATYPE_MASK (0x0f << 4) # define RADEON_GMC_BRUSH_8X8_MONO_FG_BG (0 << 4) # define RADEON_GMC_BRUSH_8X8_MONO_FG_LA (1 << 4) # define RADEON_GMC_BRUSH_1X8_MONO_FG_BG (4 << 4) # define RADEON_GMC_BRUSH_1X8_MONO_FG_LA (5 << 4) # define RADEON_GMC_BRUSH_32x1_MONO_FG_BG (6 << 4) # define RADEON_GMC_BRUSH_32x1_MONO_FG_LA (7 << 4) # define RADEON_GMC_BRUSH_32x32_MONO_FG_BG (8 << 4) # define RADEON_GMC_BRUSH_32x32_MONO_FG_LA (9 << 4) # define RADEON_GMC_BRUSH_8x8_COLOR (10 << 4) # define RADEON_GMC_BRUSH_1X8_COLOR (12 << 4) # define RADEON_GMC_BRUSH_SOLID_COLOR (13 << 4) # define RADEON_GMC_BRUSH_NONE (15 << 4) # define RADEON_GMC_DST_8BPP_CI (2 << 8) # define RADEON_GMC_DST_15BPP (3 << 8) # define RADEON_GMC_DST_16BPP (4 << 8) # define RADEON_GMC_DST_24BPP (5 << 8) # define RADEON_GMC_DST_32BPP (6 << 8) # define RADEON_GMC_DST_8BPP_RGB (7 << 8) # define RADEON_GMC_DST_Y8 (8 << 8) # define RADEON_GMC_DST_RGB8 (9 << 8) # define RADEON_GMC_DST_VYUY (11 << 8) # define RADEON_GMC_DST_YVYU (12 << 8) # define RADEON_GMC_DST_AYUV444 (14 << 8) # define RADEON_GMC_DST_ARGB4444 (15 << 8) # define RADEON_GMC_DST_DATATYPE_MASK (0x0f << 8) # define RADEON_GMC_DST_DATATYPE_SHIFT 8 # define RADEON_GMC_SRC_DATATYPE_MASK (3 << 12) # define RADEON_GMC_SRC_DATATYPE_MONO_FG_BG (0 << 12) # define RADEON_GMC_SRC_DATATYPE_MONO_FG_LA (1 << 12) # define RADEON_GMC_SRC_DATATYPE_COLOR (3 << 12) # define RADEON_GMC_BYTE_PIX_ORDER (1 << 14) # define RADEON_GMC_BYTE_MSB_TO_LSB (0 << 14) # define RADEON_GMC_BYTE_LSB_TO_MSB (1 << 14) # define RADEON_GMC_CONVERSION_TEMP (1 << 15) # define RADEON_GMC_CONVERSION_TEMP_6500 (0 << 15) # define RADEON_GMC_CONVERSION_TEMP_9300 (1 << 15) # define RADEON_GMC_ROP3_MASK (0xff << 16) # define RADEON_DP_SRC_SOURCE_MASK (7 << 24) # define RADEON_DP_SRC_SOURCE_MEMORY (2 << 24) # define RADEON_DP_SRC_SOURCE_HOST_DATA (3 << 24) # define RADEON_GMC_3D_FCN_EN (1 << 27) # define RADEON_GMC_CLR_CMP_CNTL_DIS (1 << 28) # define RADEON_GMC_AUX_CLIP_DIS (1 << 29) # define RADEON_GMC_WR_MSK_DIS (1 << 30) # define RADEON_GMC_LD_BRUSH_Y_X (1 << 31) # define RADEON_ROP3_ZERO 0x00000000 # define RADEON_ROP3_DSa 0x00880000 # define RADEON_ROP3_SDna 0x00440000 # define RADEON_ROP3_S 0x00cc0000 # define RADEON_ROP3_DSna 0x00220000 # define RADEON_ROP3_D 0x00aa0000 # define RADEON_ROP3_DSx 0x00660000 # define RADEON_ROP3_DSo 0x00ee0000 # define RADEON_ROP3_DSon 0x00110000 # define RADEON_ROP3_DSxn 0x00990000 # define RADEON_ROP3_Dn 0x00550000 # define RADEON_ROP3_SDno 0x00dd0000 # define RADEON_ROP3_Sn 0x00330000 # define RADEON_ROP3_DSno 0x00bb0000 # define RADEON_ROP3_DSan 0x00770000 # define RADEON_ROP3_ONE 0x00ff0000 # define RADEON_ROP3_DPa 0x00a00000 # define RADEON_ROP3_PDna 0x00500000 # define RADEON_ROP3_P 0x00f00000 # define RADEON_ROP3_DPna 0x000a0000 # define RADEON_ROP3_D 0x00aa0000 # define RADEON_ROP3_DPx 0x005a0000 # define RADEON_ROP3_DPo 0x00fa0000 # define RADEON_ROP3_DPon 0x00050000 # define RADEON_ROP3_PDxn 0x00a50000 # define RADEON_ROP3_PDno 0x00f50000 # define RADEON_ROP3_Pn 0x000f0000 # define RADEON_ROP3_DPno 0x00af0000 # define RADEON_ROP3_DPan 0x005f0000 #define RADEON_DP_GUI_MASTER_CNTL_C 0x1c84 #define RADEON_DP_MIX 0x16c8 #define RADEON_DP_SRC_BKGD_CLR 0x15dc #define RADEON_DP_SRC_FRGD_CLR 0x15d8 #define RADEON_DP_WRITE_MASK 0x16cc #define RADEON_DST_BRES_DEC 0x1630 #define RADEON_DST_BRES_ERR 0x1628 #define RADEON_DST_BRES_INC 0x162c #define RADEON_DST_BRES_LNTH 0x1634 #define RADEON_DST_BRES_LNTH_SUB 0x1638 #define RADEON_DST_HEIGHT 0x1410 #define RADEON_DST_HEIGHT_WIDTH 0x143c #define RADEON_DST_HEIGHT_WIDTH_8 0x158c #define RADEON_DST_HEIGHT_WIDTH_BW 0x15b4 #define RADEON_DST_HEIGHT_Y 0x15a0 #define RADEON_DST_LINE_START 0x1600 #define RADEON_DST_LINE_END 0x1604 #define RADEON_DST_LINE_PATCOUNT 0x1608 # define RADEON_BRES_CNTL_SHIFT 8 #define RADEON_DST_OFFSET 0x1404 #define RADEON_DST_PITCH 0x1408 #define RADEON_DST_PITCH_OFFSET 0x142c #define RADEON_DST_PITCH_OFFSET_C 0x1c80 # define RADEON_PITCH_SHIFT 21 # define RADEON_DST_TILE_LINEAR (0 << 30) # define RADEON_DST_TILE_MACRO (1 << 30) # define RADEON_DST_TILE_MICRO (2 << 30) # define RADEON_DST_TILE_BOTH (3 << 30) #define RADEON_DST_WIDTH 0x140c #define RADEON_DST_WIDTH_HEIGHT 0x1598 #define RADEON_DST_WIDTH_X 0x1588 #define RADEON_DST_WIDTH_X_INCY 0x159c #define RADEON_DST_X 0x141c #define RADEON_DST_X_SUB 0x15a4 #define RADEON_DST_X_Y 0x1594 #define RADEON_DST_Y 0x1420 #define RADEON_DST_Y_SUB 0x15a8 #define RADEON_DST_Y_X 0x1438 #define RADEON_FCP_CNTL 0x0910 # define RADEON_FCP0_SRC_PCICLK 0 # define RADEON_FCP0_SRC_PCLK 1 # define RADEON_FCP0_SRC_PCLKb 2 # define RADEON_FCP0_SRC_HREF 3 # define RADEON_FCP0_SRC_GND 4 # define RADEON_FCP0_SRC_HREFb 5 #define RADEON_FLUSH_1 0x1704 #define RADEON_FLUSH_2 0x1708 #define RADEON_FLUSH_3 0x170c #define RADEON_FLUSH_4 0x1710 #define RADEON_FLUSH_5 0x1714 #define RADEON_FLUSH_6 0x1718 #define RADEON_FLUSH_7 0x171c #define RADEON_FOG_3D_TABLE_START 0x1810 #define RADEON_FOG_3D_TABLE_END 0x1814 #define RADEON_FOG_3D_TABLE_DENSITY 0x181c #define RADEON_FOG_TABLE_INDEX 0x1a14 #define RADEON_FOG_TABLE_DATA 0x1a18 #define RADEON_FP_CRTC_H_TOTAL_DISP 0x0250 #define RADEON_FP_CRTC_V_TOTAL_DISP 0x0254 # define RADEON_FP_CRTC_H_TOTAL_MASK 0x000003ff # define RADEON_FP_CRTC_H_DISP_MASK 0x01ff0000 # define RADEON_FP_CRTC_V_TOTAL_MASK 0x00000fff # define RADEON_FP_CRTC_V_DISP_MASK 0x0fff0000 # define RADEON_FP_H_SYNC_STRT_CHAR_MASK 0x00001ff8 # define RADEON_FP_H_SYNC_WID_MASK 0x003f0000 # define RADEON_FP_V_SYNC_STRT_MASK 0x00000fff # define RADEON_FP_V_SYNC_WID_MASK 0x001f0000 # define RADEON_FP_CRTC_H_TOTAL_SHIFT 0x00000000 # define RADEON_FP_CRTC_H_DISP_SHIFT 0x00000010 # define RADEON_FP_CRTC_V_TOTAL_SHIFT 0x00000000 # define RADEON_FP_CRTC_V_DISP_SHIFT 0x00000010 # define RADEON_FP_H_SYNC_STRT_CHAR_SHIFT 0x00000003 # define RADEON_FP_H_SYNC_WID_SHIFT 0x00000010 # define RADEON_FP_V_SYNC_STRT_SHIFT 0x00000000 # define RADEON_FP_V_SYNC_WID_SHIFT 0x00000010 #define RADEON_FP_GEN_CNTL 0x0284 # define RADEON_FP_FPON (1 << 0) # define RADEON_FP_BLANK_EN (1 << 1) # define RADEON_FP_TMDS_EN (1 << 2) # define RADEON_FP_PANEL_FORMAT (1 << 3) # define RADEON_FP_EN_TMDS (1 << 7) # define RADEON_FP_DETECT_SENSE (1 << 8) # define R200_FP_SOURCE_SEL_MASK (3 << 10) # define R200_FP_SOURCE_SEL_CRTC1 (0 << 10) # define R200_FP_SOURCE_SEL_CRTC2 (1 << 10) # define R200_FP_SOURCE_SEL_RMX (2 << 10) # define R200_FP_SOURCE_SEL_TRANS (3 << 10) # define RADEON_FP_SEL_CRTC1 (0 << 13) # define RADEON_FP_SEL_CRTC2 (1 << 13) # define RADEON_FP_CRTC_DONT_SHADOW_HPAR (1 << 15) # define RADEON_FP_CRTC_DONT_SHADOW_VPAR (1 << 16) # define RADEON_FP_CRTC_DONT_SHADOW_HEND (1 << 17) # define RADEON_FP_CRTC_USE_SHADOW_VEND (1 << 18) # define RADEON_FP_RMX_HVSYNC_CONTROL_EN (1 << 20) # define RADEON_FP_DFP_SYNC_SEL (1 << 21) # define RADEON_FP_CRTC_LOCK_8DOT (1 << 22) # define RADEON_FP_CRT_SYNC_SEL (1 << 23) # define RADEON_FP_USE_SHADOW_EN (1 << 24) # define RADEON_FP_CRT_SYNC_ALT (1 << 26) #define RADEON_FP2_GEN_CNTL 0x0288 # define RADEON_FP2_BLANK_EN (1 << 1) # define RADEON_FP2_ON (1 << 2) # define RADEON_FP2_PANEL_FORMAT (1 << 3) # define RADEON_FP2_DETECT_SENSE (1 << 8) # define R200_FP2_SOURCE_SEL_MASK (3 << 10) # define R200_FP2_SOURCE_SEL_CRTC1 (0 << 10) # define R200_FP2_SOURCE_SEL_CRTC2 (1 << 10) # define R200_FP2_SOURCE_SEL_RMX (2 << 10) # define R200_FP2_SOURCE_SEL_TRANS_UNIT (3 << 10) # define RADEON_FP2_SRC_SEL_MASK (3 << 13) # define RADEON_FP2_SRC_SEL_CRTC2 (1 << 13) # define RADEON_FP2_FP_POL (1 << 16) # define RADEON_FP2_LP_POL (1 << 17) # define RADEON_FP2_SCK_POL (1 << 18) # define RADEON_FP2_LCD_CNTL_MASK (7 << 19) # define RADEON_FP2_PAD_FLOP_EN (1 << 22) # define RADEON_FP2_CRC_EN (1 << 23) # define RADEON_FP2_CRC_READ_EN (1 << 24) # define RADEON_FP2_DVO_EN (1 << 25) # define RADEON_FP2_DVO_RATE_SEL_SDR (1 << 26) # define R200_FP2_DVO_RATE_SEL_SDR (1 << 27) # define R200_FP2_DVO_CLOCK_MODE_SINGLE (1 << 28) # define R300_FP2_DVO_DUAL_CHANNEL_EN (1 << 29) #define RADEON_FP_H_SYNC_STRT_WID 0x02c4 #define RADEON_FP_H2_SYNC_STRT_WID 0x03c4 #define RADEON_FP_HORZ_STRETCH 0x028c #define RADEON_FP_HORZ2_STRETCH 0x038c # define RADEON_HORZ_STRETCH_RATIO_MASK 0xffff # define RADEON_HORZ_STRETCH_RATIO_MAX 4096 # define RADEON_HORZ_PANEL_SIZE (0x1ff << 16) # define RADEON_HORZ_PANEL_SHIFT 16 # define RADEON_HORZ_STRETCH_PIXREP (0 << 25) # define RADEON_HORZ_STRETCH_BLEND (1 << 26) # define RADEON_HORZ_STRETCH_ENABLE (1 << 25) # define RADEON_HORZ_AUTO_RATIO (1 << 27) # define RADEON_HORZ_FP_LOOP_STRETCH (0x7 << 28) # define RADEON_HORZ_AUTO_RATIO_INC (1 << 31) #define RADEON_FP_HORZ_VERT_ACTIVE 0x0278 #define RADEON_FP_V_SYNC_STRT_WID 0x02c8 #define RADEON_FP_VERT_STRETCH 0x0290 #define RADEON_FP_V2_SYNC_STRT_WID 0x03c8 #define RADEON_FP_VERT2_STRETCH 0x0390 # define RADEON_VERT_PANEL_SIZE (0xfff << 12) # define RADEON_VERT_PANEL_SHIFT 12 # define RADEON_VERT_STRETCH_RATIO_MASK 0xfff # define RADEON_VERT_STRETCH_RATIO_SHIFT 0 # define RADEON_VERT_STRETCH_RATIO_MAX 4096 # define RADEON_VERT_STRETCH_ENABLE (1 << 25) # define RADEON_VERT_STRETCH_LINEREP (0 << 26) # define RADEON_VERT_STRETCH_BLEND (1 << 26) # define RADEON_VERT_AUTO_RATIO_EN (1 << 27) # define RADEON_VERT_AUTO_RATIO_INC (1 << 31) # define RADEON_VERT_STRETCH_RESERVED 0x71000000 #define RS400_FP_2ND_GEN_CNTL 0x0384 # define RS400_FP_2ND_ON (1 << 0) # define RS400_FP_2ND_BLANK_EN (1 << 1) # define RS400_TMDS_2ND_EN (1 << 2) # define RS400_PANEL_FORMAT_2ND (1 << 3) # define RS400_FP_2ND_EN_TMDS (1 << 7) # define RS400_FP_2ND_DETECT_SENSE (1 << 8) # define RS400_FP_2ND_SOURCE_SEL_MASK (3 << 10) # define RS400_FP_2ND_SOURCE_SEL_CRTC1 (0 << 10) # define RS400_FP_2ND_SOURCE_SEL_CRTC2 (1 << 10) # define RS400_FP_2ND_SOURCE_SEL_RMX (2 << 10) # define RS400_FP_2ND_DETECT_EN (1 << 12) # define RS400_HPD_2ND_SEL (1 << 13) #define RS400_FP2_2_GEN_CNTL 0x0388 # define RS400_FP2_2_BLANK_EN (1 << 1) # define RS400_FP2_2_ON (1 << 2) # define RS400_FP2_2_PANEL_FORMAT (1 << 3) # define RS400_FP2_2_DETECT_SENSE (1 << 8) # define RS400_FP2_2_SOURCE_SEL_MASK (3 << 10) # define RS400_FP2_2_SOURCE_SEL_CRTC1 (0 << 10) # define RS400_FP2_2_SOURCE_SEL_CRTC2 (1 << 10) # define RS400_FP2_2_SOURCE_SEL_RMX (2 << 10) # define RS400_FP2_2_DVO2_EN (1 << 25) #define RS400_TMDS2_CNTL 0x0394 #define RS400_TMDS2_TRANSMITTER_CNTL 0x03a4 # define RS400_TMDS2_PLLEN (1 << 0) # define RS400_TMDS2_PLLRST (1 << 1) #define RADEON_GEN_INT_CNTL 0x0040 #define RADEON_GEN_INT_STATUS 0x0044 # define RADEON_VSYNC_INT_AK (1 << 2) # define RADEON_VSYNC_INT (1 << 2) # define RADEON_VSYNC2_INT_AK (1 << 6) # define RADEON_VSYNC2_INT (1 << 6) #define RADEON_GENENB 0x03c3 /* VGA */ #define RADEON_GENFC_RD 0x03ca /* VGA */ #define RADEON_GENFC_WT 0x03da /* VGA, 0x03ba */ #define RADEON_GENMO_RD 0x03cc /* VGA */ #define RADEON_GENMO_WT 0x03c2 /* VGA */ #define RADEON_GENS0 0x03c2 /* VGA */ #define RADEON_GENS1 0x03da /* VGA, 0x03ba */ #define RADEON_GPIO_MONID 0x0068 /* DDC interface via I2C */ /* DDC3 */ #define RADEON_GPIO_MONIDB 0x006c #define RADEON_GPIO_CRT2_DDC 0x006c #define RADEON_GPIO_DVI_DDC 0x0064 /* DDC2 */ #define RADEON_GPIO_VGA_DDC 0x0060 /* DDC1 */ # define RADEON_GPIO_A_0 (1 << 0) # define RADEON_GPIO_A_1 (1 << 1) # define RADEON_GPIO_Y_0 (1 << 8) # define RADEON_GPIO_Y_1 (1 << 9) # define RADEON_GPIO_Y_SHIFT_0 8 # define RADEON_GPIO_Y_SHIFT_1 9 # define RADEON_GPIO_EN_0 (1 << 16) # define RADEON_GPIO_EN_1 (1 << 17) # define RADEON_GPIO_MASK_0 (1 << 24) /*??*/ # define RADEON_GPIO_MASK_1 (1 << 25) /*??*/ #define RADEON_GRPH8_DATA 0x03cf /* VGA */ #define RADEON_GRPH8_IDX 0x03ce /* VGA */ #define RADEON_GUI_SCRATCH_REG0 0x15e0 #define RADEON_GUI_SCRATCH_REG1 0x15e4 #define RADEON_GUI_SCRATCH_REG2 0x15e8 #define RADEON_GUI_SCRATCH_REG3 0x15ec #define RADEON_GUI_SCRATCH_REG4 0x15f0 #define RADEON_GUI_SCRATCH_REG5 0x15f4 #define RADEON_HEADER 0x0f0e /* PCI */ #define RADEON_HOST_DATA0 0x17c0 #define RADEON_HOST_DATA1 0x17c4 #define RADEON_HOST_DATA2 0x17c8 #define RADEON_HOST_DATA3 0x17cc #define RADEON_HOST_DATA4 0x17d0 #define RADEON_HOST_DATA5 0x17d4 #define RADEON_HOST_DATA6 0x17d8 #define RADEON_HOST_DATA7 0x17dc #define RADEON_HOST_DATA_LAST 0x17e0 #define RADEON_HOST_PATH_CNTL 0x0130 # define RADEON_HDP_SOFT_RESET (1 << 26) # define RADEON_HDP_APER_CNTL (1 << 23) #define RADEON_HTOTAL_CNTL 0x0009 /* PLL */ # define RADEON_HTOT_CNTL_VGA_EN (1 << 28) #define RADEON_HTOTAL2_CNTL 0x002e /* PLL */ /* Multimedia I2C bus */ #define RADEON_I2C_CNTL_0 0x0090 #define RADEON_I2C_DONE (1 << 0) #define RADEON_I2C_NACK (1 << 1) #define RADEON_I2C_HALT (1 << 2) #define RADEON_I2C_SOFT_RST (1 << 5) #define RADEON_I2C_DRIVE_EN (1 << 6) #define RADEON_I2C_DRIVE_SEL (1 << 7) #define RADEON_I2C_START (1 << 8) #define RADEON_I2C_STOP (1 << 9) #define RADEON_I2C_RECEIVE (1 << 10) #define RADEON_I2C_ABORT (1 << 11) #define RADEON_I2C_GO (1 << 12) #define RADEON_I2C_CNTL_1 0x0094 #define RADEON_I2C_SEL (1 << 16) #define RADEON_I2C_EN (1 << 17) #define RADEON_I2C_DATA 0x0098 #define RADEON_DVI_I2C_CNTL_0 0x02e0 # define R200_DVI_I2C_PIN_SEL(x) ((x) << 3) # define R200_SEL_DDC1 0 /* 0x60 - VGA_DDC */ # define R200_SEL_DDC2 1 /* 0x64 - DVI_DDC */ # define R200_SEL_DDC3 2 /* 0x68 - MONID_DDC */ #define RADEON_DVI_I2C_CNTL_1 0x02e4 #define RADEON_DVI_I2C_DATA 0x02e8 #define RADEON_INTERRUPT_LINE 0x0f3c /* PCI */ #define RADEON_INTERRUPT_PIN 0x0f3d /* PCI */ #define RADEON_IO_BASE 0x0f14 /* PCI */ #define RADEON_LATENCY 0x0f0d /* PCI */ #define RADEON_LEAD_BRES_DEC 0x1608 #define RADEON_LEAD_BRES_LNTH 0x161c #define RADEON_LEAD_BRES_LNTH_SUB 0x1624 #define RADEON_LVDS_GEN_CNTL 0x02d0 # define RADEON_LVDS_ON (1 << 0) # define RADEON_LVDS_DISPLAY_DIS (1 << 1) # define RADEON_LVDS_PANEL_TYPE (1 << 2) # define RADEON_LVDS_PANEL_FORMAT (1 << 3) # define RADEON_LVDS_RST_FM (1 << 6) # define RADEON_LVDS_EN (1 << 7) # define RADEON_LVDS_BL_MOD_LEVEL_SHIFT 8 # define RADEON_LVDS_BL_MOD_LEVEL_MASK (0xff << 8) # define RADEON_LVDS_BL_MOD_EN (1 << 16) # define RADEON_LVDS_DIGON (1 << 18) # define RADEON_LVDS_BLON (1 << 19) # define RADEON_LVDS_SEL_CRTC2 (1 << 23) #define RADEON_LVDS_PLL_CNTL 0x02d4 # define RADEON_HSYNC_DELAY_SHIFT 28 # define RADEON_HSYNC_DELAY_MASK (0xf << 28) # define RADEON_LVDS_PLL_EN (1 << 16) # define RADEON_LVDS_PLL_RESET (1 << 17) # define R300_LVDS_SRC_SEL_MASK (3 << 18) # define R300_LVDS_SRC_SEL_CRTC1 (0 << 18) # define R300_LVDS_SRC_SEL_CRTC2 (1 << 18) # define R300_LVDS_SRC_SEL_RMX (2 << 18) #define RADEON_MAX_LATENCY 0x0f3f /* PCI */ #define RADEON_MC_AGP_LOCATION 0x014c #define RADEON_MC_FB_LOCATION 0x0148 #define RADEON_DISPLAY_BASE_ADDR 0x23c #define RADEON_DISPLAY2_BASE_ADDR 0x33c #define RADEON_OV0_BASE_ADDR 0x43c #define RADEON_NB_TOM 0x15c #define R300_MC_INIT_MISC_LAT_TIMER 0x180 # define R300_MC_DISP0R_INIT_LAT_SHIFT 8 # define R300_MC_DISP0R_INIT_LAT_MASK 0xf # define R300_MC_DISP1R_INIT_LAT_SHIFT 12 # define R300_MC_DISP1R_INIT_LAT_MASK 0xf #define RADEON_MCLK_CNTL 0x0012 /* PLL */ # define RADEON_FORCEON_MCLKA (1 << 16) # define RADEON_FORCEON_MCLKB (1 << 17) # define RADEON_FORCEON_YCLKA (1 << 18) # define RADEON_FORCEON_YCLKB (1 << 19) # define RADEON_FORCEON_MC (1 << 20) # define RADEON_FORCEON_AIC (1 << 21) # define R300_DISABLE_MC_MCLKA (1 << 21) # define R300_DISABLE_MC_MCLKB (1 << 21) #define RADEON_MCLK_MISC 0x001f /* PLL */ # define RADEON_MC_MCLK_MAX_DYN_STOP_LAT (1 << 12) # define RADEON_IO_MCLK_MAX_DYN_STOP_LAT (1 << 13) # define RADEON_MC_MCLK_DYN_ENABLE (1 << 14) # define RADEON_IO_MCLK_DYN_ENABLE (1 << 15) #define RADEON_LCD_GPIO_MASK 0x01a0 #define RADEON_GPIOPAD_EN 0x01a0 #define RADEON_LCD_GPIO_Y_REG 0x01a4 #define RADEON_MDGPIO_A_REG 0x01ac #define RADEON_MDGPIO_EN_REG 0x01b0 #define RADEON_MDGPIO_MASK 0x0198 #define RADEON_GPIOPAD_MASK 0x0198 #define RADEON_GPIOPAD_A 0x019c #define RADEON_MDGPIO_Y_REG 0x01b4 #define RADEON_MEM_ADDR_CONFIG 0x0148 #define RADEON_MEM_BASE 0x0f10 /* PCI */ #define RADEON_MEM_CNTL 0x0140 # define RADEON_MEM_NUM_CHANNELS_MASK 0x01 # define RADEON_MEM_USE_B_CH_ONLY (1 << 1) # define RV100_HALF_MODE (1 << 3) # define R300_MEM_NUM_CHANNELS_MASK 0x03 # define R300_MEM_USE_CD_CH_ONLY (1 << 2) #define RADEON_MEM_TIMING_CNTL 0x0144 /* EXT_MEM_CNTL */ #define RADEON_MEM_INIT_LAT_TIMER 0x0154 #define RADEON_MEM_INTF_CNTL 0x014c #define RADEON_MEM_SDRAM_MODE_REG 0x0158 # define RADEON_SDRAM_MODE_MASK 0xffff0000 # define RADEON_B3MEM_RESET_MASK 0x6fffffff # define RADEON_MEM_CFG_TYPE_DDR (1 << 30) #define RADEON_MEM_STR_CNTL 0x0150 # define RADEON_MEM_PWRUP_COMPL_A (1 << 0) # define RADEON_MEM_PWRUP_COMPL_B (1 << 1) # define R300_MEM_PWRUP_COMPL_C (1 << 2) # define R300_MEM_PWRUP_COMPL_D (1 << 3) # define RADEON_MEM_PWRUP_COMPLETE 0x03 # define R300_MEM_PWRUP_COMPLETE 0x0f #define RADEON_MC_STATUS 0x0150 # define RADEON_MC_IDLE (1 << 2) # define R300_MC_IDLE (1 << 4) #define RADEON_MEM_VGA_RP_SEL 0x003c #define RADEON_MEM_VGA_WP_SEL 0x0038 #define RADEON_MIN_GRANT 0x0f3e /* PCI */ #define RADEON_MM_DATA 0x0004 #define RADEON_MM_INDEX 0x0000 #define RADEON_MPLL_CNTL 0x000e /* PLL */ #define RADEON_MPP_TB_CONFIG 0x01c0 /* ? */ #define RADEON_MPP_GP_CONFIG 0x01c8 /* ? */ #define RADEON_SEPROM_CNTL1 0x01c0 # define RADEON_SCK_PRESCALE_SHIFT 24 # define RADEON_SCK_PRESCALE_MASK (0xff << 24) #define R300_MC_IND_INDEX 0x01f8 # define R300_MC_IND_ADDR_MASK 0x3f # define R300_MC_IND_WR_EN (1 << 8) #define R300_MC_IND_DATA 0x01fc #define R300_MC_READ_CNTL_AB 0x017c # define R300_MEM_RBS_POSITION_A_MASK 0x03 #define R300_MC_READ_CNTL_CD_mcind 0x24 # define R300_MEM_RBS_POSITION_C_MASK 0x03 #define RADEON_N_VIF_COUNT 0x0248 #define RADEON_OV0_AUTO_FLIP_CNTL 0x0470 # define RADEON_OV0_AUTO_FLIP_CNTL_SOFT_BUF_NUM 0x00000007 # define RADEON_OV0_AUTO_FLIP_CNTL_SOFT_REPEAT_FIELD 0x00000008 # define RADEON_OV0_AUTO_FLIP_CNTL_SOFT_BUF_ODD 0x00000010 # define RADEON_OV0_AUTO_FLIP_CNTL_IGNORE_REPEAT_FIELD 0x00000020 # define RADEON_OV0_AUTO_FLIP_CNTL_SOFT_EOF_TOGGLE 0x00000040 # define RADEON_OV0_AUTO_FLIP_CNTL_VID_PORT_SELECT 0x00000300 # define RADEON_OV0_AUTO_FLIP_CNTL_P1_FIRST_LINE_EVEN 0x00010000 # define RADEON_OV0_AUTO_FLIP_CNTL_SHIFT_EVEN_DOWN 0x00040000 # define RADEON_OV0_AUTO_FLIP_CNTL_SHIFT_ODD_DOWN 0x00080000 # define RADEON_OV0_AUTO_FLIP_CNTL_FIELD_POL_SOURCE 0x00800000 #define RADEON_OV0_COLOUR_CNTL 0x04E0 #define RADEON_OV0_DEINTERLACE_PATTERN 0x0474 #define RADEON_OV0_EXCLUSIVE_HORZ 0x0408 # define RADEON_EXCL_HORZ_START_MASK 0x000000ff # define RADEON_EXCL_HORZ_END_MASK 0x0000ff00 # define RADEON_EXCL_HORZ_BACK_PORCH_MASK 0x00ff0000 # define RADEON_EXCL_HORZ_EXCLUSIVE_EN 0x80000000 #define RADEON_OV0_EXCLUSIVE_VERT 0x040C # define RADEON_EXCL_VERT_START_MASK 0x000003ff # define RADEON_EXCL_VERT_END_MASK 0x03ff0000 #define RADEON_OV0_FILTER_CNTL 0x04A0 # define RADEON_FILTER_PROGRAMMABLE_COEF 0x0 # define RADEON_FILTER_HC_COEF_HORZ_Y 0x1 # define RADEON_FILTER_HC_COEF_HORZ_UV 0x2 # define RADEON_FILTER_HC_COEF_VERT_Y 0x4 # define RADEON_FILTER_HC_COEF_VERT_UV 0x8 # define RADEON_FILTER_HARDCODED_COEF 0xf # define RADEON_FILTER_COEF_MASK 0xf #define RADEON_OV0_FOUR_TAP_COEF_0 0x04B0 #define RADEON_OV0_FOUR_TAP_COEF_1 0x04B4 #define RADEON_OV0_FOUR_TAP_COEF_2 0x04B8 #define RADEON_OV0_FOUR_TAP_COEF_3 0x04BC #define RADEON_OV0_FOUR_TAP_COEF_4 0x04C0 #define RADEON_OV0_FLAG_CNTL 0x04DC #define RADEON_OV0_GAMMA_000_00F 0x0d40 #define RADEON_OV0_GAMMA_010_01F 0x0d44 #define RADEON_OV0_GAMMA_020_03F 0x0d48 #define RADEON_OV0_GAMMA_040_07F 0x0d4c #define RADEON_OV0_GAMMA_080_0BF 0x0e00 #define RADEON_OV0_GAMMA_0C0_0FF 0x0e04 #define RADEON_OV0_GAMMA_100_13F 0x0e08 #define RADEON_OV0_GAMMA_140_17F 0x0e0c #define RADEON_OV0_GAMMA_180_1BF 0x0e10 #define RADEON_OV0_GAMMA_1C0_1FF 0x0e14 #define RADEON_OV0_GAMMA_200_23F 0x0e18 #define RADEON_OV0_GAMMA_240_27F 0x0e1c #define RADEON_OV0_GAMMA_280_2BF 0x0e20 #define RADEON_OV0_GAMMA_2C0_2FF 0x0e24 #define RADEON_OV0_GAMMA_300_33F 0x0e28 #define RADEON_OV0_GAMMA_340_37F 0x0e2c #define RADEON_OV0_GAMMA_380_3BF 0x0d50 #define RADEON_OV0_GAMMA_3C0_3FF 0x0d54 #define RADEON_OV0_GRAPHICS_KEY_CLR_LOW 0x04EC #define RADEON_OV0_GRAPHICS_KEY_CLR_HIGH 0x04F0 #define RADEON_OV0_H_INC 0x0480 #define RADEON_OV0_KEY_CNTL 0x04F4 # define RADEON_VIDEO_KEY_FN_MASK 0x00000003L # define RADEON_VIDEO_KEY_FN_FALSE 0x00000000L # define RADEON_VIDEO_KEY_FN_TRUE 0x00000001L # define RADEON_VIDEO_KEY_FN_EQ 0x00000002L # define RADEON_VIDEO_KEY_FN_NE 0x00000003L # define RADEON_GRAPHIC_KEY_FN_MASK 0x00000030L # define RADEON_GRAPHIC_KEY_FN_FALSE 0x00000000L # define RADEON_GRAPHIC_KEY_FN_TRUE 0x00000010L # define RADEON_GRAPHIC_KEY_FN_EQ 0x00000020L # define RADEON_GRAPHIC_KEY_FN_NE 0x00000030L # define RADEON_CMP_MIX_MASK 0x00000100L # define RADEON_CMP_MIX_OR 0x00000000L # define RADEON_CMP_MIX_AND 0x00000100L #define RADEON_OV0_LIN_TRANS_A 0x0d20 #define RADEON_OV0_LIN_TRANS_B 0x0d24 #define RADEON_OV0_LIN_TRANS_C 0x0d28 #define RADEON_OV0_LIN_TRANS_D 0x0d2c #define RADEON_OV0_LIN_TRANS_E 0x0d30 #define RADEON_OV0_LIN_TRANS_F 0x0d34 #define RADEON_OV0_P1_BLANK_LINES_AT_TOP 0x0430 # define RADEON_P1_BLNK_LN_AT_TOP_M1_MASK 0x00000fffL # define RADEON_P1_ACTIVE_LINES_M1 0x0fff0000L #define RADEON_OV0_P1_H_ACCUM_INIT 0x0488 #define RADEON_OV0_P1_V_ACCUM_INIT 0x0428 # define RADEON_OV0_P1_MAX_LN_IN_PER_LN_OUT 0x00000003L # define RADEON_OV0_P1_V_ACCUM_INIT_MASK 0x01ff8000L #define RADEON_OV0_P1_X_START_END 0x0494 #define RADEON_OV0_P2_X_START_END 0x0498 #define RADEON_OV0_P23_BLANK_LINES_AT_TOP 0x0434 # define RADEON_P23_BLNK_LN_AT_TOP_M1_MASK 0x000007ffL # define RADEON_P23_ACTIVE_LINES_M1 0x07ff0000L #define RADEON_OV0_P23_H_ACCUM_INIT 0x048C #define RADEON_OV0_P23_V_ACCUM_INIT 0x042C #define RADEON_OV0_P3_X_START_END 0x049C #define RADEON_OV0_REG_LOAD_CNTL 0x0410 # define RADEON_REG_LD_CTL_LOCK 0x00000001L # define RADEON_REG_LD_CTL_VBLANK_DURING_LOCK 0x00000002L # define RADEON_REG_LD_CTL_STALL_GUI_UNTIL_FLIP 0x00000004L # define RADEON_REG_LD_CTL_LOCK_READBACK 0x00000008L # define RADEON_REG_LD_CTL_FLIP_READBACK 0x00000010L #define RADEON_OV0_SCALE_CNTL 0x0420 # define RADEON_SCALER_HORZ_PICK_NEAREST 0x00000004L # define RADEON_SCALER_VERT_PICK_NEAREST 0x00000008L # define RADEON_SCALER_SIGNED_UV 0x00000010L # define RADEON_SCALER_GAMMA_SEL_MASK 0x00000060L # define RADEON_SCALER_GAMMA_SEL_BRIGHT 0x00000000L # define RADEON_SCALER_GAMMA_SEL_G22 0x00000020L # define RADEON_SCALER_GAMMA_SEL_G18 0x00000040L # define RADEON_SCALER_GAMMA_SEL_G14 0x00000060L # define RADEON_SCALER_COMCORE_SHIFT_UP_ONE 0x00000080L # define RADEON_SCALER_SURFAC_FORMAT 0x00000f00L # define RADEON_SCALER_SOURCE_15BPP 0x00000300L # define RADEON_SCALER_SOURCE_16BPP 0x00000400L # define RADEON_SCALER_SOURCE_32BPP 0x00000600L # define RADEON_SCALER_SOURCE_YUV9 0x00000900L # define RADEON_SCALER_SOURCE_YUV12 0x00000A00L # define RADEON_SCALER_SOURCE_VYUY422 0x00000B00L # define RADEON_SCALER_SOURCE_YVYU422 0x00000C00L # define RADEON_SCALER_ADAPTIVE_DEINT 0x00001000L # define RADEON_SCALER_TEMPORAL_DEINT 0x00002000L # define RADEON_SCALER_CRTC_SEL 0x00004000L # define RADEON_SCALER_SMART_SWITCH 0x00008000L # define RADEON_SCALER_BURST_PER_PLANE 0x007F0000L # define RADEON_SCALER_DOUBLE_BUFFER 0x01000000L # define RADEON_SCALER_DIS_LIMIT 0x08000000L # define RADEON_SCALER_LIN_TRANS_BYPASS 0x10000000L # define RADEON_SCALER_INT_EMU 0x20000000L # define RADEON_SCALER_ENABLE 0x40000000L # define RADEON_SCALER_SOFT_RESET 0x80000000L #define RADEON_OV0_STEP_BY 0x0484 #define RADEON_OV0_TEST 0x04F8 #define RADEON_OV0_V_INC 0x0424 #define RADEON_OV0_VID_BUF_PITCH0_VALUE 0x0460 #define RADEON_OV0_VID_BUF_PITCH1_VALUE 0x0464 #define RADEON_OV0_VID_BUF0_BASE_ADRS 0x0440 # define RADEON_VIF_BUF0_PITCH_SEL 0x00000001L # define RADEON_VIF_BUF0_TILE_ADRS 0x00000002L # define RADEON_VIF_BUF0_BASE_ADRS_MASK 0x03fffff0L # define RADEON_VIF_BUF0_1ST_LINE_LSBS_MASK 0x48000000L #define RADEON_OV0_VID_BUF1_BASE_ADRS 0x0444 # define RADEON_VIF_BUF1_PITCH_SEL 0x00000001L # define RADEON_VIF_BUF1_TILE_ADRS 0x00000002L # define RADEON_VIF_BUF1_BASE_ADRS_MASK 0x03fffff0L # define RADEON_VIF_BUF1_1ST_LINE_LSBS_MASK 0x48000000L #define RADEON_OV0_VID_BUF2_BASE_ADRS 0x0448 # define RADEON_VIF_BUF2_PITCH_SEL 0x00000001L # define RADEON_VIF_BUF2_TILE_ADRS 0x00000002L # define RADEON_VIF_BUF2_BASE_ADRS_MASK 0x03fffff0L # define RADEON_VIF_BUF2_1ST_LINE_LSBS_MASK 0x48000000L #define RADEON_OV0_VID_BUF3_BASE_ADRS 0x044C #define RADEON_OV0_VID_BUF4_BASE_ADRS 0x0450 #define RADEON_OV0_VID_BUF5_BASE_ADRS 0x0454 #define RADEON_OV0_VIDEO_KEY_CLR_HIGH 0x04E8 #define RADEON_OV0_VIDEO_KEY_CLR_LOW 0x04E4 #define RADEON_OV0_Y_X_START 0x0400 #define RADEON_OV0_Y_X_END 0x0404 #define RADEON_OV1_Y_X_START 0x0600 #define RADEON_OV1_Y_X_END 0x0604 #define RADEON_OVR_CLR 0x0230 #define RADEON_OVR_WID_LEFT_RIGHT 0x0234 #define RADEON_OVR_WID_TOP_BOTTOM 0x0238 /* first capture unit */ #define RADEON_CAP0_BUF0_OFFSET 0x0920 #define RADEON_CAP0_BUF1_OFFSET 0x0924 #define RADEON_CAP0_BUF0_EVEN_OFFSET 0x0928 #define RADEON_CAP0_BUF1_EVEN_OFFSET 0x092C #define RADEON_CAP0_BUF_PITCH 0x0930 #define RADEON_CAP0_V_WINDOW 0x0934 #define RADEON_CAP0_H_WINDOW 0x0938 #define RADEON_CAP0_VBI0_OFFSET 0x093C #define RADEON_CAP0_VBI1_OFFSET 0x0940 #define RADEON_CAP0_VBI_V_WINDOW 0x0944 #define RADEON_CAP0_VBI_H_WINDOW 0x0948 #define RADEON_CAP0_PORT_MODE_CNTL 0x094C #define RADEON_CAP0_TRIG_CNTL 0x0950 #define RADEON_CAP0_DEBUG 0x0954 #define RADEON_CAP0_CONFIG 0x0958 # define RADEON_CAP0_CONFIG_CONTINUOS 0x00000001 # define RADEON_CAP0_CONFIG_START_FIELD_EVEN 0x00000002 # define RADEON_CAP0_CONFIG_START_BUF_GET 0x00000004 # define RADEON_CAP0_CONFIG_START_BUF_SET 0x00000008 # define RADEON_CAP0_CONFIG_BUF_TYPE_ALT 0x00000010 # define RADEON_CAP0_CONFIG_BUF_TYPE_FRAME 0x00000020 # define RADEON_CAP0_CONFIG_ONESHOT_MODE_FRAME 0x00000040 # define RADEON_CAP0_CONFIG_BUF_MODE_DOUBLE 0x00000080 # define RADEON_CAP0_CONFIG_BUF_MODE_TRIPLE 0x00000100 # define RADEON_CAP0_CONFIG_MIRROR_EN 0x00000200 # define RADEON_CAP0_CONFIG_ONESHOT_MIRROR_EN 0x00000400 # define RADEON_CAP0_CONFIG_VIDEO_SIGNED_UV 0x00000800 # define RADEON_CAP0_CONFIG_ANC_DECODE_EN 0x00001000 # define RADEON_CAP0_CONFIG_VBI_EN 0x00002000 # define RADEON_CAP0_CONFIG_SOFT_PULL_DOWN_EN 0x00004000 # define RADEON_CAP0_CONFIG_VIP_EXTEND_FLAG_EN 0x00008000 # define RADEON_CAP0_CONFIG_FAKE_FIELD_EN 0x00010000 # define RADEON_CAP0_CONFIG_ODD_ONE_MORE_LINE 0x00020000 # define RADEON_CAP0_CONFIG_EVEN_ONE_MORE_LINE 0x00040000 # define RADEON_CAP0_CONFIG_HORZ_DIVIDE_2 0x00080000 # define RADEON_CAP0_CONFIG_HORZ_DIVIDE_4 0x00100000 # define RADEON_CAP0_CONFIG_VERT_DIVIDE_2 0x00200000 # define RADEON_CAP0_CONFIG_VERT_DIVIDE_4 0x00400000 # define RADEON_CAP0_CONFIG_FORMAT_BROOKTREE 0x00000000 # define RADEON_CAP0_CONFIG_FORMAT_CCIR656 0x00800000 # define RADEON_CAP0_CONFIG_FORMAT_ZV 0x01000000 # define RADEON_CAP0_CONFIG_FORMAT_VIP 0x01800000 # define RADEON_CAP0_CONFIG_FORMAT_TRANSPORT 0x02000000 # define RADEON_CAP0_CONFIG_HORZ_DECIMATOR 0x04000000 # define RADEON_CAP0_CONFIG_VIDEO_IN_YVYU422 0x00000000 # define RADEON_CAP0_CONFIG_VIDEO_IN_VYUY422 0x20000000 # define RADEON_CAP0_CONFIG_VBI_DIVIDE_2 0x40000000 # define RADEON_CAP0_CONFIG_VBI_DIVIDE_4 0x80000000 #define RADEON_CAP0_ANC_ODD_OFFSET 0x095C #define RADEON_CAP0_ANC_EVEN_OFFSET 0x0960 #define RADEON_CAP0_ANC_H_WINDOW 0x0964 #define RADEON_CAP0_VIDEO_SYNC_TEST 0x0968 #define RADEON_CAP0_ONESHOT_BUF_OFFSET 0x096C #define RADEON_CAP0_BUF_STATUS 0x0970 /* #define RADEON_CAP0_DWNSC_XRATIO 0x0978 */ /* #define RADEON_CAP0_XSHARPNESS 0x097C */ #define RADEON_CAP0_VBI2_OFFSET 0x0980 #define RADEON_CAP0_VBI3_OFFSET 0x0984 #define RADEON_CAP0_ANC2_OFFSET 0x0988 #define RADEON_CAP0_ANC3_OFFSET 0x098C #define RADEON_VID_BUFFER_CONTROL 0x0900 /* second capture unit */ #define RADEON_CAP1_BUF0_OFFSET 0x0990 #define RADEON_CAP1_BUF1_OFFSET 0x0994 #define RADEON_CAP1_BUF0_EVEN_OFFSET 0x0998 #define RADEON_CAP1_BUF1_EVEN_OFFSET 0x099C #define RADEON_CAP1_BUF_PITCH 0x09A0 #define RADEON_CAP1_V_WINDOW 0x09A4 #define RADEON_CAP1_H_WINDOW 0x09A8 #define RADEON_CAP1_VBI_ODD_OFFSET 0x09AC #define RADEON_CAP1_VBI_EVEN_OFFSET 0x09B0 #define RADEON_CAP1_VBI_V_WINDOW 0x09B4 #define RADEON_CAP1_VBI_H_WINDOW 0x09B8 #define RADEON_CAP1_PORT_MODE_CNTL 0x09BC #define RADEON_CAP1_TRIG_CNTL 0x09C0 #define RADEON_CAP1_DEBUG 0x09C4 #define RADEON_CAP1_CONFIG 0x09C8 #define RADEON_CAP1_ANC_ODD_OFFSET 0x09CC #define RADEON_CAP1_ANC_EVEN_OFFSET 0x09D0 #define RADEON_CAP1_ANC_H_WINDOW 0x09D4 #define RADEON_CAP1_VIDEO_SYNC_TEST 0x09D8 #define RADEON_CAP1_ONESHOT_BUF_OFFSET 0x09DC #define RADEON_CAP1_BUF_STATUS 0x09E0 #define RADEON_CAP1_DWNSC_XRATIO 0x09E8 #define RADEON_CAP1_XSHARPNESS 0x09EC /* misc multimedia registers */ #define RADEON_IDCT_RUNS 0x1F80 #define RADEON_IDCT_LEVELS 0x1F84 #define RADEON_IDCT_CONTROL 0x1FBC #define RADEON_IDCT_AUTH_CONTROL 0x1F88 #define RADEON_IDCT_AUTH 0x1F8C #define RADEON_P2PLL_CNTL 0x002a /* P2PLL */ # define RADEON_P2PLL_RESET (1 << 0) # define RADEON_P2PLL_SLEEP (1 << 1) # define RADEON_P2PLL_PVG_MASK (7 << 11) # define RADEON_P2PLL_PVG_SHIFT 11 # define RADEON_P2PLL_ATOMIC_UPDATE_EN (1 << 16) # define RADEON_P2PLL_VGA_ATOMIC_UPDATE_EN (1 << 17) # define RADEON_P2PLL_ATOMIC_UPDATE_VSYNC (1 << 18) #define RADEON_P2PLL_DIV_0 0x002c # define RADEON_P2PLL_FB0_DIV_MASK 0x07ff # define RADEON_P2PLL_POST0_DIV_MASK 0x00070000 #define RADEON_P2PLL_REF_DIV 0x002B /* PLL */ # define RADEON_P2PLL_REF_DIV_MASK 0x03ff # define RADEON_P2PLL_ATOMIC_UPDATE_R (1 << 15) /* same as _W */ # define RADEON_P2PLL_ATOMIC_UPDATE_W (1 << 15) /* same as _R */ # define R300_PPLL_REF_DIV_ACC_MASK (0x3ff << 18) # define R300_PPLL_REF_DIV_ACC_SHIFT 18 #define RADEON_PALETTE_DATA 0x00b4 #define RADEON_PALETTE_30_DATA 0x00b8 #define RADEON_PALETTE_INDEX 0x00b0 #define RADEON_PCI_GART_PAGE 0x017c #define RADEON_PIXCLKS_CNTL 0x002d # define RADEON_PIX2CLK_SRC_SEL_MASK 0x03 # define RADEON_PIX2CLK_SRC_SEL_CPUCLK 0x00 # define RADEON_PIX2CLK_SRC_SEL_PSCANCLK 0x01 # define RADEON_PIX2CLK_SRC_SEL_BYTECLK 0x02 # define RADEON_PIX2CLK_SRC_SEL_P2PLLCLK 0x03 # define RADEON_PIX2CLK_ALWAYS_ONb (1<<6) # define RADEON_PIX2CLK_DAC_ALWAYS_ONb (1<<7) # define RADEON_PIXCLK_TV_SRC_SEL (1 << 8) # define RADEON_DISP_TVOUT_PIXCLK_TV_ALWAYS_ONb (1 << 9) # define R300_DVOCLK_ALWAYS_ONb (1 << 10) # define RADEON_PIXCLK_BLEND_ALWAYS_ONb (1 << 11) # define RADEON_PIXCLK_GV_ALWAYS_ONb (1 << 12) # define RADEON_PIXCLK_DIG_TMDS_ALWAYS_ONb (1 << 13) # define R300_PIXCLK_DVO_ALWAYS_ONb (1 << 13) # define RADEON_PIXCLK_LVDS_ALWAYS_ONb (1 << 14) # define RADEON_PIXCLK_TMDS_ALWAYS_ONb (1 << 15) # define R300_PIXCLK_TRANS_ALWAYS_ONb (1 << 16) # define R300_PIXCLK_TVO_ALWAYS_ONb (1 << 17) # define R300_P2G2CLK_ALWAYS_ONb (1 << 18) # define R300_P2G2CLK_DAC_ALWAYS_ONb (1 << 19) # define R300_DISP_DAC_PIXCLK_DAC2_BLANK_OFF (1 << 23) #define RADEON_PLANE_3D_MASK_C 0x1d44 #define RADEON_PLL_TEST_CNTL 0x0013 /* PLL */ # define RADEON_PLL_MASK_READ_B (1 << 9) #define RADEON_PMI_CAP_ID 0x0f5c /* PCI */ #define RADEON_PMI_DATA 0x0f63 /* PCI */ #define RADEON_PMI_NXT_CAP_PTR 0x0f5d /* PCI */ #define RADEON_PMI_PMC_REG 0x0f5e /* PCI */ #define RADEON_PMI_PMCSR_REG 0x0f60 /* PCI */ #define RADEON_PMI_REGISTER 0x0f5c /* PCI */ #define RADEON_PPLL_CNTL 0x0002 /* PLL */ # define RADEON_PPLL_RESET (1 << 0) # define RADEON_PPLL_SLEEP (1 << 1) # define RADEON_PPLL_PVG_MASK (7 << 11) # define RADEON_PPLL_PVG_SHIFT 11 # define RADEON_PPLL_ATOMIC_UPDATE_EN (1 << 16) # define RADEON_PPLL_VGA_ATOMIC_UPDATE_EN (1 << 17) # define RADEON_PPLL_ATOMIC_UPDATE_VSYNC (1 << 18) #define RADEON_PPLL_DIV_0 0x0004 /* PLL */ #define RADEON_PPLL_DIV_1 0x0005 /* PLL */ #define RADEON_PPLL_DIV_2 0x0006 /* PLL */ #define RADEON_PPLL_DIV_3 0x0007 /* PLL */ # define RADEON_PPLL_FB3_DIV_MASK 0x07ff # define RADEON_PPLL_POST3_DIV_MASK 0x00070000 #define RADEON_PPLL_REF_DIV 0x0003 /* PLL */ # define RADEON_PPLL_REF_DIV_MASK 0x03ff # define RADEON_PPLL_ATOMIC_UPDATE_R (1 << 15) /* same as _W */ # define RADEON_PPLL_ATOMIC_UPDATE_W (1 << 15) /* same as _R */ #define RADEON_PWR_MNGMT_CNTL_STATUS 0x0f60 /* PCI */ #define RADEON_RBBM_GUICNTL 0x172c # define RADEON_HOST_DATA_SWAP_NONE (0 << 0) # define RADEON_HOST_DATA_SWAP_16BIT (1 << 0) # define RADEON_HOST_DATA_SWAP_32BIT (2 << 0) # define RADEON_HOST_DATA_SWAP_HDW (3 << 0) #define RADEON_RBBM_SOFT_RESET 0x00f0 # define RADEON_SOFT_RESET_CP (1 << 0) # define RADEON_SOFT_RESET_HI (1 << 1) # define RADEON_SOFT_RESET_SE (1 << 2) # define RADEON_SOFT_RESET_RE (1 << 3) # define RADEON_SOFT_RESET_PP (1 << 4) # define RADEON_SOFT_RESET_E2 (1 << 5) # define RADEON_SOFT_RESET_RB (1 << 6) # define RADEON_SOFT_RESET_HDP (1 << 7) #define RADEON_RBBM_STATUS 0x0e40 # define RADEON_RBBM_FIFOCNT_MASK 0x007f # define RADEON_RBBM_ACTIVE (1 << 31) #define RADEON_RB2D_DSTCACHE_CTLSTAT 0x342c # define RADEON_RB2D_DC_FLUSH (3 << 0) # define RADEON_RB2D_DC_FREE (3 << 2) # define RADEON_RB2D_DC_FLUSH_ALL 0xf # define RADEON_RB2D_DC_BUSY (1 << 31) #define RADEON_RB2D_DSTCACHE_MODE 0x3428 #define RADEON_DSTCACHE_CTLSTAT 0x1714 #define RADEON_RB3D_ZCACHE_MODE 0x3250 #define RADEON_RB3D_ZCACHE_CTLSTAT 0x3254 # define RADEON_RB3D_ZC_FLUSH_ALL 0x5 #define RADEON_RB3D_DSTCACHE_MODE 0x3258 # define RADEON_RB3D_DC_CACHE_ENABLE (0) # define RADEON_RB3D_DC_2D_CACHE_DISABLE (1) # define RADEON_RB3D_DC_3D_CACHE_DISABLE (2) # define RADEON_RB3D_DC_CACHE_DISABLE (3) # define RADEON_RB3D_DC_2D_CACHE_LINESIZE_128 (1 << 2) # define RADEON_RB3D_DC_3D_CACHE_LINESIZE_128 (2 << 2) # define RADEON_RB3D_DC_2D_CACHE_AUTOFLUSH (1 << 8) # define RADEON_RB3D_DC_3D_CACHE_AUTOFLUSH (2 << 8) # define R200_RB3D_DC_2D_CACHE_AUTOFREE (1 << 10) # define R200_RB3D_DC_3D_CACHE_AUTOFREE (2 << 10) # define RADEON_RB3D_DC_FORCE_RMW (1 << 16) # define RADEON_RB3D_DC_DISABLE_RI_FILL (1 << 24) # define RADEON_RB3D_DC_DISABLE_RI_READ (1 << 25) #define RADEON_RB3D_DSTCACHE_CTLSTAT 0x325C # define RADEON_RB3D_DC_FLUSH (3 << 0) # define RADEON_RB3D_DC_FREE (3 << 2) # define RADEON_RB3D_DC_FLUSH_ALL 0xf # define RADEON_RB3D_DC_BUSY (1 << 31) #define RADEON_REG_BASE 0x0f18 /* PCI */ #define RADEON_REGPROG_INF 0x0f09 /* PCI */ #define RADEON_REVISION_ID 0x0f08 /* PCI */ #define RADEON_SC_BOTTOM 0x164c #define RADEON_SC_BOTTOM_RIGHT 0x16f0 #define RADEON_SC_BOTTOM_RIGHT_C 0x1c8c #define RADEON_SC_LEFT 0x1640 #define RADEON_SC_RIGHT 0x1644 #define RADEON_SC_TOP 0x1648 #define RADEON_SC_TOP_LEFT 0x16ec #define RADEON_SC_TOP_LEFT_C 0x1c88 # define RADEON_SC_SIGN_MASK_LO 0x8000 # define RADEON_SC_SIGN_MASK_HI 0x80000000 #define RADEON_SCLK_CNTL 0x000d /* PLL */ # define RADEON_SCLK_SRC_SEL_MASK 0x0007 # define RADEON_DYN_STOP_LAT_MASK 0x00007ff8 # define RADEON_CP_MAX_DYN_STOP_LAT 0x0008 # define RADEON_SCLK_FORCEON_MASK 0xffff8000 # define RADEON_SCLK_FORCE_DISP2 (1<<15) # define RADEON_SCLK_FORCE_CP (1<<16) # define RADEON_SCLK_FORCE_HDP (1<<17) # define RADEON_SCLK_FORCE_DISP1 (1<<18) # define RADEON_SCLK_FORCE_TOP (1<<19) # define RADEON_SCLK_FORCE_E2 (1<<20) # define RADEON_SCLK_FORCE_SE (1<<21) # define RADEON_SCLK_FORCE_IDCT (1<<22) # define RADEON_SCLK_FORCE_VIP (1<<23) # define RADEON_SCLK_FORCE_RE (1<<24) # define RADEON_SCLK_FORCE_PB (1<<25) # define RADEON_SCLK_FORCE_TAM (1<<26) # define RADEON_SCLK_FORCE_TDM (1<<27) # define RADEON_SCLK_FORCE_RB (1<<28) # define RADEON_SCLK_FORCE_TV_SCLK (1<<29) # define RADEON_SCLK_FORCE_SUBPIC (1<<30) # define RADEON_SCLK_FORCE_OV0 (1<<31) # define R300_SCLK_FORCE_VAP (1<<21) # define R300_SCLK_FORCE_SR (1<<25) # define R300_SCLK_FORCE_PX (1<<26) # define R300_SCLK_FORCE_TX (1<<27) # define R300_SCLK_FORCE_US (1<<28) # define R300_SCLK_FORCE_SU (1<<30) #define R300_SCLK_CNTL2 0x1e /* PLL */ # define R300_SCLK_TCL_MAX_DYN_STOP_LAT (1<<10) # define R300_SCLK_GA_MAX_DYN_STOP_LAT (1<<11) # define R300_SCLK_CBA_MAX_DYN_STOP_LAT (1<<12) # define R300_SCLK_FORCE_TCL (1<<13) # define R300_SCLK_FORCE_CBA (1<<14) # define R300_SCLK_FORCE_GA (1<<15) #define RADEON_SCLK_MORE_CNTL 0x0035 /* PLL */ # define RADEON_SCLK_MORE_MAX_DYN_STOP_LAT 0x0007 # define RADEON_SCLK_MORE_FORCEON 0x0700 #define RADEON_SDRAM_MODE_REG 0x0158 #define RADEON_SEQ8_DATA 0x03c5 /* VGA */ #define RADEON_SEQ8_IDX 0x03c4 /* VGA */ #define RADEON_SNAPSHOT_F_COUNT 0x0244 #define RADEON_SNAPSHOT_VH_COUNTS 0x0240 #define RADEON_SNAPSHOT_VIF_COUNT 0x024c #define RADEON_SRC_OFFSET 0x15ac #define RADEON_SRC_PITCH 0x15b0 #define RADEON_SRC_PITCH_OFFSET 0x1428 #define RADEON_SRC_SC_BOTTOM 0x165c #define RADEON_SRC_SC_BOTTOM_RIGHT 0x16f4 #define RADEON_SRC_SC_RIGHT 0x1654 #define RADEON_SRC_X 0x1414 #define RADEON_SRC_X_Y 0x1590 #define RADEON_SRC_Y 0x1418 #define RADEON_SRC_Y_X 0x1434 #define RADEON_STATUS 0x0f06 /* PCI */ #define RADEON_SUBPIC_CNTL 0x0540 /* ? */ #define RADEON_SUB_CLASS 0x0f0a /* PCI */ #define RADEON_SURFACE_CNTL 0x0b00 # define RADEON_SURF_TRANSLATION_DIS (1 << 8) # define RADEON_NONSURF_AP0_SWP_16BPP (1 << 20) # define RADEON_NONSURF_AP0_SWP_32BPP (1 << 21) # define RADEON_NONSURF_AP1_SWP_16BPP (1 << 22) # define RADEON_NONSURF_AP1_SWP_32BPP (1 << 23) #define RADEON_SURFACE0_INFO 0x0b0c # define RADEON_SURF_TILE_COLOR_MACRO (0 << 16) # define RADEON_SURF_TILE_COLOR_BOTH (1 << 16) # define RADEON_SURF_TILE_DEPTH_32BPP (2 << 16) # define RADEON_SURF_TILE_DEPTH_16BPP (3 << 16) # define R200_SURF_TILE_NONE (0 << 16) # define R200_SURF_TILE_COLOR_MACRO (1 << 16) # define R200_SURF_TILE_COLOR_MICRO (2 << 16) # define R200_SURF_TILE_COLOR_BOTH (3 << 16) # define R200_SURF_TILE_DEPTH_32BPP (4 << 16) # define R200_SURF_TILE_DEPTH_16BPP (5 << 16) # define R300_SURF_TILE_NONE (0 << 16) # define R300_SURF_TILE_COLOR_MACRO (1 << 16) # define R300_SURF_TILE_DEPTH_32BPP (2 << 16) # define RADEON_SURF_AP0_SWP_16BPP (1 << 20) # define RADEON_SURF_AP0_SWP_32BPP (1 << 21) # define RADEON_SURF_AP1_SWP_16BPP (1 << 22) # define RADEON_SURF_AP1_SWP_32BPP (1 << 23) #define RADEON_SURFACE0_LOWER_BOUND 0x0b04 #define RADEON_SURFACE0_UPPER_BOUND 0x0b08 #define RADEON_SURFACE1_INFO 0x0b1c #define RADEON_SURFACE1_LOWER_BOUND 0x0b14 #define RADEON_SURFACE1_UPPER_BOUND 0x0b18 #define RADEON_SURFACE2_INFO 0x0b2c #define RADEON_SURFACE2_LOWER_BOUND 0x0b24 #define RADEON_SURFACE2_UPPER_BOUND 0x0b28 #define RADEON_SURFACE3_INFO 0x0b3c #define RADEON_SURFACE3_LOWER_BOUND 0x0b34 #define RADEON_SURFACE3_UPPER_BOUND 0x0b38 #define RADEON_SURFACE4_INFO 0x0b4c #define RADEON_SURFACE4_LOWER_BOUND 0x0b44 #define RADEON_SURFACE4_UPPER_BOUND 0x0b48 #define RADEON_SURFACE5_INFO 0x0b5c #define RADEON_SURFACE5_LOWER_BOUND 0x0b54 #define RADEON_SURFACE5_UPPER_BOUND 0x0b58 #define RADEON_SURFACE6_INFO 0x0b6c #define RADEON_SURFACE6_LOWER_BOUND 0x0b64 #define RADEON_SURFACE6_UPPER_BOUND 0x0b68 #define RADEON_SURFACE7_INFO 0x0b7c #define RADEON_SURFACE7_LOWER_BOUND 0x0b74 #define RADEON_SURFACE7_UPPER_BOUND 0x0b78 #define RADEON_SW_SEMAPHORE 0x013c #define RADEON_TEST_DEBUG_CNTL 0x0120 #define RADEON_TEST_DEBUG_CNTL__TEST_DEBUG_OUT_EN 0x00000001 #define RADEON_TEST_DEBUG_MUX 0x0124 #define RADEON_TEST_DEBUG_OUT 0x012c #define RADEON_TMDS_PLL_CNTL 0x02a8 #define RADEON_TMDS_TRANSMITTER_CNTL 0x02a4 # define RADEON_TMDS_TRANSMITTER_PLLEN 1 # define RADEON_TMDS_TRANSMITTER_PLLRST 2 #define RADEON_TRAIL_BRES_DEC 0x1614 #define RADEON_TRAIL_BRES_ERR 0x160c #define RADEON_TRAIL_BRES_INC 0x1610 #define RADEON_TRAIL_X 0x1618 #define RADEON_TRAIL_X_SUB 0x1620 #define RADEON_VCLK_ECP_CNTL 0x0008 /* PLL */ # define RADEON_VCLK_SRC_SEL_MASK 0x03 # define RADEON_VCLK_SRC_SEL_CPUCLK 0x00 # define RADEON_VCLK_SRC_SEL_PSCANCLK 0x01 # define RADEON_VCLK_SRC_SEL_BYTECLK 0x02 # define RADEON_VCLK_SRC_SEL_PPLLCLK 0x03 # define RADEON_PIXCLK_ALWAYS_ONb (1<<6) # define RADEON_PIXCLK_DAC_ALWAYS_ONb (1<<7) # define R300_DISP_DAC_PIXCLK_DAC_BLANK_OFF (1<<23) #define RADEON_VENDOR_ID 0x0f00 /* PCI */ #define RADEON_VGA_DDA_CONFIG 0x02e8 #define RADEON_VGA_DDA_ON_OFF 0x02ec #define RADEON_VID_BUFFER_CONTROL 0x0900 #define RADEON_VIDEOMUX_CNTL 0x0190 /* VIP bus */ #define RADEON_VIPH_CH0_DATA 0x0c00 #define RADEON_VIPH_CH1_DATA 0x0c04 #define RADEON_VIPH_CH2_DATA 0x0c08 #define RADEON_VIPH_CH3_DATA 0x0c0c #define RADEON_VIPH_CH0_ADDR 0x0c10 #define RADEON_VIPH_CH1_ADDR 0x0c14 #define RADEON_VIPH_CH2_ADDR 0x0c18 #define RADEON_VIPH_CH3_ADDR 0x0c1c #define RADEON_VIPH_CH0_SBCNT 0x0c20 #define RADEON_VIPH_CH1_SBCNT 0x0c24 #define RADEON_VIPH_CH2_SBCNT 0x0c28 #define RADEON_VIPH_CH3_SBCNT 0x0c2c #define RADEON_VIPH_CH0_ABCNT 0x0c30 #define RADEON_VIPH_CH1_ABCNT 0x0c34 #define RADEON_VIPH_CH2_ABCNT 0x0c38 #define RADEON_VIPH_CH3_ABCNT 0x0c3c #define RADEON_VIPH_CONTROL 0x0c40 # define RADEON_VIP_BUSY 0 # define RADEON_VIP_IDLE 1 # define RADEON_VIP_RESET 2 # define RADEON_VIPH_EN (1 << 21) #define RADEON_VIPH_DV_LAT 0x0c44 #define RADEON_VIPH_BM_CHUNK 0x0c48 #define RADEON_VIPH_DV_INT 0x0c4c #define RADEON_VIPH_TIMEOUT_STAT 0x0c50 #define RADEON_VIPH_TIMEOUT_STAT__VIPH_REG_STAT 0x00000010 #define RADEON_VIPH_TIMEOUT_STAT__VIPH_REG_AK 0x00000010 #define RADEON_VIPH_TIMEOUT_STAT__VIPH_REGR_DIS 0x01000000 #define RADEON_VIPH_REG_DATA 0x0084 #define RADEON_VIPH_REG_ADDR 0x0080 #define RADEON_WAIT_UNTIL 0x1720 # define RADEON_WAIT_CRTC_PFLIP (1 << 0) # define RADEON_WAIT_RE_CRTC_VLINE (1 << 1) # define RADEON_WAIT_FE_CRTC_VLINE (1 << 2) # define RADEON_WAIT_CRTC_VLINE (1 << 3) # define RADEON_WAIT_DMA_VID_IDLE (1 << 8) # define RADEON_WAIT_DMA_GUI_IDLE (1 << 9) # define RADEON_WAIT_CMDFIFO (1 << 10) /* wait for CMDFIFO_ENTRIES */ # define RADEON_WAIT_OV0_FLIP (1 << 11) # define RADEON_WAIT_AGP_FLUSH (1 << 13) # define RADEON_WAIT_2D_IDLE (1 << 14) # define RADEON_WAIT_3D_IDLE (1 << 15) # define RADEON_WAIT_2D_IDLECLEAN (1 << 16) # define RADEON_WAIT_3D_IDLECLEAN (1 << 17) # define RADEON_WAIT_HOST_IDLECLEAN (1 << 18) # define RADEON_CMDFIFO_ENTRIES_SHIFT 10 # define RADEON_CMDFIFO_ENTRIES_MASK 0x7f # define RADEON_WAIT_VAP_IDLE (1 << 28) # define RADEON_WAIT_BOTH_CRTC_PFLIP (1 << 30) # define RADEON_ENG_DISPLAY_SELECT_CRTC0 (0 << 31) # define RADEON_ENG_DISPLAY_SELECT_CRTC1 (1 << 31) #define RADEON_X_MPLL_REF_FB_DIV 0x000a /* PLL */ #define RADEON_XCLK_CNTL 0x000d /* PLL */ #define RADEON_XDLL_CNTL 0x000c /* PLL */ #define RADEON_XPLL_CNTL 0x000b /* PLL */ /* Registers for 3D/TCL */ #define RADEON_PP_BORDER_COLOR_0 0x1d40 #define RADEON_PP_BORDER_COLOR_1 0x1d44 #define RADEON_PP_BORDER_COLOR_2 0x1d48 #define RADEON_PP_CNTL 0x1c38 # define RADEON_STIPPLE_ENABLE (1 << 0) # define RADEON_SCISSOR_ENABLE (1 << 1) # define RADEON_PATTERN_ENABLE (1 << 2) # define RADEON_SHADOW_ENABLE (1 << 3) # define RADEON_TEX_ENABLE_MASK (0xf << 4) # define RADEON_TEX_0_ENABLE (1 << 4) # define RADEON_TEX_1_ENABLE (1 << 5) # define RADEON_TEX_2_ENABLE (1 << 6) # define RADEON_TEX_3_ENABLE (1 << 7) # define RADEON_TEX_BLEND_ENABLE_MASK (0xf << 12) # define RADEON_TEX_BLEND_0_ENABLE (1 << 12) # define RADEON_TEX_BLEND_1_ENABLE (1 << 13) # define RADEON_TEX_BLEND_2_ENABLE (1 << 14) # define RADEON_TEX_BLEND_3_ENABLE (1 << 15) # define RADEON_PLANAR_YUV_ENABLE (1 << 20) # define RADEON_SPECULAR_ENABLE (1 << 21) # define RADEON_FOG_ENABLE (1 << 22) # define RADEON_ALPHA_TEST_ENABLE (1 << 23) # define RADEON_ANTI_ALIAS_NONE (0 << 24) # define RADEON_ANTI_ALIAS_LINE (1 << 24) # define RADEON_ANTI_ALIAS_POLY (2 << 24) # define RADEON_ANTI_ALIAS_LINE_POLY (3 << 24) # define RADEON_BUMP_MAP_ENABLE (1 << 26) # define RADEON_BUMPED_MAP_T0 (0 << 27) # define RADEON_BUMPED_MAP_T1 (1 << 27) # define RADEON_BUMPED_MAP_T2 (2 << 27) # define RADEON_TEX_3D_ENABLE_0 (1 << 29) # define RADEON_TEX_3D_ENABLE_1 (1 << 30) # define RADEON_MC_ENABLE (1 << 31) #define RADEON_PP_FOG_COLOR 0x1c18 # define RADEON_FOG_COLOR_MASK 0x00ffffff # define RADEON_FOG_VERTEX (0 << 24) # define RADEON_FOG_TABLE (1 << 24) # define RADEON_FOG_USE_DEPTH (0 << 25) # define RADEON_FOG_USE_DIFFUSE_ALPHA (2 << 25) # define RADEON_FOG_USE_SPEC_ALPHA (3 << 25) #define RADEON_PP_LUM_MATRIX 0x1d00 #define RADEON_PP_MISC 0x1c14 # define RADEON_REF_ALPHA_MASK 0x000000ff # define RADEON_ALPHA_TEST_FAIL (0 << 8) # define RADEON_ALPHA_TEST_LESS (1 << 8) # define RADEON_ALPHA_TEST_LEQUAL (2 << 8) # define RADEON_ALPHA_TEST_EQUAL (3 << 8) # define RADEON_ALPHA_TEST_GEQUAL (4 << 8) # define RADEON_ALPHA_TEST_GREATER (5 << 8) # define RADEON_ALPHA_TEST_NEQUAL (6 << 8) # define RADEON_ALPHA_TEST_PASS (7 << 8) # define RADEON_ALPHA_TEST_OP_MASK (7 << 8) # define RADEON_CHROMA_FUNC_FAIL (0 << 16) # define RADEON_CHROMA_FUNC_PASS (1 << 16) # define RADEON_CHROMA_FUNC_NEQUAL (2 << 16) # define RADEON_CHROMA_FUNC_EQUAL (3 << 16) # define RADEON_CHROMA_KEY_NEAREST (0 << 18) # define RADEON_CHROMA_KEY_ZERO (1 << 18) # define RADEON_SHADOW_ID_AUTO_INC (1 << 20) # define RADEON_SHADOW_FUNC_EQUAL (0 << 21) # define RADEON_SHADOW_FUNC_NEQUAL (1 << 21) # define RADEON_SHADOW_PASS_1 (0 << 22) # define RADEON_SHADOW_PASS_2 (1 << 22) # define RADEON_RIGHT_HAND_CUBE_D3D (0 << 24) # define RADEON_RIGHT_HAND_CUBE_OGL (1 << 24) #define RADEON_PP_ROT_MATRIX_0 0x1d58 #define RADEON_PP_ROT_MATRIX_1 0x1d5c #define RADEON_PP_TXFILTER_0 0x1c54 #define RADEON_PP_TXFILTER_1 0x1c6c #define RADEON_PP_TXFILTER_2 0x1c84 # define RADEON_MAG_FILTER_NEAREST (0 << 0) # define RADEON_MAG_FILTER_LINEAR (1 << 0) # define RADEON_MAG_FILTER_MASK (1 << 0) # define RADEON_MIN_FILTER_NEAREST (0 << 1) # define RADEON_MIN_FILTER_LINEAR (1 << 1) # define RADEON_MIN_FILTER_NEAREST_MIP_NEAREST (2 << 1) # define RADEON_MIN_FILTER_NEAREST_MIP_LINEAR (3 << 1) # define RADEON_MIN_FILTER_LINEAR_MIP_NEAREST (6 << 1) # define RADEON_MIN_FILTER_LINEAR_MIP_LINEAR (7 << 1) # define RADEON_MIN_FILTER_ANISO_NEAREST (8 << 1) # define RADEON_MIN_FILTER_ANISO_LINEAR (9 << 1) # define RADEON_MIN_FILTER_ANISO_NEAREST_MIP_NEAREST (10 << 1) # define RADEON_MIN_FILTER_ANISO_NEAREST_MIP_LINEAR (11 << 1) # define RADEON_MIN_FILTER_MASK (15 << 1) # define RADEON_MAX_ANISO_1_TO_1 (0 << 5) # define RADEON_MAX_ANISO_2_TO_1 (1 << 5) # define RADEON_MAX_ANISO_4_TO_1 (2 << 5) # define RADEON_MAX_ANISO_8_TO_1 (3 << 5) # define RADEON_MAX_ANISO_16_TO_1 (4 << 5) # define RADEON_MAX_ANISO_MASK (7 << 5) # define RADEON_LOD_BIAS_MASK (0xff << 8) # define RADEON_LOD_BIAS_SHIFT 8 # define RADEON_MAX_MIP_LEVEL_MASK (0x0f << 16) # define RADEON_MAX_MIP_LEVEL_SHIFT 16 # define RADEON_YUV_TO_RGB (1 << 20) # define RADEON_YUV_TEMPERATURE_COOL (0 << 21) # define RADEON_YUV_TEMPERATURE_HOT (1 << 21) # define RADEON_YUV_TEMPERATURE_MASK (1 << 21) # define RADEON_WRAPEN_S (1 << 22) # define RADEON_CLAMP_S_WRAP (0 << 23) # define RADEON_CLAMP_S_MIRROR (1 << 23) # define RADEON_CLAMP_S_CLAMP_LAST (2 << 23) # define RADEON_CLAMP_S_MIRROR_CLAMP_LAST (3 << 23) # define RADEON_CLAMP_S_CLAMP_BORDER (4 << 23) # define RADEON_CLAMP_S_MIRROR_CLAMP_BORDER (5 << 23) # define RADEON_CLAMP_S_CLAMP_GL (6 << 23) # define RADEON_CLAMP_S_MIRROR_CLAMP_GL (7 << 23) # define RADEON_CLAMP_S_MASK (7 << 23) # define RADEON_WRAPEN_T (1 << 26) # define RADEON_CLAMP_T_WRAP (0 << 27) # define RADEON_CLAMP_T_MIRROR (1 << 27) # define RADEON_CLAMP_T_CLAMP_LAST (2 << 27) # define RADEON_CLAMP_T_MIRROR_CLAMP_LAST (3 << 27) # define RADEON_CLAMP_T_CLAMP_BORDER (4 << 27) # define RADEON_CLAMP_T_MIRROR_CLAMP_BORDER (5 << 27) # define RADEON_CLAMP_T_CLAMP_GL (6 << 27) # define RADEON_CLAMP_T_MIRROR_CLAMP_GL (7 << 27) # define RADEON_CLAMP_T_MASK (7 << 27) # define RADEON_BORDER_MODE_OGL (0 << 31) # define RADEON_BORDER_MODE_D3D (1 << 31) #define RADEON_PP_TXFORMAT_0 0x1c58 #define RADEON_PP_TXFORMAT_1 0x1c70 #define RADEON_PP_TXFORMAT_2 0x1c88 # define RADEON_TXFORMAT_I8 (0 << 0) # define RADEON_TXFORMAT_AI88 (1 << 0) # define RADEON_TXFORMAT_RGB332 (2 << 0) # define RADEON_TXFORMAT_ARGB1555 (3 << 0) # define RADEON_TXFORMAT_RGB565 (4 << 0) # define RADEON_TXFORMAT_ARGB4444 (5 << 0) # define RADEON_TXFORMAT_ARGB8888 (6 << 0) # define RADEON_TXFORMAT_RGBA8888 (7 << 0) # define RADEON_TXFORMAT_Y8 (8 << 0) # define RADEON_TXFORMAT_VYUY422 (10 << 0) # define RADEON_TXFORMAT_YVYU422 (11 << 0) # define RADEON_TXFORMAT_DXT1 (12 << 0) # define RADEON_TXFORMAT_DXT23 (14 << 0) # define RADEON_TXFORMAT_DXT45 (15 << 0) # define RADEON_TXFORMAT_FORMAT_MASK (31 << 0) # define RADEON_TXFORMAT_FORMAT_SHIFT 0 # define RADEON_TXFORMAT_APPLE_YUV_MODE (1 << 5) # define RADEON_TXFORMAT_ALPHA_IN_MAP (1 << 6) # define RADEON_TXFORMAT_NON_POWER2 (1 << 7) # define RADEON_TXFORMAT_WIDTH_MASK (15 << 8) # define RADEON_TXFORMAT_WIDTH_SHIFT 8 # define RADEON_TXFORMAT_HEIGHT_MASK (15 << 12) # define RADEON_TXFORMAT_HEIGHT_SHIFT 12 # define RADEON_TXFORMAT_F5_WIDTH_MASK (15 << 16) # define RADEON_TXFORMAT_F5_WIDTH_SHIFT 16 # define RADEON_TXFORMAT_F5_HEIGHT_MASK (15 << 20) # define RADEON_TXFORMAT_F5_HEIGHT_SHIFT 20 # define RADEON_TXFORMAT_ST_ROUTE_STQ0 (0 << 24) # define RADEON_TXFORMAT_ST_ROUTE_MASK (3 << 24) # define RADEON_TXFORMAT_ST_ROUTE_STQ1 (1 << 24) # define RADEON_TXFORMAT_ST_ROUTE_STQ2 (2 << 24) # define RADEON_TXFORMAT_ENDIAN_NO_SWAP (0 << 26) # define RADEON_TXFORMAT_ENDIAN_16BPP_SWAP (1 << 26) # define RADEON_TXFORMAT_ENDIAN_32BPP_SWAP (2 << 26) # define RADEON_TXFORMAT_ENDIAN_HALFDW_SWAP (3 << 26) # define RADEON_TXFORMAT_ALPHA_MASK_ENABLE (1 << 28) # define RADEON_TXFORMAT_CHROMA_KEY_ENABLE (1 << 29) # define RADEON_TXFORMAT_CUBIC_MAP_ENABLE (1 << 30) # define RADEON_TXFORMAT_PERSPECTIVE_ENABLE (1 << 31) #define RADEON_PP_CUBIC_FACES_0 0x1d24 #define RADEON_PP_CUBIC_FACES_1 0x1d28 #define RADEON_PP_CUBIC_FACES_2 0x1d2c # define RADEON_FACE_WIDTH_1_SHIFT 0 # define RADEON_FACE_HEIGHT_1_SHIFT 4 # define RADEON_FACE_WIDTH_1_MASK (0xf << 0) # define RADEON_FACE_HEIGHT_1_MASK (0xf << 4) # define RADEON_FACE_WIDTH_2_SHIFT 8 # define RADEON_FACE_HEIGHT_2_SHIFT 12 # define RADEON_FACE_WIDTH_2_MASK (0xf << 8) # define RADEON_FACE_HEIGHT_2_MASK (0xf << 12) # define RADEON_FACE_WIDTH_3_SHIFT 16 # define RADEON_FACE_HEIGHT_3_SHIFT 20 # define RADEON_FACE_WIDTH_3_MASK (0xf << 16) # define RADEON_FACE_HEIGHT_3_MASK (0xf << 20) # define RADEON_FACE_WIDTH_4_SHIFT 24 # define RADEON_FACE_HEIGHT_4_SHIFT 28 # define RADEON_FACE_WIDTH_4_MASK (0xf << 24) # define RADEON_FACE_HEIGHT_4_MASK (0xf << 28) #define RADEON_PP_TXOFFSET_0 0x1c5c #define RADEON_PP_TXOFFSET_1 0x1c74 #define RADEON_PP_TXOFFSET_2 0x1c8c # define RADEON_TXO_ENDIAN_NO_SWAP (0 << 0) # define RADEON_TXO_ENDIAN_BYTE_SWAP (1 << 0) # define RADEON_TXO_ENDIAN_WORD_SWAP (2 << 0) # define RADEON_TXO_ENDIAN_HALFDW_SWAP (3 << 0) # define RADEON_TXO_MACRO_LINEAR (0 << 2) # define RADEON_TXO_MACRO_TILE (1 << 2) # define RADEON_TXO_MICRO_LINEAR (0 << 3) # define RADEON_TXO_MICRO_TILE_X2 (1 << 3) # define RADEON_TXO_MICRO_TILE_OPT (2 << 3) # define RADEON_TXO_OFFSET_MASK 0xffffffe0 # define RADEON_TXO_OFFSET_SHIFT 5 #define RADEON_PP_CUBIC_OFFSET_T0_0 0x1dd0 /* bits [31:5] */ #define RADEON_PP_CUBIC_OFFSET_T0_1 0x1dd4 #define RADEON_PP_CUBIC_OFFSET_T0_2 0x1dd8 #define RADEON_PP_CUBIC_OFFSET_T0_3 0x1ddc #define RADEON_PP_CUBIC_OFFSET_T0_4 0x1de0 #define RADEON_PP_CUBIC_OFFSET_T1_0 0x1e00 #define RADEON_PP_CUBIC_OFFSET_T1_1 0x1e04 #define RADEON_PP_CUBIC_OFFSET_T1_2 0x1e08 #define RADEON_PP_CUBIC_OFFSET_T1_3 0x1e0c #define RADEON_PP_CUBIC_OFFSET_T1_4 0x1e10 #define RADEON_PP_CUBIC_OFFSET_T2_0 0x1e14 #define RADEON_PP_CUBIC_OFFSET_T2_1 0x1e18 #define RADEON_PP_CUBIC_OFFSET_T2_2 0x1e1c #define RADEON_PP_CUBIC_OFFSET_T2_3 0x1e20 #define RADEON_PP_CUBIC_OFFSET_T2_4 0x1e24 #define RADEON_PP_TEX_SIZE_0 0x1d04 /* NPOT */ #define RADEON_PP_TEX_SIZE_1 0x1d0c #define RADEON_PP_TEX_SIZE_2 0x1d14 # define RADEON_TEX_USIZE_MASK (0x7ff << 0) # define RADEON_TEX_USIZE_SHIFT 0 # define RADEON_TEX_VSIZE_MASK (0x7ff << 16) # define RADEON_TEX_VSIZE_SHIFT 16 # define RADEON_SIGNED_RGB_MASK (1 << 30) # define RADEON_SIGNED_RGB_SHIFT 30 # define RADEON_SIGNED_ALPHA_MASK (1 << 31) # define RADEON_SIGNED_ALPHA_SHIFT 31 #define RADEON_PP_TEX_PITCH_0 0x1d08 /* NPOT */ #define RADEON_PP_TEX_PITCH_1 0x1d10 /* NPOT */ #define RADEON_PP_TEX_PITCH_2 0x1d18 /* NPOT */ /* note: bits 13-5: 32 byte aligned stride of texture map */ #define RADEON_PP_TXCBLEND_0 0x1c60 #define RADEON_PP_TXCBLEND_1 0x1c78 #define RADEON_PP_TXCBLEND_2 0x1c90 # define RADEON_COLOR_ARG_A_SHIFT 0 # define RADEON_COLOR_ARG_A_MASK (0x1f << 0) # define RADEON_COLOR_ARG_A_ZERO (0 << 0) # define RADEON_COLOR_ARG_A_CURRENT_COLOR (2 << 0) # define RADEON_COLOR_ARG_A_CURRENT_ALPHA (3 << 0) # define RADEON_COLOR_ARG_A_DIFFUSE_COLOR (4 << 0) # define RADEON_COLOR_ARG_A_DIFFUSE_ALPHA (5 << 0) # define RADEON_COLOR_ARG_A_SPECULAR_COLOR (6 << 0) # define RADEON_COLOR_ARG_A_SPECULAR_ALPHA (7 << 0) # define RADEON_COLOR_ARG_A_TFACTOR_COLOR (8 << 0) # define RADEON_COLOR_ARG_A_TFACTOR_ALPHA (9 << 0) # define RADEON_COLOR_ARG_A_T0_COLOR (10 << 0) # define RADEON_COLOR_ARG_A_T0_ALPHA (11 << 0) # define RADEON_COLOR_ARG_A_T1_COLOR (12 << 0) # define RADEON_COLOR_ARG_A_T1_ALPHA (13 << 0) # define RADEON_COLOR_ARG_A_T2_COLOR (14 << 0) # define RADEON_COLOR_ARG_A_T2_ALPHA (15 << 0) # define RADEON_COLOR_ARG_A_T3_COLOR (16 << 0) # define RADEON_COLOR_ARG_A_T3_ALPHA (17 << 0) # define RADEON_COLOR_ARG_B_SHIFT 5 # define RADEON_COLOR_ARG_B_MASK (0x1f << 5) # define RADEON_COLOR_ARG_B_ZERO (0 << 5) # define RADEON_COLOR_ARG_B_CURRENT_COLOR (2 << 5) # define RADEON_COLOR_ARG_B_CURRENT_ALPHA (3 << 5) # define RADEON_COLOR_ARG_B_DIFFUSE_COLOR (4 << 5) # define RADEON_COLOR_ARG_B_DIFFUSE_ALPHA (5 << 5) # define RADEON_COLOR_ARG_B_SPECULAR_COLOR (6 << 5) # define RADEON_COLOR_ARG_B_SPECULAR_ALPHA (7 << 5) # define RADEON_COLOR_ARG_B_TFACTOR_COLOR (8 << 5) # define RADEON_COLOR_ARG_B_TFACTOR_ALPHA (9 << 5) # define RADEON_COLOR_ARG_B_T0_COLOR (10 << 5) # define RADEON_COLOR_ARG_B_T0_ALPHA (11 << 5) # define RADEON_COLOR_ARG_B_T1_COLOR (12 << 5) # define RADEON_COLOR_ARG_B_T1_ALPHA (13 << 5) # define RADEON_COLOR_ARG_B_T2_COLOR (14 << 5) # define RADEON_COLOR_ARG_B_T2_ALPHA (15 << 5) # define RADEON_COLOR_ARG_B_T3_COLOR (16 << 5) # define RADEON_COLOR_ARG_B_T3_ALPHA (17 << 5) # define RADEON_COLOR_ARG_C_SHIFT 10 # define RADEON_COLOR_ARG_C_MASK (0x1f << 10) # define RADEON_COLOR_ARG_C_ZERO (0 << 10) # define RADEON_COLOR_ARG_C_CURRENT_COLOR (2 << 10) # define RADEON_COLOR_ARG_C_CURRENT_ALPHA (3 << 10) # define RADEON_COLOR_ARG_C_DIFFUSE_COLOR (4 << 10) # define RADEON_COLOR_ARG_C_DIFFUSE_ALPHA (5 << 10) # define RADEON_COLOR_ARG_C_SPECULAR_COLOR (6 << 10) # define RADEON_COLOR_ARG_C_SPECULAR_ALPHA (7 << 10) # define RADEON_COLOR_ARG_C_TFACTOR_COLOR (8 << 10) # define RADEON_COLOR_ARG_C_TFACTOR_ALPHA (9 << 10) # define RADEON_COLOR_ARG_C_T0_COLOR (10 << 10) # define RADEON_COLOR_ARG_C_T0_ALPHA (11 << 10) # define RADEON_COLOR_ARG_C_T1_COLOR (12 << 10) # define RADEON_COLOR_ARG_C_T1_ALPHA (13 << 10) # define RADEON_COLOR_ARG_C_T2_COLOR (14 << 10) # define RADEON_COLOR_ARG_C_T2_ALPHA (15 << 10) # define RADEON_COLOR_ARG_C_T3_COLOR (16 << 10) # define RADEON_COLOR_ARG_C_T3_ALPHA (17 << 10) # define RADEON_COMP_ARG_A (1 << 15) # define RADEON_COMP_ARG_A_SHIFT 15 # define RADEON_COMP_ARG_B (1 << 16) # define RADEON_COMP_ARG_B_SHIFT 16 # define RADEON_COMP_ARG_C (1 << 17) # define RADEON_COMP_ARG_C_SHIFT 17 # define RADEON_BLEND_CTL_MASK (7 << 18) # define RADEON_BLEND_CTL_ADD (0 << 18) # define RADEON_BLEND_CTL_SUBTRACT (1 << 18) # define RADEON_BLEND_CTL_ADDSIGNED (2 << 18) # define RADEON_BLEND_CTL_BLEND (3 << 18) # define RADEON_BLEND_CTL_DOT3 (4 << 18) # define RADEON_SCALE_SHIFT 21 # define RADEON_SCALE_MASK (3 << 21) # define RADEON_SCALE_1X (0 << 21) # define RADEON_SCALE_2X (1 << 21) # define RADEON_SCALE_4X (2 << 21) # define RADEON_CLAMP_TX (1 << 23) # define RADEON_T0_EQ_TCUR (1 << 24) # define RADEON_T1_EQ_TCUR (1 << 25) # define RADEON_T2_EQ_TCUR (1 << 26) # define RADEON_T3_EQ_TCUR (1 << 27) # define RADEON_COLOR_ARG_MASK 0x1f # define RADEON_COMP_ARG_SHIFT 15 #define RADEON_PP_TXABLEND_0 0x1c64 #define RADEON_PP_TXABLEND_1 0x1c7c #define RADEON_PP_TXABLEND_2 0x1c94 # define RADEON_ALPHA_ARG_A_SHIFT 0 # define RADEON_ALPHA_ARG_A_MASK (0xf << 0) # define RADEON_ALPHA_ARG_A_ZERO (0 << 0) # define RADEON_ALPHA_ARG_A_CURRENT_ALPHA (1 << 0) # define RADEON_ALPHA_ARG_A_DIFFUSE_ALPHA (2 << 0) # define RADEON_ALPHA_ARG_A_SPECULAR_ALPHA (3 << 0) # define RADEON_ALPHA_ARG_A_TFACTOR_ALPHA (4 << 0) # define RADEON_ALPHA_ARG_A_T0_ALPHA (5 << 0) # define RADEON_ALPHA_ARG_A_T1_ALPHA (6 << 0) # define RADEON_ALPHA_ARG_A_T2_ALPHA (7 << 0) # define RADEON_ALPHA_ARG_A_T3_ALPHA (8 << 0) # define RADEON_ALPHA_ARG_B_SHIFT 4 # define RADEON_ALPHA_ARG_B_MASK (0xf << 4) # define RADEON_ALPHA_ARG_B_ZERO (0 << 4) # define RADEON_ALPHA_ARG_B_CURRENT_ALPHA (1 << 4) # define RADEON_ALPHA_ARG_B_DIFFUSE_ALPHA (2 << 4) # define RADEON_ALPHA_ARG_B_SPECULAR_ALPHA (3 << 4) # define RADEON_ALPHA_ARG_B_TFACTOR_ALPHA (4 << 4) # define RADEON_ALPHA_ARG_B_T0_ALPHA (5 << 4) # define RADEON_ALPHA_ARG_B_T1_ALPHA (6 << 4) # define RADEON_ALPHA_ARG_B_T2_ALPHA (7 << 4) # define RADEON_ALPHA_ARG_B_T3_ALPHA (8 << 4) # define RADEON_ALPHA_ARG_C_SHIFT 8 # define RADEON_ALPHA_ARG_C_MASK (0xf << 8) # define RADEON_ALPHA_ARG_C_ZERO (0 << 8) # define RADEON_ALPHA_ARG_C_CURRENT_ALPHA (1 << 8) # define RADEON_ALPHA_ARG_C_DIFFUSE_ALPHA (2 << 8) # define RADEON_ALPHA_ARG_C_SPECULAR_ALPHA (3 << 8) # define RADEON_ALPHA_ARG_C_TFACTOR_ALPHA (4 << 8) # define RADEON_ALPHA_ARG_C_T0_ALPHA (5 << 8) # define RADEON_ALPHA_ARG_C_T1_ALPHA (6 << 8) # define RADEON_ALPHA_ARG_C_T2_ALPHA (7 << 8) # define RADEON_ALPHA_ARG_C_T3_ALPHA (8 << 8) # define RADEON_DOT_ALPHA_DONT_REPLICATE (1 << 9) # define RADEON_ALPHA_ARG_MASK 0xf #define RADEON_PP_TFACTOR_0 0x1c68 #define RADEON_PP_TFACTOR_1 0x1c80 #define RADEON_PP_TFACTOR_2 0x1c98 #define RADEON_RB3D_BLENDCNTL 0x1c20 # define RADEON_COMB_FCN_MASK (3 << 12) # define RADEON_COMB_FCN_ADD_CLAMP (0 << 12) # define RADEON_COMB_FCN_ADD_NOCLAMP (1 << 12) # define RADEON_COMB_FCN_SUB_CLAMP (2 << 12) # define RADEON_COMB_FCN_SUB_NOCLAMP (3 << 12) # define RADEON_SRC_BLEND_GL_ZERO (32 << 16) # define RADEON_SRC_BLEND_GL_ONE (33 << 16) # define RADEON_SRC_BLEND_GL_SRC_COLOR (34 << 16) # define RADEON_SRC_BLEND_GL_ONE_MINUS_SRC_COLOR (35 << 16) # define RADEON_SRC_BLEND_GL_DST_COLOR (36 << 16) # define RADEON_SRC_BLEND_GL_ONE_MINUS_DST_COLOR (37 << 16) # define RADEON_SRC_BLEND_GL_SRC_ALPHA (38 << 16) # define RADEON_SRC_BLEND_GL_ONE_MINUS_SRC_ALPHA (39 << 16) # define RADEON_SRC_BLEND_GL_DST_ALPHA (40 << 16) # define RADEON_SRC_BLEND_GL_ONE_MINUS_DST_ALPHA (41 << 16) # define RADEON_SRC_BLEND_GL_SRC_ALPHA_SATURATE (42 << 16) # define RADEON_SRC_BLEND_MASK (63 << 16) # define RADEON_DST_BLEND_GL_ZERO (32 << 24) # define RADEON_DST_BLEND_GL_ONE (33 << 24) # define RADEON_DST_BLEND_GL_SRC_COLOR (34 << 24) # define RADEON_DST_BLEND_GL_ONE_MINUS_SRC_COLOR (35 << 24) # define RADEON_DST_BLEND_GL_DST_COLOR (36 << 24) # define RADEON_DST_BLEND_GL_ONE_MINUS_DST_COLOR (37 << 24) # define RADEON_DST_BLEND_GL_SRC_ALPHA (38 << 24) # define RADEON_DST_BLEND_GL_ONE_MINUS_SRC_ALPHA (39 << 24) # define RADEON_DST_BLEND_GL_DST_ALPHA (40 << 24) # define RADEON_DST_BLEND_GL_ONE_MINUS_DST_ALPHA (41 << 24) # define RADEON_DST_BLEND_MASK (63 << 24) #define RADEON_RB3D_CNTL 0x1c3c # define RADEON_ALPHA_BLEND_ENABLE (1 << 0) # define RADEON_PLANE_MASK_ENABLE (1 << 1) # define RADEON_DITHER_ENABLE (1 << 2) # define RADEON_ROUND_ENABLE (1 << 3) # define RADEON_SCALE_DITHER_ENABLE (1 << 4) # define RADEON_DITHER_INIT (1 << 5) # define RADEON_ROP_ENABLE (1 << 6) # define RADEON_STENCIL_ENABLE (1 << 7) # define RADEON_Z_ENABLE (1 << 8) # define RADEON_DEPTH_XZ_OFFEST_ENABLE (1 << 9) # define RADEON_COLOR_FORMAT_ARGB1555 (3 << 10) # define RADEON_COLOR_FORMAT_RGB565 (4 << 10) # define RADEON_COLOR_FORMAT_ARGB8888 (6 << 10) # define RADEON_COLOR_FORMAT_RGB332 (7 << 10) # define RADEON_COLOR_FORMAT_Y8 (8 << 10) # define RADEON_COLOR_FORMAT_RGB8 (9 << 10) # define RADEON_COLOR_FORMAT_YUV422_VYUY (11 << 10) # define RADEON_COLOR_FORMAT_YUV422_YVYU (12 << 10) # define RADEON_COLOR_FORMAT_aYUV444 (14 << 10) # define RADEON_COLOR_FORMAT_ARGB4444 (15 << 10) # define RADEON_CLRCMP_FLIP_ENABLE (1 << 14) #define RADEON_RB3D_COLOROFFSET 0x1c40 # define RADEON_COLOROFFSET_MASK 0xfffffff0 #define RADEON_RB3D_COLORPITCH 0x1c48 # define RADEON_COLORPITCH_MASK 0x000001ff8 # define RADEON_COLOR_TILE_ENABLE (1 << 16) # define RADEON_COLOR_MICROTILE_ENABLE (1 << 17) # define RADEON_COLOR_ENDIAN_NO_SWAP (0 << 18) # define RADEON_COLOR_ENDIAN_WORD_SWAP (1 << 18) # define RADEON_COLOR_ENDIAN_DWORD_SWAP (2 << 18) #define RADEON_RB3D_DEPTHOFFSET 0x1c24 #define RADEON_RB3D_DEPTHPITCH 0x1c28 # define RADEON_DEPTHPITCH_MASK 0x00001ff8 # define RADEON_DEPTH_ENDIAN_NO_SWAP (0 << 18) # define RADEON_DEPTH_ENDIAN_WORD_SWAP (1 << 18) # define RADEON_DEPTH_ENDIAN_DWORD_SWAP (2 << 18) #define RADEON_RB3D_PLANEMASK 0x1d84 #define RADEON_RB3D_ROPCNTL 0x1d80 # define RADEON_ROP_MASK (15 << 8) # define RADEON_ROP_CLEAR (0 << 8) # define RADEON_ROP_NOR (1 << 8) # define RADEON_ROP_AND_INVERTED (2 << 8) # define RADEON_ROP_COPY_INVERTED (3 << 8) # define RADEON_ROP_AND_REVERSE (4 << 8) # define RADEON_ROP_INVERT (5 << 8) # define RADEON_ROP_XOR (6 << 8) # define RADEON_ROP_NAND (7 << 8) # define RADEON_ROP_AND (8 << 8) # define RADEON_ROP_EQUIV (9 << 8) # define RADEON_ROP_NOOP (10 << 8) # define RADEON_ROP_OR_INVERTED (11 << 8) # define RADEON_ROP_COPY (12 << 8) # define RADEON_ROP_OR_REVERSE (13 << 8) # define RADEON_ROP_OR (14 << 8) # define RADEON_ROP_SET (15 << 8) #define RADEON_RB3D_STENCILREFMASK 0x1d7c # define RADEON_STENCIL_REF_SHIFT 0 # define RADEON_STENCIL_REF_MASK (0xff << 0) # define RADEON_STENCIL_MASK_SHIFT 16 # define RADEON_STENCIL_VALUE_MASK (0xff << 16) # define RADEON_STENCIL_WRITEMASK_SHIFT 24 # define RADEON_STENCIL_WRITE_MASK (0xff << 24) #define RADEON_RB3D_ZSTENCILCNTL 0x1c2c # define RADEON_DEPTH_FORMAT_MASK (0xf << 0) # define RADEON_DEPTH_FORMAT_16BIT_INT_Z (0 << 0) # define RADEON_DEPTH_FORMAT_24BIT_INT_Z (2 << 0) # define RADEON_DEPTH_FORMAT_24BIT_FLOAT_Z (3 << 0) # define RADEON_DEPTH_FORMAT_32BIT_INT_Z (4 << 0) # define RADEON_DEPTH_FORMAT_32BIT_FLOAT_Z (5 << 0) # define RADEON_DEPTH_FORMAT_16BIT_FLOAT_W (7 << 0) # define RADEON_DEPTH_FORMAT_24BIT_FLOAT_W (9 << 0) # define RADEON_DEPTH_FORMAT_32BIT_FLOAT_W (11 << 0) # define RADEON_Z_TEST_NEVER (0 << 4) # define RADEON_Z_TEST_LESS (1 << 4) # define RADEON_Z_TEST_LEQUAL (2 << 4) # define RADEON_Z_TEST_EQUAL (3 << 4) # define RADEON_Z_TEST_GEQUAL (4 << 4) # define RADEON_Z_TEST_GREATER (5 << 4) # define RADEON_Z_TEST_NEQUAL (6 << 4) # define RADEON_Z_TEST_ALWAYS (7 << 4) # define RADEON_Z_TEST_MASK (7 << 4) # define RADEON_STENCIL_TEST_NEVER (0 << 12) # define RADEON_STENCIL_TEST_LESS (1 << 12) # define RADEON_STENCIL_TEST_LEQUAL (2 << 12) # define RADEON_STENCIL_TEST_EQUAL (3 << 12) # define RADEON_STENCIL_TEST_GEQUAL (4 << 12) # define RADEON_STENCIL_TEST_GREATER (5 << 12) # define RADEON_STENCIL_TEST_NEQUAL (6 << 12) # define RADEON_STENCIL_TEST_ALWAYS (7 << 12) # define RADEON_STENCIL_TEST_MASK (0x7 << 12) # define RADEON_STENCIL_FAIL_KEEP (0 << 16) # define RADEON_STENCIL_FAIL_ZERO (1 << 16) # define RADEON_STENCIL_FAIL_REPLACE (2 << 16) # define RADEON_STENCIL_FAIL_INC (3 << 16) # define RADEON_STENCIL_FAIL_DEC (4 << 16) # define RADEON_STENCIL_FAIL_INVERT (5 << 16) # define RADEON_STENCIL_FAIL_MASK (0x7 << 16) # define RADEON_STENCIL_ZPASS_KEEP (0 << 20) # define RADEON_STENCIL_ZPASS_ZERO (1 << 20) # define RADEON_STENCIL_ZPASS_REPLACE (2 << 20) # define RADEON_STENCIL_ZPASS_INC (3 << 20) # define RADEON_STENCIL_ZPASS_DEC (4 << 20) # define RADEON_STENCIL_ZPASS_INVERT (5 << 20) # define RADEON_STENCIL_ZPASS_MASK (0x7 << 20) # define RADEON_STENCIL_ZFAIL_KEEP (0 << 24) # define RADEON_STENCIL_ZFAIL_ZERO (1 << 24) # define RADEON_STENCIL_ZFAIL_REPLACE (2 << 24) # define RADEON_STENCIL_ZFAIL_INC (3 << 24) # define RADEON_STENCIL_ZFAIL_DEC (4 << 24) # define RADEON_STENCIL_ZFAIL_INVERT (5 << 24) # define RADEON_STENCIL_ZFAIL_MASK (0x7 << 24) # define RADEON_Z_COMPRESSION_ENABLE (1 << 28) # define RADEON_FORCE_Z_DIRTY (1 << 29) # define RADEON_Z_WRITE_ENABLE (1 << 30) #define RADEON_RE_LINE_PATTERN 0x1cd0 # define RADEON_LINE_PATTERN_MASK 0x0000ffff # define RADEON_LINE_REPEAT_COUNT_SHIFT 16 # define RADEON_LINE_PATTERN_START_SHIFT 24 # define RADEON_LINE_PATTERN_LITTLE_BIT_ORDER (0 << 28) # define RADEON_LINE_PATTERN_BIG_BIT_ORDER (1 << 28) # define RADEON_LINE_PATTERN_AUTO_RESET (1 << 29) #define RADEON_RE_LINE_STATE 0x1cd4 # define RADEON_LINE_CURRENT_PTR_SHIFT 0 # define RADEON_LINE_CURRENT_COUNT_SHIFT 8 #define RADEON_RE_MISC 0x26c4 # define RADEON_STIPPLE_COORD_MASK 0x1f # define RADEON_STIPPLE_X_OFFSET_SHIFT 0 # define RADEON_STIPPLE_X_OFFSET_MASK (0x1f << 0) # define RADEON_STIPPLE_Y_OFFSET_SHIFT 8 # define RADEON_STIPPLE_Y_OFFSET_MASK (0x1f << 8) # define RADEON_STIPPLE_LITTLE_BIT_ORDER (0 << 16) # define RADEON_STIPPLE_BIG_BIT_ORDER (1 << 16) #define RADEON_RE_SOLID_COLOR 0x1c1c #define RADEON_RE_TOP_LEFT 0x26c0 # define RADEON_RE_LEFT_SHIFT 0 # define RADEON_RE_TOP_SHIFT 16 #define RADEON_RE_WIDTH_HEIGHT 0x1c44 # define RADEON_RE_WIDTH_SHIFT 0 # define RADEON_RE_HEIGHT_SHIFT 16 #define RADEON_SE_CNTL 0x1c4c # define RADEON_FFACE_CULL_CW (0 << 0) # define RADEON_FFACE_CULL_CCW (1 << 0) # define RADEON_FFACE_CULL_DIR_MASK (1 << 0) # define RADEON_BFACE_CULL (0 << 1) # define RADEON_BFACE_SOLID (3 << 1) # define RADEON_FFACE_CULL (0 << 3) # define RADEON_FFACE_SOLID (3 << 3) # define RADEON_FFACE_CULL_MASK (3 << 3) # define RADEON_BADVTX_CULL_DISABLE (1 << 5) # define RADEON_FLAT_SHADE_VTX_0 (0 << 6) # define RADEON_FLAT_SHADE_VTX_1 (1 << 6) # define RADEON_FLAT_SHADE_VTX_2 (2 << 6) # define RADEON_FLAT_SHADE_VTX_LAST (3 << 6) # define RADEON_DIFFUSE_SHADE_SOLID (0 << 8) # define RADEON_DIFFUSE_SHADE_FLAT (1 << 8) # define RADEON_DIFFUSE_SHADE_GOURAUD (2 << 8) # define RADEON_DIFFUSE_SHADE_MASK (3 << 8) # define RADEON_ALPHA_SHADE_SOLID (0 << 10) # define RADEON_ALPHA_SHADE_FLAT (1 << 10) # define RADEON_ALPHA_SHADE_GOURAUD (2 << 10) # define RADEON_ALPHA_SHADE_MASK (3 << 10) # define RADEON_SPECULAR_SHADE_SOLID (0 << 12) # define RADEON_SPECULAR_SHADE_FLAT (1 << 12) # define RADEON_SPECULAR_SHADE_GOURAUD (2 << 12) # define RADEON_SPECULAR_SHADE_MASK (3 << 12) # define RADEON_FOG_SHADE_SOLID (0 << 14) # define RADEON_FOG_SHADE_FLAT (1 << 14) # define RADEON_FOG_SHADE_GOURAUD (2 << 14) # define RADEON_FOG_SHADE_MASK (3 << 14) # define RADEON_ZBIAS_ENABLE_POINT (1 << 16) # define RADEON_ZBIAS_ENABLE_LINE (1 << 17) # define RADEON_ZBIAS_ENABLE_TRI (1 << 18) # define RADEON_WIDELINE_ENABLE (1 << 20) # define RADEON_VPORT_XY_XFORM_ENABLE (1 << 24) # define RADEON_VPORT_Z_XFORM_ENABLE (1 << 25) # define RADEON_VTX_PIX_CENTER_D3D (0 << 27) # define RADEON_VTX_PIX_CENTER_OGL (1 << 27) # define RADEON_ROUND_MODE_TRUNC (0 << 28) # define RADEON_ROUND_MODE_ROUND (1 << 28) # define RADEON_ROUND_MODE_ROUND_EVEN (2 << 28) # define RADEON_ROUND_MODE_ROUND_ODD (3 << 28) # define RADEON_ROUND_PREC_16TH_PIX (0 << 30) # define RADEON_ROUND_PREC_8TH_PIX (1 << 30) # define RADEON_ROUND_PREC_4TH_PIX (2 << 30) # define RADEON_ROUND_PREC_HALF_PIX (3 << 30) #define R200_RE_CNTL 0x1c50 # define R200_STIPPLE_ENABLE 0x1 # define R200_SCISSOR_ENABLE 0x2 # define R200_PATTERN_ENABLE 0x4 # define R200_PERSPECTIVE_ENABLE 0x8 # define R200_POINT_SMOOTH 0x20 # define R200_VTX_STQ0_D3D 0x00010000 # define R200_VTX_STQ1_D3D 0x00040000 # define R200_VTX_STQ2_D3D 0x00100000 # define R200_VTX_STQ3_D3D 0x00400000 # define R200_VTX_STQ4_D3D 0x01000000 # define R200_VTX_STQ5_D3D 0x04000000 #define R200_RE_SCISSOR_TL_0 0x1cd8 #define R200_RE_SCISSOR_BR_0 0x1cdc #define R200_RE_SCISSOR_TL_1 0x1ce0 #define R200_RE_SCISSOR_BR_1 0x1ce4 #define R200_RE_SCISSOR_TL_2 0x1ce8 #define R200_RE_SCISSOR_BR_2 0x1cec # define R200_SCISSOR_X_SHIFT 0 # define R200_SCISSOR_Y_SHIFT 16 #define RADEON_SE_CNTL_STATUS 0x2140 # define RADEON_VC_NO_SWAP (0 << 0) # define RADEON_VC_16BIT_SWAP (1 << 0) # define RADEON_VC_32BIT_SWAP (2 << 0) # define RADEON_VC_HALF_DWORD_SWAP (3 << 0) # define RADEON_TCL_BYPASS (1 << 8) #define RADEON_SE_COORD_FMT 0x1c50 # define RADEON_VTX_XY_PRE_MULT_1_OVER_W0 (1 << 0) # define RADEON_VTX_Z_PRE_MULT_1_OVER_W0 (1 << 1) # define RADEON_VTX_ST0_NONPARAMETRIC (1 << 8) # define RADEON_VTX_ST1_NONPARAMETRIC (1 << 9) # define RADEON_VTX_ST2_NONPARAMETRIC (1 << 10) # define RADEON_VTX_ST3_NONPARAMETRIC (1 << 11) # define RADEON_VTX_W0_NORMALIZE (1 << 12) # define RADEON_VTX_W0_IS_NOT_1_OVER_W0 (1 << 16) # define RADEON_VTX_ST0_PRE_MULT_1_OVER_W0 (1 << 17) # define RADEON_VTX_ST1_PRE_MULT_1_OVER_W0 (1 << 19) # define RADEON_VTX_ST2_PRE_MULT_1_OVER_W0 (1 << 21) # define RADEON_VTX_ST3_PRE_MULT_1_OVER_W0 (1 << 23) # define RADEON_TEX1_W_ROUTING_USE_W0 (0 << 26) # define RADEON_TEX1_W_ROUTING_USE_Q1 (1 << 26) #define RADEON_SE_LINE_WIDTH 0x1db8 #define RADEON_SE_TCL_LIGHT_MODEL_CTL 0x226c # define RADEON_LIGHTING_ENABLE (1 << 0) # define RADEON_LIGHT_IN_MODELSPACE (1 << 1) # define RADEON_LOCAL_VIEWER (1 << 2) # define RADEON_NORMALIZE_NORMALS (1 << 3) # define RADEON_RESCALE_NORMALS (1 << 4) # define RADEON_SPECULAR_LIGHTS (1 << 5) # define RADEON_DIFFUSE_SPECULAR_COMBINE (1 << 6) # define RADEON_LIGHT_ALPHA (1 << 7) # define RADEON_LOCAL_LIGHT_VEC_GL (1 << 8) # define RADEON_LIGHT_NO_NORMAL_AMBIENT_ONLY (1 << 9) # define RADEON_LM_SOURCE_STATE_PREMULT 0 # define RADEON_LM_SOURCE_STATE_MULT 1 # define RADEON_LM_SOURCE_VERTEX_DIFFUSE 2 # define RADEON_LM_SOURCE_VERTEX_SPECULAR 3 # define RADEON_EMISSIVE_SOURCE_SHIFT 16 # define RADEON_AMBIENT_SOURCE_SHIFT 18 # define RADEON_DIFFUSE_SOURCE_SHIFT 20 # define RADEON_SPECULAR_SOURCE_SHIFT 22 #define RADEON_SE_TCL_MATERIAL_AMBIENT_RED 0x2220 #define RADEON_SE_TCL_MATERIAL_AMBIENT_GREEN 0x2224 #define RADEON_SE_TCL_MATERIAL_AMBIENT_BLUE 0x2228 #define RADEON_SE_TCL_MATERIAL_AMBIENT_ALPHA 0x222c #define RADEON_SE_TCL_MATERIAL_DIFFUSE_RED 0x2230 #define RADEON_SE_TCL_MATERIAL_DIFFUSE_GREEN 0x2234 #define RADEON_SE_TCL_MATERIAL_DIFFUSE_BLUE 0x2238 #define RADEON_SE_TCL_MATERIAL_DIFFUSE_ALPHA 0x223c #define RADEON_SE_TCL_MATERIAL_EMMISSIVE_RED 0x2210 #define RADEON_SE_TCL_MATERIAL_EMMISSIVE_GREEN 0x2214 #define RADEON_SE_TCL_MATERIAL_EMMISSIVE_BLUE 0x2218 #define RADEON_SE_TCL_MATERIAL_EMMISSIVE_ALPHA 0x221c #define RADEON_SE_TCL_MATERIAL_SPECULAR_RED 0x2240 #define RADEON_SE_TCL_MATERIAL_SPECULAR_GREEN 0x2244 #define RADEON_SE_TCL_MATERIAL_SPECULAR_BLUE 0x2248 #define RADEON_SE_TCL_MATERIAL_SPECULAR_ALPHA 0x224c #define RADEON_SE_TCL_MATRIX_SELECT_0 0x225c # define RADEON_MODELVIEW_0_SHIFT 0 # define RADEON_MODELVIEW_1_SHIFT 4 # define RADEON_MODELVIEW_2_SHIFT 8 # define RADEON_MODELVIEW_3_SHIFT 12 # define RADEON_IT_MODELVIEW_0_SHIFT 16 # define RADEON_IT_MODELVIEW_1_SHIFT 20 # define RADEON_IT_MODELVIEW_2_SHIFT 24 # define RADEON_IT_MODELVIEW_3_SHIFT 28 #define RADEON_SE_TCL_MATRIX_SELECT_1 0x2260 # define RADEON_MODELPROJECT_0_SHIFT 0 # define RADEON_MODELPROJECT_1_SHIFT 4 # define RADEON_MODELPROJECT_2_SHIFT 8 # define RADEON_MODELPROJECT_3_SHIFT 12 # define RADEON_TEXMAT_0_SHIFT 16 # define RADEON_TEXMAT_1_SHIFT 20 # define RADEON_TEXMAT_2_SHIFT 24 # define RADEON_TEXMAT_3_SHIFT 28 #define RADEON_SE_TCL_OUTPUT_VTX_FMT 0x2254 # define RADEON_TCL_VTX_W0 (1 << 0) # define RADEON_TCL_VTX_FP_DIFFUSE (1 << 1) # define RADEON_TCL_VTX_FP_ALPHA (1 << 2) # define RADEON_TCL_VTX_PK_DIFFUSE (1 << 3) # define RADEON_TCL_VTX_FP_SPEC (1 << 4) # define RADEON_TCL_VTX_FP_FOG (1 << 5) # define RADEON_TCL_VTX_PK_SPEC (1 << 6) # define RADEON_TCL_VTX_ST0 (1 << 7) # define RADEON_TCL_VTX_ST1 (1 << 8) # define RADEON_TCL_VTX_Q1 (1 << 9) # define RADEON_TCL_VTX_ST2 (1 << 10) # define RADEON_TCL_VTX_Q2 (1 << 11) # define RADEON_TCL_VTX_ST3 (1 << 12) # define RADEON_TCL_VTX_Q3 (1 << 13) # define RADEON_TCL_VTX_Q0 (1 << 14) # define RADEON_TCL_VTX_WEIGHT_COUNT_SHIFT 15 # define RADEON_TCL_VTX_NORM0 (1 << 18) # define RADEON_TCL_VTX_XY1 (1 << 27) # define RADEON_TCL_VTX_Z1 (1 << 28) # define RADEON_TCL_VTX_W1 (1 << 29) # define RADEON_TCL_VTX_NORM1 (1 << 30) # define RADEON_TCL_VTX_Z0 (1 << 31) #define RADEON_SE_TCL_OUTPUT_VTX_SEL 0x2258 # define RADEON_TCL_COMPUTE_XYZW (1 << 0) # define RADEON_TCL_COMPUTE_DIFFUSE (1 << 1) # define RADEON_TCL_COMPUTE_SPECULAR (1 << 2) # define RADEON_TCL_FORCE_NAN_IF_COLOR_NAN (1 << 3) # define RADEON_TCL_FORCE_INORDER_PROC (1 << 4) # define RADEON_TCL_TEX_INPUT_TEX_0 0 # define RADEON_TCL_TEX_INPUT_TEX_1 1 # define RADEON_TCL_TEX_INPUT_TEX_2 2 # define RADEON_TCL_TEX_INPUT_TEX_3 3 # define RADEON_TCL_TEX_COMPUTED_TEX_0 8 # define RADEON_TCL_TEX_COMPUTED_TEX_1 9 # define RADEON_TCL_TEX_COMPUTED_TEX_2 10 # define RADEON_TCL_TEX_COMPUTED_TEX_3 11 # define RADEON_TCL_TEX_0_OUTPUT_SHIFT 16 # define RADEON_TCL_TEX_1_OUTPUT_SHIFT 20 # define RADEON_TCL_TEX_2_OUTPUT_SHIFT 24 # define RADEON_TCL_TEX_3_OUTPUT_SHIFT 28 #define RADEON_SE_TCL_PER_LIGHT_CTL_0 0x2270 # define RADEON_LIGHT_0_ENABLE (1 << 0) # define RADEON_LIGHT_0_ENABLE_AMBIENT (1 << 1) # define RADEON_LIGHT_0_ENABLE_SPECULAR (1 << 2) # define RADEON_LIGHT_0_IS_LOCAL (1 << 3) # define RADEON_LIGHT_0_IS_SPOT (1 << 4) # define RADEON_LIGHT_0_DUAL_CONE (1 << 5) # define RADEON_LIGHT_0_ENABLE_RANGE_ATTEN (1 << 6) # define RADEON_LIGHT_0_CONSTANT_RANGE_ATTEN (1 << 7) # define RADEON_LIGHT_0_SHIFT 0 # define RADEON_LIGHT_1_ENABLE (1 << 16) # define RADEON_LIGHT_1_ENABLE_AMBIENT (1 << 17) # define RADEON_LIGHT_1_ENABLE_SPECULAR (1 << 18) # define RADEON_LIGHT_1_IS_LOCAL (1 << 19) # define RADEON_LIGHT_1_IS_SPOT (1 << 20) # define RADEON_LIGHT_1_DUAL_CONE (1 << 21) # define RADEON_LIGHT_1_ENABLE_RANGE_ATTEN (1 << 22) # define RADEON_LIGHT_1_CONSTANT_RANGE_ATTEN (1 << 23) # define RADEON_LIGHT_1_SHIFT 16 #define RADEON_SE_TCL_PER_LIGHT_CTL_1 0x2274 # define RADEON_LIGHT_2_SHIFT 0 # define RADEON_LIGHT_3_SHIFT 16 #define RADEON_SE_TCL_PER_LIGHT_CTL_2 0x2278 # define RADEON_LIGHT_4_SHIFT 0 # define RADEON_LIGHT_5_SHIFT 16 #define RADEON_SE_TCL_PER_LIGHT_CTL_3 0x227c # define RADEON_LIGHT_6_SHIFT 0 # define RADEON_LIGHT_7_SHIFT 16 #define RADEON_SE_TCL_SHININESS 0x2250 #define RADEON_SE_TCL_TEXTURE_PROC_CTL 0x2268 # define RADEON_TEXGEN_TEXMAT_0_ENABLE (1 << 0) # define RADEON_TEXGEN_TEXMAT_1_ENABLE (1 << 1) # define RADEON_TEXGEN_TEXMAT_2_ENABLE (1 << 2) # define RADEON_TEXGEN_TEXMAT_3_ENABLE (1 << 3) # define RADEON_TEXMAT_0_ENABLE (1 << 4) # define RADEON_TEXMAT_1_ENABLE (1 << 5) # define RADEON_TEXMAT_2_ENABLE (1 << 6) # define RADEON_TEXMAT_3_ENABLE (1 << 7) # define RADEON_TEXGEN_INPUT_MASK 0xf # define RADEON_TEXGEN_INPUT_TEXCOORD_0 0 # define RADEON_TEXGEN_INPUT_TEXCOORD_1 1 # define RADEON_TEXGEN_INPUT_TEXCOORD_2 2 # define RADEON_TEXGEN_INPUT_TEXCOORD_3 3 # define RADEON_TEXGEN_INPUT_OBJ 4 # define RADEON_TEXGEN_INPUT_EYE 5 # define RADEON_TEXGEN_INPUT_EYE_NORMAL 6 # define RADEON_TEXGEN_INPUT_EYE_REFLECT 7 # define RADEON_TEXGEN_INPUT_EYE_NORMALIZED 8 # define RADEON_TEXGEN_0_INPUT_SHIFT 16 # define RADEON_TEXGEN_1_INPUT_SHIFT 20 # define RADEON_TEXGEN_2_INPUT_SHIFT 24 # define RADEON_TEXGEN_3_INPUT_SHIFT 28 #define RADEON_SE_TCL_UCP_VERT_BLEND_CTL 0x2264 # define RADEON_UCP_IN_CLIP_SPACE (1 << 0) # define RADEON_UCP_IN_MODEL_SPACE (1 << 1) # define RADEON_UCP_ENABLE_0 (1 << 2) # define RADEON_UCP_ENABLE_1 (1 << 3) # define RADEON_UCP_ENABLE_2 (1 << 4) # define RADEON_UCP_ENABLE_3 (1 << 5) # define RADEON_UCP_ENABLE_4 (1 << 6) # define RADEON_UCP_ENABLE_5 (1 << 7) # define RADEON_TCL_FOG_MASK (3 << 8) # define RADEON_TCL_FOG_DISABLE (0 << 8) # define RADEON_TCL_FOG_EXP (1 << 8) # define RADEON_TCL_FOG_EXP2 (2 << 8) # define RADEON_TCL_FOG_LINEAR (3 << 8) # define RADEON_RNG_BASED_FOG (1 << 10) # define RADEON_LIGHT_TWOSIDE (1 << 11) # define RADEON_BLEND_OP_COUNT_MASK (7 << 12) # define RADEON_BLEND_OP_COUNT_SHIFT 12 # define RADEON_POSITION_BLEND_OP_ENABLE (1 << 16) # define RADEON_NORMAL_BLEND_OP_ENABLE (1 << 17) # define RADEON_VERTEX_BLEND_SRC_0_PRIMARY (1 << 18) # define RADEON_VERTEX_BLEND_SRC_0_SECONDARY (1 << 18) # define RADEON_VERTEX_BLEND_SRC_1_PRIMARY (1 << 19) # define RADEON_VERTEX_BLEND_SRC_1_SECONDARY (1 << 19) # define RADEON_VERTEX_BLEND_SRC_2_PRIMARY (1 << 20) # define RADEON_VERTEX_BLEND_SRC_2_SECONDARY (1 << 20) # define RADEON_VERTEX_BLEND_SRC_3_PRIMARY (1 << 21) # define RADEON_VERTEX_BLEND_SRC_3_SECONDARY (1 << 21) # define RADEON_VERTEX_BLEND_WGT_MINUS_ONE (1 << 22) # define RADEON_CULL_FRONT_IS_CW (0 << 28) # define RADEON_CULL_FRONT_IS_CCW (1 << 28) # define RADEON_CULL_FRONT (1 << 29) # define RADEON_CULL_BACK (1 << 30) # define RADEON_FORCE_W_TO_ONE (1 << 31) #define RADEON_SE_VPORT_XSCALE 0x1d98 #define RADEON_SE_VPORT_XOFFSET 0x1d9c #define RADEON_SE_VPORT_YSCALE 0x1da0 #define RADEON_SE_VPORT_YOFFSET 0x1da4 #define RADEON_SE_VPORT_ZSCALE 0x1da8 #define RADEON_SE_VPORT_ZOFFSET 0x1dac #define RADEON_SE_ZBIAS_FACTOR 0x1db0 #define RADEON_SE_ZBIAS_CONSTANT 0x1db4 #define RADEON_SE_VTX_FMT 0x2080 # define RADEON_SE_VTX_FMT_XY 0x00000000 # define RADEON_SE_VTX_FMT_W0 0x00000001 # define RADEON_SE_VTX_FMT_FPCOLOR 0x00000002 # define RADEON_SE_VTX_FMT_FPALPHA 0x00000004 # define RADEON_SE_VTX_FMT_PKCOLOR 0x00000008 # define RADEON_SE_VTX_FMT_FPSPEC 0x00000010 # define RADEON_SE_VTX_FMT_FPFOG 0x00000020 # define RADEON_SE_VTX_FMT_PKSPEC 0x00000040 # define RADEON_SE_VTX_FMT_ST0 0x00000080 # define RADEON_SE_VTX_FMT_ST1 0x00000100 # define RADEON_SE_VTX_FMT_Q1 0x00000200 # define RADEON_SE_VTX_FMT_ST2 0x00000400 # define RADEON_SE_VTX_FMT_Q2 0x00000800 # define RADEON_SE_VTX_FMT_ST3 0x00001000 # define RADEON_SE_VTX_FMT_Q3 0x00002000 # define RADEON_SE_VTX_FMT_Q0 0x00004000 # define RADEON_SE_VTX_FMT_BLND_WEIGHT_CNT_MASK 0x00038000 # define RADEON_SE_VTX_FMT_N0 0x00040000 # define RADEON_SE_VTX_FMT_XY1 0x08000000 # define RADEON_SE_VTX_FMT_Z1 0x10000000 # define RADEON_SE_VTX_FMT_W1 0x20000000 # define RADEON_SE_VTX_FMT_N1 0x40000000 # define RADEON_SE_VTX_FMT_Z 0x80000000 #define RADEON_SE_VF_CNTL 0x2084 # define RADEON_VF_PRIM_TYPE_POINT_LIST 1 # define RADEON_VF_PRIM_TYPE_LINE_LIST 2 # define RADEON_VF_PRIM_TYPE_LINE_STRIP 3 # define RADEON_VF_PRIM_TYPE_TRIANGLE_LIST 4 # define RADEON_VF_PRIM_TYPE_TRIANGLE_FAN 5 # define RADEON_VF_PRIM_TYPE_TRIANGLE_STRIP 6 # define RADEON_VF_PRIM_TYPE_TRIANGLE_FLAG 7 # define RADEON_VF_PRIM_TYPE_RECTANGLE_LIST 8 # define RADEON_VF_PRIM_TYPE_POINT_LIST_3 9 # define RADEON_VF_PRIM_TYPE_LINE_LIST_3 10 # define RADEON_VF_PRIM_TYPE_SPIRIT_LIST 11 # define RADEON_VF_PRIM_TYPE_LINE_LOOP 12 # define RADEON_VF_PRIM_TYPE_QUAD_LIST 13 # define RADEON_VF_PRIM_TYPE_QUAD_STRIP 14 # define RADEON_VF_PRIM_TYPE_POLYGON 15 # define RADEON_VF_PRIM_WALK_STATE (0<<4) # define RADEON_VF_PRIM_WALK_INDEX (1<<4) # define RADEON_VF_PRIM_WALK_LIST (2<<4) # define RADEON_VF_PRIM_WALK_DATA (3<<4) # define RADEON_VF_COLOR_ORDER_RGBA (1<<6) # define RADEON_VF_RADEON_MODE (1<<8) # define RADEON_VF_TCL_OUTPUT_CTL_ENA (1<<9) # define RADEON_VF_PROG_STREAM_ENA (1<<10) # define RADEON_VF_INDEX_SIZE_SHIFT 11 # define RADEON_VF_NUM_VERTICES_SHIFT 16 #define RADEON_SE_PORT_DATA0 0x2000 #define R200_SE_VAP_CNTL 0x2080 # define R200_VAP_TCL_ENABLE 0x00000001 # define R200_VAP_SINGLE_BUF_STATE_ENABLE 0x00000010 # define R200_VAP_FORCE_W_TO_ONE 0x00010000 # define R200_VAP_D3D_TEX_DEFAULT 0x00020000 # define R200_VAP_VF_MAX_VTX_NUM__SHIFT 18 # define R200_VAP_VF_MAX_VTX_NUM (9 << 18) # define R200_VAP_DX_CLIP_SPACE_DEF 0x00400000 #define R200_VF_MAX_VTX_INDX 0x210c #define R200_VF_MIN_VTX_INDX 0x2110 #define R200_SE_VTE_CNTL 0x20b0 # define R200_VPORT_X_SCALE_ENA 0x00000001 # define R200_VPORT_X_OFFSET_ENA 0x00000002 # define R200_VPORT_Y_SCALE_ENA 0x00000004 # define R200_VPORT_Y_OFFSET_ENA 0x00000008 # define R200_VPORT_Z_SCALE_ENA 0x00000010 # define R200_VPORT_Z_OFFSET_ENA 0x00000020 # define R200_VTX_XY_FMT 0x00000100 # define R200_VTX_Z_FMT 0x00000200 # define R200_VTX_W0_FMT 0x00000400 # define R200_VTX_W0_NORMALIZE 0x00000800 # define R200_VTX_ST_DENORMALIZED 0x00001000 #define R200_SE_VAP_CNTL_STATUS 0x2140 # define R200_VC_NO_SWAP (0 << 0) # define R200_VC_16BIT_SWAP (1 << 0) # define R200_VC_32BIT_SWAP (2 << 0) #define R200_RE_AUX_SCISSOR_CNTL 0x26f0 # define R200_EXCLUSIVE_SCISSOR_0 0x01000000 # define R200_EXCLUSIVE_SCISSOR_1 0x02000000 # define R200_EXCLUSIVE_SCISSOR_2 0x04000000 # define R200_SCISSOR_ENABLE_0 0x10000000 # define R200_SCISSOR_ENABLE_1 0x20000000 # define R200_SCISSOR_ENABLE_2 0x40000000 #define R200_PP_TXFILTER_0 0x2c00 #define R200_PP_TXFILTER_1 0x2c20 #define R200_PP_TXFILTER_2 0x2c40 #define R200_PP_TXFILTER_3 0x2c60 #define R200_PP_TXFILTER_4 0x2c80 #define R200_PP_TXFILTER_5 0x2ca0 # define R200_MAG_FILTER_NEAREST (0 << 0) # define R200_MAG_FILTER_LINEAR (1 << 0) # define R200_MAG_FILTER_MASK (1 << 0) # define R200_MIN_FILTER_NEAREST (0 << 1) # define R200_MIN_FILTER_LINEAR (1 << 1) # define R200_MIN_FILTER_NEAREST_MIP_NEAREST (2 << 1) # define R200_MIN_FILTER_NEAREST_MIP_LINEAR (3 << 1) # define R200_MIN_FILTER_LINEAR_MIP_NEAREST (6 << 1) # define R200_MIN_FILTER_LINEAR_MIP_LINEAR (7 << 1) # define R200_MIN_FILTER_ANISO_NEAREST (8 << 1) # define R200_MIN_FILTER_ANISO_LINEAR (9 << 1) # define R200_MIN_FILTER_ANISO_NEAREST_MIP_NEAREST (10 << 1) # define R200_MIN_FILTER_ANISO_NEAREST_MIP_LINEAR (11 << 1) # define R200_MIN_FILTER_MASK (15 << 1) # define R200_MAX_ANISO_1_TO_1 (0 << 5) # define R200_MAX_ANISO_2_TO_1 (1 << 5) # define R200_MAX_ANISO_4_TO_1 (2 << 5) # define R200_MAX_ANISO_8_TO_1 (3 << 5) # define R200_MAX_ANISO_16_TO_1 (4 << 5) # define R200_MAX_ANISO_MASK (7 << 5) # define R200_MAX_MIP_LEVEL_MASK (0x0f << 16) # define R200_MAX_MIP_LEVEL_SHIFT 16 # define R200_YUV_TO_RGB (1 << 20) # define R200_YUV_TEMPERATURE_COOL (0 << 21) # define R200_YUV_TEMPERATURE_HOT (1 << 21) # define R200_YUV_TEMPERATURE_MASK (1 << 21) # define R200_WRAPEN_S (1 << 22) # define R200_CLAMP_S_WRAP (0 << 23) # define R200_CLAMP_S_MIRROR (1 << 23) # define R200_CLAMP_S_CLAMP_LAST (2 << 23) # define R200_CLAMP_S_MIRROR_CLAMP_LAST (3 << 23) # define R200_CLAMP_S_CLAMP_BORDER (4 << 23) # define R200_CLAMP_S_MIRROR_CLAMP_BORDER (5 << 23) # define R200_CLAMP_S_CLAMP_GL (6 << 23) # define R200_CLAMP_S_MIRROR_CLAMP_GL (7 << 23) # define R200_CLAMP_S_MASK (7 << 23) # define R200_WRAPEN_T (1 << 26) # define R200_CLAMP_T_WRAP (0 << 27) # define R200_CLAMP_T_MIRROR (1 << 27) # define R200_CLAMP_T_CLAMP_LAST (2 << 27) # define R200_CLAMP_T_MIRROR_CLAMP_LAST (3 << 27) # define R200_CLAMP_T_CLAMP_BORDER (4 << 27) # define R200_CLAMP_T_MIRROR_CLAMP_BORDER (5 << 27) # define R200_CLAMP_T_CLAMP_GL (6 << 27) # define R200_CLAMP_T_MIRROR_CLAMP_GL (7 << 27) # define R200_CLAMP_T_MASK (7 << 27) # define R200_KILL_LT_ZERO (1 << 30) # define R200_BORDER_MODE_OGL (0 << 31) # define R200_BORDER_MODE_D3D (1 << 31) #define R200_PP_TXFORMAT_0 0x2c04 #define R200_PP_TXFORMAT_1 0x2c24 #define R200_PP_TXFORMAT_2 0x2c44 #define R200_PP_TXFORMAT_3 0x2c64 #define R200_PP_TXFORMAT_4 0x2c84 #define R200_PP_TXFORMAT_5 0x2ca4 # define R200_TXFORMAT_I8 (0 << 0) # define R200_TXFORMAT_AI88 (1 << 0) # define R200_TXFORMAT_RGB332 (2 << 0) # define R200_TXFORMAT_ARGB1555 (3 << 0) # define R200_TXFORMAT_RGB565 (4 << 0) # define R200_TXFORMAT_ARGB4444 (5 << 0) # define R200_TXFORMAT_ARGB8888 (6 << 0) # define R200_TXFORMAT_RGBA8888 (7 << 0) # define R200_TXFORMAT_Y8 (8 << 0) # define R200_TXFORMAT_AVYU4444 (9 << 0) # define R200_TXFORMAT_VYUY422 (10 << 0) # define R200_TXFORMAT_YVYU422 (11 << 0) # define R200_TXFORMAT_DXT1 (12 << 0) # define R200_TXFORMAT_DXT23 (14 << 0) # define R200_TXFORMAT_DXT45 (15 << 0) # define R200_TXFORMAT_ABGR8888 (22 << 0) # define R200_TXFORMAT_FORMAT_MASK (31 << 0) # define R200_TXFORMAT_FORMAT_SHIFT 0 # define R200_TXFORMAT_ALPHA_IN_MAP (1 << 6) # define R200_TXFORMAT_NON_POWER2 (1 << 7) # define R200_TXFORMAT_WIDTH_MASK (15 << 8) # define R200_TXFORMAT_WIDTH_SHIFT 8 # define R200_TXFORMAT_HEIGHT_MASK (15 << 12) # define R200_TXFORMAT_HEIGHT_SHIFT 12 # define R200_TXFORMAT_F5_WIDTH_MASK (15 << 16) /* cube face 5 */ # define R200_TXFORMAT_F5_WIDTH_SHIFT 16 # define R200_TXFORMAT_F5_HEIGHT_MASK (15 << 20) # define R200_TXFORMAT_F5_HEIGHT_SHIFT 20 # define R200_TXFORMAT_ST_ROUTE_STQ0 (0 << 24) # define R200_TXFORMAT_ST_ROUTE_STQ1 (1 << 24) # define R200_TXFORMAT_ST_ROUTE_STQ2 (2 << 24) # define R200_TXFORMAT_ST_ROUTE_STQ3 (3 << 24) # define R200_TXFORMAT_ST_ROUTE_STQ4 (4 << 24) # define R200_TXFORMAT_ST_ROUTE_STQ5 (5 << 24) # define R200_TXFORMAT_ST_ROUTE_MASK (7 << 24) # define R200_TXFORMAT_ST_ROUTE_SHIFT 24 # define R200_TXFORMAT_ALPHA_MASK_ENABLE (1 << 28) # define R200_TXFORMAT_CHROMA_KEY_ENABLE (1 << 29) # define R200_TXFORMAT_CUBIC_MAP_ENABLE (1 << 30) #define R200_PP_TXFORMAT_X_0 0x2c08 #define R200_PP_TXFORMAT_X_1 0x2c28 #define R200_PP_TXFORMAT_X_2 0x2c48 #define R200_PP_TXFORMAT_X_3 0x2c68 #define R200_PP_TXFORMAT_X_4 0x2c88 #define R200_PP_TXFORMAT_X_5 0x2ca8 #define R200_PP_TXSIZE_0 0x2c0c /* NPOT only */ #define R200_PP_TXSIZE_1 0x2c2c /* NPOT only */ #define R200_PP_TXSIZE_2 0x2c4c /* NPOT only */ #define R200_PP_TXSIZE_3 0x2c6c /* NPOT only */ #define R200_PP_TXSIZE_4 0x2c8c /* NPOT only */ #define R200_PP_TXSIZE_5 0x2cac /* NPOT only */ #define R200_PP_TXPITCH_0 0x2c10 /* NPOT only */ #define R200_PP_TXPITCH_1 0x2c30 /* NPOT only */ #define R200_PP_TXPITCH_2 0x2c50 /* NPOT only */ #define R200_PP_TXPITCH_3 0x2c70 /* NPOT only */ #define R200_PP_TXPITCH_4 0x2c90 /* NPOT only */ #define R200_PP_TXPITCH_5 0x2cb0 /* NPOT only */ #define R200_PP_TXOFFSET_0 0x2d00 # define R200_TXO_ENDIAN_NO_SWAP (0 << 0) # define R200_TXO_ENDIAN_BYTE_SWAP (1 << 0) # define R200_TXO_ENDIAN_WORD_SWAP (2 << 0) # define R200_TXO_ENDIAN_HALFDW_SWAP (3 << 0) # define R200_TXO_MACRO_LINEAR (0 << 2) # define R200_TXO_MACRO_TILE (1 << 2) # define R200_TXO_MICRO_LINEAR (0 << 3) # define R200_TXO_MICRO_TILE (1 << 3) # define R200_TXO_OFFSET_MASK 0xffffffe0 # define R200_TXO_OFFSET_SHIFT 5 #define R200_PP_TXOFFSET_1 0x2d18 #define R200_PP_TXOFFSET_2 0x2d30 #define R200_PP_TXOFFSET_3 0x2d48 #define R200_PP_TXOFFSET_4 0x2d60 #define R200_PP_TXOFFSET_5 0x2d78 #define R200_PP_TFACTOR_0 0x2ee0 #define R200_PP_TFACTOR_1 0x2ee4 #define R200_PP_TFACTOR_2 0x2ee8 #define R200_PP_TFACTOR_3 0x2eec #define R200_PP_TFACTOR_4 0x2ef0 #define R200_PP_TFACTOR_5 0x2ef4 #define R200_PP_TXCBLEND_0 0x2f00 # define R200_TXC_ARG_A_ZERO (0) # define R200_TXC_ARG_A_CURRENT_COLOR (2) # define R200_TXC_ARG_A_CURRENT_ALPHA (3) # define R200_TXC_ARG_A_DIFFUSE_COLOR (4) # define R200_TXC_ARG_A_DIFFUSE_ALPHA (5) # define R200_TXC_ARG_A_SPECULAR_COLOR (6) # define R200_TXC_ARG_A_SPECULAR_ALPHA (7) # define R200_TXC_ARG_A_TFACTOR_COLOR (8) # define R200_TXC_ARG_A_TFACTOR_ALPHA (9) # define R200_TXC_ARG_A_R0_COLOR (10) # define R200_TXC_ARG_A_R0_ALPHA (11) # define R200_TXC_ARG_A_R1_COLOR (12) # define R200_TXC_ARG_A_R1_ALPHA (13) # define R200_TXC_ARG_A_R2_COLOR (14) # define R200_TXC_ARG_A_R2_ALPHA (15) # define R200_TXC_ARG_A_R3_COLOR (16) # define R200_TXC_ARG_A_R3_ALPHA (17) # define R200_TXC_ARG_A_R4_COLOR (18) # define R200_TXC_ARG_A_R4_ALPHA (19) # define R200_TXC_ARG_A_R5_COLOR (20) # define R200_TXC_ARG_A_R5_ALPHA (21) # define R200_TXC_ARG_A_TFACTOR1_COLOR (26) # define R200_TXC_ARG_A_TFACTOR1_ALPHA (27) # define R200_TXC_ARG_A_MASK (31 << 0) # define R200_TXC_ARG_A_SHIFT 0 # define R200_TXC_ARG_B_ZERO (0 << 5) # define R200_TXC_ARG_B_CURRENT_COLOR (2 << 5) # define R200_TXC_ARG_B_CURRENT_ALPHA (3 << 5) # define R200_TXC_ARG_B_DIFFUSE_COLOR (4 << 5) # define R200_TXC_ARG_B_DIFFUSE_ALPHA (5 << 5) # define R200_TXC_ARG_B_SPECULAR_COLOR (6 << 5) # define R200_TXC_ARG_B_SPECULAR_ALPHA (7 << 5) # define R200_TXC_ARG_B_TFACTOR_COLOR (8 << 5) # define R200_TXC_ARG_B_TFACTOR_ALPHA (9 << 5) # define R200_TXC_ARG_B_R0_COLOR (10 << 5) # define R200_TXC_ARG_B_R0_ALPHA (11 << 5) # define R200_TXC_ARG_B_R1_COLOR (12 << 5) # define R200_TXC_ARG_B_R1_ALPHA (13 << 5) # define R200_TXC_ARG_B_R2_COLOR (14 << 5) # define R200_TXC_ARG_B_R2_ALPHA (15 << 5) # define R200_TXC_ARG_B_R3_COLOR (16 << 5) # define R200_TXC_ARG_B_R3_ALPHA (17 << 5) # define R200_TXC_ARG_B_R4_COLOR (18 << 5) # define R200_TXC_ARG_B_R4_ALPHA (19 << 5) # define R200_TXC_ARG_B_R5_COLOR (20 << 5) # define R200_TXC_ARG_B_R5_ALPHA (21 << 5) # define R200_TXC_ARG_B_TFACTOR1_COLOR (26 << 5) # define R200_TXC_ARG_B_TFACTOR1_ALPHA (27 << 5) # define R200_TXC_ARG_B_MASK (31 << 5) # define R200_TXC_ARG_B_SHIFT 5 # define R200_TXC_ARG_C_ZERO (0 << 10) # define R200_TXC_ARG_C_CURRENT_COLOR (2 << 10) # define R200_TXC_ARG_C_CURRENT_ALPHA (3 << 10) # define R200_TXC_ARG_C_DIFFUSE_COLOR (4 << 10) # define R200_TXC_ARG_C_DIFFUSE_ALPHA (5 << 10) # define R200_TXC_ARG_C_SPECULAR_COLOR (6 << 10) # define R200_TXC_ARG_C_SPECULAR_ALPHA (7 << 10) # define R200_TXC_ARG_C_TFACTOR_COLOR (8 << 10) # define R200_TXC_ARG_C_TFACTOR_ALPHA (9 << 10) # define R200_TXC_ARG_C_R0_COLOR (10 << 10) # define R200_TXC_ARG_C_R0_ALPHA (11 << 10) # define R200_TXC_ARG_C_R1_COLOR (12 << 10) # define R200_TXC_ARG_C_R1_ALPHA (13 << 10) # define R200_TXC_ARG_C_R2_COLOR (14 << 10) # define R200_TXC_ARG_C_R2_ALPHA (15 << 10) # define R200_TXC_ARG_C_R3_COLOR (16 << 10) # define R200_TXC_ARG_C_R3_ALPHA (17 << 10) # define R200_TXC_ARG_C_R4_COLOR (18 << 10) # define R200_TXC_ARG_C_R4_ALPHA (19 << 10) # define R200_TXC_ARG_C_R5_COLOR (20 << 10) # define R200_TXC_ARG_C_R5_ALPHA (21 << 10) # define R200_TXC_ARG_C_TFACTOR1_COLOR (26 << 10) # define R200_TXC_ARG_C_TFACTOR1_ALPHA (27 << 10) # define R200_TXC_ARG_C_MASK (31 << 10) # define R200_TXC_ARG_C_SHIFT 10 # define R200_TXC_COMP_ARG_A (1 << 16) # define R200_TXC_COMP_ARG_A_SHIFT (16) # define R200_TXC_BIAS_ARG_A (1 << 17) # define R200_TXC_SCALE_ARG_A (1 << 18) # define R200_TXC_NEG_ARG_A (1 << 19) # define R200_TXC_COMP_ARG_B (1 << 20) # define R200_TXC_COMP_ARG_B_SHIFT (20) # define R200_TXC_BIAS_ARG_B (1 << 21) # define R200_TXC_SCALE_ARG_B (1 << 22) # define R200_TXC_NEG_ARG_B (1 << 23) # define R200_TXC_COMP_ARG_C (1 << 24) # define R200_TXC_COMP_ARG_C_SHIFT (24) # define R200_TXC_BIAS_ARG_C (1 << 25) # define R200_TXC_SCALE_ARG_C (1 << 26) # define R200_TXC_NEG_ARG_C (1 << 27) # define R200_TXC_OP_MADD (0 << 28) # define R200_TXC_OP_CND0 (2 << 28) # define R200_TXC_OP_LERP (3 << 28) # define R200_TXC_OP_DOT3 (4 << 28) # define R200_TXC_OP_DOT4 (5 << 28) # define R200_TXC_OP_CONDITIONAL (6 << 28) # define R200_TXC_OP_DOT2_ADD (7 << 28) # define R200_TXC_OP_MASK (7 << 28) #define R200_PP_TXCBLEND2_0 0x2f04 # define R200_TXC_TFACTOR_SEL_SHIFT 0 # define R200_TXC_TFACTOR_SEL_MASK 0x7 # define R200_TXC_TFACTOR1_SEL_SHIFT 4 # define R200_TXC_TFACTOR1_SEL_MASK (0x7 << 4) # define R200_TXC_SCALE_SHIFT 8 # define R200_TXC_SCALE_MASK (7 << 8) # define R200_TXC_SCALE_1X (0 << 8) # define R200_TXC_SCALE_2X (1 << 8) # define R200_TXC_SCALE_4X (2 << 8) # define R200_TXC_SCALE_8X (3 << 8) # define R200_TXC_SCALE_INV2 (5 << 8) # define R200_TXC_SCALE_INV4 (6 << 8) # define R200_TXC_SCALE_INV8 (7 << 8) # define R200_TXC_CLAMP_SHIFT 12 # define R200_TXC_CLAMP_MASK (3 << 12) # define R200_TXC_CLAMP_WRAP (0 << 12) # define R200_TXC_CLAMP_0_1 (1 << 12) # define R200_TXC_CLAMP_8_8 (2 << 12) # define R200_TXC_OUTPUT_REG_MASK (7 << 16) # define R200_TXC_OUTPUT_REG_NONE (0 << 16) # define R200_TXC_OUTPUT_REG_R0 (1 << 16) # define R200_TXC_OUTPUT_REG_R1 (2 << 16) # define R200_TXC_OUTPUT_REG_R2 (3 << 16) # define R200_TXC_OUTPUT_REG_R3 (4 << 16) # define R200_TXC_OUTPUT_REG_R4 (5 << 16) # define R200_TXC_OUTPUT_REG_R5 (6 << 16) # define R200_TXC_OUTPUT_MASK_MASK (7 << 20) # define R200_TXC_OUTPUT_MASK_RGB (0 << 20) # define R200_TXC_OUTPUT_MASK_RG (1 << 20) # define R200_TXC_OUTPUT_MASK_RB (2 << 20) # define R200_TXC_OUTPUT_MASK_R (3 << 20) # define R200_TXC_OUTPUT_MASK_GB (4 << 20) # define R200_TXC_OUTPUT_MASK_G (5 << 20) # define R200_TXC_OUTPUT_MASK_B (6 << 20) # define R200_TXC_OUTPUT_MASK_NONE (7 << 20) # define R200_TXC_REPL_NORMAL 0 # define R200_TXC_REPL_RED 1 # define R200_TXC_REPL_GREEN 2 # define R200_TXC_REPL_BLUE 3 # define R200_TXC_REPL_ARG_A_SHIFT 26 # define R200_TXC_REPL_ARG_A_MASK (3 << 26) # define R200_TXC_REPL_ARG_B_SHIFT 28 # define R200_TXC_REPL_ARG_B_MASK (3 << 28) # define R200_TXC_REPL_ARG_C_SHIFT 30 # define R200_TXC_REPL_ARG_C_MASK (3 << 30) #define R200_PP_TXABLEND_0 0x2f08 # define R200_TXA_ARG_A_ZERO (0) # define R200_TXA_ARG_A_CURRENT_ALPHA (2) /* guess */ # define R200_TXA_ARG_A_CURRENT_BLUE (3) /* guess */ # define R200_TXA_ARG_A_DIFFUSE_ALPHA (4) # define R200_TXA_ARG_A_DIFFUSE_BLUE (5) # define R200_TXA_ARG_A_SPECULAR_ALPHA (6) # define R200_TXA_ARG_A_SPECULAR_BLUE (7) # define R200_TXA_ARG_A_TFACTOR_ALPHA (8) # define R200_TXA_ARG_A_TFACTOR_BLUE (9) # define R200_TXA_ARG_A_R0_ALPHA (10) # define R200_TXA_ARG_A_R0_BLUE (11) # define R200_TXA_ARG_A_R1_ALPHA (12) # define R200_TXA_ARG_A_R1_BLUE (13) # define R200_TXA_ARG_A_R2_ALPHA (14) # define R200_TXA_ARG_A_R2_BLUE (15) # define R200_TXA_ARG_A_R3_ALPHA (16) # define R200_TXA_ARG_A_R3_BLUE (17) # define R200_TXA_ARG_A_R4_ALPHA (18) # define R200_TXA_ARG_A_R4_BLUE (19) # define R200_TXA_ARG_A_R5_ALPHA (20) # define R200_TXA_ARG_A_R5_BLUE (21) # define R200_TXA_ARG_A_TFACTOR1_ALPHA (26) # define R200_TXA_ARG_A_TFACTOR1_BLUE (27) # define R200_TXA_ARG_A_MASK (31 << 0) # define R200_TXA_ARG_A_SHIFT 0 # define R200_TXA_ARG_B_ZERO (0 << 5) # define R200_TXA_ARG_B_CURRENT_ALPHA (2 << 5) /* guess */ # define R200_TXA_ARG_B_CURRENT_BLUE (3 << 5) /* guess */ # define R200_TXA_ARG_B_DIFFUSE_ALPHA (4 << 5) # define R200_TXA_ARG_B_DIFFUSE_BLUE (5 << 5) # define R200_TXA_ARG_B_SPECULAR_ALPHA (6 << 5) # define R200_TXA_ARG_B_SPECULAR_BLUE (7 << 5) # define R200_TXA_ARG_B_TFACTOR_ALPHA (8 << 5) # define R200_TXA_ARG_B_TFACTOR_BLUE (9 << 5) # define R200_TXA_ARG_B_R0_ALPHA (10 << 5) # define R200_TXA_ARG_B_R0_BLUE (11 << 5) # define R200_TXA_ARG_B_R1_ALPHA (12 << 5) # define R200_TXA_ARG_B_R1_BLUE (13 << 5) # define R200_TXA_ARG_B_R2_ALPHA (14 << 5) # define R200_TXA_ARG_B_R2_BLUE (15 << 5) # define R200_TXA_ARG_B_R3_ALPHA (16 << 5) # define R200_TXA_ARG_B_R3_BLUE (17 << 5) # define R200_TXA_ARG_B_R4_ALPHA (18 << 5) # define R200_TXA_ARG_B_R4_BLUE (19 << 5) # define R200_TXA_ARG_B_R5_ALPHA (20 << 5) # define R200_TXA_ARG_B_R5_BLUE (21 << 5) # define R200_TXA_ARG_B_TFACTOR1_ALPHA (26 << 5) # define R200_TXA_ARG_B_TFACTOR1_BLUE (27 << 5) # define R200_TXA_ARG_B_MASK (31 << 5) # define R200_TXA_ARG_B_SHIFT 5 # define R200_TXA_ARG_C_ZERO (0 << 10) # define R200_TXA_ARG_C_CURRENT_ALPHA (2 << 10) /* guess */ # define R200_TXA_ARG_C_CURRENT_BLUE (3 << 10) /* guess */ # define R200_TXA_ARG_C_DIFFUSE_ALPHA (4 << 10) # define R200_TXA_ARG_C_DIFFUSE_BLUE (5 << 10) # define R200_TXA_ARG_C_SPECULAR_ALPHA (6 << 10) # define R200_TXA_ARG_C_SPECULAR_BLUE (7 << 10) # define R200_TXA_ARG_C_TFACTOR_ALPHA (8 << 10) # define R200_TXA_ARG_C_TFACTOR_BLUE (9 << 10) # define R200_TXA_ARG_C_R0_ALPHA (10 << 10) # define R200_TXA_ARG_C_R0_BLUE (11 << 10) # define R200_TXA_ARG_C_R1_ALPHA (12 << 10) # define R200_TXA_ARG_C_R1_BLUE (13 << 10) # define R200_TXA_ARG_C_R2_ALPHA (14 << 10) # define R200_TXA_ARG_C_R2_BLUE (15 << 10) # define R200_TXA_ARG_C_R3_ALPHA (16 << 10) # define R200_TXA_ARG_C_R3_BLUE (17 << 10) # define R200_TXA_ARG_C_R4_ALPHA (18 << 10) # define R200_TXA_ARG_C_R4_BLUE (19 << 10) # define R200_TXA_ARG_C_R5_ALPHA (20 << 10) # define R200_TXA_ARG_C_R5_BLUE (21 << 10) # define R200_TXA_ARG_C_TFACTOR1_ALPHA (26 << 10) # define R200_TXA_ARG_C_TFACTOR1_BLUE (27 << 10) # define R200_TXA_ARG_C_MASK (31 << 10) # define R200_TXA_ARG_C_SHIFT 10 # define R200_TXA_COMP_ARG_A (1 << 16) # define R200_TXA_COMP_ARG_A_SHIFT (16) # define R200_TXA_BIAS_ARG_A (1 << 17) # define R200_TXA_SCALE_ARG_A (1 << 18) # define R200_TXA_NEG_ARG_A (1 << 19) # define R200_TXA_COMP_ARG_B (1 << 20) # define R200_TXA_COMP_ARG_B_SHIFT (20) # define R200_TXA_BIAS_ARG_B (1 << 21) # define R200_TXA_SCALE_ARG_B (1 << 22) # define R200_TXA_NEG_ARG_B (1 << 23) # define R200_TXA_COMP_ARG_C (1 << 24) # define R200_TXA_COMP_ARG_C_SHIFT (24) # define R200_TXA_BIAS_ARG_C (1 << 25) # define R200_TXA_SCALE_ARG_C (1 << 26) # define R200_TXA_NEG_ARG_C (1 << 27) # define R200_TXA_OP_MADD (0 << 28) # define R200_TXA_OP_CND0 (2 << 28) # define R200_TXA_OP_LERP (3 << 28) # define R200_TXA_OP_CONDITIONAL (6 << 28) # define R200_TXA_OP_MASK (7 << 28) #define R200_PP_TXABLEND2_0 0x2f0c # define R200_TXA_TFACTOR_SEL_SHIFT 0 # define R200_TXA_TFACTOR_SEL_MASK 0x7 # define R200_TXA_TFACTOR1_SEL_SHIFT 4 # define R200_TXA_TFACTOR1_SEL_MASK (0x7 << 4) # define R200_TXA_SCALE_SHIFT 8 # define R200_TXA_SCALE_MASK (7 << 8) # define R200_TXA_SCALE_1X (0 << 8) # define R200_TXA_SCALE_2X (1 << 8) # define R200_TXA_SCALE_4X (2 << 8) # define R200_TXA_SCALE_8X (3 << 8) # define R200_TXA_SCALE_INV2 (5 << 8) # define R200_TXA_SCALE_INV4 (6 << 8) # define R200_TXA_SCALE_INV8 (7 << 8) # define R200_TXA_CLAMP_SHIFT 12 # define R200_TXA_CLAMP_MASK (3 << 12) # define R200_TXA_CLAMP_WRAP (0 << 12) # define R200_TXA_CLAMP_0_1 (1 << 12) # define R200_TXA_CLAMP_8_8 (2 << 12) # define R200_TXA_OUTPUT_REG_MASK (7 << 16) # define R200_TXA_OUTPUT_REG_NONE (0 << 16) # define R200_TXA_OUTPUT_REG_R0 (1 << 16) # define R200_TXA_OUTPUT_REG_R1 (2 << 16) # define R200_TXA_OUTPUT_REG_R2 (3 << 16) # define R200_TXA_OUTPUT_REG_R3 (4 << 16) # define R200_TXA_OUTPUT_REG_R4 (5 << 16) # define R200_TXA_OUTPUT_REG_R5 (6 << 16) # define R200_TXA_DOT_ALPHA (1 << 20) # define R200_TXA_REPL_NORMAL 0 # define R200_TXA_REPL_RED 1 # define R200_TXA_REPL_GREEN 2 # define R200_TXA_REPL_ARG_A_SHIFT 26 # define R200_TXA_REPL_ARG_A_MASK (3 << 26) # define R200_TXA_REPL_ARG_B_SHIFT 28 # define R200_TXA_REPL_ARG_B_MASK (3 << 28) # define R200_TXA_REPL_ARG_C_SHIFT 30 # define R200_TXA_REPL_ARG_C_MASK (3 << 30) #define R200_PP_TXCBLEND_1 0x2f10 #define R200_PP_TXCBLEND2_1 0x2f14 #define R200_PP_TXABLEND_1 0x2f18 #define R200_PP_TXABLEND2_1 0x2f1c #define R200_PP_TXCBLEND_2 0x2f20 #define R200_PP_TXCBLEND2_2 0x2f24 #define R200_PP_TXABLEND_2 0x2f28 #define R200_PP_TXABLEND2_2 0x2f2c #define R200_PP_TXCBLEND_3 0x2f30 #define R200_PP_TXCBLEND2_3 0x2f34 #define R200_PP_TXABLEND_3 0x2f38 #define R200_PP_TXABLEND2_3 0x2f3c #define R200_SE_VTX_FMT_0 0x2088 # define R200_VTX_XY 0 /* always have xy */ # define R200_VTX_Z0 (1<<0) # define R200_VTX_W0 (1<<1) # define R200_VTX_WEIGHT_COUNT_SHIFT (2) # define R200_VTX_PV_MATRIX_SEL (1<<5) # define R200_VTX_N0 (1<<6) # define R200_VTX_POINT_SIZE (1<<7) # define R200_VTX_DISCRETE_FOG (1<<8) # define R200_VTX_SHININESS_0 (1<<9) # define R200_VTX_SHININESS_1 (1<<10) # define R200_VTX_COLOR_NOT_PRESENT 0 # define R200_VTX_PK_RGBA 1 # define R200_VTX_FP_RGB 2 # define R200_VTX_FP_RGBA 3 # define R200_VTX_COLOR_MASK 3 # define R200_VTX_COLOR_0_SHIFT 11 # define R200_VTX_COLOR_1_SHIFT 13 # define R200_VTX_COLOR_2_SHIFT 15 # define R200_VTX_COLOR_3_SHIFT 17 # define R200_VTX_COLOR_4_SHIFT 19 # define R200_VTX_COLOR_5_SHIFT 21 # define R200_VTX_COLOR_6_SHIFT 23 # define R200_VTX_COLOR_7_SHIFT 25 # define R200_VTX_XY1 (1<<28) # define R200_VTX_Z1 (1<<29) # define R200_VTX_W1 (1<<30) # define R200_VTX_N1 (1<<31) #define R200_SE_VTX_FMT_1 0x208c # define R200_VTX_TEX0_COMP_CNT_SHIFT 0 # define R200_VTX_TEX1_COMP_CNT_SHIFT 3 # define R200_VTX_TEX2_COMP_CNT_SHIFT 6 # define R200_VTX_TEX3_COMP_CNT_SHIFT 9 # define R200_VTX_TEX4_COMP_CNT_SHIFT 12 # define R200_VTX_TEX5_COMP_CNT_SHIFT 15 #define R200_SE_TCL_OUTPUT_VTX_FMT_0 0x2090 #define R200_SE_TCL_OUTPUT_VTX_FMT_1 0x2094 #define R200_SE_TCL_OUTPUT_VTX_COMP_SEL 0x2250 # define R200_OUTPUT_XYZW (1<<0) # define R200_OUTPUT_COLOR_0 (1<<8) # define R200_OUTPUT_COLOR_1 (1<<9) # define R200_OUTPUT_TEX_0 (1<<16) # define R200_OUTPUT_TEX_1 (1<<17) # define R200_OUTPUT_TEX_2 (1<<18) # define R200_OUTPUT_TEX_3 (1<<19) # define R200_OUTPUT_TEX_4 (1<<20) # define R200_OUTPUT_TEX_5 (1<<21) # define R200_OUTPUT_TEX_MASK (0x3f<<16) # define R200_OUTPUT_DISCRETE_FOG (1<<24) # define R200_OUTPUT_PT_SIZE (1<<25) # define R200_FORCE_INORDER_PROC (1<<31) #define R200_PP_CNTL_X 0x2cc4 #define R200_PP_TXMULTI_CTL_0 0x2c1c #define R200_SE_VTX_STATE_CNTL 0x2180 # define R200_UPDATE_USER_COLOR_0_ENA_MASK (1<<16) /* Registers for CP and Microcode Engine */ #define RADEON_CP_ME_RAM_ADDR 0x07d4 #define RADEON_CP_ME_RAM_RADDR 0x07d8 #define RADEON_CP_ME_RAM_DATAH 0x07dc #define RADEON_CP_ME_RAM_DATAL 0x07e0 #define RADEON_CP_RB_BASE 0x0700 #define RADEON_CP_RB_CNTL 0x0704 #define RADEON_CP_RB_RPTR_ADDR 0x070c #define RADEON_CP_RB_RPTR 0x0710 #define RADEON_CP_RB_WPTR 0x0714 #define RADEON_CP_IB_BASE 0x0738 #define RADEON_CP_IB_BUFSZ 0x073c #define RADEON_CP_CSQ_CNTL 0x0740 # define RADEON_CSQ_CNT_PRIMARY_MASK (0xff << 0) # define RADEON_CSQ_PRIDIS_INDDIS (0 << 28) # define RADEON_CSQ_PRIPIO_INDDIS (1 << 28) # define RADEON_CSQ_PRIBM_INDDIS (2 << 28) # define RADEON_CSQ_PRIPIO_INDBM (3 << 28) # define RADEON_CSQ_PRIBM_INDBM (4 << 28) # define RADEON_CSQ_PRIPIO_INDPIO (15 << 28) #define RADEON_CP_CSQ_STAT 0x07f8 # define RADEON_CSQ_RPTR_PRIMARY_MASK (0xff << 0) # define RADEON_CSQ_WPTR_PRIMARY_MASK (0xff << 8) # define RADEON_CSQ_RPTR_INDIRECT_MASK (0xff << 16) # define RADEON_CSQ_WPTR_INDIRECT_MASK (0xff << 24) #define RADEON_CP_CSQ_ADDR 0x07f0 #define RADEON_CP_CSQ_DATA 0x07f4 #define RADEON_CP_CSQ_APER_PRIMARY 0x1000 #define RADEON_CP_CSQ_APER_INDIRECT 0x1300 #define RADEON_CP_RB_WPTR_DELAY 0x0718 # define RADEON_PRE_WRITE_TIMER_SHIFT 0 # define RADEON_PRE_WRITE_LIMIT_SHIFT 23 #define RADEON_AIC_CNTL 0x01d0 # define RADEON_PCIGART_TRANSLATE_EN (1 << 0) #define RADEON_AIC_LO_ADDR 0x01dc /* Constants */ #define RADEON_LAST_FRAME_REG RADEON_GUI_SCRATCH_REG0 #define RADEON_LAST_CLEAR_REG RADEON_GUI_SCRATCH_REG2 /* CP packet types */ #define RADEON_CP_PACKET0 0x00000000 #define RADEON_CP_PACKET1 0x40000000 #define RADEON_CP_PACKET2 0x80000000 #define RADEON_CP_PACKET3 0xC0000000 # define RADEON_CP_PACKET_MASK 0xC0000000 # define RADEON_CP_PACKET_COUNT_MASK 0x3fff0000 # define RADEON_CP_PACKET_MAX_DWORDS (1 << 12) # define RADEON_CP_PACKET0_REG_MASK 0x000007ff # define RADEON_CP_PACKET1_REG0_MASK 0x000007ff # define RADEON_CP_PACKET1_REG1_MASK 0x003ff800 #define RADEON_CP_PACKET0_ONE_REG_WR 0x00008000 #define RADEON_CP_PACKET3_NOP 0xC0001000 #define RADEON_CP_PACKET3_NEXT_CHAR 0xC0001900 #define RADEON_CP_PACKET3_PLY_NEXTSCAN 0xC0001D00 #define RADEON_CP_PACKET3_SET_SCISSORS 0xC0001E00 #define RADEON_CP_PACKET3_3D_RNDR_GEN_INDX_PRIM 0xC0002300 #define RADEON_CP_PACKET3_LOAD_MICROCODE 0xC0002400 #define RADEON_CP_PACKET3_WAIT_FOR_IDLE 0xC0002600 #define RADEON_CP_PACKET3_3D_DRAW_VBUF 0xC0002800 #define RADEON_CP_PACKET3_3D_DRAW_IMMD 0xC0002900 #define RADEON_CP_PACKET3_3D_DRAW_INDX 0xC0002A00 #define RADEON_CP_PACKET3_LOAD_PALETTE 0xC0002C00 #define R200_CP_PACKET3_3D_DRAW_IMMD_2 0xc0003500 #define RADEON_CP_PACKET3_3D_LOAD_VBPNTR 0xC0002F00 #define RADEON_CP_PACKET3_CNTL_PAINT 0xC0009100 #define RADEON_CP_PACKET3_CNTL_BITBLT 0xC0009200 #define RADEON_CP_PACKET3_CNTL_SMALLTEXT 0xC0009300 #define RADEON_CP_PACKET3_CNTL_HOSTDATA_BLT 0xC0009400 #define RADEON_CP_PACKET3_CNTL_POLYLINE 0xC0009500 #define RADEON_CP_PACKET3_CNTL_POLYSCANLINES 0xC0009800 #define RADEON_CP_PACKET3_CNTL_PAINT_MULTI 0xC0009A00 #define RADEON_CP_PACKET3_CNTL_BITBLT_MULTI 0xC0009B00 #define RADEON_CP_PACKET3_CNTL_TRANS_BITBLT 0xC0009C00 #define RADEON_CP_VC_FRMT_XY 0x00000000 #define RADEON_CP_VC_FRMT_W0 0x00000001 #define RADEON_CP_VC_FRMT_FPCOLOR 0x00000002 #define RADEON_CP_VC_FRMT_FPALPHA 0x00000004 #define RADEON_CP_VC_FRMT_PKCOLOR 0x00000008 #define RADEON_CP_VC_FRMT_FPSPEC 0x00000010 #define RADEON_CP_VC_FRMT_FPFOG 0x00000020 #define RADEON_CP_VC_FRMT_PKSPEC 0x00000040 #define RADEON_CP_VC_FRMT_ST0 0x00000080 #define RADEON_CP_VC_FRMT_ST1 0x00000100 #define RADEON_CP_VC_FRMT_Q1 0x00000200 #define RADEON_CP_VC_FRMT_ST2 0x00000400 #define RADEON_CP_VC_FRMT_Q2 0x00000800 #define RADEON_CP_VC_FRMT_ST3 0x00001000 #define RADEON_CP_VC_FRMT_Q3 0x00002000 #define RADEON_CP_VC_FRMT_Q0 0x00004000 #define RADEON_CP_VC_FRMT_BLND_WEIGHT_CNT_MASK 0x00038000 #define RADEON_CP_VC_FRMT_N0 0x00040000 #define RADEON_CP_VC_FRMT_XY1 0x08000000 #define RADEON_CP_VC_FRMT_Z1 0x10000000 #define RADEON_CP_VC_FRMT_W1 0x20000000 #define RADEON_CP_VC_FRMT_N1 0x40000000 #define RADEON_CP_VC_FRMT_Z 0x80000000 #define RADEON_CP_VC_CNTL_PRIM_TYPE_NONE 0x00000000 #define RADEON_CP_VC_CNTL_PRIM_TYPE_POINT 0x00000001 #define RADEON_CP_VC_CNTL_PRIM_TYPE_LINE 0x00000002 #define RADEON_CP_VC_CNTL_PRIM_TYPE_LINE_STRIP 0x00000003 #define RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_LIST 0x00000004 #define RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_FAN 0x00000005 #define RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_STRIP 0x00000006 #define RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_TYPE_2 0x00000007 #define RADEON_CP_VC_CNTL_PRIM_TYPE_RECT_LIST 0x00000008 #define RADEON_CP_VC_CNTL_PRIM_TYPE_3VRT_POINT_LIST 0x00000009 #define RADEON_CP_VC_CNTL_PRIM_TYPE_3VRT_LINE_LIST 0x0000000a #define RADEON_CP_VC_CNTL_PRIM_TYPE_QUAD_LIST 0x0000000d #define RADEON_CP_VC_CNTL_PRIM_WALK_IND 0x00000010 #define RADEON_CP_VC_CNTL_PRIM_WALK_LIST 0x00000020 #define RADEON_CP_VC_CNTL_PRIM_WALK_RING 0x00000030 #define RADEON_CP_VC_CNTL_COLOR_ORDER_BGRA 0x00000000 #define RADEON_CP_VC_CNTL_COLOR_ORDER_RGBA 0x00000040 #define RADEON_CP_VC_CNTL_MAOS_ENABLE 0x00000080 #define RADEON_CP_VC_CNTL_VTX_FMT_NON_RADEON_MODE 0x00000000 #define RADEON_CP_VC_CNTL_VTX_FMT_RADEON_MODE 0x00000100 #define RADEON_CP_VC_CNTL_TCL_DISABLE 0x00000000 #define RADEON_CP_VC_CNTL_TCL_ENABLE 0x00000200 #define RADEON_CP_VC_CNTL_NUM_SHIFT 16 #define RADEON_VS_MATRIX_0_ADDR 0 #define RADEON_VS_MATRIX_1_ADDR 4 #define RADEON_VS_MATRIX_2_ADDR 8 #define RADEON_VS_MATRIX_3_ADDR 12 #define RADEON_VS_MATRIX_4_ADDR 16 #define RADEON_VS_MATRIX_5_ADDR 20 #define RADEON_VS_MATRIX_6_ADDR 24 #define RADEON_VS_MATRIX_7_ADDR 28 #define RADEON_VS_MATRIX_8_ADDR 32 #define RADEON_VS_MATRIX_9_ADDR 36 #define RADEON_VS_MATRIX_10_ADDR 40 #define RADEON_VS_MATRIX_11_ADDR 44 #define RADEON_VS_MATRIX_12_ADDR 48 #define RADEON_VS_MATRIX_13_ADDR 52 #define RADEON_VS_MATRIX_14_ADDR 56 #define RADEON_VS_MATRIX_15_ADDR 60 #define RADEON_VS_LIGHT_AMBIENT_ADDR 64 #define RADEON_VS_LIGHT_DIFFUSE_ADDR 72 #define RADEON_VS_LIGHT_SPECULAR_ADDR 80 #define RADEON_VS_LIGHT_DIRPOS_ADDR 88 #define RADEON_VS_LIGHT_HWVSPOT_ADDR 96 #define RADEON_VS_LIGHT_ATTENUATION_ADDR 104 #define RADEON_VS_MATRIX_EYE2CLIP_ADDR 112 #define RADEON_VS_UCP_ADDR 116 #define RADEON_VS_GLOBAL_AMBIENT_ADDR 122 #define RADEON_VS_FOG_PARAM_ADDR 123 #define RADEON_VS_EYE_VECTOR_ADDR 124 #define RADEON_SS_LIGHT_DCD_ADDR 0 #define RADEON_SS_LIGHT_SPOT_EXPONENT_ADDR 8 #define RADEON_SS_LIGHT_SPOT_CUTOFF_ADDR 16 #define RADEON_SS_LIGHT_SPECULAR_THRESH_ADDR 24 #define RADEON_SS_LIGHT_RANGE_CUTOFF_ADDR 32 #define RADEON_SS_VERT_GUARD_CLIP_ADJ_ADDR 48 #define RADEON_SS_VERT_GUARD_DISCARD_ADJ_ADDR 49 #define RADEON_SS_HORZ_GUARD_CLIP_ADJ_ADDR 50 #define RADEON_SS_HORZ_GUARD_DISCARD_ADJ_ADDR 51 #define RADEON_SS_SHININESS 60 #define RADEON_TV_MASTER_CNTL 0x0800 # define RADEON_TV_ASYNC_RST (1 << 0) # define RADEON_CRT_ASYNC_RST (1 << 1) # define RADEON_RESTART_PHASE_FIX (1 << 3) # define RADEON_TV_FIFO_ASYNC_RST (1 << 4) # define RADEON_VIN_ASYNC_RST (1 << 5) # define RADEON_AUD_ASYNC_RST (1 << 6) # define RADEON_DVS_ASYNC_RST (1 << 7) # define RADEON_CRT_FIFO_CE_EN (1 << 9) # define RADEON_TV_FIFO_CE_EN (1 << 10) # define RADEON_RE_SYNC_NOW_SEL_MASK (3 << 14) # define RADEON_TVCLK_ALWAYS_ONb (1 << 30) # define RADEON_TV_ON (1 << 31) #define RADEON_TV_PRE_DAC_MUX_CNTL 0x0888 # define RADEON_Y_RED_EN (1 << 0) # define RADEON_C_GRN_EN (1 << 1) # define RADEON_CMP_BLU_EN (1 << 2) # define RADEON_DAC_DITHER_EN (1 << 3) # define RADEON_RED_MX_FORCE_DAC_DATA (6 << 4) # define RADEON_GRN_MX_FORCE_DAC_DATA (6 << 8) # define RADEON_BLU_MX_FORCE_DAC_DATA (6 << 12) # define RADEON_TV_FORCE_DAC_DATA_SHIFT 16 #define RADEON_TV_RGB_CNTL 0x0804 # define RADEON_SWITCH_TO_BLUE (1 << 4) # define RADEON_RGB_DITHER_EN (1 << 5) # define RADEON_RGB_SRC_SEL_MASK (3 << 8) # define RADEON_RGB_SRC_SEL_CRTC1 (0 << 8) # define RADEON_RGB_SRC_SEL_RMX (1 << 8) # define RADEON_RGB_SRC_SEL_CRTC2 (2 << 8) # define RADEON_RGB_CONVERT_BY_PASS (1 << 10) # define RADEON_UVRAM_READ_MARGIN_SHIFT 16 # define RADEON_FIFORAM_FFMACRO_READ_MARGIN_SHIFT 20 # define RADEON_RGB_ATTEN_SEL(x) ((x) << 24) # define RADEON_TVOUT_SCALE_EN (1 << 26) # define RADEON_RGB_ATTEN_VAL(x) ((x) << 28) #define RADEON_TV_SYNC_CNTL 0x0808 # define RADEON_SYNC_OE (1 << 0) # define RADEON_SYNC_OUT (1 << 1) # define RADEON_SYNC_IN (1 << 2) # define RADEON_SYNC_PUB (1 << 3) # define RADEON_SYNC_PD (1 << 4) # define RADEON_TV_SYNC_IO_DRIVE (1 << 5) #define RADEON_TV_HTOTAL 0x080c #define RADEON_TV_HDISP 0x0810 #define RADEON_TV_HSTART 0x0818 #define RADEON_TV_HCOUNT 0x081C #define RADEON_TV_VTOTAL 0x0820 #define RADEON_TV_VDISP 0x0824 #define RADEON_TV_VCOUNT 0x0828 #define RADEON_TV_FTOTAL 0x082c #define RADEON_TV_FCOUNT 0x0830 #define RADEON_TV_FRESTART 0x0834 #define RADEON_TV_HRESTART 0x0838 #define RADEON_TV_VRESTART 0x083c #define RADEON_TV_HOST_READ_DATA 0x0840 #define RADEON_TV_HOST_WRITE_DATA 0x0844 #define RADEON_TV_HOST_RD_WT_CNTL 0x0848 # define RADEON_HOST_FIFO_RD (1 << 12) # define RADEON_HOST_FIFO_RD_ACK (1 << 13) # define RADEON_HOST_FIFO_WT (1 << 14) # define RADEON_HOST_FIFO_WT_ACK (1 << 15) #define RADEON_TV_VSCALER_CNTL1 0x084c # define RADEON_UV_INC_MASK 0xffff # define RADEON_UV_INC_SHIFT 0 # define RADEON_Y_W_EN (1 << 24) # define RADEON_RESTART_FIELD (1 << 29) /* restart on field 0 */ # define RADEON_Y_DEL_W_SIG_SHIFT 26 #define RADEON_TV_TIMING_CNTL 0x0850 # define RADEON_H_INC_MASK 0xfff # define RADEON_H_INC_SHIFT 0 # define RADEON_REQ_Y_FIRST (1 << 19) # define RADEON_FORCE_BURST_ALWAYS (1 << 21) # define RADEON_UV_POST_SCALE_BYPASS (1 << 23) # define RADEON_UV_OUTPUT_POST_SCALE_SHIFT 24 #define RADEON_TV_VSCALER_CNTL2 0x0854 # define RADEON_DITHER_MODE (1 << 0) # define RADEON_Y_OUTPUT_DITHER_EN (1 << 1) # define RADEON_UV_OUTPUT_DITHER_EN (1 << 2) # define RADEON_UV_TO_BUF_DITHER_EN (1 << 3) #define RADEON_TV_Y_FALL_CNTL 0x0858 # define RADEON_Y_FALL_PING_PONG (1 << 16) # define RADEON_Y_COEF_EN (1 << 17) #define RADEON_TV_Y_RISE_CNTL 0x085c # define RADEON_Y_RISE_PING_PONG (1 << 16) #define RADEON_TV_Y_SAW_TOOTH_CNTL 0x0860 #define RADEON_TV_UPSAMP_AND_GAIN_CNTL 0x0864 # define RADEON_YUPSAMP_EN (1 << 0) # define RADEON_UVUPSAMP_EN (1 << 2) #define RADEON_TV_GAIN_LIMIT_SETTINGS 0x0868 # define RADEON_Y_GAIN_LIMIT_SHIFT 0 # define RADEON_UV_GAIN_LIMIT_SHIFT 16 #define RADEON_TV_LINEAR_GAIN_SETTINGS 0x086c # define RADEON_Y_GAIN_SHIFT 0 # define RADEON_UV_GAIN_SHIFT 16 #define RADEON_TV_MODULATOR_CNTL1 0x0870 # define RADEON_YFLT_EN (1 << 2) # define RADEON_UVFLT_EN (1 << 3) # define RADEON_ALT_PHASE_EN (1 << 6) # define RADEON_SYNC_TIP_LEVEL (1 << 7) # define RADEON_BLANK_LEVEL_SHIFT 8 # define RADEON_SET_UP_LEVEL_SHIFT 16 # define RADEON_SLEW_RATE_LIMIT (1 << 23) # define RADEON_CY_FILT_BLEND_SHIFT 28 #define RADEON_TV_MODULATOR_CNTL2 0x0874 # define RADEON_TV_U_BURST_LEVEL_MASK 0x1ff # define RADEON_TV_V_BURST_LEVEL_MASK 0x1ff # define RADEON_TV_V_BURST_LEVEL_SHIFT 16 #define RADEON_TV_CRC_CNTL 0x0890 #define RADEON_TV_UV_ADR 0x08ac # define RADEON_MAX_UV_ADR_MASK 0x000000ff # define RADEON_MAX_UV_ADR_SHIFT 0 # define RADEON_TABLE1_BOT_ADR_MASK 0x0000ff00 # define RADEON_TABLE1_BOT_ADR_SHIFT 8 # define RADEON_TABLE3_TOP_ADR_MASK 0x00ff0000 # define RADEON_TABLE3_TOP_ADR_SHIFT 16 # define RADEON_HCODE_TABLE_SEL_MASK 0x06000000 # define RADEON_HCODE_TABLE_SEL_SHIFT 25 # define RADEON_VCODE_TABLE_SEL_MASK 0x18000000 # define RADEON_VCODE_TABLE_SEL_SHIFT 27 # define RADEON_TV_MAX_FIFO_ADDR 0x1a7 # define RADEON_TV_MAX_FIFO_ADDR_INTERNAL 0x1ff #define RADEON_TV_PLL_FINE_CNTL 0x0020 /* PLL */ #define RADEON_TV_PLL_CNTL 0x0021 /* PLL */ # define RADEON_TV_M0LO_MASK 0xff # define RADEON_TV_M0HI_MASK 0x7 # define RADEON_TV_M0HI_SHIFT 18 # define RADEON_TV_N0LO_MASK 0x1ff # define RADEON_TV_N0LO_SHIFT 8 # define RADEON_TV_N0HI_MASK 0x3 # define RADEON_TV_N0HI_SHIFT 21 # define RADEON_TV_P_MASK 0xf # define RADEON_TV_P_SHIFT 24 # define RADEON_TV_SLIP_EN (1 << 23) # define RADEON_TV_DTO_EN (1 << 28) #define RADEON_TV_PLL_CNTL1 0x0022 /* PLL */ # define RADEON_TVPLL_RESET (1 << 1) # define RADEON_TVPLL_SLEEP (1 << 3) # define RADEON_TVPLL_REFCLK_SEL (1 << 4) # define RADEON_TVPCP_SHIFT 8 # define RADEON_TVPCP_MASK (7 << 8) # define RADEON_TVPVG_SHIFT 11 # define RADEON_TVPVG_MASK (7 << 11) # define RADEON_TVPDC_SHIFT 14 # define RADEON_TVPDC_MASK (3 << 14) # define RADEON_TVPLL_TEST_DIS (1 << 31) # define RADEON_TVCLK_SRC_SEL_TVPLL (1 << 30) #define RS400_DISP2_REQ_CNTL1 0xe30 # define RS400_DISP2_START_REQ_LEVEL_SHIFT 0 # define RS400_DISP2_START_REQ_LEVEL_MASK 0x3ff # define RS400_DISP2_STOP_REQ_LEVEL_SHIFT 12 # define RS400_DISP2_STOP_REQ_LEVEL_MASK 0x3ff # define RS400_DISP2_ALLOW_FID_LEVEL_SHIFT 22 # define RS400_DISP2_ALLOW_FID_LEVEL_MASK 0x3ff #define RS400_DISP2_REQ_CNTL2 0xe34 # define RS400_DISP2_CRITICAL_POINT_START_SHIFT 12 # define RS400_DISP2_CRITICAL_POINT_START_MASK 0x3ff # define RS400_DISP2_CRITICAL_POINT_STOP_SHIFT 22 # define RS400_DISP2_CRITICAL_POINT_STOP_MASK 0x3ff #define RS400_DMIF_MEM_CNTL1 0xe38 # define RS400_DISP2_START_ADR_SHIFT 0 # define RS400_DISP2_START_ADR_MASK 0x3ff # define RS400_DISP1_CRITICAL_POINT_START_SHIFT 12 # define RS400_DISP1_CRITICAL_POINT_START_MASK 0x3ff # define RS400_DISP1_CRITICAL_POINT_STOP_SHIFT 22 # define RS400_DISP1_CRITICAL_POINT_STOP_MASK 0x3ff #define RS400_DISP1_REQ_CNTL1 0xe3c # define RS400_DISP1_START_REQ_LEVEL_SHIFT 0 # define RS400_DISP1_START_REQ_LEVEL_MASK 0x3ff # define RS400_DISP1_STOP_REQ_LEVEL_SHIFT 12 # define RS400_DISP1_STOP_REQ_LEVEL_MASK 0x3ff # define RS400_DISP1_ALLOW_FID_LEVEL_SHIFT 22 # define RS400_DISP1_ALLOW_FID_LEVEL_MASK 0x3ff #define RS690_MC_INDEX 0x78 # define RS690_MC_INDEX_MASK 0x1ff # define RS690_MC_INDEX_WR_EN (1 << 9) # define RS690_MC_INDEX_WR_ACK 0x7f #define RS690_MC_DATA 0x7c #define RS690_MC_FB_LOCATION 0x100 #define RS690_MC_AGP_LOCATION 0x101 #define RS690_MC_AGP_BASE 0x102 #define RS690_MC_AGP_BASE_2 0x103 #define RS690_MC_INIT_MISC_LAT_TIMER 0x104 #define RS690_MC_STATUS 0x90 #define RS690_MC_STATUS_IDLE (1 << 0) #define RS600_MC_INDEX 0x70 # define RS600_MC_ADDR_MASK 0xffff # define RS600_MC_IND_SEQ_RBS_0 (1 << 16) # define RS600_MC_IND_SEQ_RBS_1 (1 << 17) # define RS600_MC_IND_SEQ_RBS_2 (1 << 18) # define RS600_MC_IND_SEQ_RBS_3 (1 << 19) # define RS600_MC_IND_AIC_RBS (1 << 20) # define RS600_MC_IND_CITF_ARB0 (1 << 21) # define RS600_MC_IND_CITF_ARB1 (1 << 22) # define RS600_MC_IND_WR_EN (1 << 23) #define RS600_MC_DATA 0x74 #define RS600_MC_STATUS 0x0 # define RS600_MC_IDLE (1 << 1) #define RS600_MC_FB_LOCATION 0x4 #define RS600_MC_AGP_LOCATION 0x5 #define RS600_AGP_BASE 0x6 #define RS600_AGP_BASE2 0x7 #define AVIVO_MC_INDEX 0x0070 #define R520_MC_STATUS 0x00 # define R520_MC_STATUS_IDLE (1 << 1) #define RV515_MC_STATUS 0x08 # define RV515_MC_STATUS_IDLE (1 << 4) #define RV515_MC_INIT_MISC_LAT_TIMER 0x09 #define AVIVO_MC_DATA 0x0074 #define RV515_MC_FB_LOCATION 0x1 #define RV515_MC_AGP_LOCATION 0x2 #define RV515_MC_AGP_BASE 0x3 #define RV515_MC_AGP_BASE_2 0x4 #define RV515_MC_CNTL 0x5 # define RV515_MEM_NUM_CHANNELS_MASK 0x3 #define R520_MC_FB_LOCATION 0x4 #define R520_MC_AGP_LOCATION 0x5 #define R520_MC_AGP_BASE 0x6 #define R520_MC_AGP_BASE_2 0x7 #define R520_MC_CNTL0 0x8 # define R520_MEM_NUM_CHANNELS_MASK (0x3 << 24) # define R520_MEM_NUM_CHANNELS_SHIFT 24 # define R520_MC_CHANNEL_SIZE (1 << 23) #define RS780_MC_INDEX 0x28f8 # define RS780_MC_INDEX_MASK 0x1ff # define RS780_MC_INDEX_WR_EN (1 << 9) #define RS780_MC_DATA 0x28fc #define R600_RAMCFG 0x2408 # define R600_CHANSIZE (1 << 7) # define R600_CHANSIZE_OVERRIDE (1 << 10) #define R600_SRBM_STATUS 0x0e50 #define AVIVO_CP_DYN_CNTL 0x000f /* PLL */ # define AVIVO_CP_FORCEON (1 << 0) #define AVIVO_E2_DYN_CNTL 0x0011 /* PLL */ # define AVIVO_E2_FORCEON (1 << 0) #define AVIVO_IDCT_DYN_CNTL 0x0013 /* PLL */ # define AVIVO_IDCT_FORCEON (1 << 0) #define AVIVO_HDP_FB_LOCATION 0x134 #define AVIVO_VGA_RENDER_CONTROL 0x0300 # define AVIVO_VGA_VSTATUS_CNTL_MASK (3 << 16) #define AVIVO_D1VGA_CONTROL 0x0330 # define AVIVO_DVGA_CONTROL_MODE_ENABLE (1<<0) # define AVIVO_DVGA_CONTROL_TIMING_SELECT (1<<8) # define AVIVO_DVGA_CONTROL_SYNC_POLARITY_SELECT (1<<9) # define AVIVO_DVGA_CONTROL_OVERSCAN_TIMING_SELECT (1<<10) # define AVIVO_DVGA_CONTROL_OVERSCAN_COLOR_EN (1<<16) # define AVIVO_DVGA_CONTROL_ROTATE (1<<24) #define AVIVO_D2VGA_CONTROL 0x0338 #define AVIVO_VGA25_PPLL_REF_DIV_SRC 0x0360 #define AVIVO_VGA25_PPLL_REF_DIV 0x0364 #define AVIVO_VGA28_PPLL_REF_DIV_SRC 0x0368 #define AVIVO_VGA28_PPLL_REF_DIV 0x036c #define AVIVO_VGA41_PPLL_REF_DIV_SRC 0x0370 #define AVIVO_VGA41_PPLL_REF_DIV 0x0374 #define AVIVO_VGA25_PPLL_FB_DIV 0x0378 #define AVIVO_VGA28_PPLL_FB_DIV 0x037c #define AVIVO_VGA41_PPLL_FB_DIV 0x0380 #define AVIVO_VGA25_PPLL_POST_DIV_SRC 0x0384 #define AVIVO_VGA25_PPLL_POST_DIV 0x0388 #define AVIVO_VGA28_PPLL_POST_DIV_SRC 0x038c #define AVIVO_VGA28_PPLL_POST_DIV 0x0390 #define AVIVO_VGA41_PPLL_POST_DIV_SRC 0x0394 #define AVIVO_VGA41_PPLL_POST_DIV 0x0398 #define AVIVO_VGA25_PPLL_CNTL 0x039c #define AVIVO_VGA28_PPLL_CNTL 0x03a0 #define AVIVO_VGA41_PPLL_CNTL 0x03a4 #define AVIVO_EXT1_PPLL_REF_DIV_SRC 0x400 #define AVIVO_EXT1_PPLL_REF_DIV 0x404 #define AVIVO_EXT1_PPLL_UPDATE_LOCK 0x408 #define AVIVO_EXT1_PPLL_UPDATE_CNTL 0x40c #define AVIVO_EXT2_PPLL_REF_DIV_SRC 0x410 #define AVIVO_EXT2_PPLL_REF_DIV 0x414 #define AVIVO_EXT2_PPLL_UPDATE_LOCK 0x418 #define AVIVO_EXT2_PPLL_UPDATE_CNTL 0x41c #define AVIVO_EXT1_PPLL_FB_DIV 0x430 #define AVIVO_EXT2_PPLL_FB_DIV 0x434 #define AVIVO_EXT1_PPLL_POST_DIV_SRC 0x438 #define AVIVO_EXT1_PPLL_POST_DIV 0x43c #define AVIVO_EXT2_PPLL_POST_DIV_SRC 0x440 #define AVIVO_EXT2_PPLL_POST_DIV 0x444 #define AVIVO_EXT1_PPLL_CNTL 0x448 #define AVIVO_EXT2_PPLL_CNTL 0x44c #define AVIVO_P1PLL_CNTL 0x450 #define AVIVO_P2PLL_CNTL 0x454 #define AVIVO_P1PLL_INT_SS_CNTL 0x458 #define AVIVO_P2PLL_INT_SS_CNTL 0x45c #define AVIVO_P1PLL_TMDSA_CNTL 0x460 #define AVIVO_P2PLL_LVTMA_CNTL 0x464 #define AVIVO_PCLK_CRTC1_CNTL 0x480 #define AVIVO_PCLK_CRTC2_CNTL 0x484 #define AVIVO_D1CRTC_H_TOTAL 0x6000 #define AVIVO_D1CRTC_H_BLANK_START_END 0x6004 #define AVIVO_D1CRTC_H_SYNC_A 0x6008 #define AVIVO_D1CRTC_H_SYNC_A_CNTL 0x600c #define AVIVO_D1CRTC_H_SYNC_B 0x6010 #define AVIVO_D1CRTC_H_SYNC_B_CNTL 0x6014 #define AVIVO_D1CRTC_V_TOTAL 0x6020 #define AVIVO_D1CRTC_V_BLANK_START_END 0x6024 #define AVIVO_D1CRTC_V_SYNC_A 0x6028 #define AVIVO_D1CRTC_V_SYNC_A_CNTL 0x602c #define AVIVO_D1CRTC_V_SYNC_B 0x6030 #define AVIVO_D1CRTC_V_SYNC_B_CNTL 0x6034 #define AVIVO_D1CRTC_CONTROL 0x6080 # define AVIVO_CRTC_EN (1<<0) #define AVIVO_D1CRTC_BLANK_CONTROL 0x6084 #define AVIVO_D1CRTC_INTERLACE_CONTROL 0x6088 #define AVIVO_D1CRTC_INTERLACE_STATUS 0x608c #define AVIVO_D1CRTC_STEREO_CONTROL 0x60c4 /* master controls */ #define AVIVO_DC_CRTC_MASTER_EN 0x60f8 #define AVIVO_DC_CRTC_TV_CONTROL 0x60fc #define AVIVO_D1GRPH_ENABLE 0x6100 #define AVIVO_D1GRPH_CONTROL 0x6104 # define AVIVO_D1GRPH_CONTROL_DEPTH_8BPP (0<<0) # define AVIVO_D1GRPH_CONTROL_DEPTH_16BPP (1<<0) # define AVIVO_D1GRPH_CONTROL_DEPTH_32BPP (2<<0) # define AVIVO_D1GRPH_CONTROL_DEPTH_64BPP (3<<0) # define AVIVO_D1GRPH_CONTROL_8BPP_INDEXED (0<<8) # define AVIVO_D1GRPH_CONTROL_16BPP_ARGB1555 (0<<8) # define AVIVO_D1GRPH_CONTROL_16BPP_RGB565 (1<<8) # define AVIVO_D1GRPH_CONTROL_16BPP_ARGB4444 (2<<8) # define AVIVO_D1GRPH_CONTROL_16BPP_AI88 (3<<8) # define AVIVO_D1GRPH_CONTROL_16BPP_MONO16 (4<<8) # define AVIVO_D1GRPH_CONTROL_32BPP_ARGB8888 (0<<8) # define AVIVO_D1GRPH_CONTROL_32BPP_ARGB2101010 (1<<8) # define AVIVO_D1GRPH_CONTROL_32BPP_DIGITAL (2<<8) # define AVIVO_D1GRPH_CONTROL_32BPP_8B_ARGB2101010 (3<<8) # define AVIVO_D1GRPH_CONTROL_64BPP_ARGB16161616 (0<<8) # define AVIVO_D1GRPH_SWAP_RB (1<<16) # define AVIVO_D1GRPH_TILED (1<<20) # define AVIVO_D1GRPH_MACRO_ADDRESS_MODE (1<<21) #define AVIVO_D1GRPH_LUT_SEL 0x6108 #define R600_D1GRPH_SWAP_CONTROL 0x610C # define R600_D1GRPH_SWAP_ENDIAN_NONE (0 << 0) # define R600_D1GRPH_SWAP_ENDIAN_16BIT (1 << 0) # define R600_D1GRPH_SWAP_ENDIAN_32BIT (2 << 0) # define R600_D1GRPH_SWAP_ENDIAN_64BIT (3 << 0) /* the *_HIGH surface regs are backwards; the D1 regs are in the D2 * block and vice versa. This applies to GRPH, CUR, etc. */ #define AVIVO_D1GRPH_PRIMARY_SURFACE_ADDRESS 0x6110 #define R700_D1GRPH_PRIMARY_SURFACE_ADDRESS_HIGH 0x6914 #define R700_D2GRPH_PRIMARY_SURFACE_ADDRESS_HIGH 0x6114 #define AVIVO_D1GRPH_SECONDARY_SURFACE_ADDRESS 0x6118 #define R700_D1GRPH_SECONDARY_SURFACE_ADDRESS_HIGH 0x691c #define R700_D2GRPH_SECONDARY_SURFACE_ADDRESS_HIGH 0x611c #define AVIVO_D1GRPH_PITCH 0x6120 #define AVIVO_D1GRPH_SURFACE_OFFSET_X 0x6124 #define AVIVO_D1GRPH_SURFACE_OFFSET_Y 0x6128 #define AVIVO_D1GRPH_X_START 0x612c #define AVIVO_D1GRPH_Y_START 0x6130 #define AVIVO_D1GRPH_X_END 0x6134 #define AVIVO_D1GRPH_Y_END 0x6138 #define AVIVO_D1GRPH_UPDATE 0x6144 # define AVIVO_D1GRPH_UPDATE_LOCK (1<<16) #define AVIVO_D1GRPH_FLIP_CONTROL 0x6148 #define AVIVO_D1GRPH_COLOR_MATRIX_TRANSFORMATION_CNTL 0x6380 #define AVIVO_D1CUR_CONTROL 0x6400 # define AVIVO_D1CURSOR_EN (1<<0) # define AVIVO_D1CURSOR_MODE_SHIFT 8 # define AVIVO_D1CURSOR_MODE_MASK (0x3<<8) # define AVIVO_D1CURSOR_MODE_24BPP (0x2) #define AVIVO_D1CUR_SURFACE_ADDRESS 0x6408 #define R700_D1CUR_SURFACE_ADDRESS_HIGH 0x6c0c #define R700_D2CUR_SURFACE_ADDRESS_HIGH 0x640c #define AVIVO_D1CUR_SIZE 0x6410 #define AVIVO_D1CUR_POSITION 0x6414 #define AVIVO_D1CUR_HOT_SPOT 0x6418 #define AVIVO_D1CUR_UPDATE 0x6424 # define AVIVO_D1CURSOR_UPDATE_LOCK (1 << 16) #define AVIVO_DC_LUT_RW_SELECT 0x6480 #define AVIVO_DC_LUT_RW_MODE 0x6484 #define AVIVO_DC_LUT_RW_INDEX 0x6488 #define AVIVO_DC_LUT_SEQ_COLOR 0x648c #define AVIVO_DC_LUT_PWL_DATA 0x6490 #define AVIVO_DC_LUT_30_COLOR 0x6494 #define AVIVO_DC_LUT_READ_PIPE_SELECT 0x6498 #define AVIVO_DC_LUT_WRITE_EN_MASK 0x649c #define AVIVO_DC_LUT_AUTOFILL 0x64a0 #define AVIVO_DC_LUTA_CONTROL 0x64c0 #define AVIVO_DC_LUTA_BLACK_OFFSET_BLUE 0x64c4 #define AVIVO_DC_LUTA_BLACK_OFFSET_GREEN 0x64c8 #define AVIVO_DC_LUTA_BLACK_OFFSET_RED 0x64cc #define AVIVO_DC_LUTA_WHITE_OFFSET_BLUE 0x64d0 #define AVIVO_DC_LUTA_WHITE_OFFSET_GREEN 0x64d4 #define AVIVO_DC_LUTA_WHITE_OFFSET_RED 0x64d8 #define AVIVO_DC_LB_MEMORY_SPLIT 0x6520 # define AVIVO_DC_LB_MEMORY_SPLIT_MASK 0x3 # define AVIVO_DC_LB_MEMORY_SPLIT_SHIFT 0 # define AVIVO_DC_LB_MEMORY_SPLIT_D1HALF_D2HALF 0 # define AVIVO_DC_LB_MEMORY_SPLIT_D1_3Q_D2_1Q 1 # define AVIVO_DC_LB_MEMORY_SPLIT_D1_ONLY 2 # define AVIVO_DC_LB_MEMORY_SPLIT_D1_1Q_D2_3Q 3 # define AVIVO_DC_LB_MEMORY_SPLIT_SHIFT_MODE (1 << 2) # define AVIVO_DC_LB_DISP1_END_ADR_SHIFT 4 # define AVIVO_DC_LB_DISP1_END_ADR_MASK 0x7ff #define AVIVO_D1MODE_PRIORITY_A_CNT 0x6548 # define AVIVO_DxMODE_PRIORITY_MARK_MASK 0x7fff # define AVIVO_DxMODE_PRIORITY_OFF (1 << 16) # define AVIVO_DxMODE_PRIORITY_ALWAYS_ON (1 << 20) # define AVIVO_DxMODE_PRIORITY_FORCE_MASK (1 << 24) #define AVIVO_D1MODE_PRIORITY_B_CNT 0x654c #define AVIVO_D2MODE_PRIORITY_A_CNT 0x6d48 #define AVIVO_D2MODE_PRIORITY_B_CNT 0x6d4c #define AVIVO_LB_MAX_REQ_OUTSTANDING 0x6d58 # define AVIVO_LB_D1_MAX_REQ_OUTSTANDING_MASK 0xf # define AVIVO_LB_D1_MAX_REQ_OUTSTANDING_SHIFT 0 # define AVIVO_LB_D2_MAX_REQ_OUTSTANDING_MASK 0xf # define AVIVO_LB_D2_MAX_REQ_OUTSTANDING_SHIFT 16 #define AVIVO_D1MODE_DATA_FORMAT 0x6528 # define AVIVO_D1MODE_INTERLEAVE_EN (1 << 0) #define AVIVO_D1MODE_DESKTOP_HEIGHT 0x652c #define AVIVO_D1MODE_VLINE_START_END 0x6538 # define AVIVO_D1MODE_VLINE_START_SHIFT 0 # define AVIVO_D1MODE_VLINE_END_SHIFT 16 # define AVIVO_D1MODE_VLINE_INV (1 << 31) #define AVIVO_D1MODE_VLINE_STATUS 0x653c # define AVIVO_D1MODE_VLINE_STAT (1 << 12) #define AVIVO_D1MODE_VIEWPORT_START 0x6580 #define AVIVO_D1MODE_VIEWPORT_SIZE 0x6584 #define AVIVO_D1MODE_EXT_OVERSCAN_LEFT_RIGHT 0x6588 #define AVIVO_D1MODE_EXT_OVERSCAN_TOP_BOTTOM 0x658c #define AVIVO_D1SCL_SCALER_ENABLE 0x6590 #define AVIVO_D1SCL_SCALER_TAP_CONTROL 0x6594 #define AVIVO_D1SCL_UPDATE 0x65cc # define AVIVO_D1SCL_UPDATE_LOCK (1<<16) /* second crtc */ #define AVIVO_D2CRTC_H_TOTAL 0x6800 #define AVIVO_D2CRTC_H_BLANK_START_END 0x6804 #define AVIVO_D2CRTC_H_SYNC_A 0x6808 #define AVIVO_D2CRTC_H_SYNC_A_CNTL 0x680c #define AVIVO_D2CRTC_H_SYNC_B 0x6810 #define AVIVO_D2CRTC_H_SYNC_B_CNTL 0x6814 #define AVIVO_D2CRTC_V_TOTAL 0x6820 #define AVIVO_D2CRTC_V_BLANK_START_END 0x6824 #define AVIVO_D2CRTC_V_SYNC_A 0x6828 #define AVIVO_D2CRTC_V_SYNC_A_CNTL 0x682c #define AVIVO_D2CRTC_V_SYNC_B 0x6830 #define AVIVO_D2CRTC_V_SYNC_B_CNTL 0x6834 #define AVIVO_D2CRTC_CONTROL 0x6880 #define AVIVO_D2CRTC_BLANK_CONTROL 0x6884 #define AVIVO_D2CRTC_INTERLACE_CONTROL 0x6888 #define AVIVO_D2CRTC_INTERLACE_STATUS 0x688c #define AVIVO_D2CRTC_STEREO_CONTROL 0x68c4 #define AVIVO_D2GRPH_ENABLE 0x6900 #define AVIVO_D2GRPH_CONTROL 0x6904 #define AVIVO_D2GRPH_LUT_SEL 0x6908 #define AVIVO_D2GRPH_PRIMARY_SURFACE_ADDRESS 0x6910 #define AVIVO_D2GRPH_SECONDARY_SURFACE_ADDRESS 0x6918 #define AVIVO_D2GRPH_PITCH 0x6920 #define AVIVO_D2GRPH_SURFACE_OFFSET_X 0x6924 #define AVIVO_D2GRPH_SURFACE_OFFSET_Y 0x6928 #define AVIVO_D2GRPH_X_START 0x692c #define AVIVO_D2GRPH_Y_START 0x6930 #define AVIVO_D2GRPH_X_END 0x6934 #define AVIVO_D2GRPH_Y_END 0x6938 #define AVIVO_D2GRPH_UPDATE 0x6944 #define AVIVO_D2GRPH_FLIP_CONTROL 0x6948 #define AVIVO_D2CUR_CONTROL 0x6c00 #define AVIVO_D2CUR_SURFACE_ADDRESS 0x6c08 #define AVIVO_D2CUR_SIZE 0x6c10 #define AVIVO_D2CUR_POSITION 0x6c14 #define RS690_DCP_CONTROL 0x6c9c #define AVIVO_D2MODE_DATA_FORMAT 0x6d28 #define AVIVO_D2MODE_DESKTOP_HEIGHT 0x6d2c #define AVIVO_D2MODE_VIEWPORT_START 0x6d80 #define AVIVO_D2MODE_VIEWPORT_SIZE 0x6d84 #define AVIVO_D2MODE_EXT_OVERSCAN_LEFT_RIGHT 0x6d88 #define AVIVO_D2MODE_EXT_OVERSCAN_TOP_BOTTOM 0x6d8c #define AVIVO_D2SCL_SCALER_ENABLE 0x6d90 #define AVIVO_D2SCL_SCALER_TAP_CONTROL 0x6d94 #define AVIVO_D2SCL_UPDATE 0x6dcc #define AVIVO_DDIA_BIT_DEPTH_CONTROL 0x7214 #define AVIVO_DACA_ENABLE 0x7800 # define AVIVO_DAC_ENABLE (1 << 0) #define AVIVO_DACA_SOURCE_SELECT 0x7804 # define AVIVO_DAC_SOURCE_CRTC1 (0 << 0) # define AVIVO_DAC_SOURCE_CRTC2 (1 << 0) # define AVIVO_DAC_SOURCE_TV (2 << 0) #define AVIVO_DACA_FORCE_OUTPUT_CNTL 0x783c # define AVIVO_DACA_FORCE_OUTPUT_CNTL_FORCE_DATA_EN (1 << 0) # define AVIVO_DACA_FORCE_OUTPUT_CNTL_DATA_SEL_SHIFT (8) # define AVIVO_DACA_FORCE_OUTPUT_CNTL_DATA_SEL_BLUE (1 << 0) # define AVIVO_DACA_FORCE_OUTPUT_CNTL_DATA_SEL_GREEN (1 << 1) # define AVIVO_DACA_FORCE_OUTPUT_CNTL_DATA_SEL_RED (1 << 2) # define AVIVO_DACA_FORCE_OUTPUT_CNTL_DATA_ON_BLANKB_ONLY (1 << 24) #define AVIVO_DACA_POWERDOWN 0x7850 # define AVIVO_DACA_POWERDOWN_POWERDOWN (1 << 0) # define AVIVO_DACA_POWERDOWN_BLUE (1 << 8) # define AVIVO_DACA_POWERDOWN_GREEN (1 << 16) # define AVIVO_DACA_POWERDOWN_RED (1 << 24) #define AVIVO_DACB_ENABLE 0x7a00 #define AVIVO_DACB_SOURCE_SELECT 0x7a04 #define AVIVO_DACB_FORCE_OUTPUT_CNTL 0x7a3c # define AVIVO_DACB_FORCE_OUTPUT_CNTL_FORCE_DATA_EN (1 << 0) # define AVIVO_DACB_FORCE_OUTPUT_CNTL_DATA_SEL_SHIFT (8) # define AVIVO_DACB_FORCE_OUTPUT_CNTL_DATA_SEL_BLUE (1 << 0) # define AVIVO_DACB_FORCE_OUTPUT_CNTL_DATA_SEL_GREEN (1 << 1) # define AVIVO_DACB_FORCE_OUTPUT_CNTL_DATA_SEL_RED (1 << 2) # define AVIVO_DACB_FORCE_OUTPUT_CNTL_DATA_ON_BLANKB_ONLY (1 << 24) #define AVIVO_DACB_POWERDOWN 0x7a50 # define AVIVO_DACB_POWERDOWN_POWERDOWN (1 << 0) # define AVIVO_DACB_POWERDOWN_BLUE (1 << 8) # define AVIVO_DACB_POWERDOWN_GREEN (1 << 16) # define AVIVO_DACB_POWERDOWN_RED #define AVIVO_TMDSA_CNTL 0x7880 # define AVIVO_TMDSA_CNTL_ENABLE (1 << 0) # define AVIVO_TMDSA_CNTL_HPD_MASK (1 << 4) # define AVIVO_TMDSA_CNTL_HPD_SELECT (1 << 8) # define AVIVO_TMDSA_CNTL_SYNC_PHASE (1 << 12) # define AVIVO_TMDSA_CNTL_PIXEL_ENCODING (1 << 16) # define AVIVO_TMDSA_CNTL_DUAL_LINK_ENABLE (1 << 24) # define AVIVO_TMDSA_CNTL_SWAP (1 << 28) #define AVIVO_TMDSA_SOURCE_SELECT 0x7884 /* 78a8 appears to be some kind of (reasonably tolerant) clock? * 78d0 definitely hits the transmitter, definitely clock. */ /* MYSTERY1 This appears to control dithering? */ #define AVIVO_TMDSA_BIT_DEPTH_CONTROL 0x7894 # define AVIVO_TMDS_BIT_DEPTH_CONTROL_TRUNCATE_EN (1 << 0) # define AVIVO_TMDS_BIT_DEPTH_CONTROL_TRUNCATE_DEPTH (1 << 4) # define AVIVO_TMDS_BIT_DEPTH_CONTROL_SPATIAL_DITHER_EN (1 << 8) # define AVIVO_TMDS_BIT_DEPTH_CONTROL_SPATIAL_DITHER_DEPTH (1 << 12) # define AVIVO_TMDS_BIT_DEPTH_CONTROL_TEMPORAL_DITHER_EN (1 << 16) # define AVIVO_TMDS_BIT_DEPTH_CONTROL_TEMPORAL_DITHER_DEPTH (1 << 20) # define AVIVO_TMDS_BIT_DEPTH_CONTROL_TEMPORAL_LEVEL (1 << 24) # define AVIVO_TMDS_BIT_DEPTH_CONTROL_TEMPORAL_DITHER_RESET (1 << 26) #define AVIVO_TMDSA_DCBALANCER_CONTROL 0x78d0 # define AVIVO_TMDSA_DCBALANCER_CONTROL_EN (1 << 0) # define AVIVO_TMDSA_DCBALANCER_CONTROL_TEST_EN (1 << 8) # define AVIVO_TMDSA_DCBALANCER_CONTROL_TEST_IN_SHIFT (16) # define AVIVO_TMDSA_DCBALANCER_CONTROL_FORCE (1 << 24) #define AVIVO_TMDSA_DATA_SYNCHRONIZATION 0x78d8 # define AVIVO_TMDSA_DATA_SYNCHRONIZATION_DSYNSEL (1 << 0) # define AVIVO_TMDSA_DATA_SYNCHRONIZATION_PFREQCHG (1 << 8) #define AVIVO_TMDSA_CLOCK_ENABLE 0x7900 #define AVIVO_TMDSA_TRANSMITTER_ENABLE 0x7904 # define AVIVO_TMDSA_TRANSMITTER_ENABLE_TX0_ENABLE (1 << 0) # define AVIVO_TMDSA_TRANSMITTER_ENABLE_LNKC0EN (1 << 1) # define AVIVO_TMDSA_TRANSMITTER_ENABLE_LNKD00EN (1 << 2) # define AVIVO_TMDSA_TRANSMITTER_ENABLE_LNKD01EN (1 << 3) # define AVIVO_TMDSA_TRANSMITTER_ENABLE_LNKD02EN (1 << 4) # define AVIVO_TMDSA_TRANSMITTER_ENABLE_TX1_ENABLE (1 << 8) # define AVIVO_TMDSA_TRANSMITTER_ENABLE_LNKD10EN (1 << 10) # define AVIVO_TMDSA_TRANSMITTER_ENABLE_LNKD11EN (1 << 11) # define AVIVO_TMDSA_TRANSMITTER_ENABLE_LNKD12EN (1 << 12) # define AVIVO_TMDSA_TRANSMITTER_ENABLE_TX_ENABLE_HPD_MASK (1 << 16) # define AVIVO_TMDSA_TRANSMITTER_ENABLE_LNKCEN_HPD_MASK (1 << 17) # define AVIVO_TMDSA_TRANSMITTER_ENABLE_LNKDEN_HPD_MASK (1 << 18) #define AVIVO_TMDSA_TRANSMITTER_CONTROL 0x7910 # define AVIVO_TMDSA_TRANSMITTER_CONTROL_PLL_ENABLE (1 << 0) # define AVIVO_TMDSA_TRANSMITTER_CONTROL_PLL_RESET (1 << 1) # define AVIVO_TMDSA_TRANSMITTER_CONTROL_PLL_HPD_MASK_SHIFT (2) # define AVIVO_TMDSA_TRANSMITTER_CONTROL_IDSCKSEL (1 << 4) # define AVIVO_TMDSA_TRANSMITTER_CONTROL_BGSLEEP (1 << 5) # define AVIVO_TMDSA_TRANSMITTER_CONTROL_PLL_PWRUP_SEQ_EN (1 << 6) # define AVIVO_TMDSA_TRANSMITTER_CONTROL_TMCLK (1 << 8) # define AVIVO_TMDSA_TRANSMITTER_CONTROL_TMCLK_FROM_PADS (1 << 13) # define AVIVO_TMDSA_TRANSMITTER_CONTROL_TDCLK (1 << 14) # define AVIVO_TMDSA_TRANSMITTER_CONTROL_TDCLK_FROM_PADS (1 << 15) # define AVIVO_TMDSA_TRANSMITTER_CONTROL_CLK_PATTERN_SHIFT (16) # define AVIVO_TMDSA_TRANSMITTER_CONTROL_BYPASS_PLL (1 << 28) # define AVIVO_TMDSA_TRANSMITTER_CONTROL_USE_CLK_DATA (1 << 29) # define AVIVO_TMDSA_TRANSMITTER_CONTROL_INPUT_TEST_CLK_SEL (1 << 31) #define AVIVO_LVTMA_CNTL 0x7a80 # define AVIVO_LVTMA_CNTL_ENABLE (1 << 0) # define AVIVO_LVTMA_CNTL_HPD_MASK (1 << 4) # define AVIVO_LVTMA_CNTL_HPD_SELECT (1 << 8) # define AVIVO_LVTMA_CNTL_SYNC_PHASE (1 << 12) # define AVIVO_LVTMA_CNTL_PIXEL_ENCODING (1 << 16) # define AVIVO_LVTMA_CNTL_DUAL_LINK_ENABLE (1 << 24) # define AVIVO_LVTMA_CNTL_SWAP (1 << 28) #define AVIVO_LVTMA_SOURCE_SELECT 0x7a84 #define AVIVO_LVTMA_COLOR_FORMAT 0x7a88 #define AVIVO_LVTMA_BIT_DEPTH_CONTROL 0x7a94 # define AVIVO_LVTMA_BIT_DEPTH_CONTROL_TRUNCATE_EN (1 << 0) # define AVIVO_LVTMA_BIT_DEPTH_CONTROL_TRUNCATE_DEPTH (1 << 4) # define AVIVO_LVTMA_BIT_DEPTH_CONTROL_SPATIAL_DITHER_EN (1 << 8) # define AVIVO_LVTMA_BIT_DEPTH_CONTROL_SPATIAL_DITHER_DEPTH (1 << 12) # define AVIVO_LVTMA_BIT_DEPTH_CONTROL_TEMPORAL_DITHER_EN (1 << 16) # define AVIVO_LVTMA_BIT_DEPTH_CONTROL_TEMPORAL_DITHER_DEPTH (1 << 20) # define AVIVO_LVTMA_BIT_DEPTH_CONTROL_TEMPORAL_LEVEL (1 << 24) # define AVIVO_LVTMA_BIT_DEPTH_CONTROL_TEMPORAL_DITHER_RESET (1 << 26) #define AVIVO_LVTMA_DCBALANCER_CONTROL 0x7ad0 # define AVIVO_LVTMA_DCBALANCER_CONTROL_EN (1 << 0) # define AVIVO_LVTMA_DCBALANCER_CONTROL_TEST_EN (1 << 8) # define AVIVO_LVTMA_DCBALANCER_CONTROL_TEST_IN_SHIFT (16) # define AVIVO_LVTMA_DCBALANCER_CONTROL_FORCE (1 << 24) #define AVIVO_LVTMA_DATA_SYNCHRONIZATION 0x78d8 # define AVIVO_LVTMA_DATA_SYNCHRONIZATION_DSYNSEL (1 << 0) # define AVIVO_LVTMA_DATA_SYNCHRONIZATION_PFREQCHG (1 << 8) #define R500_LVTMA_CLOCK_ENABLE 0x7b00 #define R600_LVTMA_CLOCK_ENABLE 0x7b04 #define R500_LVTMA_TRANSMITTER_ENABLE 0x7b04 #define R600_LVTMA_TRANSMITTER_ENABLE 0x7b08 # define AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKC0EN (1 << 1) # define AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKD00EN (1 << 2) # define AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKD01EN (1 << 3) # define AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKD02EN (1 << 4) # define AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKD03EN (1 << 5) # define AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKC1EN (1 << 9) # define AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKD10EN (1 << 10) # define AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKD11EN (1 << 11) # define AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKD12EN (1 << 12) # define AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKCEN_HPD_MASK (1 << 17) # define AVIVO_LVTMA_TRANSMITTER_ENABLE_LNKDEN_HPD_MASK (1 << 18) #define R500_LVTMA_TRANSMITTER_CONTROL 0x7b10 #define R600_LVTMA_TRANSMITTER_CONTROL 0x7b14 # define AVIVO_LVTMA_TRANSMITTER_CONTROL_PLL_ENABLE (1 << 0) # define AVIVO_LVTMA_TRANSMITTER_CONTROL_PLL_RESET (1 << 1) # define AVIVO_LVTMA_TRANSMITTER_CONTROL_PLL_HPD_MASK_SHIFT (2) # define AVIVO_LVTMA_TRANSMITTER_CONTROL_IDSCKSEL (1 << 4) # define AVIVO_LVTMA_TRANSMITTER_CONTROL_BGSLEEP (1 << 5) # define AVIVO_LVTMA_TRANSMITTER_CONTROL_PLL_PWRUP_SEQ_EN (1 << 6) # define AVIVO_LVTMA_TRANSMITTER_CONTROL_TMCLK (1 << 8) # define AVIVO_LVTMA_TRANSMITTER_CONTROL_TMCLK_FROM_PADS (1 << 13) # define AVIVO_LVTMA_TRANSMITTER_CONTROL_TDCLK (1 << 14) # define AVIVO_LVTMA_TRANSMITTER_CONTROL_TDCLK_FROM_PADS (1 << 15) # define AVIVO_LVTMA_TRANSMITTER_CONTROL_CLK_PATTERN_SHIFT (16) # define AVIVO_LVTMA_TRANSMITTER_CONTROL_BYPASS_PLL (1 << 28) # define AVIVO_LVTMA_TRANSMITTER_CONTROL_USE_CLK_DATA (1 << 29) # define AVIVO_LVTMA_TRANSMITTER_CONTROL_INPUT_TEST_CLK_SEL (1 << 31) #define R500_LVTMA_PWRSEQ_CNTL 0x7af0 #define R600_LVTMA_PWRSEQ_CNTL 0x7af4 # define AVIVO_LVTMA_PWRSEQ_EN (1 << 0) # define AVIVO_LVTMA_PWRSEQ_PLL_ENABLE_MASK (1 << 2) # define AVIVO_LVTMA_PWRSEQ_PLL_RESET_MASK (1 << 3) # define AVIVO_LVTMA_PWRSEQ_TARGET_STATE (1 << 4) # define AVIVO_LVTMA_SYNCEN (1 << 8) # define AVIVO_LVTMA_SYNCEN_OVRD (1 << 9) # define AVIVO_LVTMA_SYNCEN_POL (1 << 10) # define AVIVO_LVTMA_DIGON (1 << 16) # define AVIVO_LVTMA_DIGON_OVRD (1 << 17) # define AVIVO_LVTMA_DIGON_POL (1 << 18) # define AVIVO_LVTMA_BLON (1 << 24) # define AVIVO_LVTMA_BLON_OVRD (1 << 25) # define AVIVO_LVTMA_BLON_POL (1 << 26) #define R500_LVTMA_PWRSEQ_STATE 0x7af4 #define R600_LVTMA_PWRSEQ_STATE 0x7af8 # define AVIVO_LVTMA_PWRSEQ_STATE_TARGET_STATE_R (1 << 0) # define AVIVO_LVTMA_PWRSEQ_STATE_DIGON (1 << 1) # define AVIVO_LVTMA_PWRSEQ_STATE_SYNCEN (1 << 2) # define AVIVO_LVTMA_PWRSEQ_STATE_BLON (1 << 3) # define AVIVO_LVTMA_PWRSEQ_STATE_DONE (1 << 4) # define AVIVO_LVTMA_PWRSEQ_STATE_STATUS_SHIFT (8) #define AVIVO_LVDS_BACKLIGHT_CNTL 0x7af8 # define AVIVO_LVDS_BACKLIGHT_CNTL_EN (1 << 0) # define AVIVO_LVDS_BACKLIGHT_LEVEL_MASK 0x0000ff00 # define AVIVO_LVDS_BACKLIGHT_LEVEL_SHIFT 8 #define AVIVO_DVOA_BIT_DEPTH_CONTROL 0x7988 #define AVIVO_GPIO_0 0x7e30 #define AVIVO_GPIO_1 0x7e40 #define AVIVO_GPIO_2 0x7e50 #define AVIVO_GPIO_3 0x7e60 #define AVIVO_DC_GPIO_HPD_MASK 0x7e90 #define AVIVO_DC_GPIO_HPD_A 0x7e94 #define AVIVO_DC_GPIO_HPD_EN 0x7e98 #define AVIVO_DC_GPIO_HPD_Y 0x7e9c #define AVIVO_I2C_STATUS 0x7d30 # define AVIVO_I2C_STATUS_DONE (1 << 0) # define AVIVO_I2C_STATUS_NACK (1 << 1) # define AVIVO_I2C_STATUS_HALT (1 << 2) # define AVIVO_I2C_STATUS_GO (1 << 3) # define AVIVO_I2C_STATUS_MASK 0x7 /* If radeon_mm_i2c is to be believed, this is HALT, NACK, and maybe * DONE? */ # define AVIVO_I2C_STATUS_CMD_RESET 0x7 # define AVIVO_I2C_STATUS_CMD_WAIT (1 << 3) #define AVIVO_I2C_STOP 0x7d34 #define AVIVO_I2C_START_CNTL 0x7d38 # define AVIVO_I2C_START (1 << 8) # define AVIVO_I2C_CONNECTOR0 (0 << 16) # define AVIVO_I2C_CONNECTOR1 (1 << 16) #define R520_I2C_START (1<<0) #define R520_I2C_STOP (1<<1) #define R520_I2C_RX (1<<2) #define R520_I2C_EN (1<<8) #define R520_I2C_DDC1 (0<<16) #define R520_I2C_DDC2 (1<<16) #define R520_I2C_DDC3 (2<<16) #define R520_I2C_DDC_MASK (3<<16) #define AVIVO_I2C_CONTROL2 0x7d3c # define AVIVO_I2C_7D3C_SIZE_SHIFT 8 # define AVIVO_I2C_7D3C_SIZE_MASK (0xf << 8) #define AVIVO_I2C_CONTROL3 0x7d40 /* Reading is done 4 bytes at a time: read the bottom 8 bits from * 7d44, four times in a row. * Writing is a little more complex. First write DATA with * 0xnnnnnnzz, then 0xnnnnnnyy, where nnnnnn is some non-deterministic * magic number, zz is, I think, the slave address, and yy is the byte * you want to write. */ #define AVIVO_I2C_DATA 0x7d44 #define R520_I2C_ADDR_COUNT_MASK (0x7) #define R520_I2C_DATA_COUNT_SHIFT (8) #define R520_I2C_DATA_COUNT_MASK (0xF00) #define AVIVO_I2C_CNTL 0x7d50 # define AVIVO_I2C_EN (1 << 0) # define AVIVO_I2C_RESET (1 << 8) #define R600_GENERAL_PWRMGT 0x618 # define R600_OPEN_DRAIN_PADS (1 << 11) #define R600_LOWER_GPIO_ENABLE 0x710 #define R600_CTXSW_VID_LOWER_GPIO_CNTL 0x718 #define R600_HIGH_VID_LOWER_GPIO_CNTL 0x71c #define R600_MEDIUM_VID_LOWER_GPIO_CNTL 0x720 #define R600_LOW_VID_LOWER_GPIO_CNTL 0x724 #define R600_MC_VM_FB_LOCATION 0x2180 #define R600_MC_VM_AGP_TOP 0x2184 #define R600_MC_VM_AGP_BOT 0x2188 #define R600_MC_VM_AGP_BASE 0x218c #define R600_MC_VM_SYSTEM_APERTURE_LOW_ADDR 0x2190 #define R600_MC_VM_SYSTEM_APERTURE_HIGH_ADDR 0x2194 #define R600_MC_VM_SYSTEM_APERTURE_DEFAULT_ADDR 0x2198 #define R700_MC_VM_FB_LOCATION 0x2024 #define R700_MC_VM_AGP_TOP 0x2028 #define R700_MC_VM_AGP_BOT 0x202c #define R700_MC_VM_AGP_BASE 0x2030 #define R600_HDP_NONSURFACE_BASE 0x2c04 #define R600_BUS_CNTL 0x5420 #define R600_CONFIG_CNTL 0x5424 #define R600_CONFIG_MEMSIZE 0x5428 #define R600_CONFIG_F0_BASE 0x542C #define R600_CONFIG_APER_SIZE 0x5430 #define R600_ROM_CNTL 0x1600 # define R600_SCK_OVERWRITE (1 << 1) # define R600_SCK_PRESCALE_CRYSTAL_CLK_SHIFT 28 # define R600_SCK_PRESCALE_CRYSTAL_CLK_MASK (0xf << 28) #define R600_CG_SPLL_FUNC_CNTL 0x600 # define R600_SPLL_BYPASS_EN (1 << 3) #define R600_CG_SPLL_STATUS 0x60c # define R600_SPLL_CHG_STATUS (1 << 1) #define R600_BIOS_0_SCRATCH 0x1724 #define R600_BIOS_1_SCRATCH 0x1728 #define R600_BIOS_2_SCRATCH 0x172c #define R600_BIOS_3_SCRATCH 0x1730 #define R600_BIOS_4_SCRATCH 0x1734 #define R600_BIOS_5_SCRATCH 0x1738 #define R600_BIOS_6_SCRATCH 0x173c #define R600_BIOS_7_SCRATCH 0x1740 /* evergreen */ #define EVERGREEN_VGA_MEMORY_BASE_ADDRESS 0x310 #define EVERGREEN_VGA_MEMORY_BASE_ADDRESS_HIGH 0x324 #define EVERGREEN_D3VGA_CONTROL 0x3e0 #define EVERGREEN_D4VGA_CONTROL 0x3e4 #define EVERGREEN_D5VGA_CONTROL 0x3e8 #define EVERGREEN_D6VGA_CONTROL 0x3ec #define EVERGREEN_P1PLL_SS_CNTL 0x414 #define EVERGREEN_P2PLL_SS_CNTL 0x454 # define EVERGREEN_PxPLL_SS_EN (1 << 12) /* GRPH blocks at 0x6800, 0x7400, 0x10000, 0x10c00, 0x11800, 0x12400 */ #define EVERGREEN_GRPH_ENABLE 0x6800 #define EVERGREEN_GRPH_CONTROL 0x6804 # define EVERGREEN_GRPH_DEPTH(x) (((x) & 0x3) << 0) # define EVERGREEN_GRPH_DEPTH_8BPP 0 # define EVERGREEN_GRPH_DEPTH_16BPP 1 # define EVERGREEN_GRPH_DEPTH_32BPP 2 # define EVERGREEN_GRPH_FORMAT(x) (((x) & 0x7) << 8) /* 8 BPP */ # define EVERGREEN_GRPH_FORMAT_INDEXED 0 /* 16 BPP */ # define EVERGREEN_GRPH_FORMAT_ARGB1555 0 # define EVERGREEN_GRPH_FORMAT_ARGB565 1 # define EVERGREEN_GRPH_FORMAT_ARGB4444 2 # define EVERGREEN_GRPH_FORMAT_AI88 3 # define EVERGREEN_GRPH_FORMAT_MONO16 4 # define EVERGREEN_GRPH_FORMAT_BGRA5551 5 /* 32 BPP */ # define EVERGREEN_GRPH_FORMAT_ARGB8888 0 # define EVERGREEN_GRPH_FORMAT_ARGB2101010 1 # define EVERGREEN_GRPH_FORMAT_32BPP_DIG 2 # define EVERGREEN_GRPH_FORMAT_8B_ARGB2101010 3 # define EVERGREEN_GRPH_FORMAT_BGRA1010102 4 # define EVERGREEN_GRPH_FORMAT_8B_BGRA1010102 5 # define EVERGREEN_GRPH_FORMAT_RGB111110 6 # define EVERGREEN_GRPH_FORMAT_BGR101111 7 #define EVERGREEN_GRPH_SWAP_CONTROL 0x680c # define EVERGREEN_GRPH_ENDIAN_SWAP(x) (((x) & 0x3) << 0) # define EVERGREEN_GRPH_ENDIAN_NONE 0 # define EVERGREEN_GRPH_ENDIAN_8IN16 1 # define EVERGREEN_GRPH_ENDIAN_8IN32 2 # define EVERGREEN_GRPH_ENDIAN_8IN64 3 # define EVERGREEN_GRPH_RED_CROSSBAR(x) (((x) & 0x3) << 4) # define EVERGREEN_GRPH_RED_SEL_R 0 # define EVERGREEN_GRPH_RED_SEL_G 1 # define EVERGREEN_GRPH_RED_SEL_B 2 # define EVERGREEN_GRPH_RED_SEL_A 3 # define EVERGREEN_GRPH_GREEN_CROSSBAR(x) (((x) & 0x3) << 6) # define EVERGREEN_GRPH_GREEN_SEL_G 0 # define EVERGREEN_GRPH_GREEN_SEL_B 1 # define EVERGREEN_GRPH_GREEN_SEL_A 2 # define EVERGREEN_GRPH_GREEN_SEL_R 3 # define EVERGREEN_GRPH_BLUE_CROSSBAR(x) (((x) & 0x3) << 8) # define EVERGREEN_GRPH_BLUE_SEL_B 0 # define EVERGREEN_GRPH_BLUE_SEL_A 1 # define EVERGREEN_GRPH_BLUE_SEL_R 2 # define EVERGREEN_GRPH_BLUE_SEL_G 3 # define EVERGREEN_GRPH_ALPHA_CROSSBAR(x) (((x) & 0x3) << 10) # define EVERGREEN_GRPH_ALPHA_SEL_A 0 # define EVERGREEN_GRPH_ALPHA_SEL_R 1 # define EVERGREEN_GRPH_ALPHA_SEL_G 2 # define EVERGREEN_GRPH_ALPHA_SEL_B 3 #define EVERGREEN_GRPH_PRIMARY_SURFACE_ADDRESS 0x6810 #define EVERGREEN_GRPH_SECONDARY_SURFACE_ADDRESS 0x6814 # define EVERGREEN_GRPH_DFQ_ENABLE (1 << 0) # define EVERGREEN_GRPH_SURFACE_ADDRESS_MASK 0xffffff00 #define EVERGREEN_GRPH_PITCH 0x6818 #define EVERGREEN_GRPH_PRIMARY_SURFACE_ADDRESS_HIGH 0x681c #define EVERGREEN_GRPH_SECONDARY_SURFACE_ADDRESS_HIGH 0x6820 #define EVERGREEN_GRPH_SURFACE_OFFSET_X 0x6824 #define EVERGREEN_GRPH_SURFACE_OFFSET_Y 0x6828 #define EVERGREEN_GRPH_X_START 0x682c #define EVERGREEN_GRPH_Y_START 0x6830 #define EVERGREEN_GRPH_X_END 0x6834 #define EVERGREEN_GRPH_Y_END 0x6838 /* CUR blocks at 0x6998, 0x7598, 0x10198, 0x10d98, 0x11998, 0x12598 */ #define EVERGREEN_CUR_CONTROL 0x6998 # define EVERGREEN_CURSOR_EN (1 << 0) # define EVERGREEN_CURSOR_MODE(x) (((x) & 0x3) << 8) # define EVERGREEN_CURSOR_MONO 0 # define EVERGREEN_CURSOR_24_1 1 # define EVERGREEN_CURSOR_24_8_PRE_MULT 2 # define EVERGREEN_CURSOR_24_8_UNPRE_MULT 3 # define EVERGREEN_CURSOR_2X_MAGNIFY (1 << 16) # define EVERGREEN_CURSOR_FORCE_MC_ON (1 << 20) # define EVERGREEN_CURSOR_URGENT_CONTROL(x) (((x) & 0x7) << 24) # define EVERGREEN_CURSOR_URGENT_ALWAYS 0 # define EVERGREEN_CURSOR_URGENT_1_8 1 # define EVERGREEN_CURSOR_URGENT_1_4 2 # define EVERGREEN_CURSOR_URGENT_3_8 3 # define EVERGREEN_CURSOR_URGENT_1_2 4 #define EVERGREEN_CUR_SURFACE_ADDRESS 0x699c # define EVERGREEN_CUR_SURFACE_ADDRESS_MASK 0xfffff000 #define EVERGREEN_CUR_SIZE 0x69a0 #define EVERGREEN_CUR_SURFACE_ADDRESS_HIGH 0x69a4 #define EVERGREEN_CUR_POSITION 0x69a8 #define EVERGREEN_CUR_HOT_SPOT 0x69ac #define EVERGREEN_CUR_COLOR1 0x69b0 #define EVERGREEN_CUR_COLOR2 0x69b4 #define EVERGREEN_CUR_UPDATE 0x69b8 # define EVERGREEN_CURSOR_UPDATE_PENDING (1 << 0) # define EVERGREEN_CURSOR_UPDATE_TAKEN (1 << 1) # define EVERGREEN_CURSOR_UPDATE_LOCK (1 << 16) # define EVERGREEN_CURSOR_DISABLE_MULTIPLE_UPDATE (1 << 24) /* LUT blocks at 0x69e0, 0x75e0, 0x101e0, 0x10de0, 0x119e0, 0x125e0 */ #define EVERGREEN_DC_LUT_RW_MODE 0x69e0 #define EVERGREEN_DC_LUT_RW_INDEX 0x69e4 #define EVERGREEN_DC_LUT_SEQ_COLOR 0x69e8 #define EVERGREEN_DC_LUT_PWL_DATA 0x69ec #define EVERGREEN_DC_LUT_30_COLOR 0x69f0 #define EVERGREEN_DC_LUT_VGA_ACCESS_ENABLE 0x69f4 #define EVERGREEN_DC_LUT_WRITE_EN_MASK 0x69f8 #define EVERGREEN_DC_LUT_AUTOFILL 0x69fc #define EVERGREEN_DC_LUT_CONTROL 0x6a00 #define EVERGREEN_DC_LUT_BLACK_OFFSET_BLUE 0x6a04 #define EVERGREEN_DC_LUT_BLACK_OFFSET_GREEN 0x6a08 #define EVERGREEN_DC_LUT_BLACK_OFFSET_RED 0x6a0c #define EVERGREEN_DC_LUT_WHITE_OFFSET_BLUE 0x6a10 #define EVERGREEN_DC_LUT_WHITE_OFFSET_GREEN 0x6a14 #define EVERGREEN_DC_LUT_WHITE_OFFSET_RED 0x6a18 #define EVERGREEN_DATA_FORMAT 0x6b00 # define EVERGREEN_INTERLEAVE_EN (1 << 0) #define EVERGREEN_DESKTOP_HEIGHT 0x6b04 #define EVERGREEN_VLINE_START_END 0x6b08 # define EVERGREEN_VLINE_START_SHIFT 0 # define EVERGREEN_VLINE_END_SHIFT 16 # define EVERGREEN_VLINE_INV (1 << 31) #define EVERGREEN_VLINE_STATUS 0x6bb8 # define EVERGREEN_VLINE_STAT (1 << 12) #define EVERGREEN_VIEWPORT_START 0x6d70 #define EVERGREEN_VIEWPORT_SIZE 0x6d74 /* display controller offsets used for crtc/cur/lut/grph/viewport/etc. */ #define EVERGREEN_CRTC0_REGISTER_OFFSET (0x6df0 - 0x6df0) #define EVERGREEN_CRTC1_REGISTER_OFFSET (0x79f0 - 0x6df0) #define EVERGREEN_CRTC2_REGISTER_OFFSET (0x105f0 - 0x6df0) #define EVERGREEN_CRTC3_REGISTER_OFFSET (0x111f0 - 0x6df0) #define EVERGREEN_CRTC4_REGISTER_OFFSET (0x11df0 - 0x6df0) #define EVERGREEN_CRTC5_REGISTER_OFFSET (0x129f0 - 0x6df0) /* CRTC blocks at 0x6df0, 0x79f0, 0x105f0, 0x111f0, 0x11df0, 0x129f0 */ #define EVERGREEN_CRTC_CONTROL 0x6e70 # define EVERGREEN_CRTC_MASTER_EN (1 << 0) #define EVERGREEN_CRTC_UPDATE_LOCK 0x6ed4 #define EVERGREEN_DC_GPIO_HPD_MASK 0x64b0 #define EVERGREEN_DC_GPIO_HPD_A 0x64b4 #define EVERGREEN_DC_GPIO_HPD_EN 0x64b8 #define EVERGREEN_DC_GPIO_HPD_Y 0x64bc #define R300_GB_TILE_CONFIG 0x4018 # define R300_ENABLE_TILING (1 << 0) # define R300_PIPE_COUNT_RV350 (0 << 1) # define R300_PIPE_COUNT_R300 (3 << 1) # define R300_PIPE_COUNT_R420_3P (6 << 1) # define R300_PIPE_COUNT_R420 (7 << 1) # define R300_TILE_SIZE_8 (0 << 4) # define R300_TILE_SIZE_16 (1 << 4) # define R300_TILE_SIZE_32 (2 << 4) # define R300_SUBPIXEL_1_12 (0 << 16) # define R300_SUBPIXEL_1_16 (1 << 16) #define R300_GB_SELECT 0x401c #define R300_GB_ENABLE 0x4008 #define R300_GB_AA_CONFIG 0x4020 #define R400_GB_PIPE_SELECT 0x402c #define R300_GB_MSPOS0 0x4010 # define R300_MS_X0_SHIFT 0 # define R300_MS_Y0_SHIFT 4 # define R300_MS_X1_SHIFT 8 # define R300_MS_Y1_SHIFT 12 # define R300_MS_X2_SHIFT 16 # define R300_MS_Y2_SHIFT 20 # define R300_MSBD0_Y_SHIFT 24 # define R300_MSBD0_X_SHIFT 28 #define R300_GB_MSPOS1 0x4014 # define R300_MS_X3_SHIFT 0 # define R300_MS_Y3_SHIFT 4 # define R300_MS_X4_SHIFT 8 # define R300_MS_Y4_SHIFT 12 # define R300_MS_X5_SHIFT 16 # define R300_MS_Y5_SHIFT 20 # define R300_MSBD1_SHIFT 24 #define R300_GA_ENHANCE 0x4274 # define R300_GA_DEADLOCK_CNTL (1 << 0) # define R300_GA_FASTSYNC_CNTL (1 << 1) #define R300_GA_POLY_MODE 0x4288 # define R300_FRONT_PTYPE_POINT (0 << 4) # define R300_FRONT_PTYPE_LINE (1 << 4) # define R300_FRONT_PTYPE_TRIANGE (2 << 4) # define R300_BACK_PTYPE_POINT (0 << 7) # define R300_BACK_PTYPE_LINE (1 << 7) # define R300_BACK_PTYPE_TRIANGE (2 << 7) #define R300_GA_ROUND_MODE 0x428c # define R300_GEOMETRY_ROUND_TRUNC (0 << 0) # define R300_GEOMETRY_ROUND_NEAREST (1 << 0) # define R300_COLOR_ROUND_TRUNC (0 << 2) # define R300_COLOR_ROUND_NEAREST (1 << 2) #define R300_GA_COLOR_CONTROL 0x4278 # define R300_RGB0_SHADING_SOLID (0 << 0) # define R300_RGB0_SHADING_FLAT (1 << 0) # define R300_RGB0_SHADING_GOURAUD (2 << 0) # define R300_ALPHA0_SHADING_SOLID (0 << 2) # define R300_ALPHA0_SHADING_FLAT (1 << 2) # define R300_ALPHA0_SHADING_GOURAUD (2 << 2) # define R300_RGB1_SHADING_SOLID (0 << 4) # define R300_RGB1_SHADING_FLAT (1 << 4) # define R300_RGB1_SHADING_GOURAUD (2 << 4) # define R300_ALPHA1_SHADING_SOLID (0 << 6) # define R300_ALPHA1_SHADING_FLAT (1 << 6) # define R300_ALPHA1_SHADING_GOURAUD (2 << 6) # define R300_RGB2_SHADING_SOLID (0 << 8) # define R300_RGB2_SHADING_FLAT (1 << 8) # define R300_RGB2_SHADING_GOURAUD (2 << 8) # define R300_ALPHA2_SHADING_SOLID (0 << 10) # define R300_ALPHA2_SHADING_FLAT (1 << 10) # define R300_ALPHA2_SHADING_GOURAUD (2 << 10) # define R300_RGB3_SHADING_SOLID (0 << 12) # define R300_RGB3_SHADING_FLAT (1 << 12) # define R300_RGB3_SHADING_GOURAUD (2 << 12) # define R300_ALPHA3_SHADING_SOLID (0 << 14) # define R300_ALPHA3_SHADING_FLAT (1 << 14) # define R300_ALPHA3_SHADING_GOURAUD (2 << 14) #define R300_GA_OFFSET 0x4290 #define R500_SU_REG_DEST 0x42c8 #define R300_VAP_CNTL_STATUS 0x2140 # define R300_PVS_BYPASS (1 << 8) #define R300_VAP_PVS_STATE_FLUSH_REG 0x2284 #define R300_VAP_CNTL 0x2080 # define R300_PVS_NUM_SLOTS_SHIFT 0 # define R300_PVS_NUM_CNTLRS_SHIFT 4 # define R300_PVS_NUM_FPUS_SHIFT 8 # define R300_VF_MAX_VTX_NUM_SHIFT 18 # define R300_GL_CLIP_SPACE_DEF (0 << 22) # define R300_DX_CLIP_SPACE_DEF (1 << 22) # define R500_TCL_STATE_OPTIMIZATION (1 << 23) #define R300_VAP_VTE_CNTL 0x20B0 # define R300_VPORT_X_SCALE_ENA (1 << 0) # define R300_VPORT_X_OFFSET_ENA (1 << 1) # define R300_VPORT_Y_SCALE_ENA (1 << 2) # define R300_VPORT_Y_OFFSET_ENA (1 << 3) # define R300_VPORT_Z_SCALE_ENA (1 << 4) # define R300_VPORT_Z_OFFSET_ENA (1 << 5) # define R300_VTX_XY_FMT (1 << 8) # define R300_VTX_Z_FMT (1 << 9) # define R300_VTX_W0_FMT (1 << 10) #define R300_VAP_VTX_STATE_CNTL 0x2180 #define R300_VAP_PSC_SGN_NORM_CNTL 0x21DC #define R300_VAP_PROG_STREAM_CNTL_0 0x2150 # define R300_DATA_TYPE_0_SHIFT 0 # define R300_DATA_TYPE_FLOAT_1 0 # define R300_DATA_TYPE_FLOAT_2 1 # define R300_DATA_TYPE_FLOAT_3 2 # define R300_DATA_TYPE_FLOAT_4 3 # define R300_DATA_TYPE_BYTE 4 # define R300_DATA_TYPE_D3DCOLOR 5 # define R300_DATA_TYPE_SHORT_2 6 # define R300_DATA_TYPE_SHORT_4 7 # define R300_DATA_TYPE_VECTOR_3_TTT 8 # define R300_DATA_TYPE_VECTOR_3_EET 9 # define R300_SKIP_DWORDS_0_SHIFT 4 # define R300_DST_VEC_LOC_0_SHIFT 8 # define R300_LAST_VEC_0 (1 << 13) # define R300_SIGNED_0 (1 << 14) # define R300_NORMALIZE_0 (1 << 15) # define R300_DATA_TYPE_1_SHIFT 16 # define R300_SKIP_DWORDS_1_SHIFT 20 # define R300_DST_VEC_LOC_1_SHIFT 24 # define R300_LAST_VEC_1 (1 << 29) # define R300_SIGNED_1 (1 << 30) # define R300_NORMALIZE_1 (1 << 31) #define R300_VAP_PROG_STREAM_CNTL_1 0x2154 # define R300_DATA_TYPE_2_SHIFT 0 # define R300_SKIP_DWORDS_2_SHIFT 4 # define R300_DST_VEC_LOC_2_SHIFT 8 # define R300_LAST_VEC_2 (1 << 13) # define R300_SIGNED_2 (1 << 14) # define R300_NORMALIZE_2 (1 << 15) # define R300_DATA_TYPE_3_SHIFT 16 # define R300_SKIP_DWORDS_3_SHIFT 20 # define R300_DST_VEC_LOC_3_SHIFT 24 # define R300_LAST_VEC_3 (1 << 29) # define R300_SIGNED_3 (1 << 30) # define R300_NORMALIZE_3 (1 << 31) #define R300_VAP_PROG_STREAM_CNTL_EXT_0 0x21e0 # define R300_SWIZZLE_SELECT_X_0_SHIFT 0 # define R300_SWIZZLE_SELECT_Y_0_SHIFT 3 # define R300_SWIZZLE_SELECT_Z_0_SHIFT 6 # define R300_SWIZZLE_SELECT_W_0_SHIFT 9 # define R300_SWIZZLE_SELECT_X 0 # define R300_SWIZZLE_SELECT_Y 1 # define R300_SWIZZLE_SELECT_Z 2 # define R300_SWIZZLE_SELECT_W 3 # define R300_SWIZZLE_SELECT_FP_ZERO 4 # define R300_SWIZZLE_SELECT_FP_ONE 5 # define R300_WRITE_ENA_0_SHIFT 12 # define R300_WRITE_ENA_X 1 # define R300_WRITE_ENA_Y 2 # define R300_WRITE_ENA_Z 4 # define R300_WRITE_ENA_W 8 # define R300_SWIZZLE_SELECT_X_1_SHIFT 16 # define R300_SWIZZLE_SELECT_Y_1_SHIFT 19 # define R300_SWIZZLE_SELECT_Z_1_SHIFT 22 # define R300_SWIZZLE_SELECT_W_1_SHIFT 25 # define R300_WRITE_ENA_1_SHIFT 28 #define R300_VAP_PROG_STREAM_CNTL_EXT_1 0x21e4 # define R300_SWIZZLE_SELECT_X_2_SHIFT 0 # define R300_SWIZZLE_SELECT_Y_2_SHIFT 3 # define R300_SWIZZLE_SELECT_Z_2_SHIFT 6 # define R300_SWIZZLE_SELECT_W_2_SHIFT 9 # define R300_WRITE_ENA_2_SHIFT 12 # define R300_SWIZZLE_SELECT_X_3_SHIFT 16 # define R300_SWIZZLE_SELECT_Y_3_SHIFT 19 # define R300_SWIZZLE_SELECT_Z_3_SHIFT 22 # define R300_SWIZZLE_SELECT_W_3_SHIFT 25 # define R300_WRITE_ENA_3_SHIFT 28 #define R300_VAP_PVS_CODE_CNTL_0 0x22D0 # define R300_PVS_FIRST_INST_SHIFT 0 # define R300_PVS_XYZW_VALID_INST_SHIFT 10 # define R300_PVS_LAST_INST_SHIFT 20 #define R300_VAP_PVS_CODE_CNTL_1 0x22D8 # define R300_PVS_LAST_VTX_SRC_INST_SHIFT 0 #define R300_VAP_PVS_VECTOR_INDX_REG 0x2200 # define R300_PVS_CODE_START 0 # define R300_PVS_CONST_START 512 # define R500_PVS_CONST_START 1024 # define R300_PVS_VECTOR_INST_INDEX(x) ((x) + R300_PVS_CODE_START) # define R300_PVS_VECTOR_CONST_INDEX(x) ((x) + R300_PVS_CONST_START) # define R500_PVS_VECTOR_CONST_INDEX(x) ((x) + R500_PVS_CONST_START) #define R300_VAP_PVS_VECTOR_DATA_REG 0x2204 /* PVS instructions */ /* Opcode and dst instruction */ #define R300_PVS_DST_OPCODE(x) ((x) << 0) /* Vector ops */ # define R300_VECTOR_NO_OP 0 # define R300_VE_DOT_PRODUCT 1 # define R300_VE_MULTIPLY 2 # define R300_VE_ADD 3 # define R300_VE_MULTIPLY_ADD 4 # define R300_VE_DISTANCE_VECTOR 5 # define R300_VE_FRACTION 6 # define R300_VE_MAXIMUM 7 # define R300_VE_MINIMUM 8 # define R300_VE_SET_GREATER_THAN_EQUAL 9 # define R300_VE_SET_LESS_THAN 10 # define R300_VE_MULTIPLYX2_ADD 11 # define R300_VE_MULTIPLY_CLAMP 12 # define R300_VE_FLT2FIX_DX 13 # define R300_VE_FLT2FIX_DX_RND 14 /* R500 additions */ # define R500_VE_PRED_SET_EQ_PUSH 15 # define R500_VE_PRED_SET_GT_PUSH 16 # define R500_VE_PRED_SET_GTE_PUSH 17 # define R500_VE_PRED_SET_NEQ_PUSH 18 # define R500_VE_COND_WRITE_EQ 19 # define R500_VE_COND_WRITE_GT 20 # define R500_VE_COND_WRITE_GTE 21 # define R500_VE_COND_WRITE_NEQ 22 # define R500_VE_COND_MUX_EQ 23 # define R500_VE_COND_MUX_GT 24 # define R500_VE_COND_MUX_GTE 25 # define R500_VE_SET_GREATER_THAN 26 # define R500_VE_SET_EQUAL 27 # define R500_VE_SET_NOT_EQUAL 28 /* Math ops */ # define R300_MATH_NO_OP 0 # define R300_ME_EXP_BASE2_DX 1 # define R300_ME_LOG_BASE2_DX 2 # define R300_ME_EXP_BASEE_FF 3 # define R300_ME_LIGHT_COEFF_DX 4 # define R300_ME_POWER_FUNC_FF 5 # define R300_ME_RECIP_DX 6 # define R300_ME_RECIP_FF 7 # define R300_ME_RECIP_SQRT_DX 8 # define R300_ME_RECIP_SQRT_FF 9 # define R300_ME_MULTIPLY 10 # define R300_ME_EXP_BASE2_FULL_DX 11 # define R300_ME_LOG_BASE2_FULL_DX 12 # define R300_ME_POWER_FUNC_FF_CLAMP_B 13 # define R300_ME_POWER_FUNC_FF_CLAMP_B1 14 # define R300_ME_POWER_FUNC_FF_CLAMP_01 15 # define R300_ME_SIN 16 # define R300_ME_COS 17 /* R500 additions */ # define R500_ME_LOG_BASE2_IEEE 18 # define R500_ME_RECIP_IEEE 19 # define R500_ME_RECIP_SQRT_IEEE 20 # define R500_ME_PRED_SET_EQ 21 # define R500_ME_PRED_SET_GT 22 # define R500_ME_PRED_SET_GTE 23 # define R500_ME_PRED_SET_NEQ 24 # define R500_ME_PRED_SET_CLR 25 # define R500_ME_PRED_SET_INV 26 # define R500_ME_PRED_SET_POP 27 # define R500_ME_PRED_SET_RESTORE 28 /* macro */ # define R300_PVS_MACRO_OP_2CLK_MADD 0 # define R300_PVS_MACRO_OP_2CLK_M2X_ADD 1 #define R300_PVS_DST_MATH_INST (1 << 6) #define R300_PVS_DST_MACRO_INST (1 << 7) #define R300_PVS_DST_REG_TYPE(x) ((x) << 8) # define R300_PVS_DST_REG_TEMPORARY 0 # define R300_PVS_DST_REG_A0 1 # define R300_PVS_DST_REG_OUT 2 # define R500_PVS_DST_REG_OUT_REPL_X 3 # define R300_PVS_DST_REG_ALT_TEMPORARY 4 # define R300_PVS_DST_REG_INPUT 5 #define R300_PVS_DST_ADDR_MODE_1 (1 << 12) #define R300_PVS_DST_OFFSET(x) ((x) << 13) #define R300_PVS_DST_WE_X (1 << 20) #define R300_PVS_DST_WE_Y (1 << 21) #define R300_PVS_DST_WE_Z (1 << 22) #define R300_PVS_DST_WE_W (1 << 23) #define R300_PVS_DST_VE_SAT (1 << 24) #define R300_PVS_DST_ME_SAT (1 << 25) #define R300_PVS_DST_PRED_ENABLE (1 << 26) #define R300_PVS_DST_PRED_SENSE (1 << 27) #define R300_PVS_DST_DUAL_MATH_OP (1 << 28) #define R300_PVS_DST_ADDR_SEL(x) ((x) << 29) #define R300_PVS_DST_ADDR_MODE_0 (1 << 31) /* src operand instruction */ #define R300_PVS_SRC_REG_TYPE(x) ((x) << 0) # define R300_PVS_SRC_REG_TEMPORARY 0 # define R300_PVS_SRC_REG_INPUT 1 # define R300_PVS_SRC_REG_CONSTANT 2 # define R300_PVS_SRC_REG_ALT_TEMPORARY 3 #define R300_SPARE_0 (1 << 2) #define R300_PVS_SRC_ABS_XYZW (1 << 3) #define R300_PVS_SRC_ADDR_MODE_0 (1 << 4) #define R300_PVS_SRC_OFFSET(x) ((x) << 5) #define R300_PVS_SRC_SWIZZLE_X(x) ((x) << 13) #define R300_PVS_SRC_SWIZZLE_Y(x) ((x) << 16) #define R300_PVS_SRC_SWIZZLE_Z(x) ((x) << 19) #define R300_PVS_SRC_SWIZZLE_W(x) ((x) << 22) # define R300_PVS_SRC_SELECT_X 0 # define R300_PVS_SRC_SELECT_Y 1 # define R300_PVS_SRC_SELECT_Z 2 # define R300_PVS_SRC_SELECT_W 3 # define R300_PVS_SRC_SELECT_FORCE_0 4 # define R300_PVS_SRC_SELECT_FORCE_1 5 #define R300_PVS_SRC_NEG_X (1 << 25) #define R300_PVS_SRC_NEG_Y (1 << 26) #define R300_PVS_SRC_NEG_Z (1 << 27) #define R300_PVS_SRC_NEG_W (1 << 28) #define R300_PVS_SRC_ADDR_SEL(x) ((x) << 29) #define R300_PVS_SRC_ADDR_MODE_1 (1 << 31) #define R300_VAP_PVS_CONST_CNTL 0x22d4 # define R300_PVS_CONST_BASE_OFFSET(x) ((x) << 0) # define R300_PVS_MAX_CONST_ADDR(x) ((x) << 16) #define R300_VAP_PVS_FLOW_CNTL_OPC 0x22dc #define R300_VAP_OUT_VTX_FMT_0 0x2090 # define R300_VTX_POS_PRESENT (1 << 0) # define R300_VTX_COLOR_0_PRESENT (1 << 1) # define R300_VTX_COLOR_1_PRESENT (1 << 2) # define R300_VTX_COLOR_2_PRESENT (1 << 3) # define R300_VTX_COLOR_3_PRESENT (1 << 4) # define R300_VTX_PT_SIZE_PRESENT (1 << 16) #define R300_VAP_OUT_VTX_FMT_1 0x2094 # define R300_TEX_0_COMP_CNT_SHIFT 0 # define R300_TEX_1_COMP_CNT_SHIFT 3 # define R300_TEX_2_COMP_CNT_SHIFT 6 # define R300_TEX_3_COMP_CNT_SHIFT 9 # define R300_TEX_4_COMP_CNT_SHIFT 12 # define R300_TEX_5_COMP_CNT_SHIFT 15 # define R300_TEX_6_COMP_CNT_SHIFT 18 # define R300_TEX_7_COMP_CNT_SHIFT 21 #define R300_VAP_VTX_SIZE 0x20b4 #define R300_VAP_GB_VERT_CLIP_ADJ 0x2220 #define R300_VAP_GB_VERT_DISC_ADJ 0x2224 #define R300_VAP_GB_HORZ_CLIP_ADJ 0x2228 #define R300_VAP_GB_HORZ_DISC_ADJ 0x222c #define R300_VAP_CLIP_CNTL 0x221c # define R300_UCP_ENA_0 (1 << 0) # define R300_UCP_ENA_1 (1 << 1) # define R300_UCP_ENA_2 (1 << 2) # define R300_UCP_ENA_3 (1 << 3) # define R300_UCP_ENA_4 (1 << 4) # define R300_UCP_ENA_5 (1 << 5) # define R300_PS_UCP_MODE_SHIFT 14 # define R300_CLIP_DISABLE (1 << 16) # define R300_UCP_CULL_ONLY_ENA (1 << 17) # define R300_BOUNDARY_EDGE_FLAG_ENA (1 << 18) #define R300_VAP_PVS_STATE_FLUSH_REG 0x2284 #define R500_VAP_INDEX_OFFSET 0x208c #define R300_SU_TEX_WRAP 0x42a0 #define R300_SU_POLY_OFFSET_ENABLE 0x42b4 #define R300_SU_CULL_MODE 0x42b8 # define R300_CULL_FRONT (1 << 0) # define R300_CULL_BACK (1 << 1) # define R300_FACE_POS (0 << 2) # define R300_FACE_NEG (1 << 2) #define R300_SU_DEPTH_SCALE 0x42c0 #define R300_SU_DEPTH_OFFSET 0x42c4 #define R300_RS_COUNT 0x4300 # define R300_RS_COUNT_IT_COUNT_SHIFT 0 # define R300_RS_COUNT_IC_COUNT_SHIFT 7 # define R300_RS_COUNT_HIRES_EN (1 << 18) #define R300_RS_IP_0 0x4310 #define R300_RS_IP_1 0x4314 # define R300_RS_TEX_PTR(x) ((x) << 0) # define R300_RS_COL_PTR(x) ((x) << 6) # define R300_RS_COL_FMT(x) ((x) << 9) # define R300_RS_COL_FMT_RGBA 0 # define R300_RS_COL_FMT_RGB0 2 # define R300_RS_COL_FMT_RGB1 3 # define R300_RS_COL_FMT_000A 4 # define R300_RS_COL_FMT_0000 5 # define R300_RS_COL_FMT_0001 6 # define R300_RS_COL_FMT_111A 8 # define R300_RS_COL_FMT_1110 9 # define R300_RS_COL_FMT_1111 10 # define R300_RS_SEL_S(x) ((x) << 13) # define R300_RS_SEL_T(x) ((x) << 16) # define R300_RS_SEL_R(x) ((x) << 19) # define R300_RS_SEL_Q(x) ((x) << 22) # define R300_RS_SEL_C0 0 # define R300_RS_SEL_C1 1 # define R300_RS_SEL_C2 2 # define R300_RS_SEL_C3 3 # define R300_RS_SEL_K0 4 # define R300_RS_SEL_K1 5 #define R300_RS_INST_COUNT 0x4304 # define R300_INST_COUNT_RS(x) ((x) << 0) # define R300_RS_W_EN (1 << 4) # define R300_TX_OFFSET_RS(x) ((x) << 5) #define R300_RS_INST_0 0x4330 #define R300_RS_INST_1 0x4334 # define R300_INST_TEX_ID(x) ((x) << 0) # define R300_RS_INST_TEX_CN_WRITE (1 << 3) # define R300_INST_TEX_ADDR(x) ((x) << 6) #define R300_TX_INVALTAGS 0x4100 #define R300_TX_FILTER0_0 0x4400 #define R300_TX_FILTER0_1 0x4404 #define R300_TX_FILTER0_2 0x4408 # define R300_TX_CLAMP_S(x) ((x) << 0) # define R300_TX_CLAMP_T(x) ((x) << 3) # define R300_TX_CLAMP_R(x) ((x) << 6) # define R300_TX_CLAMP_WRAP 0 # define R300_TX_CLAMP_MIRROR 1 # define R300_TX_CLAMP_CLAMP_LAST 2 # define R300_TX_CLAMP_MIRROR_CLAMP_LAST 3 # define R300_TX_CLAMP_CLAMP_BORDER 4 # define R300_TX_CLAMP_MIRROR_CLAMP_BORDER 5 # define R300_TX_CLAMP_CLAMP_GL 6 # define R300_TX_CLAMP_MIRROR_CLAMP_GL 7 # define R300_TX_MAG_FILTER_NEAREST (1 << 9) # define R300_TX_MIN_FILTER_NEAREST (1 << 11) # define R300_TX_MAG_FILTER_LINEAR (2 << 9) # define R300_TX_MIN_FILTER_LINEAR (2 << 11) # define R300_TX_ID_SHIFT 28 #define R300_TX_FILTER1_0 0x4440 #define R300_TX_FILTER1_1 0x4444 #define R300_TX_FILTER1_2 0x4448 #define R300_TX_FORMAT0_0 0x4480 #define R300_TX_FORMAT0_1 0x4484 #define R300_TX_FORMAT0_2 0x4488 # define R300_TXWIDTH_SHIFT 0 # define R300_TXHEIGHT_SHIFT 11 # define R300_TXDEPTH_SHIFT 22 # define R300_NUM_LEVELS_SHIFT 26 # define R300_NUM_LEVELS_MASK 0x # define R300_TXPROJECTED (1 << 30) # define R300_TXPITCH_EN (1 << 31) #define R300_TX_FORMAT1_0 0x44c0 #define R300_TX_FORMAT1_1 0x44c4 #define R300_TX_FORMAT1_2 0x44c8 # define R300_TX_FORMAT_X8 0x0 # define R300_TX_FORMAT_X16 0x1 # define R300_TX_FORMAT_Y4X4 0x2 # define R300_TX_FORMAT_Y8X8 0x3 # define R300_TX_FORMAT_Y16X16 0x4 # define R300_TX_FORMAT_Z3Y3X2 0x5 # define R300_TX_FORMAT_Z5Y6X5 0x6 # define R300_TX_FORMAT_Z6Y5X5 0x7 # define R300_TX_FORMAT_Z11Y11X10 0x8 # define R300_TX_FORMAT_Z10Y11X11 0x9 # define R300_TX_FORMAT_W4Z4Y4X4 0xA # define R300_TX_FORMAT_W1Z5Y5X5 0xB # define R300_TX_FORMAT_W8Z8Y8X8 0xC # define R300_TX_FORMAT_W2Z10Y10X10 0xD # define R300_TX_FORMAT_W16Z16Y16X16 0xE # define R300_TX_FORMAT_DXT1 0xF # define R300_TX_FORMAT_DXT3 0x10 # define R300_TX_FORMAT_DXT5 0x11 # define R300_TX_FORMAT_D3DMFT_CxV8U8 0x12 /* no swizzle */ # define R300_TX_FORMAT_A8R8G8B8 0x13 /* no swizzle */ # define R300_TX_FORMAT_B8G8_B8G8 0x14 /* no swizzle */ # define R300_TX_FORMAT_G8R8_G8B8 0x15 /* no swizzle */ # define R300_TX_FORMAT_VYUY422 0x14 /* no swizzle */ # define R300_TX_FORMAT_YVYU422 0x15 /* no swizzle */ # define R300_TX_FORMAT_X24_Y8 0x1e # define R300_TX_FORMAT_X32 0x1e /* Floating point formats */ /* Note - hardware supports both 16 and 32 bit floating point */ # define R300_TX_FORMAT_FL_I16 0x18 # define R300_TX_FORMAT_FL_I16A16 0x19 # define R300_TX_FORMAT_FL_R16G16B16A16 0x1A # define R300_TX_FORMAT_FL_I32 0x1B # define R300_TX_FORMAT_FL_I32A32 0x1C # define R300_TX_FORMAT_FL_R32G32B32A32 0x1D /* alpha modes, convenience mostly */ /* if you have alpha, pick constant appropriate to the number of channels (1 for I8, 2 for I8A8, 4 for R8G8B8A8, etc */ # define R300_TX_FORMAT_ALPHA_1CH 0x000 # define R300_TX_FORMAT_ALPHA_2CH 0x200 # define R300_TX_FORMAT_ALPHA_4CH 0x600 # define R300_TX_FORMAT_ALPHA_NONE 0xA00 /* Swizzling */ /* constants */ # define R300_TX_FORMAT_X 0 # define R300_TX_FORMAT_Y 1 # define R300_TX_FORMAT_Z 2 # define R300_TX_FORMAT_W 3 # define R300_TX_FORMAT_ZERO 4 # define R300_TX_FORMAT_ONE 5 /* 2.0*Z, everything above 1.0 is set to 0.0 */ # define R300_TX_FORMAT_CUT_Z 6 /* 2.0*W, everything above 1.0 is set to 0.0 */ # define R300_TX_FORMAT_CUT_W 7 # define R300_TX_FORMAT_B_SHIFT 18 # define R300_TX_FORMAT_G_SHIFT 15 # define R300_TX_FORMAT_R_SHIFT 12 # define R300_TX_FORMAT_A_SHIFT 9 /* Convenience macro to take care of layout and swizzling */ # define R300_EASY_TX_FORMAT(B, G, R, A, FMT) ( \ ((R300_TX_FORMAT_##B)< * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "xf86.h" #include "cayman_shader.h" #include "cayman_reg.h" /* solid vs --------------------------------------- */ int cayman_solid_vs(RADEONChipFamily ChipSet, uint32_t* shader) { int i = 0; /* 0 */ shader[i++] = CF_DWORD0(ADDR(4), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(1), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_TC), BARRIER(1)); /* 1 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_POS0), TYPE(SQ_EXPORT_POS), RW_GPR(1), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), BURST_COUNT(1), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(1)); /* 2 - always export a param whether it's used or not */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(0), TYPE(SQ_EXPORT_PARAM), RW_GPR(0), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), BURST_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(0)); /* 3 - end */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_END), BARRIER(1)); /* 4/5 */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), STRUCTURED_READ(SQ_VTX_STRU_READ_OFF), LDS_REQ(0), COALESCED_READ(0)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(1), DST_REL(0), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_0), DST_SEL_W(SQ_SEL_1), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(0), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), ALT_CONST(0), BUFFER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = VTX_DWORD_PAD; return i; } /* solid ps --------------------------------------- */ int cayman_solid_ps(RADEONChipFamily ChipSet, uint32_t* shader) { int i = 0; /* 0 */ shader[i++] = CF_ALU_DWORD0(ADDR(3), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_LOCK_1)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(4), ALT_CONST(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 1 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_PIXEL_MRT0), TYPE(SQ_EXPORT_PIXEL), RW_GPR(0), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(1)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), BURST_COUNT(1), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(1)); /* 2 - end */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_END), BARRIER(1)); /* 3 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(1)); /* 4 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(1)); /* 5 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(1)); /* 6 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(1)); return i; } /* copy vs --------------------------------------- */ int cayman_copy_vs(RADEONChipFamily ChipSet, uint32_t* shader) { int i = 0; /* 0 */ shader[i++] = CF_DWORD0(ADDR(4), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(2), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_TC), BARRIER(1)); /* 1 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_POS0), TYPE(SQ_EXPORT_POS), RW_GPR(1), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), BURST_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(1)); /* 2 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(0), TYPE(SQ_EXPORT_PARAM), RW_GPR(0), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), BURST_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(0)); /* 3 - end */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_END), BARRIER(1)); /* 4/5 */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), STRUCTURED_READ(SQ_VTX_STRU_READ_OFF), LDS_REQ(0), COALESCED_READ(0)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(1), DST_REL(0), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_0), DST_SEL_W(SQ_SEL_1), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(0), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), ALT_CONST(0), BUFFER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = VTX_DWORD_PAD; /* 6/7 */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), STRUCTURED_READ(SQ_VTX_STRU_READ_OFF), LDS_REQ(0), COALESCED_READ(0)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(0), DST_REL(0), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_0), DST_SEL_W(SQ_SEL_1), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(8), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), ALT_CONST(0), BUFFER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = VTX_DWORD_PAD; return i; } /* copy ps --------------------------------------- */ int cayman_copy_ps(RADEONChipFamily ChipSet, uint32_t* shader) { int i = 0; /* CF INST 0 */ shader[i++] = CF_ALU_DWORD0(ADDR(4), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_NOP)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(4), ALT_CONST(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* CF INST 1 */ shader[i++] = CF_DWORD0(ADDR(8), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(1), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_TC), BARRIER(1)); /* CF INST 2 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_PIXEL_MRT0), TYPE(SQ_EXPORT_PIXEL), RW_GPR(0), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(1)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), BURST_COUNT(1), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(1)); /* CF INST 3 - end */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_END), BARRIER(1)); /* 4 interpolate tex coords */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 5 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 6 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 7 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 8/9 TEX INST 0 */ shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE), INST_MOD(0), FETCH_WHOLE_QUAD(0), RESOURCE_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), ALT_CONST(0), RESOURCE_INDEX_MODE(SQ_CF_INDEX_NONE), SAMPLER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = TEX_DWORD1(DST_GPR(0), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_X), /* R */ DST_SEL_Y(SQ_SEL_Y), /* G */ DST_SEL_Z(SQ_SEL_Z), /* B */ DST_SEL_W(SQ_SEL_W), /* A */ LOD_BIAS(0), COORD_TYPE_X(TEX_UNNORMALIZED), COORD_TYPE_Y(TEX_UNNORMALIZED), COORD_TYPE_Z(TEX_UNNORMALIZED), COORD_TYPE_W(TEX_UNNORMALIZED)); shader[i++] = TEX_DWORD2(OFFSET_X(0), OFFSET_Y(0), OFFSET_Z(0), SAMPLER_ID(0), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1)); shader[i++] = TEX_DWORD_PAD; return i; } int cayman_xv_vs(RADEONChipFamily ChipSet, uint32_t* shader) { int i = 0; /* 0 */ shader[i++] = CF_DWORD0(ADDR(8), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(2), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_TC), BARRIER(1)); /* 1 - ALU */ shader[i++] = CF_ALU_DWORD0(ADDR(5), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_LOCK_1)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(2), ALT_CONST(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 2 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_POS0), TYPE(SQ_EXPORT_POS), RW_GPR(1), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(3)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), BURST_COUNT(1), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(1)); /* 3 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(0), TYPE(SQ_EXPORT_PARAM), RW_GPR(0), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(3)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), BURST_COUNT(1), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(0)); /* 4 - end */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_END), BARRIER(1)); /* 5 texX / w */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 6 texY / h */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 7 - padding */ shader[i++] = 0x00000000; shader[i++] = 0x00000000; /* 8/9 */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), STRUCTURED_READ(SQ_VTX_STRU_READ_OFF), LDS_REQ(0), COALESCED_READ(0)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(1), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_0), DST_SEL_W(SQ_SEL_1), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(0), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), ALT_CONST(0), BUFFER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = VTX_DWORD_PAD; /* 10/11 */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), STRUCTURED_READ(SQ_VTX_STRU_READ_OFF), LDS_REQ(0), COALESCED_READ(0)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(0), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_0), DST_SEL_W(SQ_SEL_1), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(8), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), ALT_CONST(0), BUFFER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = VTX_DWORD_PAD; return i; } int cayman_xv_ps(RADEONChipFamily ChipSet, uint32_t* shader) { int i = 0; /* 0 */ shader[i++] = CF_ALU_DWORD0(ADDR(6), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_NOP)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(4), ALT_CONST(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 1 */ shader[i++] = CF_DWORD0(ADDR(22), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_BOOL), I_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_CALL), BARRIER(0)); /* 2 */ shader[i++] = CF_DWORD0(ADDR(30), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_NOT_BOOL), I_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_CALL), BARRIER(0)); /* 3 */ shader[i++] = CF_ALU_DWORD0(ADDR(10), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_LOCK_1)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(12), ALT_CONST(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 4 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_PIXEL_MRT0), TYPE(SQ_EXPORT_PIXEL), RW_GPR(2), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(3)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), BURST_COUNT(1), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(1)); /* 5 - end */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_END), BARRIER(1)); /* 6 interpolate tex coords */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 7 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 8 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 9 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 10,11,12,13 */ /* r2.x = MAD(c0.w, r1.x, c0.x) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_X), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* r2.y = MAD(c0.w, r1.x, c0.y) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_Y), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* r2.z = MAD(c0.w, r1.x, c0.z) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_Z), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* r2.w = MAD(0, 0, 1) */ shader[i++] = ALU_DWORD0(SRC0_SEL(SQ_ALU_SRC_0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(SQ_ALU_SRC_0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_1), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_X), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 14,15,16,17 */ /* r2.x = MAD(c1.x, r1.y, pv.x) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_PV), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_X), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* r2.y = MAD(c1.y, r1.y, pv.y) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_PV), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_Y), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* r2.z = MAD(c1.z, r1.y, pv.z) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_PV), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_Z), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* r2.w = MAD(0, 0, 1) */ shader[i++] = ALU_DWORD0(SRC0_SEL(SQ_ALU_SRC_0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(SQ_ALU_SRC_0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_1), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_W), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 18,19,20,21 */ /* r2.x = MAD(c2.x, r1.z, pv.x) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 2), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_PV), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_X), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(1)); /* r2.y = MAD(c2.y, r1.z, pv.y) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 2), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_PV), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_Y), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(1)); /* r2.z = MAD(c2.z, r1.z, pv.z) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 2), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_PV), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_Z), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(1)); /* r2.w = MAD(0, 0, 1) */ shader[i++] = ALU_DWORD0(SRC0_SEL(SQ_ALU_SRC_0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(SQ_ALU_SRC_0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_1), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_X), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(1)); /* 22 */ shader[i++] = CF_DWORD0(ADDR(24), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(3), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_TC), BARRIER(1)); /* 23 */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_RETURN), BARRIER(1)); /* 24/25 */ shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE), INST_MOD(0), FETCH_WHOLE_QUAD(0), RESOURCE_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), ALT_CONST(0), RESOURCE_INDEX_MODE(SQ_CF_INDEX_NONE), SAMPLER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = TEX_DWORD1(DST_GPR(1), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_MASK), DST_SEL_Z(SQ_SEL_MASK), DST_SEL_W(SQ_SEL_1), LOD_BIAS(0), COORD_TYPE_X(TEX_NORMALIZED), COORD_TYPE_Y(TEX_NORMALIZED), COORD_TYPE_Z(TEX_NORMALIZED), COORD_TYPE_W(TEX_NORMALIZED)); shader[i++] = TEX_DWORD2(OFFSET_X(0), OFFSET_Y(0), OFFSET_Z(0), SAMPLER_ID(0), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1)); shader[i++] = TEX_DWORD_PAD; /* 26/27 */ shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE), INST_MOD(0), FETCH_WHOLE_QUAD(0), RESOURCE_ID(1), SRC_GPR(0), SRC_REL(ABSOLUTE), ALT_CONST(0), RESOURCE_INDEX_MODE(SQ_CF_INDEX_NONE), SAMPLER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = TEX_DWORD1(DST_GPR(1), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_MASK), DST_SEL_Y(SQ_SEL_MASK), DST_SEL_Z(SQ_SEL_X), DST_SEL_W(SQ_SEL_MASK), LOD_BIAS(0), COORD_TYPE_X(TEX_NORMALIZED), COORD_TYPE_Y(TEX_NORMALIZED), COORD_TYPE_Z(TEX_NORMALIZED), COORD_TYPE_W(TEX_NORMALIZED)); shader[i++] = TEX_DWORD2(OFFSET_X(0), OFFSET_Y(0), OFFSET_Z(0), SAMPLER_ID(1), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1)); shader[i++] = TEX_DWORD_PAD; /* 28/29 */ shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE), INST_MOD(0), FETCH_WHOLE_QUAD(0), RESOURCE_ID(2), SRC_GPR(0), SRC_REL(ABSOLUTE), ALT_CONST(0), RESOURCE_INDEX_MODE(SQ_CF_INDEX_NONE), SAMPLER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = TEX_DWORD1(DST_GPR(1), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_MASK), DST_SEL_Y(SQ_SEL_X), DST_SEL_Z(SQ_SEL_MASK), DST_SEL_W(SQ_SEL_MASK), LOD_BIAS(0), COORD_TYPE_X(TEX_NORMALIZED), COORD_TYPE_Y(TEX_NORMALIZED), COORD_TYPE_Z(TEX_NORMALIZED), COORD_TYPE_W(TEX_NORMALIZED)); shader[i++] = TEX_DWORD2(OFFSET_X(0), OFFSET_Y(0), OFFSET_Z(0), SAMPLER_ID(2), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1)); shader[i++] = TEX_DWORD_PAD; /* 30 */ shader[i++] = CF_DWORD0(ADDR(32), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(1), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_TC), BARRIER(1)); /* 31 */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_RETURN), BARRIER(1)); /* 32/33 */ shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE), INST_MOD(0), FETCH_WHOLE_QUAD(0), RESOURCE_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), ALT_CONST(0), RESOURCE_INDEX_MODE(SQ_CF_INDEX_NONE), SAMPLER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = TEX_DWORD1(DST_GPR(1), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_Z), DST_SEL_W(SQ_SEL_1), LOD_BIAS(0), COORD_TYPE_X(TEX_NORMALIZED), COORD_TYPE_Y(TEX_NORMALIZED), COORD_TYPE_Z(TEX_NORMALIZED), COORD_TYPE_W(TEX_NORMALIZED)); shader[i++] = TEX_DWORD2(OFFSET_X(0), OFFSET_Y(0), OFFSET_Z(0), SAMPLER_ID(0), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1)); shader[i++] = TEX_DWORD_PAD; return i; } /* comp vs --------------------------------------- */ int cayman_comp_vs(RADEONChipFamily ChipSet, uint32_t* shader) { int i = 0; /* 0 */ shader[i++] = CF_DWORD0(ADDR(3), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_BOOL), I_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_CALL), BARRIER(0)); /* 1 */ shader[i++] = CF_DWORD0(ADDR(9), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_NOT_BOOL), I_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_CALL), BARRIER(0)); /* 2 - end */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_END), BARRIER(1)); /* 3 - mask sub */ shader[i++] = CF_DWORD0(ADDR(44), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(3), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_TC), BARRIER(1)); /* 4 - ALU */ shader[i++] = CF_ALU_DWORD0(ADDR(14), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_LOCK_1)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(20), ALT_CONST(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 5 - dst */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_POS0), TYPE(SQ_EXPORT_POS), RW_GPR(2), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1), BURST_COUNT(1), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(1)); /* 6 - src */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(0), TYPE(SQ_EXPORT_PARAM), RW_GPR(1), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1), BURST_COUNT(1), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT), MARK(0), BARRIER(0)); /* 7 - mask */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(1), TYPE(SQ_EXPORT_PARAM), RW_GPR(0), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1), BURST_COUNT(1), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(0)); /* 8 */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_RETURN), BARRIER(1)); /* 9 - non-mask sub */ shader[i++] = CF_DWORD0(ADDR(50), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(2), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_TC), BARRIER(1)); /* 10 - ALU */ shader[i++] = CF_ALU_DWORD0(ADDR(34), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_LOCK_1)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(10), ALT_CONST(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 11 - dst */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_POS0), TYPE(SQ_EXPORT_POS), RW_GPR(1), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1), BURST_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(1)); /* 12 - src */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(0), TYPE(SQ_EXPORT_PARAM), RW_GPR(0), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1), BURST_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(0)); /* 13 */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_RETURN), BARRIER(1)); /* 14 srcX.x DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(3), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 15 srcX.y DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(3), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 16 srcX.z DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(3), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 17 srcX.w DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(3), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 18 srcY.x DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(3), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 19 srcY.y DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(3), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 20 srcY.z DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(3), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 21 srcY.w DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(3), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 22 maskX.x DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 2), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(4), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 23 maskX.y DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 2), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(4), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 24 maskX.z DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 2), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(4), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 25 maskX.w DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 2), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(4), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 26 maskY.x DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 3), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(4), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 27 maskY.y DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 3), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(4), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 28 maskY.z DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 3), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(4), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 29 maskY.w DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 3), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(4), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 30 srcX / w */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 3), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(1), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 31 srcY / h */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 3), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(1), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 32 maskX / w */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 4), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 2), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 33 maskY / h */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 4), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 3), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 34 srcX.x DOT4 - non-mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 35 srcX.y DOT4 - non-mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 36 srcX.z DOT4 - non-mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 37 srcX.w DOT4 - non-mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 38 srcY.x DOT4 - non-mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 39 srcY.y DOT4 - non-mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 40 srcY.z DOT4 - non-mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 41 srcY.w DOT4 - non-mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 42 srcX / w */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 2), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 43 srcY / h */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 2), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* mask vfetch - 44/45 - dst */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), STRUCTURED_READ(SQ_VTX_STRU_READ_OFF), LDS_REQ(0), COALESCED_READ(0)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(2), DST_REL(0), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_0), DST_SEL_W(SQ_SEL_1), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(0), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), ALT_CONST(0), BUFFER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = VTX_DWORD_PAD; /* 46/47 - src */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), STRUCTURED_READ(SQ_VTX_STRU_READ_OFF), LDS_REQ(0), COALESCED_READ(0)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(1), DST_REL(0), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_1), DST_SEL_W(SQ_SEL_0), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(8), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), ALT_CONST(0), BUFFER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = VTX_DWORD_PAD; /* 48/49 - mask */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), STRUCTURED_READ(SQ_VTX_STRU_READ_OFF), LDS_REQ(0), COALESCED_READ(0)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(0), DST_REL(0), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_1), DST_SEL_W(SQ_SEL_0), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(16), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), ALT_CONST(0), BUFFER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = VTX_DWORD_PAD; /* no mask vfetch - 50/51 - dst */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), STRUCTURED_READ(SQ_VTX_STRU_READ_OFF), LDS_REQ(0), COALESCED_READ(0)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(1), DST_REL(0), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_0), DST_SEL_W(SQ_SEL_1), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(0), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), ALT_CONST(0), BUFFER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = VTX_DWORD_PAD; /* 52/53 - src */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), STRUCTURED_READ(SQ_VTX_STRU_READ_OFF), LDS_REQ(0), COALESCED_READ(0)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(0), DST_REL(0), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_1), DST_SEL_W(SQ_SEL_0), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(8), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), ALT_CONST(0), BUFFER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = VTX_DWORD_PAD; return i; } /* comp ps --------------------------------------- */ int cayman_comp_ps(RADEONChipFamily ChipSet, uint32_t* shader) { int i = 0; /* 0 */ /* call interp-fetch-mask if boolean1 == true */ shader[i++] = CF_DWORD0(ADDR(12), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(1), COND(SQ_CF_COND_BOOL), I_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_CALL), BARRIER(0)); /* 1 */ /* call read-constant-mask if boolean1 == false */ shader[i++] = CF_DWORD0(ADDR(15), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(1), COND(SQ_CF_COND_NOT_BOOL), I_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_CALL), BARRIER(0)); /* 2 */ /* call interp-fetch-src if boolean0 == true */ shader[i++] = CF_DWORD0(ADDR(7), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_BOOL), I_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_CALL), BARRIER(0)); /* 3 */ /* call read-constant-src if boolean0 == false */ shader[i++] = CF_DWORD0(ADDR(10), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_NOT_BOOL), I_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_CALL), BARRIER(0)); /* 4 */ /* src IN mask (GPR2 := GPR1 .* GPR0) */ shader[i++] = CF_ALU_DWORD0(ADDR(17), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_NOP)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(4), ALT_CONST(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 5 */ /* export pixel data */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_PIXEL_MRT0), TYPE(SQ_EXPORT_PIXEL), RW_GPR(0), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(1)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), BURST_COUNT(1), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(1)); /* 6 */ /* end of program */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_END), BARRIER(1)); /* subroutine interp-fetch-src */ /* 7 */ /* interpolate src */ shader[i++] = CF_ALU_DWORD0(ADDR(21), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_NOP)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(4), ALT_CONST(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 8 */ /* texture fetch src into GPR0 */ shader[i++] = CF_DWORD0(ADDR(26), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(1), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_TC), BARRIER(1)); /* 9 */ /* return */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_RETURN), BARRIER(0)); /* subroutine read-constant-src */ /* 10 */ /* read constants into GPR0 */ shader[i++] = CF_ALU_DWORD0(ADDR(28), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_LOCK_1)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(4), ALT_CONST(1), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 11 */ /* return */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_RETURN), BARRIER(0)); /* subroutine interp-fetch-mask */ /* 12 */ /* interpolate mask */ shader[i++] = CF_ALU_DWORD0(ADDR(32), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_NOP)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(4), ALT_CONST(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 13 */ /* texture fetch mask into GPR1 */ shader[i++] = CF_DWORD0(ADDR(36), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(1), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_TC), BARRIER(1)); /* 14 */ /* return */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_RETURN), BARRIER(0)); /* subroutine read-constant-src */ /* 15 */ /* read constants into GPR1 */ shader[i++] = CF_ALU_DWORD0(ADDR(38), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_LOCK_1)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(4), ALT_CONST(1), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 16 */ /* return */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_RETURN), BARRIER(0)); /* ALU clauses */ /* 17 */ /* MUL gpr[0].x gpr[0].x gpr[1].x */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(1)); /* 18 */ /* MUL gpr[0].y gpr[0].y gpr[1].y */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(1)); /* 19 */ /* MUL gpr[0].z gpr[0].z gpr[1].z */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(1)); /* 20 */ /* MUL gpr[0].w gpr[0].w gpr[1].w */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(1)); /* 21 */ /* INTERP_XY GPR0.x, GPR0.y PARAM0.x */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 22 */ /* INTERP_XY GPR0.y, GPR0.x PARAM0.x */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 23 */ /* INTERP_XY GPR0.z, GPR0.y PARAM0.x */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 24 */ /* INTERP_XY GPR0.w, GPR0.x PARAM0.x */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 25 */ shader[i++] = 0; shader[i++] = 0; /* 26/27 */ /* SAMPLE RID=0 GPR0, GPR0 */ shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE), INST_MOD(0), FETCH_WHOLE_QUAD(0), RESOURCE_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), ALT_CONST(0), RESOURCE_INDEX_MODE(SQ_CF_INDEX_NONE), SAMPLER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = TEX_DWORD1(DST_GPR(0), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_Z), DST_SEL_W(SQ_SEL_W), LOD_BIAS(0), COORD_TYPE_X(TEX_NORMALIZED), COORD_TYPE_Y(TEX_NORMALIZED), COORD_TYPE_Z(TEX_NORMALIZED), COORD_TYPE_W(TEX_NORMALIZED)); shader[i++] = TEX_DWORD2(OFFSET_X(0), OFFSET_Y(0), OFFSET_Z(0), SAMPLER_ID(0), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1)); shader[i++] = TEX_DWORD_PAD; /* 28 */ /* MOV GPR0.x, KC4.x */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 4), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(1)); /* 29 */ /* MOV GPR0.y, KC4.y */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 4), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(1)); /* 30 */ /* MOV GPR0.z, KC4.z */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 4), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(1)); /* 31 */ /* MOV GPR0.w, KC4.w */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 4), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(1)); /* 32 */ /* INTERP_XY GPR1.x, PARAM1 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(1), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 33 */ /* INTERP_XY GPR1.y, PARAM1 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(1), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 34 */ /* INTERP_XY GPR1.z, PARAM1 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(1), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 35 */ /* INTERP_XY GPR1.w, PARAM1 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(1), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 36/37 */ /* SAMPLE RID=1 GPR1, GPR1 */ shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE), INST_MOD(0), FETCH_WHOLE_QUAD(0), RESOURCE_ID(1), SRC_GPR(1), SRC_REL(ABSOLUTE), ALT_CONST(0), RESOURCE_INDEX_MODE(SQ_CF_INDEX_NONE), SAMPLER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = TEX_DWORD1(DST_GPR(1), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_Z), DST_SEL_W(SQ_SEL_W), LOD_BIAS(0), COORD_TYPE_X(TEX_NORMALIZED), COORD_TYPE_Y(TEX_NORMALIZED), COORD_TYPE_Z(TEX_NORMALIZED), COORD_TYPE_W(TEX_NORMALIZED)); shader[i++] = TEX_DWORD2(OFFSET_X(0), OFFSET_Y(0), OFFSET_Z(0), SAMPLER_ID(1), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1)); shader[i++] = TEX_DWORD_PAD; /* 38 */ /* MOV GPR1.x, KC5.x */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 5), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(1), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(1)); /* 39 */ /* MOV GPR1.y, KC5.y */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 5), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(1), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(1)); /* 40 */ /* MOV GPR1.z, KC5.z */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 5), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(1), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(1)); /* 41 */ /* MOV GPR1.w, KC5.w */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 5), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(1), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(1)); return i; } xf86-video-ati-7.3.0/src/radeon_exa_shared.h0000664000175000017500000000542212177731114015520 00000000000000/* * Copyright 2005 Eric Anholt * Copyright 2005 Benjamin Herrenschmidt * Copyright 2008 Advanced Micro Devices, 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. * * Authors: * Eric Anholt * Zack Rusin * Benjamin Herrenschmidt * Alex Deucher * Matthias Hopf */ #ifndef RADEON_EXA_SHARED_H #define RADEON_EXA_SHARED_H extern PixmapPtr RADEONGetDrawablePixmap(DrawablePtr pDrawable); extern void RADEONVlineHelperClear(ScrnInfoPtr pScrn); extern void RADEONVlineHelperSet(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2); extern Bool RADEONValidPM(uint32_t pm, int bpp); extern Bool RADEONCheckBPP(int bpp); extern PixmapPtr RADEONSolidPixmap(ScreenPtr pScreen, uint32_t solid); #define RADEON_TRACE_FALL 0 #define RADEON_TRACE_DRAW 0 #if RADEON_TRACE_FALL #define RADEON_FALLBACK(x) \ do { \ ErrorF("%s: ", __FUNCTION__); \ ErrorF x; \ return FALSE; \ } while (0) #else #define RADEON_FALLBACK(x) return FALSE #endif #if RADEON_TRACE_DRAW #define TRACE do { ErrorF("TRACE: %s\n", __FUNCTION__); } while(0) #else #define TRACE #endif static inline void radeon_add_pixmap(struct radeon_cs *cs, PixmapPtr pPix, int read_domains, int write_domain) { struct radeon_exa_pixmap_priv *driver_priv = exaGetPixmapDriverPrivate(pPix); radeon_cs_space_add_persistent_bo(cs, driver_priv->bo, read_domains, write_domain); } extern void radeon_ib_discard(ScrnInfoPtr pScrn); extern int radeon_cp_start(ScrnInfoPtr pScrn); extern void radeon_vb_no_space(ScrnInfoPtr pScrn, struct radeon_vbo_object *vbo, int vert_size); extern void radeon_vbo_done_composite(PixmapPtr pDst); #endif xf86-video-ati-7.3.0/src/radeon_xvmc.c0000664000175000017500000000645512177731114014374 00000000000000/* * Copyright 2010 Christian König * * 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. * * * Based on vl_hwmc.c from xf86-video-nouveau * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "radeon_video.h" #include "compat-api.h" #include #include #include "fourcc.h" #define FOURCC_RGB 0x0000003 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 XF86MCSurfaceInfoPtr surfaces[] = { (XF86MCSurfaceInfoPtr)&yv12_mpeg2_surface, }; static XF86ImageRec rgb_subpicture = { 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 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 = { "", 1, surfaces, 3, subpictures, (xf86XvMCCreateContextProcPtr)NULL, (xf86XvMCDestroyContextProcPtr)NULL, (xf86XvMCCreateSurfaceProcPtr)NULL, (xf86XvMCDestroySurfaceProcPtr)NULL, (xf86XvMCCreateSubpictureProcPtr)NULL, (xf86XvMCDestroySubpictureProcPtr)NULL }; XF86MCAdaptorPtr RADEONCreateAdaptorXvMC(ScreenPtr pScreen, char *xv_adaptor_name) { XF86MCAdaptorPtr adaptor; ScrnInfoPtr pScrn; assert(pScreen); 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", adaptor->name); return adaptor; } xf86-video-ati-7.3.0/src/evergreen_reg.h0000664000175000017500000003154612177731114014712 00000000000000/* * Evergeen Register documentation * * Copyright (C) 2010 Advanced Micro Devices, 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) 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 _EVERGREEN_REG_H_ #define _EVERGREEN_REG_H_ /* * Register definitions */ #include "evergreen_reg_auto.h" enum { SHADER_TYPE_PS, SHADER_TYPE_VS, SHADER_TYPE_GS, SHADER_TYPE_HS, SHADER_TYPE_LS, SHADER_TYPE_CS, SHADER_TYPE_FS, }; /* SET_*_REG offsets + ends */ #define SET_CONFIG_REG_offset 0x00008000 #define SET_CONFIG_REG_end 0x0000ac00 #define SET_CONTEXT_REG_offset 0x00028000 #define SET_CONTEXT_REG_end 0x00029000 #define SET_RESOURCE_offset 0x00030000 #define SET_RESOURCE_end 0x00038000 #define SET_SAMPLER_offset 0x0003c000 #define SET_SAMPLER_end 0x0003c600 #define SET_CTL_CONST_offset 0x0003cff0 #define SET_CTL_CONST_end 0x0003ff0c #define SET_LOOP_CONST_offset 0x0003a200 #define SET_LOOP_CONST_end 0x0003a500 #define SET_BOOL_CONST_offset 0x0003a500 #define SET_BOOL_CONST_end 0x0003a518 /* Packet3 commands */ enum { IT_NOP = 0x10, IT_INDIRECT_BUFFER_END = 0x17, IT_SET_PREDICATION = 0x20, IT_COND_EXEC = 0x22, IT_PRED_EXEC = 0x23, IT_DRAW_INDEX_2 = 0x27, IT_CONTEXT_CONTROL = 0x28, IT_DRAW_INDEX_OFFSET = 0x29, IT_INDEX_TYPE = 0x2A, IT_DRAW_INDEX = 0x2B, IT_DRAW_INDEX_AUTO = 0x2D, IT_DRAW_INDEX_IMMD = 0x2E, IT_NUM_INSTANCES = 0x2F, IT_INDIRECT_BUFFER = 0x32, IT_STRMOUT_BUFFER_UPDATE = 0x34, IT_MEM_SEMAPHORE = 0x39, IT_MPEG_INDEX = 0x3A, IT_WAIT_REG_MEM = 0x3C, IT_MEM_WRITE = 0x3D, IT_SURFACE_SYNC = 0x43, IT_ME_INITIALIZE = 0x44, IT_COND_WRITE = 0x45, IT_EVENT_WRITE = 0x46, IT_EVENT_WRITE_EOP = 0x47, IT_EVENT_WRITE_EOS = 0x48, IT_SET_CONFIG_REG = 0x68, IT_SET_CONTEXT_REG = 0x69, IT_SET_ALU_CONST = 0x6A, IT_SET_BOOL_CONST = 0x6B, IT_SET_LOOP_CONST = 0x6C, IT_SET_RESOURCE = 0x6D, IT_SET_SAMPLER = 0x6E, IT_SET_CTL_CONST = 0x6F, }; /* IT_WAIT_REG_MEM operation encoding */ #define IT_WAIT_ALWAYS (0 << 0) #define IT_WAIT_LT (1 << 0) #define IT_WAIT_LE (2 << 0) #define IT_WAIT_EQ (3 << 0) #define IT_WAIT_NE (4 << 0) #define IT_WAIT_GE (5 << 0) #define IT_WAIT_GT (6 << 0) #define IT_WAIT_REG (0 << 4) #define IT_WAIT_MEM (1 << 4) #define IT_WAIT_ADDR(x) ((x) >> 2) /* IT_INDEX_TYPE */ #define IT_INDEX_TYPE_SWAP_MODE(x) ((x) << 2) enum { SQ_LDS_ALLOC_PS = 0x288ec, SQ_DYN_GPR_RESOURCE_LIMIT_1 = 0x28838, SQ_DYN_GPR_CNTL_PS_FLUSH_REQ = 0x8d8c, SQ_LDS_RESOURCE_MGMT = 0x8e2c, WAIT_UNTIL = 0x8040, WAIT_CP_DMA_IDLE_bit = 1 << 8, WAIT_CMDFIFO_bit = 1 << 10, WAIT_3D_IDLE_bit = 1 << 15, WAIT_3D_IDLECLEAN_bit = 1 << 17, WAIT_EXTERN_SIG_bit = 1 << 19, CMDFIFO_ENTRIES_mask = 0xf << 20, CMDFIFO_ENTRIES_shift = 20, CP_COHER_CNTL = 0x85f0, DEST_BASE_0_ENA_bit = 1 << 0, DEST_BASE_1_ENA_bit = 1 << 1, SO0_DEST_BASE_ENA_bit = 1 << 2, SO1_DEST_BASE_ENA_bit = 1 << 3, SO2_DEST_BASE_ENA_bit = 1 << 4, SO3_DEST_BASE_ENA_bit = 1 << 5, CB0_DEST_BASE_ENA_bit = 1 << 6, CB1_DEST_BASE_ENA_bit = 1 << 7, CB2_DEST_BASE_ENA_bit = 1 << 8, CB3_DEST_BASE_ENA_bit = 1 << 9, CB4_DEST_BASE_ENA_bit = 1 << 10, CB5_DEST_BASE_ENA_bit = 1 << 11, CB6_DEST_BASE_ENA_bit = 1 << 12, CB7_DEST_BASE_ENA_bit = 1 << 13, DB_DEST_BASE_ENA_bit = 1 << 14, CB8_DEST_BASE_ENA_bit = 1 << 15, CB9_DEST_BASE_ENA_bit = 1 << 16, CB10_DEST_BASE_ENA_bit = 1 << 17, CB11_DEST_BASE_ENA_bit = 1 << 18, FULL_CACHE_ENA_bit = 1 << 20, TC_ACTION_ENA_bit = 1 << 23, VC_ACTION_ENA_bit = 1 << 24, CB_ACTION_ENA_bit = 1 << 25, DB_ACTION_ENA_bit = 1 << 26, SH_ACTION_ENA_bit = 1 << 27, SX_ACTION_ENA_bit = 1 << 28, CP_COHER_SIZE = 0x85f4, CP_COHER_BASE = 0x85f8, CP_COHER_STATUS = 0x85fc, MATCHING_GFX_CNTX_mask = 0xff << 0, MATCHING_GFX_CNTX_shift = 0, STATUS_bit = 1 << 31, // SQ_VTX_CONSTANT_WORD2_0 = 0x00030008, // SQ_VTX_CONSTANT_WORD2_0__DATA_FORMAT_mask = 0x3f << 20, FMT_INVALID=0, FMT_8, FMT_4_4, FMT_3_3_2, FMT_16=5, FMT_16_FLOAT, FMT_8_8, FMT_5_6_5, FMT_6_5_5, FMT_1_5_5_5, FMT_4_4_4_4, FMT_5_5_5_1, FMT_32, FMT_32_FLOAT, FMT_16_16, FMT_16_16_FLOAT=16, FMT_8_24, FMT_8_24_FLOAT, FMT_24_8, FMT_24_8_FLOAT, FMT_10_11_11, FMT_10_11_11_FLOAT, FMT_11_11_10, FMT_11_11_10_FLOAT, FMT_2_10_10_10, FMT_8_8_8_8, FMT_10_10_10_2, FMT_X24_8_32_FLOAT, FMT_32_32, FMT_32_32_FLOAT, FMT_16_16_16_16, FMT_16_16_16_16_FLOAT=32, FMT_32_32_32_32=34, FMT_32_32_32_32_FLOAT, FMT_1 = 37, FMT_GB_GR=39, FMT_BG_RG, FMT_32_AS_8, FMT_32_AS_8_8, FMT_5_9_9_9_SHAREDEXP, FMT_8_8_8, FMT_16_16_16, FMT_16_16_16_FLOAT, FMT_32_32_32, FMT_32_32_32_FLOAT=48, // High level register file lengths SQ_FETCH_RESOURCE = SQ_TEX_RESOURCE_WORD0_0, SQ_FETCH_RESOURCE_ps_num = 176, SQ_FETCH_RESOURCE_vs_num = 160, SQ_FETCH_RESOURCE_gs_num = 160, SQ_FETCH_RESOURCE_hs_num = 160, SQ_FETCH_RESOURCE_ls_num = 160, SQ_FETCH_RESOURCE_cs_num = 176, SQ_FETCH_RESOURCE_fs_num = 32, SQ_FETCH_RESOURCE_all_num = 1024, SQ_FETCH_RESOURCE_offset = 32, SQ_FETCH_RESOURCE_ps = 0, // 0...175 SQ_FETCH_RESOURCE_vs = SQ_FETCH_RESOURCE_ps + SQ_FETCH_RESOURCE_ps_num, // 176...335 SQ_FETCH_RESOURCE_gs = SQ_FETCH_RESOURCE_vs + SQ_FETCH_RESOURCE_vs_num, // 336...495 SQ_FETCH_RESOURCE_hs = SQ_FETCH_RESOURCE_gs + SQ_FETCH_RESOURCE_gs_num, // 496...655 SQ_FETCH_RESOURCE_ls = SQ_FETCH_RESOURCE_hs + SQ_FETCH_RESOURCE_hs_num, // 656...815 SQ_FETCH_RESOURCE_cs = SQ_FETCH_RESOURCE_ls + SQ_FETCH_RESOURCE_ls_num, // 816...991 SQ_FETCH_RESOURCE_fs = SQ_FETCH_RESOURCE_cs + SQ_FETCH_RESOURCE_cs_num, // 992...1023 SQ_TEX_SAMPLER_WORD = SQ_TEX_SAMPLER_WORD0_0, SQ_TEX_SAMPLER_WORD_ps_num = 18, SQ_TEX_SAMPLER_WORD_vs_num = 18, SQ_TEX_SAMPLER_WORD_gs_num = 18, SQ_TEX_SAMPLER_WORD_hs_num = 18, SQ_TEX_SAMPLER_WORD_ls_num = 18, SQ_TEX_SAMPLER_WORD_cs_num = 18, SQ_TEX_SAMPLER_WORD_all_num = 108, SQ_TEX_SAMPLER_WORD_offset = 12, SQ_TEX_SAMPLER_WORD_ps = 0, // 0...17 SQ_TEX_SAMPLER_WORD_vs = SQ_TEX_SAMPLER_WORD_ps + SQ_TEX_SAMPLER_WORD_ps_num, // 18...35 SQ_TEX_SAMPLER_WORD_gs = SQ_TEX_SAMPLER_WORD_vs + SQ_TEX_SAMPLER_WORD_vs_num, // 36...53 SQ_TEX_SAMPLER_WORD_hs = SQ_TEX_SAMPLER_WORD_gs + SQ_TEX_SAMPLER_WORD_gs_num, // 54...71 SQ_TEX_SAMPLER_WORD_ls = SQ_TEX_SAMPLER_WORD_hs + SQ_TEX_SAMPLER_WORD_hs_num, // 72...89 SQ_TEX_SAMPLER_WORD_cs = SQ_TEX_SAMPLER_WORD_ls + SQ_TEX_SAMPLER_WORD_ls_num, // 90...107 SQ_LOOP_CONST = SQ_LOOP_CONST_0, SQ_LOOP_CONST_ps_num = 32, SQ_LOOP_CONST_vs_num = 32, SQ_LOOP_CONST_gs_num = 32, SQ_LOOP_CONST_hs_num = 32, SQ_LOOP_CONST_ls_num = 32, SQ_LOOP_CONST_cs_num = 32, SQ_LOOP_CONST_all_num = 192, SQ_LOOP_CONST_offset = 4, SQ_LOOP_CONST_ps = 0, // 0...31 SQ_LOOP_CONST_vs = SQ_LOOP_CONST_ps + SQ_LOOP_CONST_ps_num, // 32...63 SQ_LOOP_CONST_gs = SQ_LOOP_CONST_vs + SQ_LOOP_CONST_vs_num, // 64...95 SQ_LOOP_CONST_hs = SQ_LOOP_CONST_gs + SQ_LOOP_CONST_gs_num, // 96...127 SQ_LOOP_CONST_ls = SQ_LOOP_CONST_hs + SQ_LOOP_CONST_hs_num, // 128...159 SQ_LOOP_CONST_cs = SQ_LOOP_CONST_ls + SQ_LOOP_CONST_ls_num, // 160...191 SQ_BOOL_CONST = SQ_BOOL_CONST_0, /* 32 bits each */ SQ_BOOL_CONST_ps_num = 1, SQ_BOOL_CONST_vs_num = 1, SQ_BOOL_CONST_gs_num = 1, SQ_BOOL_CONST_hs_num = 1, SQ_BOOL_CONST_ls_num = 1, SQ_BOOL_CONST_cs_num = 1, SQ_BOOL_CONST_all_num = 6, SQ_BOOL_CONST_offset = 4, SQ_BOOL_CONST_ps = 0, SQ_BOOL_CONST_vs = SQ_BOOL_CONST_ps + SQ_BOOL_CONST_ps_num, SQ_BOOL_CONST_gs = SQ_BOOL_CONST_vs + SQ_BOOL_CONST_vs_num, SQ_BOOL_CONST_hs = SQ_BOOL_CONST_gs + SQ_BOOL_CONST_gs_num, SQ_BOOL_CONST_ls = SQ_BOOL_CONST_hs + SQ_BOOL_CONST_hs_num, SQ_BOOL_CONST_cs = SQ_BOOL_CONST_ls + SQ_BOOL_CONST_ls_num, }; #endif xf86-video-ati-7.3.0/src/drmmode_display.h0000664000175000017500000001047212200020117015217 00000000000000/* * Copyright © 2007 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: * Dave Airlie * */ #ifndef DRMMODE_DISPLAY_H #define DRMMODE_DISPLAY_H #include "xf86drmMode.h" #ifdef HAVE_LIBUDEV #include "libudev.h" #endif #include "radeon_probe.h" #ifndef DRM_CAP_TIMESTAMP_MONOTONIC #define DRM_CAP_TIMESTAMP_MONOTONIC 0x6 #endif typedef struct { int fd; unsigned fb_id; drmModeResPtr mode_res; drmModeFBPtr mode_fb; int cpp; struct radeon_bo_manager *bufmgr; ScrnInfoPtr scrn; #ifdef HAVE_LIBUDEV struct udev_monitor *uevent_monitor; InputHandlerProc uevent_handler; #endif drmEventContext event_context; } drmmode_rec, *drmmode_ptr; typedef struct { drmmode_ptr drmmode; unsigned old_fb_id; int flip_count; void *event_data; unsigned int fe_frame; unsigned int fe_tv_sec; unsigned int fe_tv_usec; } drmmode_flipdata_rec, *drmmode_flipdata_ptr; typedef struct { drmmode_flipdata_ptr flipdata; Bool dispatch_me; } drmmode_flipevtcarrier_rec, *drmmode_flipevtcarrier_ptr; typedef struct { drmmode_ptr drmmode; drmModeCrtcPtr mode_crtc; int hw_id; struct radeon_bo *cursor_bo; struct radeon_bo *rotate_bo; unsigned rotate_fb_id; int dpms_mode; CARD64 dpms_last_ust; uint32_t dpms_last_seq; int dpms_last_fps; uint32_t interpolated_vblanks; uint16_t lut_r[256], lut_g[256], lut_b[256]; int scanout_pixmap_x; } drmmode_crtc_private_rec, *drmmode_crtc_private_ptr; typedef struct { drmModePropertyPtr mode_prop; uint64_t value; 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_encoders; drmModePropertyBlobPtr edid_blob; int dpms_enum_id; int num_props; drmmode_prop_ptr props; int enc_mask; int enc_clone_mask; } drmmode_output_private_rec, *drmmode_output_private_ptr; extern Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp); extern void drmmode_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode); extern void drmmode_fini(ScrnInfoPtr pScrn, drmmode_ptr drmmode); extern Bool drmmode_set_bufmgr(ScrnInfoPtr pScrn, drmmode_ptr drmmode, struct radeon_bo_manager *bufmgr); extern void drmmode_set_cursor(ScrnInfoPtr scrn, drmmode_ptr drmmode, int id, struct radeon_bo *bo); void drmmode_adjust_frame(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int x, int y); extern Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode); extern void drmmode_copy_fb(ScrnInfoPtr pScrn, drmmode_ptr drmmode); extern Bool drmmode_setup_colormap(ScreenPtr pScreen, ScrnInfoPtr pScrn); extern void drmmode_uevent_init(ScrnInfoPtr scrn, drmmode_ptr drmmode); extern void drmmode_uevent_fini(ScrnInfoPtr scrn, drmmode_ptr drmmode); extern int drmmode_get_height_align(ScrnInfoPtr scrn, uint32_t tiling); extern int drmmode_get_pitch_align(ScrnInfoPtr scrn, int bpe, uint32_t tiling); extern int drmmode_get_base_align(ScrnInfoPtr scrn, int bpe, uint32_t tiling); Bool radeon_do_pageflip(ScrnInfoPtr scrn, struct radeon_bo *new_front, void *data, int ref_crtc_hw_id); int drmmode_get_current_ust(int drm_fd, CARD64 *ust); #endif xf86-video-ati-7.3.0/src/atipcirename.h0000664000175000017500000000611712177731114014530 00000000000000/* * Copyright 2007 George Sapountzis * * 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. */ /** * Macros for porting drivers from legacy xfree86 PCI code to the pciaccess * library. The main purpose being to facilitate source code compatibility. */ #ifndef ATIPCIRENAME_H #define ATIPCIRENAME_H enum region_type { REGION_MEM, REGION_IO }; typedef struct pci_device *pciVideoPtr; #define PCI_DEV_VENDOR_ID(_pcidev) ((_pcidev)->vendor_id) #define PCI_DEV_DEVICE_ID(_pcidev) ((_pcidev)->device_id) #define PCI_DEV_REVISION(_pcidev) ((_pcidev)->revision) #define PCI_SUB_VENDOR_ID(_pcidev) ((_pcidev)->subvendor_id) #define PCI_SUB_DEVICE_ID(_pcidev) ((_pcidev)->subdevice_id) /* pci-rework functions take a 'pci_device' parameter instead of a tag */ #define PCI_DEV_TAG(_pcidev) (_pcidev) /* PCI_DEV macros, typically used in printf's, add domain ? XXX */ #define PCI_DEV_BUS(_pcidev) ((_pcidev)->bus) #define PCI_DEV_DEV(_pcidev) ((_pcidev)->dev) #define PCI_DEV_FUNC(_pcidev) ((_pcidev)->func) /* pci-rework functions take a 'pci_device' parameter instead of a tag */ #define PCI_CFG_TAG(_pcidev) (_pcidev) /* PCI_CFG macros, typically used in DRI init, contain the domain */ #define PCI_CFG_BUS(_pcidev) (((_pcidev)->domain << 8) | \ (_pcidev)->bus) #define PCI_CFG_DEV(_pcidev) ((_pcidev)->dev) #define PCI_CFG_FUNC(_pcidev) ((_pcidev)->func) #define PCI_REGION_BASE(_pcidev, _b, _type) ((_pcidev)->regions[(_b)].base_addr) #define PCI_REGION_SIZE(_pcidev, _b) ((_pcidev)->regions[(_b)].size) #define PCI_READ_BYTE(_pcidev, _value_ptr, _offset) \ pci_device_cfg_read_u8((_pcidev), (_value_ptr), (_offset)) #define PCI_READ_LONG(_pcidev, _value_ptr, _offset) \ pci_device_cfg_read_u32((_pcidev), (_value_ptr), (_offset)) #define PCI_WRITE_LONG(_pcidev, _value, _offset) \ pci_device_cfg_write_u32((_pcidev), (_value), (_offset)) #define ATI_DEVICE_MATCH(d, i) \ { PCI_VENDOR_ATI, (d), PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, (i) } #endif /* ATIPCIRENAME_H */ xf86-video-ati-7.3.0/src/evergreen_shader.c0000664000175000017500000036005212177731114015373 00000000000000/* * Copyright 2010 Advanced Micro Devices, 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: Alex Deucher * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "xf86.h" #include "evergreen_shader.h" #include "evergreen_reg.h" /* solid vs --------------------------------------- */ int evergreen_solid_vs(RADEONChipFamily ChipSet, uint32_t* shader) { int i = 0; /* 0 */ shader[i++] = CF_DWORD0(ADDR(4), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(1), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_VC), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 1 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_POS0), TYPE(SQ_EXPORT_POS), RW_GPR(1), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), BURST_COUNT(1), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(1)); /* 2 - always export a param whether it's used or not */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(0), TYPE(SQ_EXPORT_PARAM), RW_GPR(0), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), BURST_COUNT(0), VALID_PIXEL_MODE(0), END_OF_PROGRAM(1), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(0)); /* 3 - padding */ shader[i++] = 0x00000000; shader[i++] = 0x00000000; /* 4/5 */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), MEGA_FETCH_COUNT(8)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(1), DST_REL(0), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_0), DST_SEL_W(SQ_SEL_1), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(0), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(SQ_ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), MEGA_FETCH(1), ALT_CONST(0), BUFFER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = VTX_DWORD_PAD; return i; } /* solid ps --------------------------------------- */ int evergreen_solid_ps(RADEONChipFamily ChipSet, uint32_t* shader) { int i = 0; /* 0 */ shader[i++] = CF_ALU_DWORD0(ADDR(2), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_LOCK_1)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(4), ALT_CONST(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 1 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_PIXEL_MRT0), TYPE(SQ_EXPORT_PIXEL), RW_GPR(0), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(1)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), BURST_COUNT(1), VALID_PIXEL_MODE(0), END_OF_PROGRAM(1), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(1)); /* 2 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(1)); /* 3 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(1)); /* 4 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(1)); /* 5 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(1)); return i; } /* copy vs --------------------------------------- */ int evergreen_copy_vs(RADEONChipFamily ChipSet, uint32_t* shader) { int i = 0; /* 0 */ shader[i++] = CF_DWORD0(ADDR(4), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(2), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_VC), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 1 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_POS0), TYPE(SQ_EXPORT_POS), RW_GPR(1), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), BURST_COUNT(0), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(1)); /* 2 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(0), TYPE(SQ_EXPORT_PARAM), RW_GPR(0), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), BURST_COUNT(0), VALID_PIXEL_MODE(0), END_OF_PROGRAM(1), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(0)); /* 3 */ shader[i++] = 0x00000000; shader[i++] = 0x00000000; /* 4/5 */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), MEGA_FETCH_COUNT(16)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(1), DST_REL(0), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_0), DST_SEL_W(SQ_SEL_1), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(0), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(SQ_ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), MEGA_FETCH(1), ALT_CONST(0), BUFFER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = VTX_DWORD_PAD; /* 6/7 */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), MEGA_FETCH_COUNT(8)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(0), DST_REL(0), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_0), DST_SEL_W(SQ_SEL_1), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(8), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(SQ_ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), MEGA_FETCH(0), ALT_CONST(0), BUFFER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = VTX_DWORD_PAD; return i; } /* copy ps --------------------------------------- */ int evergreen_copy_ps(RADEONChipFamily ChipSet, uint32_t* shader) { int i = 0; /* CF INST 0 */ shader[i++] = CF_ALU_DWORD0(ADDR(3), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_NOP)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(4), ALT_CONST(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* CF INST 1 */ shader[i++] = CF_DWORD0(ADDR(8), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(1), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_TC), WHOLE_QUAD_MODE(0), BARRIER(1)); /* CF INST 2 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_PIXEL_MRT0), TYPE(SQ_EXPORT_PIXEL), RW_GPR(0), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(1)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), BURST_COUNT(1), VALID_PIXEL_MODE(0), END_OF_PROGRAM(1), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(1)); /* 3 interpolate tex coords */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 4 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 5 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 6 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 7 */ shader[i++] = 0x00000000; shader[i++] = 0x00000000; /* 8/9 TEX INST 0 */ shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE), INST_MOD(0), FETCH_WHOLE_QUAD(0), RESOURCE_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), ALT_CONST(0), RESOURCE_INDEX_MODE(SQ_CF_INDEX_NONE), SAMPLER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = TEX_DWORD1(DST_GPR(0), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_X), /* R */ DST_SEL_Y(SQ_SEL_Y), /* G */ DST_SEL_Z(SQ_SEL_Z), /* B */ DST_SEL_W(SQ_SEL_W), /* A */ LOD_BIAS(0), COORD_TYPE_X(TEX_UNNORMALIZED), COORD_TYPE_Y(TEX_UNNORMALIZED), COORD_TYPE_Z(TEX_UNNORMALIZED), COORD_TYPE_W(TEX_UNNORMALIZED)); shader[i++] = TEX_DWORD2(OFFSET_X(0), OFFSET_Y(0), OFFSET_Z(0), SAMPLER_ID(0), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1)); shader[i++] = TEX_DWORD_PAD; return i; } int evergreen_xv_vs(RADEONChipFamily ChipSet, uint32_t* shader) { int i = 0; /* 0 */ shader[i++] = CF_DWORD0(ADDR(6), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(2), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_VC), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 1 - ALU */ shader[i++] = CF_ALU_DWORD0(ADDR(4), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_LOCK_1)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(2), ALT_CONST(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 2 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_POS0), TYPE(SQ_EXPORT_POS), RW_GPR(1), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(3)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), BURST_COUNT(1), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(1)); /* 3 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(0), TYPE(SQ_EXPORT_PARAM), RW_GPR(0), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(3)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), BURST_COUNT(1), VALID_PIXEL_MODE(0), END_OF_PROGRAM(1), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(0)); /* 4 texX / w */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 5 texY / h */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 6/7 */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), MEGA_FETCH_COUNT(16)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(1), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_0), DST_SEL_W(SQ_SEL_1), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(0), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(SQ_ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), MEGA_FETCH(1), ALT_CONST(0), BUFFER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = VTX_DWORD_PAD; /* 8/9 */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), MEGA_FETCH_COUNT(8)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(0), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_0), DST_SEL_W(SQ_SEL_1), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(8), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(SQ_ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), MEGA_FETCH(0), ALT_CONST(0), BUFFER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = VTX_DWORD_PAD; return i; } int evergreen_xv_ps(RADEONChipFamily ChipSet, uint32_t* shader) { int i = 0; /* 0 */ shader[i++] = CF_ALU_DWORD0(ADDR(5), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_NOP)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(4), ALT_CONST(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 1 */ shader[i++] = CF_DWORD0(ADDR(21), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_BOOL), I_COUNT(0), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_CALL), WHOLE_QUAD_MODE(0), BARRIER(0)); /* 2 */ shader[i++] = CF_DWORD0(ADDR(30), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_NOT_BOOL), I_COUNT(0), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_CALL), WHOLE_QUAD_MODE(0), BARRIER(0)); /* 3 */ shader[i++] = CF_ALU_DWORD0(ADDR(9), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_LOCK_1)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(12), ALT_CONST(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 4 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_PIXEL_MRT0), TYPE(SQ_EXPORT_PIXEL), RW_GPR(2), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(3)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), BURST_COUNT(1), VALID_PIXEL_MODE(0), END_OF_PROGRAM(1), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(1)); /* 5 interpolate tex coords */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 6 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 7 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 8 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 9,10,11,12 */ /* r2.x = MAD(c0.w, r1.x, c0.x) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_X), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* r2.y = MAD(c0.w, r1.x, c0.y) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_Y), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* r2.z = MAD(c0.w, r1.x, c0.z) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_Z), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* r2.w = MAD(0, 0, 1) */ shader[i++] = ALU_DWORD0(SRC0_SEL(SQ_ALU_SRC_0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(SQ_ALU_SRC_0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_1), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_X), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 13,14,15,16 */ /* r2.x = MAD(c1.x, r1.y, pv.x) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_PV), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_X), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* r2.y = MAD(c1.y, r1.y, pv.y) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_PV), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_Y), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* r2.z = MAD(c1.z, r1.y, pv.z) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_PV), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_Z), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* r2.w = MAD(0, 0, 1) */ shader[i++] = ALU_DWORD0(SRC0_SEL(SQ_ALU_SRC_0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(SQ_ALU_SRC_0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_1), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_W), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 17,18,19,20 */ /* r2.x = MAD(c2.x, r1.z, pv.x) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 2), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_PV), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_X), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(1)); /* r2.y = MAD(c2.y, r1.z, pv.y) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 2), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_PV), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_Y), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(1)); /* r2.z = MAD(c2.z, r1.z, pv.z) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 2), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_PV), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_Z), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(1)); /* r2.w = MAD(0, 0, 1) */ shader[i++] = ALU_DWORD0(SRC0_SEL(SQ_ALU_SRC_0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(SQ_ALU_SRC_0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_1), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_X), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(1)); /* 21 */ shader[i++] = CF_DWORD0(ADDR(24), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(3), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_TC), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 22 */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_RETURN), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 23 */ shader[i++] = 0x00000000; shader[i++] = 0x00000000; /* 24/25 */ shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE), INST_MOD(0), FETCH_WHOLE_QUAD(0), RESOURCE_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), ALT_CONST(0), RESOURCE_INDEX_MODE(SQ_CF_INDEX_NONE), SAMPLER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = TEX_DWORD1(DST_GPR(1), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_MASK), DST_SEL_Z(SQ_SEL_MASK), DST_SEL_W(SQ_SEL_1), LOD_BIAS(0), COORD_TYPE_X(TEX_NORMALIZED), COORD_TYPE_Y(TEX_NORMALIZED), COORD_TYPE_Z(TEX_NORMALIZED), COORD_TYPE_W(TEX_NORMALIZED)); shader[i++] = TEX_DWORD2(OFFSET_X(0), OFFSET_Y(0), OFFSET_Z(0), SAMPLER_ID(0), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1)); shader[i++] = TEX_DWORD_PAD; /* 26/27 */ shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE), INST_MOD(0), FETCH_WHOLE_QUAD(0), RESOURCE_ID(1), SRC_GPR(0), SRC_REL(ABSOLUTE), ALT_CONST(0), RESOURCE_INDEX_MODE(SQ_CF_INDEX_NONE), SAMPLER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = TEX_DWORD1(DST_GPR(1), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_MASK), DST_SEL_Y(SQ_SEL_MASK), DST_SEL_Z(SQ_SEL_X), DST_SEL_W(SQ_SEL_MASK), LOD_BIAS(0), COORD_TYPE_X(TEX_NORMALIZED), COORD_TYPE_Y(TEX_NORMALIZED), COORD_TYPE_Z(TEX_NORMALIZED), COORD_TYPE_W(TEX_NORMALIZED)); shader[i++] = TEX_DWORD2(OFFSET_X(0), OFFSET_Y(0), OFFSET_Z(0), SAMPLER_ID(1), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1)); shader[i++] = TEX_DWORD_PAD; /* 28/29 */ shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE), INST_MOD(0), FETCH_WHOLE_QUAD(0), RESOURCE_ID(2), SRC_GPR(0), SRC_REL(ABSOLUTE), ALT_CONST(0), RESOURCE_INDEX_MODE(SQ_CF_INDEX_NONE), SAMPLER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = TEX_DWORD1(DST_GPR(1), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_MASK), DST_SEL_Y(SQ_SEL_X), DST_SEL_Z(SQ_SEL_MASK), DST_SEL_W(SQ_SEL_MASK), LOD_BIAS(0), COORD_TYPE_X(TEX_NORMALIZED), COORD_TYPE_Y(TEX_NORMALIZED), COORD_TYPE_Z(TEX_NORMALIZED), COORD_TYPE_W(TEX_NORMALIZED)); shader[i++] = TEX_DWORD2(OFFSET_X(0), OFFSET_Y(0), OFFSET_Z(0), SAMPLER_ID(2), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1)); shader[i++] = TEX_DWORD_PAD; /* 30 */ shader[i++] = CF_DWORD0(ADDR(32), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(1), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_TC), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 31 */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_RETURN), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 32/33 */ shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE), INST_MOD(0), FETCH_WHOLE_QUAD(0), RESOURCE_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), ALT_CONST(0), RESOURCE_INDEX_MODE(SQ_CF_INDEX_NONE), SAMPLER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = TEX_DWORD1(DST_GPR(1), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_Z), DST_SEL_W(SQ_SEL_1), LOD_BIAS(0), COORD_TYPE_X(TEX_NORMALIZED), COORD_TYPE_Y(TEX_NORMALIZED), COORD_TYPE_Z(TEX_NORMALIZED), COORD_TYPE_W(TEX_NORMALIZED)); shader[i++] = TEX_DWORD2(OFFSET_X(0), OFFSET_Y(0), OFFSET_Z(0), SAMPLER_ID(0), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1)); shader[i++] = TEX_DWORD_PAD; return i; } /* comp vs --------------------------------------- */ int evergreen_comp_vs(RADEONChipFamily ChipSet, uint32_t* shader) { int i = 0; /* 0 */ shader[i++] = CF_DWORD0(ADDR(3), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_BOOL), I_COUNT(0), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_CALL), WHOLE_QUAD_MODE(0), BARRIER(0)); /* 1 */ shader[i++] = CF_DWORD0(ADDR(9), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_NOT_BOOL), I_COUNT(0), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_CALL), WHOLE_QUAD_MODE(0), BARRIER(0)); /* 2 */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), END_OF_PROGRAM(1), CF_INST(SQ_CF_INST_NOP), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 3 - mask sub */ shader[i++] = CF_DWORD0(ADDR(44), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(3), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_VC), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 4 - ALU */ shader[i++] = CF_ALU_DWORD0(ADDR(14), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_LOCK_1)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(20), ALT_CONST(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 5 - dst */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_POS0), TYPE(SQ_EXPORT_POS), RW_GPR(2), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1), BURST_COUNT(1), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(1)); /* 6 - src */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(0), TYPE(SQ_EXPORT_PARAM), RW_GPR(1), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1), BURST_COUNT(1), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_EXPORT), MARK(0), BARRIER(0)); /* 7 - mask */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(1), TYPE(SQ_EXPORT_PARAM), RW_GPR(0), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1), BURST_COUNT(1), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_EXPORT_DONE), WHOLE_QUAD_MODE(0), BARRIER(0)); /* 8 */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_RETURN), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 9 - non-mask sub */ shader[i++] = CF_DWORD0(ADDR(50), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(2), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_VC), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 10 - ALU */ shader[i++] = CF_ALU_DWORD0(ADDR(34), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_LOCK_1)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(10), ALT_CONST(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 11 - dst */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_POS0), TYPE(SQ_EXPORT_POS), RW_GPR(1), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1), BURST_COUNT(0), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(1)); /* 12 - src */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(0), TYPE(SQ_EXPORT_PARAM), RW_GPR(0), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1), BURST_COUNT(0), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(0)); /* 13 */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_RETURN), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 14 srcX.x DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(3), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 15 srcX.y DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(3), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 16 srcX.z DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(3), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 17 srcX.w DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(3), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 18 srcY.x DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(3), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 19 srcY.y DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(3), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 20 srcY.z DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(3), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 21 srcY.w DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(3), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 22 maskX.x DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 2), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(4), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 23 maskX.y DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 2), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(4), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 24 maskX.z DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 2), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(4), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 25 maskX.w DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 2), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(4), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 26 maskY.x DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 3), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(4), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 27 maskY.y DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 3), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(4), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 28 maskY.z DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 3), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(4), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 29 maskY.w DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 3), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(4), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 30 srcX / w */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 3), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(1), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 31 srcY / h */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 3), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(1), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 32 maskX / w */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 4), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 2), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 33 maskY / h */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 4), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 3), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 34 srcX.x DOT4 - non-mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 35 srcX.y DOT4 - non-mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 36 srcX.z DOT4 - non-mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 37 srcX.w DOT4 - non-mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 38 srcY.x DOT4 - non-mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 39 srcY.y DOT4 - non-mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 40 srcY.z DOT4 - non-mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 41 srcY.w DOT4 - non-mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 42 srcX / w */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 2), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 43 srcY / h */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 2), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_KCACHE0_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* mask vfetch - 44/45 - dst */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), MEGA_FETCH_COUNT(24)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(2), DST_REL(0), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_0), DST_SEL_W(SQ_SEL_1), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(0), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(SQ_ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), MEGA_FETCH(1), ALT_CONST(0), BUFFER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = VTX_DWORD_PAD; /* 46/47 - src */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), MEGA_FETCH_COUNT(8)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(1), DST_REL(0), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_1), DST_SEL_W(SQ_SEL_0), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(8), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(SQ_ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), MEGA_FETCH(0), ALT_CONST(0), BUFFER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = VTX_DWORD_PAD; /* 48/49 - mask */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), MEGA_FETCH_COUNT(8)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(0), DST_REL(0), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_1), DST_SEL_W(SQ_SEL_0), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(16), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(SQ_ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), MEGA_FETCH(0), ALT_CONST(0), BUFFER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = VTX_DWORD_PAD; /* no mask vfetch - 50/51 - dst */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), MEGA_FETCH_COUNT(16)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(1), DST_REL(0), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_0), DST_SEL_W(SQ_SEL_1), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(0), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(SQ_ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), MEGA_FETCH(1), ALT_CONST(0), BUFFER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = VTX_DWORD_PAD; /* 52/53 - src */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), MEGA_FETCH_COUNT(8)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(0), DST_REL(0), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_1), DST_SEL_W(SQ_SEL_0), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(8), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(SQ_ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), MEGA_FETCH(0), ALT_CONST(0), BUFFER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = VTX_DWORD_PAD; return i; } /* comp ps --------------------------------------- */ int evergreen_comp_ps(RADEONChipFamily ChipSet, uint32_t *shader) { int i = 0; /* 0 */ /* call interp-fetch-mask if boolean1 == true */ shader[i++] = CF_DWORD0(ADDR(11), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(1), COND(SQ_CF_COND_BOOL), I_COUNT(0), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_CALL), WHOLE_QUAD_MODE(0), BARRIER(0)); /* 1 */ /* call read-constant-mask if boolean1 == false */ shader[i++] = CF_DWORD0(ADDR(14), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(1), COND(SQ_CF_COND_NOT_BOOL), I_COUNT(0), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_CALL), WHOLE_QUAD_MODE(0), BARRIER(0)); /* 2 */ /* call interp-fetch-src if boolean0 == true */ shader[i++] = CF_DWORD0(ADDR(6), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_BOOL), I_COUNT(0), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_CALL), WHOLE_QUAD_MODE(0), BARRIER(0)); /* 3 */ /* call read-constant-src if boolean0 == false */ shader[i++] = CF_DWORD0(ADDR(9), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_NOT_BOOL), I_COUNT(0), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_CALL), WHOLE_QUAD_MODE(0), BARRIER(0)); /* 4 */ /* src IN mask (GPR2 := GPR1 .* GPR0) */ shader[i++] = CF_ALU_DWORD0(ADDR(16), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_NOP)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(4), ALT_CONST(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 5 */ /* export pixel data */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_PIXEL_MRT0), TYPE(SQ_EXPORT_PIXEL), RW_GPR(0), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(1)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), BURST_COUNT(1), VALID_PIXEL_MODE(0), END_OF_PROGRAM(1), CF_INST(SQ_CF_INST_EXPORT_DONE), MARK(0), BARRIER(1)); /* subroutine interp-fetch-src */ /* 6 */ /* interpolate src */ shader[i++] = CF_ALU_DWORD0(ADDR(20), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_NOP)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(4), ALT_CONST(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 7 */ /* texture fetch src into GPR0 */ shader[i++] = CF_DWORD0(ADDR(24), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(1), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_TC), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 8 */ /* return */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_RETURN), WHOLE_QUAD_MODE(0), BARRIER(0)); /* subroutine read-constant-src */ /* 9 */ /* read constants into GPR0 */ shader[i++] = CF_ALU_DWORD0(ADDR(26), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_LOCK_1)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(4), ALT_CONST(1), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 10 */ /* return */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_RETURN), WHOLE_QUAD_MODE(0), BARRIER(0)); /* subroutine interp-fetch-mask */ /* 11 */ /* interpolate mask */ shader[i++] = CF_ALU_DWORD0(ADDR(30), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_NOP)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(4), ALT_CONST(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 12 */ /* texture fetch mask into GPR1 */ shader[i++] = CF_DWORD0(ADDR(34), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(1), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_TC), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 13 */ /* return */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_RETURN), WHOLE_QUAD_MODE(0), BARRIER(0)); /* subroutine read-constant-src */ /* 14 */ /* read constants into GPR1 */ shader[i++] = CF_ALU_DWORD0(ADDR(36), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_LOCK_1)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(4), ALT_CONST(1), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 15 */ /* return */ shader[i++] = CF_DWORD0(ADDR(0), JUMPTABLE_SEL(SQ_CF_JUMPTABLE_SEL_CONST_A)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), VALID_PIXEL_MODE(0), END_OF_PROGRAM(0), CF_INST(SQ_CF_INST_RETURN), WHOLE_QUAD_MODE(0), BARRIER(0)); /* ALU clauses */ /* 16 */ /* MUL gpr[0].x gpr[0].x gpr[1].x */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(1)); /* 17 */ /* MUL gpr[0].y gpr[0].y gpr[1].y */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(1)); /* 18 */ /* MUL gpr[0].z gpr[0].z gpr[1].z */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(1)); /* 19 */ /* MUL gpr[0].w gpr[0].w gpr[1].w */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(1)); /* 20 */ /* INTERP_XY GPR0.x, GPR0.y PARAM0.x */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 21 */ /* INTERP_XY GPR0.y, GPR0.x PARAM0.x */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 22 */ /* INTERP_XY GPR0.z, GPR0.y PARAM0.x */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 23 */ /* INTERP_XY GPR0.w, GPR0.x PARAM0.x */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 24/25 */ /* SAMPLE RID=0 GPR0, GPR0 */ shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE), INST_MOD(0), FETCH_WHOLE_QUAD(0), RESOURCE_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), ALT_CONST(0), RESOURCE_INDEX_MODE(SQ_CF_INDEX_NONE), SAMPLER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = TEX_DWORD1(DST_GPR(0), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_Z), DST_SEL_W(SQ_SEL_W), LOD_BIAS(0), COORD_TYPE_X(TEX_NORMALIZED), COORD_TYPE_Y(TEX_NORMALIZED), COORD_TYPE_Z(TEX_NORMALIZED), COORD_TYPE_W(TEX_NORMALIZED)); shader[i++] = TEX_DWORD2(OFFSET_X(0), OFFSET_Y(0), OFFSET_Z(0), SAMPLER_ID(0), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1)); shader[i++] = TEX_DWORD_PAD; /* 26 */ /* MOV GPR0.x, KC4.x */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 4), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(1)); /* 27 */ /* MOV GPR0.y, KC4.y */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 4), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(1)); /* 28 */ /* MOV GPR0.z, KC4.z */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 4), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(1)); /* 29 */ /* MOV GPR0.w, KC4.w */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 4), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(1)); /* 30 */ /* INTERP_XY GPR1.x, PARAM1 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(1), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 31 */ /* INTERP_XY GPR1.y, PARAM1 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(1), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 32 */ /* INTERP_XY GPR1.z, PARAM1 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(1), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 33 */ /* INTERP_XY GPR1.w, PARAM1 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_PARAM_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_INTERP_XY), BANK_SWIZZLE(SQ_ALU_VEC_210), DST_GPR(1), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 34/35 */ /* SAMPLE RID=1 GPR1, GPR1 */ shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE), INST_MOD(0), FETCH_WHOLE_QUAD(0), RESOURCE_ID(1), SRC_GPR(1), SRC_REL(ABSOLUTE), ALT_CONST(0), RESOURCE_INDEX_MODE(SQ_CF_INDEX_NONE), SAMPLER_INDEX_MODE(SQ_CF_INDEX_NONE)); shader[i++] = TEX_DWORD1(DST_GPR(1), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_Z), DST_SEL_W(SQ_SEL_W), LOD_BIAS(0), COORD_TYPE_X(TEX_NORMALIZED), COORD_TYPE_Y(TEX_NORMALIZED), COORD_TYPE_Z(TEX_NORMALIZED), COORD_TYPE_W(TEX_NORMALIZED)); shader[i++] = TEX_DWORD2(OFFSET_X(0), OFFSET_Y(0), OFFSET_Z(0), SAMPLER_ID(1), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1)); shader[i++] = TEX_DWORD_PAD; /* 36 */ /* MOV GPR1.x, KC5.x */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 5), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(1), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(1)); /* 37 */ /* MOV GPR1.y, KC5.y */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 5), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(1), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(1)); /* 38 */ /* MOV GPR1.z, KC5.z */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 5), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(1), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(1)); /* 39 */ /* MOV GPR1.w, KC5.w */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_KCACHE0_BASE + 5), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(1), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(1)); return i; } xf86-video-ati-7.3.0/src/radeon_glamor.c0000664000175000017500000002271212270501170014661 00000000000000/* * Copyright © 2011 Intel Corporation. * 2012 Advanced Micro Devices, 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #define GLAMOR_FOR_XORG 1 #include #include "radeon.h" #include "radeon_bo_helper.h" #if HAS_DEVPRIVATEKEYREC DevPrivateKeyRec glamor_pixmap_index; #else int glamor_pixmap_index; #endif void radeon_glamor_exchange_buffers(PixmapPtr src, PixmapPtr dst) { RADEONInfoPtr info = RADEONPTR(xf86ScreenToScrn(dst->drawable.pScreen)); if (!info->use_glamor) return; glamor_egl_exchange_buffers(src, dst); } Bool radeon_glamor_create_screen_resources(ScreenPtr screen) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); RADEONInfoPtr info = RADEONPTR(scrn); if (!info->use_glamor) return TRUE; if (!glamor_glyphs_init(screen)) return FALSE; if (!glamor_egl_create_textured_screen_ext(screen, info->front_bo->handle, scrn->displayWidth * info->pixel_bytes, NULL)) return FALSE; return TRUE; } Bool radeon_glamor_pre_init(ScrnInfoPtr scrn) { RADEONInfoPtr info = RADEONPTR(scrn); pointer glamor_module; CARD32 version; const char *s; if (!info->dri2.available) return FALSE; s = xf86GetOptValString(info->Options, OPTION_ACCELMETHOD); if (s == NULL && info->ChipFamily < CHIP_FAMILY_TAHITI) return FALSE; if (s && strcasecmp(s, "glamor") != 0) return FALSE; if (info->ChipFamily < CHIP_FAMILY_R600) { xf86DrvMsg(scrn->scrnIndex, s ? X_ERROR : X_WARNING, "glamor requires R600 or newer GPU, disabling.\n"); return FALSE; } if (scrn->depth < 24) { xf86DrvMsg(scrn->scrnIndex, s ? X_ERROR : X_WARNING, "glamor requires depth >= 24, disabling.\n"); return FALSE; } #if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(1,15,0,0,0) if (!xf86LoaderCheckSymbol("glamor_egl_init")) { xf86DrvMsg(scrn->scrnIndex, s ? X_ERROR : X_WARNING, "glamor requires Load \"glamoregl\" in " "Section \"Module\", disabling.\n"); return FALSE; } #endif /* Load glamor module */ if ((glamor_module = xf86LoadSubModule(scrn, GLAMOR_EGL_MODULE_NAME))) { version = xf86GetModuleVersion(glamor_module); if (version < MODULE_VERSION_NUMERIC(0,3,1)) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Incompatible glamor version, required >= 0.3.0.\n"); return FALSE; } else { if (glamor_egl_init(scrn, info->dri2.drm_fd)) { xf86DrvMsg(scrn->scrnIndex, X_INFO, "glamor detected, initialising EGL layer.\n"); } else { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "glamor detected, failed to initialize EGL.\n"); return FALSE; } } } else { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "glamor not available\n"); return FALSE; } info->use_glamor = TRUE; return TRUE; } Bool radeon_glamor_create_textured_pixmap(PixmapPtr pixmap) { ScrnInfoPtr scrn = xf86ScreenToScrn(pixmap->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(scrn); struct radeon_pixmap *priv; if ((info->use_glamor) == 0) return TRUE; priv = radeon_get_pixmap_private(pixmap); if (!priv->stride) priv->stride = pixmap->devKind; if (glamor_egl_create_textured_pixmap(pixmap, priv->bo->handle, priv->stride)) return TRUE; else return FALSE; } Bool radeon_glamor_pixmap_is_offscreen(PixmapPtr pixmap) { struct radeon_pixmap *priv = radeon_get_pixmap_private(pixmap); return priv && priv->bo; } #ifdef CREATE_PIXMAP_USAGE_SHARED #define RADEON_CREATE_PIXMAP_SHARED (CREATE_PIXMAP_USAGE_SHARED | RADEON_CREATE_PIXMAP_DRI2) #else #define RADEON_CREATE_PIXMAP_SHARED RADEON_CREATE_PIXMAP_DRI2 #endif static PixmapPtr radeon_glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth, unsigned usage) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); struct radeon_pixmap *priv; PixmapPtr pixmap, new_pixmap = NULL; if (!(usage & RADEON_CREATE_PIXMAP_SHARED)) { pixmap = glamor_create_pixmap(screen, w, h, depth, usage); if (pixmap) return pixmap; } if (w > 32767 || h > 32767) return NullPixmap; if (depth == 1) return fbCreatePixmap(screen, w, h, depth, usage); if (usage == CREATE_PIXMAP_USAGE_GLYPH_PICTURE && w <= 32 && h <= 32) return fbCreatePixmap(screen, w, h, depth, usage); pixmap = fbCreatePixmap(screen, 0, 0, depth, usage); if (pixmap == NullPixmap) return pixmap; if (w && h) { priv = calloc(1, sizeof (struct radeon_pixmap)); if (priv == NULL) goto fallback_pixmap; priv->bo = radeon_alloc_pixmap_bo(scrn, w, h, depth, usage, pixmap->drawable.bitsPerPixel, &priv->stride, &priv->surface, &priv->tiling_flags); if (!priv->bo) goto fallback_priv; radeon_set_pixmap_private(pixmap, priv); screen->ModifyPixmapHeader(pixmap, w, h, 0, 0, priv->stride, NULL); if (!radeon_glamor_create_textured_pixmap(pixmap)) goto fallback_glamor; } return pixmap; fallback_glamor: if (usage & RADEON_CREATE_PIXMAP_SHARED) { /* XXX need further work to handle the DRI2 failure case. * Glamor don't know how to handle a BO only pixmap. Put * a warning indicator here. */ xf86DrvMsg(scrn->scrnIndex, X_WARNING, "Failed to create textured DRI2/PRIME pixmap."); return pixmap; } /* Create textured pixmap failed means glamor failed to * create a texture from current BO for some reasons. We turn * to create a new glamor pixmap and clean up current one. * One thing need to be noted, this new pixmap doesn't * has a priv and bo attached to it. It's glamor's responsbility * to take care of it. Glamor will mark this new pixmap as a * texture only pixmap and will never fallback to DDX layer * afterwards. */ new_pixmap = glamor_create_pixmap(screen, w, h, depth, usage); radeon_bo_unref(priv->bo); fallback_priv: free(priv); fallback_pixmap: fbDestroyPixmap(pixmap); if (new_pixmap) return new_pixmap; else return fbCreatePixmap(screen, w, h, depth, usage); } static Bool radeon_glamor_destroy_pixmap(PixmapPtr pixmap) { if (pixmap->refcnt == 1) { glamor_egl_destroy_textured_pixmap(pixmap); radeon_set_pixmap_bo(pixmap, NULL); } fbDestroyPixmap(pixmap); return TRUE; } #ifdef RADEON_PIXMAP_SHARING static Bool radeon_glamor_share_pixmap_backing(PixmapPtr pixmap, ScreenPtr slave, void **handle_p) { struct radeon_pixmap *priv = radeon_get_pixmap_private(pixmap); if (!priv) return FALSE; return radeon_share_pixmap_backing(priv->bo, handle_p); } static Bool radeon_glamor_set_shared_pixmap_backing(PixmapPtr pixmap, void *handle) { ScreenPtr screen = pixmap->drawable.pScreen; ScrnInfoPtr scrn = xf86ScreenToScrn(screen); struct radeon_surface surface; struct radeon_pixmap *priv; if (!radeon_set_shared_pixmap_backing(pixmap, handle, &surface)) return FALSE; priv = radeon_get_pixmap_private(pixmap); priv->stride = pixmap->devKind; priv->surface = surface; priv->tiling_flags = 0; if (!radeon_glamor_create_textured_pixmap(pixmap)) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Failed to get PRIME drawable for glamor pixmap.\n"); return FALSE; } screen->ModifyPixmapHeader(pixmap, pixmap->drawable.width, pixmap->drawable.height, 0, 0, priv->stride, NULL); return TRUE; } #endif /* RADEON_PIXMAP_SHARING */ Bool radeon_glamor_init(ScreenPtr screen) { ScrnInfoPtr scrn = xf86ScreenToScrn(screen); if (!glamor_init(screen, GLAMOR_INVERTED_Y_AXIS | GLAMOR_USE_EGL_SCREEN | GLAMOR_USE_SCREEN | GLAMOR_USE_PICTURE_SCREEN)) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Failed to initialize glamor.\n"); return FALSE; } if (!glamor_egl_init_textured_pixmap(screen)) { xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Failed to initialize textured pixmap of screen for glamor.\n"); return FALSE; } #if HAS_DIXREGISTERPRIVATEKEY if (!dixRegisterPrivateKey(&glamor_pixmap_index, PRIVATE_PIXMAP, 0)) #else if (!dixRequestPrivate(&glamor_pixmap_index, 0)) #endif return FALSE; screen->CreatePixmap = radeon_glamor_create_pixmap; screen->DestroyPixmap = radeon_glamor_destroy_pixmap; #ifdef RADEON_PIXMAP_SHARING screen->SharePixmapBacking = radeon_glamor_share_pixmap_backing; screen->SetSharedPixmapBacking = radeon_glamor_set_shared_pixmap_backing; #endif xf86DrvMsg(scrn->scrnIndex, X_INFO, "Use GLAMOR acceleration.\n"); return TRUE; } void radeon_glamor_flush(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); if (info->use_glamor) glamor_block_handler(pScrn->pScreen); } XF86VideoAdaptorPtr radeon_glamor_xv_init(ScreenPtr pScreen, int num_adapt) { return glamor_xv_init(pScreen, num_adapt); } xf86-video-ati-7.3.0/src/radeon_version.h0000664000175000017500000000506312177731114015103 00000000000000/* * Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * 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 Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE 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. */ #ifndef _RADEON_VERSION_H_ #define _RADEON_VERSION_H_ 1 #undef RADEON_NAME #undef RADEON_DRIVER_NAME #undef R200_DRIVER_NAME #undef RADEON_VERSION_MAJOR #undef RADEON_VERSION_MINOR #undef RADEON_VERSION_PATCH #undef RADEON_VERSION_CURRENT #undef RADEON_VERSION_EVALUATE #undef RADEON_VERSION_STRINGIFY #undef RADEON_VERSION_NAME #define RADEON_NAME "RADEON" #define RADEON_DRIVER_NAME "radeon" #define R200_DRIVER_NAME "r200" #define R300_DRIVER_NAME "r300" #define R600_DRIVER_NAME "r600" #define SI_DRIVER_NAME "radeonsi" #define RADEON_VERSION_MAJOR PACKAGE_VERSION_MAJOR #define RADEON_VERSION_MINOR PACKAGE_VERSION_MINOR #define RADEON_VERSION_PATCH PACKAGE_VERSION_PATCHLEVEL #ifndef RADEON_VERSION_EXTRA #define RADEON_VERSION_EXTRA "" #endif #define RADEON_VERSION_CURRENT \ ((RADEON_VERSION_MAJOR << 20) | \ (RADEON_VERSION_MINOR << 10) | \ (RADEON_VERSION_PATCH)) #define RADEON_VERSION_EVALUATE(__x) #__x #define RADEON_VERSION_STRINGIFY(_x) RADEON_VERSION_EVALUATE(_x) #define RADEON_VERSION_NAME \ RADEON_VERSION_STRINGIFY(RADEON_VERSION_MAJOR) "." \ RADEON_VERSION_STRINGIFY(RADEON_VERSION_MINOR) "." \ RADEON_VERSION_STRINGIFY(RADEON_VERSION_PATCH) RADEON_VERSION_EXTRA #endif /* _RADEON_VERSION_H_ */ xf86-video-ati-7.3.0/src/radeon_bo_helper.h0000664000175000017500000000316412177731114015355 00000000000000/* * Copyright 2012 Advanced Micro Devices, 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. */ #ifndef RADEON_BO_HELPER_H #define RADEON_BO_HELPER_H 1 extern struct radeon_bo* radeon_alloc_pixmap_bo(ScrnInfoPtr pScrn, int width, int height, int depth, int usage_hint, int bitsPerPixel, int *new_pitch, struct radeon_surface *new_surface, uint32_t *new_tiling); extern Bool radeon_share_pixmap_backing(struct radeon_bo *bo, void **handle_p); extern Bool radeon_set_shared_pixmap_backing(PixmapPtr ppix, void *fd_handle, struct radeon_surface *surface); #endif /* RADEON_BO_HELPER_H */ xf86-video-ati-7.3.0/src/ati.h0000664000175000017500000000267512177731114012651 00000000000000/* * Copyright 1999 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * 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 Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE 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. */ #ifndef ___ATI_H___ #define ___ATI_H___ 1 #include #include #include "xf86Pci.h" #include "xf86.h" #include "xf86_OSproc.h" extern void ati_gdev_subdriver(pointer options); #endif /* ___ATI_H___ */ xf86-video-ati-7.3.0/src/r6xx_accel.c0000664000175000017500000011531612177731114014122 00000000000000/* * Copyright 2008 Advanced Micro Devices, 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: Alex Deucher * Matthias Hopf */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "xf86.h" #include #include "radeon.h" #include "r600_shader.h" #include "radeon_reg.h" #include "r600_reg.h" #include "r600_state.h" #include "radeon_drm.h" #include "radeon_vbo.h" #include "radeon_exa_shared.h" static const uint32_t R600_ROP[16] = { RADEON_ROP3_ZERO, /* GXclear */ RADEON_ROP3_DSa, /* Gxand */ RADEON_ROP3_SDna, /* GXandReverse */ RADEON_ROP3_S, /* GXcopy */ RADEON_ROP3_DSna, /* GXandInverted */ RADEON_ROP3_D, /* GXnoop */ RADEON_ROP3_DSx, /* GXxor */ RADEON_ROP3_DSo, /* GXor */ RADEON_ROP3_DSon, /* GXnor */ RADEON_ROP3_DSxn, /* GXequiv */ RADEON_ROP3_Dn, /* GXinvert */ RADEON_ROP3_SDno, /* GXorReverse */ RADEON_ROP3_Sn, /* GXcopyInverted */ RADEON_ROP3_DSno, /* GXorInverted */ RADEON_ROP3_DSan, /* GXnand */ RADEON_ROP3_ONE, /* GXset */ }; /* we try and batch operations together under KMS - but it doesn't work yet without misrendering */ #define KMS_MULTI_OP 1 /* Flush the indirect buffer to the kernel for submission to the card */ void R600CPFlushIndirect(ScrnInfoPtr pScrn) { radeon_cs_flush_indirect(pScrn); } void R600IBDiscard(ScrnInfoPtr pScrn) { radeon_ib_discard(pScrn); } void r600_wait_3d_idle_clean(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); //flush caches, don't generate timestamp BEGIN_BATCH(5); PACK3(IT_EVENT_WRITE, 1); E32(CACHE_FLUSH_AND_INV_EVENT); // wait for 3D idle clean EREG(WAIT_UNTIL, (WAIT_3D_IDLE_bit | WAIT_3D_IDLECLEAN_bit)); END_BATCH(); } void r600_wait_3d_idle(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); BEGIN_BATCH(3); EREG(WAIT_UNTIL, WAIT_3D_IDLE_bit); END_BATCH(); } void r600_start_3d(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); if (info->ChipFamily < CHIP_FAMILY_RV770) { BEGIN_BATCH(5); PACK3(IT_START_3D_CMDBUF, 1); E32(0); } else BEGIN_BATCH(3); PACK3(IT_CONTEXT_CONTROL, 2); E32(0x80000000); E32(0x80000000); END_BATCH(); } /* * Setup of functional groups */ // asic stack/thread/gpr limits - need to query the drm static void r600_sq_setup(ScrnInfoPtr pScrn, sq_config_t *sq_conf) { uint32_t sq_config, sq_gpr_resource_mgmt_1, sq_gpr_resource_mgmt_2; uint32_t sq_thread_resource_mgmt, sq_stack_resource_mgmt_1, sq_stack_resource_mgmt_2; RADEONInfoPtr info = RADEONPTR(pScrn); if ((info->ChipFamily == CHIP_FAMILY_RV610) || (info->ChipFamily == CHIP_FAMILY_RV620) || (info->ChipFamily == CHIP_FAMILY_RS780) || (info->ChipFamily == CHIP_FAMILY_RS880) || (info->ChipFamily == CHIP_FAMILY_RV710)) sq_config = 0; // no VC else sq_config = VC_ENABLE_bit; sq_config |= (DX9_CONSTS_bit | ALU_INST_PREFER_VECTOR_bit | (sq_conf->ps_prio << PS_PRIO_shift) | (sq_conf->vs_prio << VS_PRIO_shift) | (sq_conf->gs_prio << GS_PRIO_shift) | (sq_conf->es_prio << ES_PRIO_shift)); sq_gpr_resource_mgmt_1 = ((sq_conf->num_ps_gprs << NUM_PS_GPRS_shift) | (sq_conf->num_vs_gprs << NUM_VS_GPRS_shift) | (sq_conf->num_temp_gprs << NUM_CLAUSE_TEMP_GPRS_shift)); sq_gpr_resource_mgmt_2 = ((sq_conf->num_gs_gprs << NUM_GS_GPRS_shift) | (sq_conf->num_es_gprs << NUM_ES_GPRS_shift)); sq_thread_resource_mgmt = ((sq_conf->num_ps_threads << NUM_PS_THREADS_shift) | (sq_conf->num_vs_threads << NUM_VS_THREADS_shift) | (sq_conf->num_gs_threads << NUM_GS_THREADS_shift) | (sq_conf->num_es_threads << NUM_ES_THREADS_shift)); sq_stack_resource_mgmt_1 = ((sq_conf->num_ps_stack_entries << NUM_PS_STACK_ENTRIES_shift) | (sq_conf->num_vs_stack_entries << NUM_VS_STACK_ENTRIES_shift)); sq_stack_resource_mgmt_2 = ((sq_conf->num_gs_stack_entries << NUM_GS_STACK_ENTRIES_shift) | (sq_conf->num_es_stack_entries << NUM_ES_STACK_ENTRIES_shift)); BEGIN_BATCH(8); PACK0(SQ_CONFIG, 6); E32(sq_config); E32(sq_gpr_resource_mgmt_1); E32(sq_gpr_resource_mgmt_2); E32(sq_thread_resource_mgmt); E32(sq_stack_resource_mgmt_1); E32(sq_stack_resource_mgmt_2); END_BATCH(); } void r600_set_render_target(ScrnInfoPtr pScrn, cb_config_t *cb_conf, uint32_t domain) { uint32_t cb_color_info, cb_color_control; unsigned pitch, slice, h, array_mode; RADEONInfoPtr info = RADEONPTR(pScrn); if (cb_conf->surface) { switch (cb_conf->surface->level[0].mode) { case RADEON_SURF_MODE_1D: array_mode = 2; break; case RADEON_SURF_MODE_2D: array_mode = 4; break; default: array_mode = 0; break; } pitch = (cb_conf->surface->level[0].nblk_x >> 3) - 1; slice = ((cb_conf->surface->level[0].nblk_x * cb_conf->surface->level[0].nblk_y) / 64) - 1; } else { array_mode = cb_conf->array_mode; pitch = (cb_conf->w / 8) - 1; h = RADEON_ALIGN(cb_conf->h, 8); slice = ((cb_conf->w * h) / 64) - 1; } cb_color_info = ((cb_conf->endian << ENDIAN_shift) | (cb_conf->format << CB_COLOR0_INFO__FORMAT_shift) | (array_mode << CB_COLOR0_INFO__ARRAY_MODE_shift) | (cb_conf->number_type << NUMBER_TYPE_shift) | (cb_conf->comp_swap << COMP_SWAP_shift) | (cb_conf->tile_mode << CB_COLOR0_INFO__TILE_MODE_shift)); if (cb_conf->read_size) cb_color_info |= CB_COLOR0_INFO__READ_SIZE_bit; if (cb_conf->blend_clamp) cb_color_info |= BLEND_CLAMP_bit; if (cb_conf->clear_color) cb_color_info |= CLEAR_COLOR_bit; if (cb_conf->blend_bypass) cb_color_info |= BLEND_BYPASS_bit; if (cb_conf->blend_float32) cb_color_info |= BLEND_FLOAT32_bit; if (cb_conf->simple_float) cb_color_info |= SIMPLE_FLOAT_bit; if (cb_conf->round_mode) cb_color_info |= CB_COLOR0_INFO__ROUND_MODE_bit; if (cb_conf->tile_compact) cb_color_info |= TILE_COMPACT_bit; if (cb_conf->source_format) cb_color_info |= SOURCE_FORMAT_bit; BEGIN_BATCH(3 + 2); EREG((CB_COLOR0_BASE + (4 * cb_conf->id)), (cb_conf->base >> 8)); RELOC_BATCH(cb_conf->bo, 0, domain); END_BATCH(); // rv6xx workaround if ((info->ChipFamily > CHIP_FAMILY_R600) && (info->ChipFamily < CHIP_FAMILY_RV770)) { BEGIN_BATCH(2); PACK3(IT_SURFACE_BASE_UPDATE, 1); E32((2 << cb_conf->id)); END_BATCH(); } /* Set CMASK & TILE buffer to the offset of color buffer as * we don't use those this shouldn't cause any issue and we * then have a valid cmd stream */ BEGIN_BATCH(3 + 2); EREG((CB_COLOR0_TILE + (4 * cb_conf->id)), (0 >> 8)); // CMASK per-tile data base/256 RELOC_BATCH(cb_conf->bo, 0, domain); END_BATCH(); BEGIN_BATCH(3 + 2); EREG((CB_COLOR0_FRAG + (4 * cb_conf->id)), (0 >> 8)); // FMASK per-tile data base/256 RELOC_BATCH(cb_conf->bo, 0, domain); END_BATCH(); BEGIN_BATCH(9); // pitch only for ARRAY_LINEAR_GENERAL, other tiling modes require addrlib EREG((CB_COLOR0_SIZE + (4 * cb_conf->id)), ((pitch << PITCH_TILE_MAX_shift) | (slice << SLICE_TILE_MAX_shift))); EREG((CB_COLOR0_VIEW + (4 * cb_conf->id)), ((0 << SLICE_START_shift) | (0 << SLICE_MAX_shift))); EREG((CB_COLOR0_MASK + (4 * cb_conf->id)), ((0 << CMASK_BLOCK_MAX_shift) | (0 << FMASK_TILE_MAX_shift))); END_BATCH(); BEGIN_BATCH(3 + 2); EREG((CB_COLOR0_INFO + (4 * cb_conf->id)), cb_color_info); RELOC_BATCH(cb_conf->bo, 0, domain); END_BATCH(); BEGIN_BATCH(9); EREG(CB_TARGET_MASK, (cb_conf->pmask << TARGET0_ENABLE_shift)); cb_color_control = R600_ROP[cb_conf->rop] | (cb_conf->blend_enable << TARGET_BLEND_ENABLE_shift); if (info->ChipFamily == CHIP_FAMILY_R600) { /* no per-MRT blend on R600 */ EREG(CB_COLOR_CONTROL, cb_color_control); EREG(CB_BLEND_CONTROL, cb_conf->blendcntl); } else { if (cb_conf->blend_enable) cb_color_control |= PER_MRT_BLEND_bit; EREG(CB_COLOR_CONTROL, cb_color_control); EREG(CB_BLEND0_CONTROL, cb_conf->blendcntl); } END_BATCH(); } static void r600_cp_set_surface_sync(ScrnInfoPtr pScrn, uint32_t sync_type, uint32_t size, uint64_t mc_addr, struct radeon_bo *bo, uint32_t rdomains, uint32_t wdomain) { RADEONInfoPtr info = RADEONPTR(pScrn); uint32_t cp_coher_size; if (size == 0xffffffff) cp_coher_size = 0xffffffff; else cp_coher_size = ((size + 255) >> 8); BEGIN_BATCH(5 + 2); PACK3(IT_SURFACE_SYNC, 4); E32(sync_type); E32(cp_coher_size); E32((mc_addr >> 8)); E32(10); /* poll interval */ RELOC_BATCH(bo, rdomains, wdomain); END_BATCH(); } /* inserts a wait for vline in the command stream */ void r600_cp_wait_vline_sync(ScrnInfoPtr pScrn, PixmapPtr pPix, xf86CrtcPtr crtc, int start, int stop) { RADEONInfoPtr info = RADEONPTR(pScrn); drmmode_crtc_private_ptr drmmode_crtc; if (!crtc) return; if (!crtc->enabled) return; if (pPix != pScrn->pScreen->GetScreenPixmap(pScrn->pScreen)) return; start = max(start, crtc->y); stop = min(stop, crtc->y + crtc->mode.VDisplay); if (start >= stop) return; drmmode_crtc = crtc->driver_private; BEGIN_BATCH(11); /* set the VLINE range */ EREG(AVIVO_D1MODE_VLINE_START_END, /* this is just a marker */ (start << AVIVO_D1MODE_VLINE_START_SHIFT) | (stop << AVIVO_D1MODE_VLINE_END_SHIFT)); /* tell the CP to poll the VLINE state register */ PACK3(IT_WAIT_REG_MEM, 6); E32(IT_WAIT_REG | IT_WAIT_EQ); E32(IT_WAIT_ADDR(AVIVO_D1MODE_VLINE_STATUS)); E32(0); E32(0); // Ref value E32(AVIVO_D1MODE_VLINE_STAT); // Mask E32(10); // Wait interval /* add crtc reloc */ PACK3(IT_NOP, 1); E32(drmmode_crtc->mode_crtc->crtc_id); END_BATCH(); } void r600_set_spi(ScrnInfoPtr pScrn, int vs_export_count, int num_interp) { RADEONInfoPtr info = RADEONPTR(pScrn); BEGIN_BATCH(8); /* Interpolator setup */ EREG(SPI_VS_OUT_CONFIG, (vs_export_count << VS_EXPORT_COUNT_shift)); PACK0(SPI_PS_IN_CONTROL_0, 3); E32((num_interp << NUM_INTERP_shift)); E32(0); E32(0); END_BATCH(); } void r600_fs_setup(ScrnInfoPtr pScrn, shader_config_t *fs_conf, uint32_t domain) { RADEONInfoPtr info = RADEONPTR(pScrn); uint32_t sq_pgm_resources; sq_pgm_resources = ((fs_conf->num_gprs << NUM_GPRS_shift) | (fs_conf->stack_size << STACK_SIZE_shift)); if (fs_conf->dx10_clamp) sq_pgm_resources |= SQ_PGM_RESOURCES_FS__DX10_CLAMP_bit; BEGIN_BATCH(3 + 2); EREG(SQ_PGM_START_FS, fs_conf->shader_addr >> 8); RELOC_BATCH(fs_conf->bo, domain, 0); END_BATCH(); BEGIN_BATCH(6); EREG(SQ_PGM_RESOURCES_FS, sq_pgm_resources); EREG(SQ_PGM_CF_OFFSET_FS, 0); END_BATCH(); } void r600_vs_setup(ScrnInfoPtr pScrn, shader_config_t *vs_conf, uint32_t domain) { RADEONInfoPtr info = RADEONPTR(pScrn); uint32_t sq_pgm_resources; sq_pgm_resources = ((vs_conf->num_gprs << NUM_GPRS_shift) | (vs_conf->stack_size << STACK_SIZE_shift)); if (vs_conf->dx10_clamp) sq_pgm_resources |= SQ_PGM_RESOURCES_VS__DX10_CLAMP_bit; if (vs_conf->fetch_cache_lines) sq_pgm_resources |= (vs_conf->fetch_cache_lines << FETCH_CACHE_LINES_shift); if (vs_conf->uncached_first_inst) sq_pgm_resources |= UNCACHED_FIRST_INST_bit; /* flush SQ cache */ r600_cp_set_surface_sync(pScrn, SH_ACTION_ENA_bit, vs_conf->shader_size, vs_conf->shader_addr, vs_conf->bo, domain, 0); BEGIN_BATCH(3 + 2); EREG(SQ_PGM_START_VS, vs_conf->shader_addr >> 8); RELOC_BATCH(vs_conf->bo, domain, 0); END_BATCH(); BEGIN_BATCH(6); EREG(SQ_PGM_RESOURCES_VS, sq_pgm_resources); EREG(SQ_PGM_CF_OFFSET_VS, 0); END_BATCH(); } void r600_ps_setup(ScrnInfoPtr pScrn, shader_config_t *ps_conf, uint32_t domain) { RADEONInfoPtr info = RADEONPTR(pScrn); uint32_t sq_pgm_resources; sq_pgm_resources = ((ps_conf->num_gprs << NUM_GPRS_shift) | (ps_conf->stack_size << STACK_SIZE_shift)); if (ps_conf->dx10_clamp) sq_pgm_resources |= SQ_PGM_RESOURCES_PS__DX10_CLAMP_bit; if (ps_conf->fetch_cache_lines) sq_pgm_resources |= (ps_conf->fetch_cache_lines << FETCH_CACHE_LINES_shift); if (ps_conf->uncached_first_inst) sq_pgm_resources |= UNCACHED_FIRST_INST_bit; if (ps_conf->clamp_consts) sq_pgm_resources |= CLAMP_CONSTS_bit; /* flush SQ cache */ r600_cp_set_surface_sync(pScrn, SH_ACTION_ENA_bit, ps_conf->shader_size, ps_conf->shader_addr, ps_conf->bo, domain, 0); BEGIN_BATCH(3 + 2); EREG(SQ_PGM_START_PS, ps_conf->shader_addr >> 8); RELOC_BATCH(ps_conf->bo, domain, 0); END_BATCH(); BEGIN_BATCH(9); EREG(SQ_PGM_RESOURCES_PS, sq_pgm_resources); EREG(SQ_PGM_EXPORTS_PS, ps_conf->export_mode); EREG(SQ_PGM_CF_OFFSET_PS, 0); END_BATCH(); } void r600_set_alu_consts(ScrnInfoPtr pScrn, int offset, int count, float *const_buf) { RADEONInfoPtr info = RADEONPTR(pScrn); int i; const int countreg = count * (SQ_ALU_CONSTANT_offset >> 2); BEGIN_BATCH(2 + countreg); PACK0(SQ_ALU_CONSTANT + offset * SQ_ALU_CONSTANT_offset, countreg); for (i = 0; i < countreg; i++) EFLOAT(const_buf[i]); END_BATCH(); } void r600_set_bool_consts(ScrnInfoPtr pScrn, int offset, uint32_t val) { RADEONInfoPtr info = RADEONPTR(pScrn); /* bool register order is: ps, vs, gs; one register each * 1 bits per bool; 32 bools each for ps, vs, gs. */ BEGIN_BATCH(3); EREG(SQ_BOOL_CONST + offset * SQ_BOOL_CONST_offset, val); END_BATCH(); } static void r600_set_vtx_resource(ScrnInfoPtr pScrn, vtx_resource_t *res, uint32_t domain) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; uint32_t sq_vtx_constant_word2; sq_vtx_constant_word2 = ((((res->vb_addr) >> 32) & BASE_ADDRESS_HI_mask) | ((res->vtx_size_dw << 2) << SQ_VTX_CONSTANT_WORD2_0__STRIDE_shift) | (res->format << SQ_VTX_CONSTANT_WORD2_0__DATA_FORMAT_shift) | (res->num_format_all << SQ_VTX_CONSTANT_WORD2_0__NUM_FORMAT_ALL_shift) | (res->endian << SQ_VTX_CONSTANT_WORD2_0__ENDIAN_SWAP_shift)); if (res->clamp_x) sq_vtx_constant_word2 |= SQ_VTX_CONSTANT_WORD2_0__CLAMP_X_bit; if (res->format_comp_all) sq_vtx_constant_word2 |= SQ_VTX_CONSTANT_WORD2_0__FORMAT_COMP_ALL_bit; if (res->srf_mode_all) sq_vtx_constant_word2 |= SQ_VTX_CONSTANT_WORD2_0__SRF_MODE_ALL_bit; /* flush vertex cache */ if ((info->ChipFamily == CHIP_FAMILY_RV610) || (info->ChipFamily == CHIP_FAMILY_RV620) || (info->ChipFamily == CHIP_FAMILY_RS780) || (info->ChipFamily == CHIP_FAMILY_RS880) || (info->ChipFamily == CHIP_FAMILY_RV710)) r600_cp_set_surface_sync(pScrn, TC_ACTION_ENA_bit, accel_state->vbo.vb_offset, 0, res->bo, domain, 0); else r600_cp_set_surface_sync(pScrn, VC_ACTION_ENA_bit, accel_state->vbo.vb_offset, 0, res->bo, domain, 0); BEGIN_BATCH(9 + 2); PACK0(SQ_VTX_RESOURCE + res->id * SQ_VTX_RESOURCE_offset, 7); E32(res->vb_addr & 0xffffffff); // 0: BASE_ADDRESS E32((res->vtx_num_entries << 2) - 1); // 1: SIZE E32(sq_vtx_constant_word2); // 2: BASE_HI, STRIDE, CLAMP, FORMAT, ENDIAN E32(res->mem_req_size << MEM_REQUEST_SIZE_shift); // 3: MEM_REQUEST_SIZE ?!? E32(0); // 4: n/a E32(0); // 5: n/a E32(SQ_TEX_VTX_VALID_BUFFER << SQ_VTX_CONSTANT_WORD6_0__TYPE_shift); // 6: TYPE RELOC_BATCH(res->bo, domain, 0); END_BATCH(); } void r600_set_tex_resource(ScrnInfoPtr pScrn, tex_resource_t *tex_res, uint32_t domain) { RADEONInfoPtr info = RADEONPTR(pScrn); uint32_t sq_tex_resource_word0, sq_tex_resource_word1, sq_tex_resource_word4; uint32_t sq_tex_resource_word5, sq_tex_resource_word6; uint32_t array_mode, pitch; if (tex_res->surface) { switch (tex_res->surface->level[0].mode) { case RADEON_SURF_MODE_1D: array_mode = 2; break; case RADEON_SURF_MODE_2D: array_mode = 4; break; default: array_mode = 0; break; } pitch = tex_res->surface->level[0].nblk_x >> 3; } else { array_mode = tex_res->tile_mode; pitch = (tex_res->pitch + 7) >> 3; } sq_tex_resource_word0 = ((tex_res->dim << DIM_shift) | (array_mode << SQ_TEX_RESOURCE_WORD0_0__TILE_MODE_shift)); if (tex_res->w) sq_tex_resource_word0 |= (((pitch - 1) << PITCH_shift) | ((tex_res->w - 1) << TEX_WIDTH_shift)); if (tex_res->tile_type) sq_tex_resource_word0 |= TILE_TYPE_bit; sq_tex_resource_word1 = (tex_res->format << SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift); if (tex_res->h) sq_tex_resource_word1 |= ((tex_res->h - 1) << TEX_HEIGHT_shift); if (tex_res->depth) sq_tex_resource_word1 |= ((tex_res->depth - 1) << TEX_DEPTH_shift); sq_tex_resource_word4 = ((tex_res->format_comp_x << FORMAT_COMP_X_shift) | (tex_res->format_comp_y << FORMAT_COMP_Y_shift) | (tex_res->format_comp_z << FORMAT_COMP_Z_shift) | (tex_res->format_comp_w << FORMAT_COMP_W_shift) | (tex_res->num_format_all << SQ_TEX_RESOURCE_WORD4_0__NUM_FORMAT_ALL_shift) | (tex_res->endian << SQ_TEX_RESOURCE_WORD4_0__ENDIAN_SWAP_shift) | (tex_res->request_size << REQUEST_SIZE_shift) | (tex_res->dst_sel_x << SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift) | (tex_res->dst_sel_y << SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift) | (tex_res->dst_sel_z << SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift) | (tex_res->dst_sel_w << SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift) | (tex_res->base_level << BASE_LEVEL_shift)); if (tex_res->srf_mode_all) sq_tex_resource_word4 |= SQ_TEX_RESOURCE_WORD4_0__SRF_MODE_ALL_bit; if (tex_res->force_degamma) sq_tex_resource_word4 |= SQ_TEX_RESOURCE_WORD4_0__FORCE_DEGAMMA_bit; sq_tex_resource_word5 = ((tex_res->last_level << LAST_LEVEL_shift) | (tex_res->base_array << BASE_ARRAY_shift) | (tex_res->last_array << LAST_ARRAY_shift)); sq_tex_resource_word6 = ((tex_res->mpeg_clamp << MPEG_CLAMP_shift) | (tex_res->perf_modulation << PERF_MODULATION_shift) | (SQ_TEX_VTX_VALID_TEXTURE << SQ_TEX_RESOURCE_WORD6_0__TYPE_shift)); if (tex_res->interlaced) sq_tex_resource_word6 |= INTERLACED_bit; /* flush texture cache */ r600_cp_set_surface_sync(pScrn, TC_ACTION_ENA_bit, tex_res->size, tex_res->base, tex_res->bo, domain, 0); BEGIN_BATCH(9 + 4); PACK0(SQ_TEX_RESOURCE + tex_res->id * SQ_TEX_RESOURCE_offset, 7); E32(sq_tex_resource_word0); E32(sq_tex_resource_word1); E32(((tex_res->base) >> 8)); E32(((tex_res->mip_base) >> 8)); E32(sq_tex_resource_word4); E32(sq_tex_resource_word5); E32(sq_tex_resource_word6); RELOC_BATCH(tex_res->bo, domain, 0); RELOC_BATCH(tex_res->mip_bo, domain, 0); END_BATCH(); } void r600_set_tex_sampler (ScrnInfoPtr pScrn, tex_sampler_t *s) { RADEONInfoPtr info = RADEONPTR(pScrn); uint32_t sq_tex_sampler_word0, sq_tex_sampler_word1, sq_tex_sampler_word2; sq_tex_sampler_word0 = ((s->clamp_x << SQ_TEX_SAMPLER_WORD0_0__CLAMP_X_shift) | (s->clamp_y << CLAMP_Y_shift) | (s->clamp_z << CLAMP_Z_shift) | (s->xy_mag_filter << XY_MAG_FILTER_shift) | (s->xy_min_filter << XY_MIN_FILTER_shift) | (s->z_filter << Z_FILTER_shift) | (s->mip_filter << MIP_FILTER_shift) | (s->border_color << BORDER_COLOR_TYPE_shift) | (s->depth_compare << DEPTH_COMPARE_FUNCTION_shift) | (s->chroma_key << CHROMA_KEY_shift)); if (s->point_sampling_clamp) sq_tex_sampler_word0 |= POINT_SAMPLING_CLAMP_bit; if (s->tex_array_override) sq_tex_sampler_word0 |= TEX_ARRAY_OVERRIDE_bit; if (s->lod_uses_minor_axis) sq_tex_sampler_word0 |= LOD_USES_MINOR_AXIS_bit; sq_tex_sampler_word1 = ((s->min_lod << MIN_LOD_shift) | (s->max_lod << MAX_LOD_shift) | (s->lod_bias << SQ_TEX_SAMPLER_WORD1_0__LOD_BIAS_shift)); sq_tex_sampler_word2 = ((s->lod_bias2 << LOD_BIAS_SEC_shift) | (s->perf_mip << PERF_MIP_shift) | (s->perf_z << PERF_Z_shift)); if (s->mc_coord_truncate) sq_tex_sampler_word2 |= MC_COORD_TRUNCATE_bit; if (s->force_degamma) sq_tex_sampler_word2 |= SQ_TEX_SAMPLER_WORD2_0__FORCE_DEGAMMA_bit; if (s->high_precision_filter) sq_tex_sampler_word2 |= HIGH_PRECISION_FILTER_bit; if (s->fetch_4) sq_tex_sampler_word2 |= FETCH_4_bit; if (s->sample_is_pcf) sq_tex_sampler_word2 |= SAMPLE_IS_PCF_bit; if (s->type) sq_tex_sampler_word2 |= SQ_TEX_SAMPLER_WORD2_0__TYPE_bit; BEGIN_BATCH(5); PACK0(SQ_TEX_SAMPLER_WORD + s->id * SQ_TEX_SAMPLER_WORD_offset, 3); E32(sq_tex_sampler_word0); E32(sq_tex_sampler_word1); E32(sq_tex_sampler_word2); END_BATCH(); } //XXX deal with clip offsets in clip setup void r600_set_screen_scissor(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2) { RADEONInfoPtr info = RADEONPTR(pScrn); BEGIN_BATCH(4); PACK0(PA_SC_SCREEN_SCISSOR_TL, 2); E32(((x1 << PA_SC_SCREEN_SCISSOR_TL__TL_X_shift) | (y1 << PA_SC_SCREEN_SCISSOR_TL__TL_Y_shift))); E32(((x2 << PA_SC_SCREEN_SCISSOR_BR__BR_X_shift) | (y2 << PA_SC_SCREEN_SCISSOR_BR__BR_Y_shift))); END_BATCH(); } void r600_set_vport_scissor(ScrnInfoPtr pScrn, int id, int x1, int y1, int x2, int y2) { RADEONInfoPtr info = RADEONPTR(pScrn); BEGIN_BATCH(4); PACK0(PA_SC_VPORT_SCISSOR_0_TL + id * PA_SC_VPORT_SCISSOR_0_TL_offset, 2); E32(((x1 << PA_SC_VPORT_SCISSOR_0_TL__TL_X_shift) | (y1 << PA_SC_VPORT_SCISSOR_0_TL__TL_Y_shift) | WINDOW_OFFSET_DISABLE_bit)); E32(((x2 << PA_SC_VPORT_SCISSOR_0_BR__BR_X_shift) | (y2 << PA_SC_VPORT_SCISSOR_0_BR__BR_Y_shift))); END_BATCH(); } void r600_set_generic_scissor(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2) { RADEONInfoPtr info = RADEONPTR(pScrn); BEGIN_BATCH(4); PACK0(PA_SC_GENERIC_SCISSOR_TL, 2); E32(((x1 << PA_SC_GENERIC_SCISSOR_TL__TL_X_shift) | (y1 << PA_SC_GENERIC_SCISSOR_TL__TL_Y_shift) | WINDOW_OFFSET_DISABLE_bit)); E32(((x2 << PA_SC_GENERIC_SCISSOR_BR__BR_X_shift) | (y2 << PA_SC_GENERIC_SCISSOR_TL__TL_Y_shift))); END_BATCH(); } void r600_set_window_scissor(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2) { RADEONInfoPtr info = RADEONPTR(pScrn); BEGIN_BATCH(4); PACK0(PA_SC_WINDOW_SCISSOR_TL, 2); E32(((x1 << PA_SC_WINDOW_SCISSOR_TL__TL_X_shift) | (y1 << PA_SC_WINDOW_SCISSOR_TL__TL_Y_shift) | WINDOW_OFFSET_DISABLE_bit)); E32(((x2 << PA_SC_WINDOW_SCISSOR_BR__BR_X_shift) | (y2 << PA_SC_WINDOW_SCISSOR_BR__BR_Y_shift))); END_BATCH(); } void r600_set_clip_rect(ScrnInfoPtr pScrn, int id, int x1, int y1, int x2, int y2) { RADEONInfoPtr info = RADEONPTR(pScrn); BEGIN_BATCH(4); PACK0(PA_SC_CLIPRECT_0_TL + id * PA_SC_CLIPRECT_0_TL_offset, 2); E32(((x1 << PA_SC_CLIPRECT_0_TL__TL_X_shift) | (y1 << PA_SC_CLIPRECT_0_TL__TL_Y_shift))); E32(((x2 << PA_SC_CLIPRECT_0_BR__BR_X_shift) | (y2 << PA_SC_CLIPRECT_0_BR__BR_Y_shift))); END_BATCH(); } /* * Setup of default state */ void r600_set_default_state(ScrnInfoPtr pScrn) { tex_resource_t tex_res; shader_config_t fs_conf; sq_config_t sq_conf; int i; RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; if (accel_state->XInited3D) return; memset(&tex_res, 0, sizeof(tex_resource_t)); memset(&fs_conf, 0, sizeof(shader_config_t)); accel_state->XInited3D = TRUE; r600_start_3d(pScrn); // SQ sq_conf.ps_prio = 0; sq_conf.vs_prio = 1; sq_conf.gs_prio = 2; sq_conf.es_prio = 3; // need to set stack/thread/gpr limits based on the asic // for now just set them low enough so any card will work // see r600_cp.c in the drm switch (info->ChipFamily) { case CHIP_FAMILY_R600: sq_conf.num_ps_gprs = 192; sq_conf.num_vs_gprs = 56; sq_conf.num_temp_gprs = 4; sq_conf.num_gs_gprs = 0; sq_conf.num_es_gprs = 0; sq_conf.num_ps_threads = 136; sq_conf.num_vs_threads = 48; sq_conf.num_gs_threads = 4; sq_conf.num_es_threads = 4; sq_conf.num_ps_stack_entries = 128; sq_conf.num_vs_stack_entries = 128; sq_conf.num_gs_stack_entries = 0; sq_conf.num_es_stack_entries = 0; break; case CHIP_FAMILY_RV630: case CHIP_FAMILY_RV635: sq_conf.num_ps_gprs = 84; sq_conf.num_vs_gprs = 36; sq_conf.num_temp_gprs = 4; sq_conf.num_gs_gprs = 0; sq_conf.num_es_gprs = 0; sq_conf.num_ps_threads = 144; sq_conf.num_vs_threads = 40; sq_conf.num_gs_threads = 4; sq_conf.num_es_threads = 4; sq_conf.num_ps_stack_entries = 40; sq_conf.num_vs_stack_entries = 40; sq_conf.num_gs_stack_entries = 32; sq_conf.num_es_stack_entries = 16; break; case CHIP_FAMILY_RV610: case CHIP_FAMILY_RV620: case CHIP_FAMILY_RS780: case CHIP_FAMILY_RS880: default: sq_conf.num_ps_gprs = 84; sq_conf.num_vs_gprs = 36; sq_conf.num_temp_gprs = 4; sq_conf.num_gs_gprs = 0; sq_conf.num_es_gprs = 0; sq_conf.num_ps_threads = 136; sq_conf.num_vs_threads = 48; sq_conf.num_gs_threads = 4; sq_conf.num_es_threads = 4; sq_conf.num_ps_stack_entries = 40; sq_conf.num_vs_stack_entries = 40; sq_conf.num_gs_stack_entries = 32; sq_conf.num_es_stack_entries = 16; break; case CHIP_FAMILY_RV670: sq_conf.num_ps_gprs = 144; sq_conf.num_vs_gprs = 40; sq_conf.num_temp_gprs = 4; sq_conf.num_gs_gprs = 0; sq_conf.num_es_gprs = 0; sq_conf.num_ps_threads = 136; sq_conf.num_vs_threads = 48; sq_conf.num_gs_threads = 4; sq_conf.num_es_threads = 4; sq_conf.num_ps_stack_entries = 40; sq_conf.num_vs_stack_entries = 40; sq_conf.num_gs_stack_entries = 32; sq_conf.num_es_stack_entries = 16; break; case CHIP_FAMILY_RV770: sq_conf.num_ps_gprs = 192; sq_conf.num_vs_gprs = 56; sq_conf.num_temp_gprs = 4; sq_conf.num_gs_gprs = 0; sq_conf.num_es_gprs = 0; sq_conf.num_ps_threads = 188; sq_conf.num_vs_threads = 60; sq_conf.num_gs_threads = 0; sq_conf.num_es_threads = 0; sq_conf.num_ps_stack_entries = 256; sq_conf.num_vs_stack_entries = 256; sq_conf.num_gs_stack_entries = 0; sq_conf.num_es_stack_entries = 0; break; case CHIP_FAMILY_RV730: case CHIP_FAMILY_RV740: sq_conf.num_ps_gprs = 84; sq_conf.num_vs_gprs = 36; sq_conf.num_temp_gprs = 4; sq_conf.num_gs_gprs = 0; sq_conf.num_es_gprs = 0; sq_conf.num_ps_threads = 188; sq_conf.num_vs_threads = 60; sq_conf.num_gs_threads = 0; sq_conf.num_es_threads = 0; sq_conf.num_ps_stack_entries = 128; sq_conf.num_vs_stack_entries = 128; sq_conf.num_gs_stack_entries = 0; sq_conf.num_es_stack_entries = 0; break; case CHIP_FAMILY_RV710: sq_conf.num_ps_gprs = 192; sq_conf.num_vs_gprs = 56; sq_conf.num_temp_gprs = 4; sq_conf.num_gs_gprs = 0; sq_conf.num_es_gprs = 0; sq_conf.num_ps_threads = 144; sq_conf.num_vs_threads = 48; sq_conf.num_gs_threads = 0; sq_conf.num_es_threads = 0; sq_conf.num_ps_stack_entries = 128; sq_conf.num_vs_stack_entries = 128; sq_conf.num_gs_stack_entries = 0; sq_conf.num_es_stack_entries = 0; break; } r600_sq_setup(pScrn, &sq_conf); /* set fake reloc for unused depth */ BEGIN_BATCH(3 + 2); EREG(DB_DEPTH_INFO, 0); RELOC_BATCH(accel_state->shaders_bo, RADEON_GEM_DOMAIN_VRAM, 0); END_BATCH(); BEGIN_BATCH(80); if (info->ChipFamily < CHIP_FAMILY_RV770) { EREG(TA_CNTL_AUX, (( 3 << GRADIENT_CREDIT_shift) | (28 << TD_FIFO_CREDIT_shift))); EREG(VC_ENHANCE, 0); EREG(R7xx_SQ_DYN_GPR_CNTL_PS_FLUSH_REQ, 0); EREG(DB_DEBUG, 0x82000000); /* ? */ EREG(DB_WATERMARKS, ((4 << DEPTH_FREE_shift) | (16 << DEPTH_FLUSH_shift) | (0 << FORCE_SUMMARIZE_shift) | (4 << DEPTH_PENDING_FREE_shift) | (16 << DEPTH_CACHELINE_FREE_shift) | 0)); } else { EREG(TA_CNTL_AUX, (( 2 << GRADIENT_CREDIT_shift) | (28 << TD_FIFO_CREDIT_shift))); EREG(VC_ENHANCE, 0); EREG(R7xx_SQ_DYN_GPR_CNTL_PS_FLUSH_REQ, VS_PC_LIMIT_ENABLE_bit); EREG(DB_DEBUG, 0); EREG(DB_WATERMARKS, ((4 << DEPTH_FREE_shift) | (16 << DEPTH_FLUSH_shift) | (0 << FORCE_SUMMARIZE_shift) | (4 << DEPTH_PENDING_FREE_shift) | (4 << DEPTH_CACHELINE_FREE_shift) | 0)); } PACK0(SQ_VTX_BASE_VTX_LOC, 2); E32(0); E32(0); PACK0(SQ_ESGS_RING_ITEMSIZE, 9); E32(0); // SQ_ESGS_RING_ITEMSIZE E32(0); // SQ_GSVS_RING_ITEMSIZE E32(0); // SQ_ESTMP_RING_ITEMSIZE E32(0); // SQ_GSTMP_RING_ITEMSIZE E32(0); // SQ_VSTMP_RING_ITEMSIZE E32(0); // SQ_PSTMP_RING_ITEMSIZE E32(0); // SQ_FBUF_RING_ITEMSIZE E32(0); // SQ_REDUC_RING_ITEMSIZE E32(0); // SQ_GS_VERT_ITEMSIZE // DB EREG(DB_DEPTH_CONTROL, 0); PACK0(DB_RENDER_CONTROL, 2); E32(STENCIL_COMPRESS_DISABLE_bit | DEPTH_COMPRESS_DISABLE_bit); if (info->ChipFamily < CHIP_FAMILY_RV770) E32(FORCE_SHADER_Z_ORDER_bit); else E32(0); EREG(DB_ALPHA_TO_MASK, ((2 << ALPHA_TO_MASK_OFFSET0_shift) | (2 << ALPHA_TO_MASK_OFFSET1_shift) | (2 << ALPHA_TO_MASK_OFFSET2_shift) | (2 << ALPHA_TO_MASK_OFFSET3_shift))); EREG(DB_SHADER_CONTROL, ((1 << Z_ORDER_shift) | /* EARLY_Z_THEN_LATE_Z */ DUAL_EXPORT_ENABLE_bit)); /* Only useful if no depth export */ PACK0(DB_STENCIL_CLEAR, 2); E32(0); // DB_STENCIL_CLEAR E32(0); // DB_DEPTH_CLEAR PACK0(DB_STENCILREFMASK, 3); E32(0); // DB_STENCILREFMASK E32(0); // DB_STENCILREFMASK_BF E32(0); // SX_ALPHA_REF PACK0(CB_CLRCMP_CONTROL, 4); E32(1 << CLRCMP_FCN_SEL_shift); // CB_CLRCMP_CONTROL: use CLRCMP_FCN_SRC E32(0); // CB_CLRCMP_SRC E32(0); // CB_CLRCMP_DST E32(0); // CB_CLRCMP_MSK EREG(CB_SHADER_MASK, OUTPUT0_ENABLE_mask); EREG(R7xx_CB_SHADER_CONTROL, (RT0_ENABLE_bit)); PACK0(SX_ALPHA_TEST_CONTROL, 5); E32(0); // SX_ALPHA_TEST_CONTROL E32(0x00000000); // CB_BLEND_RED E32(0x00000000); // CB_BLEND_GREEN E32(0x00000000); // CB_BLEND_BLUE E32(0x00000000); // CB_BLEND_ALPHA EREG(PA_SC_WINDOW_OFFSET, ((0 << WINDOW_X_OFFSET_shift) | (0 << WINDOW_Y_OFFSET_shift))); if (info->ChipFamily < CHIP_FAMILY_RV770) EREG(R7xx_PA_SC_EDGERULE, 0x00000000); else EREG(R7xx_PA_SC_EDGERULE, 0xAAAAAAAA); EREG(PA_SC_CLIPRECT_RULE, CLIP_RULE_mask); END_BATCH(); /* clip boolean is set to always visible -> doesn't matter */ for (i = 0; i < PA_SC_CLIPRECT_0_TL_num; i++) r600_set_clip_rect(pScrn, i, 0, 0, 8192, 8192); for (i = 0; i < PA_SC_VPORT_SCISSOR_0_TL_num; i++) r600_set_vport_scissor(pScrn, i, 0, 0, 8192, 8192); BEGIN_BATCH(49); PACK0(PA_SC_MPASS_PS_CNTL, 2); E32(0); if (info->ChipFamily < CHIP_FAMILY_RV770) E32((WALK_ORDER_ENABLE_bit | FORCE_EOV_CNTDWN_ENABLE_bit)); else E32((FORCE_EOV_CNTDWN_ENABLE_bit | FORCE_EOV_REZ_ENABLE_bit | 0x00500000)); /* ? */ PACK0(PA_SC_LINE_CNTL, 9); E32(0); // PA_SC_LINE_CNTL E32(0); // PA_SC_AA_CONFIG E32(((2 << PA_SU_VTX_CNTL__ROUND_MODE_shift) | PIX_CENTER_bit | // PA_SU_VTX_CNTL (5 << QUANT_MODE_shift))); /* Round to Even, fixed point 1/256 */ EFLOAT(1.0); // PA_CL_GB_VERT_CLIP_ADJ EFLOAT(1.0); // PA_CL_GB_VERT_DISC_ADJ EFLOAT(1.0); // PA_CL_GB_HORZ_CLIP_ADJ EFLOAT(1.0); // PA_CL_GB_HORZ_DISC_ADJ E32(0); // PA_SC_AA_SAMPLE_LOCS_MCTX E32(0); // PA_SC_AA_SAMPLE_LOCS_8S_WD1_M EREG(PA_SC_AA_MASK, 0xFFFFFFFF); PACK0(PA_CL_CLIP_CNTL, 5); E32(CLIP_DISABLE_bit); // PA_CL_CLIP_CNTL E32(FACE_bit); // PA_SU_SC_MODE_CNTL E32(VTX_XY_FMT_bit); // PA_CL_VTE_CNTL E32(0); // PA_CL_VS_OUT_CNTL E32(0); // PA_CL_NANINF_CNTL PACK0(PA_SU_POLY_OFFSET_DB_FMT_CNTL, 6); E32(0); // PA_SU_POLY_OFFSET_DB_FMT_CNTL E32(0); // PA_SU_POLY_OFFSET_CLAMP E32(0); // PA_SU_POLY_OFFSET_FRONT_SCALE E32(0); // PA_SU_POLY_OFFSET_FRONT_OFFSET E32(0); // PA_SU_POLY_OFFSET_BACK_SCALE E32(0); // PA_SU_POLY_OFFSET_BACK_OFFSET // SPI if (info->ChipFamily < CHIP_FAMILY_RV770) EREG(R7xx_SPI_THREAD_GROUPING, 0); else EREG(R7xx_SPI_THREAD_GROUPING, (1 << PS_GROUPING_shift)); /* default Interpolator setup */ EREG(SPI_VS_OUT_ID_0, ((0 << SEMANTIC_0_shift) | (1 << SEMANTIC_1_shift))); PACK0(SPI_PS_INPUT_CNTL_0 + (0 << 2), 2); /* SPI_PS_INPUT_CNTL_0 maps to GPR[0] - load with semantic id 0 */ E32(((0 << SEMANTIC_shift) | (0x01 << DEFAULT_VAL_shift) | SEL_CENTROID_bit)); /* SPI_PS_INPUT_CNTL_1 maps to GPR[1] - load with semantic id 1 */ E32(((1 << SEMANTIC_shift) | (0x01 << DEFAULT_VAL_shift) | SEL_CENTROID_bit)); PACK0(SPI_INPUT_Z, 4); E32(0); // SPI_INPUT_Z E32(0); // SPI_FOG_CNTL E32(0); // SPI_FOG_FUNC_SCALE E32(0); // SPI_FOG_FUNC_BIAS END_BATCH(); // clear FS fs_conf.bo = accel_state->shaders_bo; r600_fs_setup(pScrn, &fs_conf, RADEON_GEM_DOMAIN_VRAM); // VGT BEGIN_BATCH(46); PACK0(VGT_MAX_VTX_INDX, 4); E32(0xffffff); // VGT_MAX_VTX_INDX E32(0); // VGT_MIN_VTX_INDX E32(0); // VGT_INDX_OFFSET E32(0); // VGT_MULTI_PRIM_IB_RESET_INDX EREG(VGT_PRIMITIVEID_EN, 0); EREG(VGT_MULTI_PRIM_IB_RESET_EN, 0); PACK0(VGT_INSTANCE_STEP_RATE_0, 2); E32(0); // VGT_INSTANCE_STEP_RATE_0 E32(0); // VGT_INSTANCE_STEP_RATE_1 PACK0(PA_SU_POINT_SIZE, 17); E32(0); // PA_SU_POINT_SIZE E32(0); // PA_SU_POINT_MINMAX E32((8 << PA_SU_LINE_CNTL__WIDTH_shift)); /* Line width 1 pixel */ // PA_SU_LINE_CNTL E32(0); // PA_SC_LINE_STIPPLE E32(0); // VGT_OUTPUT_PATH_CNTL E32(0); // VGT_HOS_CNTL E32(0); // VGT_HOS_MAX_TESS_LEVEL E32(0); // VGT_HOS_MIN_TESS_LEVEL E32(0); // VGT_HOS_REUSE_DEPTH E32(0); // VGT_GROUP_PRIM_TYPE E32(0); // VGT_GROUP_FIRST_DECR E32(0); // VGT_GROUP_DECR E32(0); // VGT_GROUP_VECT_0_CNTL E32(0); // VGT_GROUP_VECT_1_CNTL E32(0); // VGT_GROUP_VECT_0_FMT_CNTL E32(0); // VGT_GROUP_VECT_1_FMT_CNTL E32(0); // VGT_GS_MODE PACK0(VGT_STRMOUT_EN, 3); E32(0); // VGT_STRMOUT_EN E32(0); // VGT_REUSE_OFF E32(0); // VGT_VTX_CNT_EN EREG(VGT_STRMOUT_BUFFER_EN, 0); EREG(SX_MISC, 0); END_BATCH(); } /* * Commands */ void r600_draw_immd(ScrnInfoPtr pScrn, draw_config_t *draw_conf, uint32_t *indices) { RADEONInfoPtr info = RADEONPTR(pScrn); uint32_t i, count; // calculate num of packets count = 2; if (draw_conf->index_type == DI_INDEX_SIZE_16_BIT) count += (draw_conf->num_indices + 1) / 2; else count += draw_conf->num_indices; BEGIN_BATCH(8 + count); EREG(VGT_PRIMITIVE_TYPE, draw_conf->prim_type); PACK3(IT_INDEX_TYPE, 1); #if X_BYTE_ORDER == X_BIG_ENDIAN E32(IT_INDEX_TYPE_SWAP_MODE(ENDIAN_8IN32) | draw_conf->index_type); #else E32(draw_conf->index_type); #endif PACK3(IT_NUM_INSTANCES, 1); E32(draw_conf->num_instances); PACK3(IT_DRAW_INDEX_IMMD, count); E32(draw_conf->num_indices); E32(draw_conf->vgt_draw_initiator); if (draw_conf->index_type == DI_INDEX_SIZE_16_BIT) { for (i = 0; i < draw_conf->num_indices; i += 2) { if ((i + 1) == draw_conf->num_indices) E32(indices[i]); else E32((indices[i] | (indices[i + 1] << 16))); } } else { for (i = 0; i < draw_conf->num_indices; i++) E32(indices[i]); } END_BATCH(); } void r600_draw_auto(ScrnInfoPtr pScrn, draw_config_t *draw_conf) { RADEONInfoPtr info = RADEONPTR(pScrn); BEGIN_BATCH(10); EREG(VGT_PRIMITIVE_TYPE, draw_conf->prim_type); PACK3(IT_INDEX_TYPE, 1); #if X_BYTE_ORDER == X_BIG_ENDIAN E32(IT_INDEX_TYPE_SWAP_MODE(ENDIAN_8IN32) | draw_conf->index_type); #else E32(draw_conf->index_type); #endif PACK3(IT_NUM_INSTANCES, 1); E32(draw_conf->num_instances); PACK3(IT_DRAW_INDEX_AUTO, 2); E32(draw_conf->num_indices); E32(draw_conf->vgt_draw_initiator); END_BATCH(); } void r600_finish_op(ScrnInfoPtr pScrn, int vtx_size) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; draw_config_t draw_conf; vtx_resource_t vtx_res; if (accel_state->vbo.vb_start_op == -1) return; CLEAR (draw_conf); CLEAR (vtx_res); if (accel_state->vbo.vb_offset == accel_state->vbo.vb_start_op) { R600IBDiscard(pScrn); return; } /* Vertex buffer setup */ accel_state->vbo.vb_size = accel_state->vbo.vb_offset - accel_state->vbo.vb_start_op; vtx_res.id = SQ_VTX_RESOURCE_vs; vtx_res.vtx_size_dw = vtx_size / 4; vtx_res.vtx_num_entries = accel_state->vbo.vb_size / 4; vtx_res.mem_req_size = 1; vtx_res.vb_addr = accel_state->vbo.vb_start_op; vtx_res.bo = accel_state->vbo.vb_bo; #if X_BYTE_ORDER == X_BIG_ENDIAN vtx_res.endian = SQ_ENDIAN_8IN32; #endif r600_set_vtx_resource(pScrn, &vtx_res, RADEON_GEM_DOMAIN_GTT); /* Draw */ draw_conf.prim_type = DI_PT_RECTLIST; draw_conf.vgt_draw_initiator = DI_SRC_SEL_AUTO_INDEX; draw_conf.num_instances = 1; draw_conf.num_indices = vtx_res.vtx_num_entries / vtx_res.vtx_size_dw; draw_conf.index_type = DI_INDEX_SIZE_16_BIT; r600_draw_auto(pScrn, &draw_conf); /* XXX drm should handle this in fence submit */ r600_wait_3d_idle_clean(pScrn); /* sync dst surface */ r600_cp_set_surface_sync(pScrn, (CB_ACTION_ENA_bit | CB0_DEST_BASE_ENA_bit), accel_state->dst_size, 0, accel_state->dst_obj.bo, 0, accel_state->dst_obj.domain); accel_state->vbo.vb_start_op = -1; accel_state->ib_reset_op = 0; } xf86-video-ati-7.3.0/src/evergreen_reg_auto.h0000664000175000017500000075643612177731114015756 00000000000000/* * Evergreen Register documentation * * Copyright (C) 2010 Advanced Micro Devices, 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) 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 _EVERGREEN_REG_AUTO_H #define _EVERGREEN_REG_AUTO_H enum { VGT_VTX_VECT_EJECT_REG = 0x000088b0, PRIM_COUNT_mask = 0x3ff << 0, PRIM_COUNT_shift = 0, VGT_LAST_COPY_STATE = 0x000088c0, SRC_STATE_ID_mask = 0x07 << 0, SRC_STATE_ID_shift = 0, DST_STATE_ID_mask = 0x07 << 16, DST_STATE_ID_shift = 16, VGT_CACHE_INVALIDATION = 0x000088c4, CACHE_INVALIDATION_mask = 0x03 << 0, CACHE_INVALIDATION_shift = 0, VC_ONLY = 0x00, TC_ONLY = 0x01, VC_AND_TC = 0x02, VS_NO_EXTRA_BUFFER_bit = 1 << 5, AUTO_INVLD_EN_mask = 0x03 << 6, AUTO_INVLD_EN_shift = 6, VGT_GS_VERTEX_REUSE = 0x000088d4, VERT_REUSE_mask = 0x1f << 0, VERT_REUSE_shift = 0, VGT_CNTL_STATUS = 0x000088f0, VGT_OUT_INDX_BUSY_bit = 1 << 0, VGT_OUT_BUSY_bit = 1 << 1, VGT_PT_BUSY_bit = 1 << 2, VGT_TE_BUSY_bit = 1 << 3, VGT_VR_BUSY_bit = 1 << 4, VGT_GRP_BUSY_bit = 1 << 5, VGT_DMA_REQ_BUSY_bit = 1 << 6, VGT_DMA_BUSY_bit = 1 << 7, VGT_GS_BUSY_bit = 1 << 8, VGT_HS_BUSY_bit = 1 << 9, VGT_TE11_BUSY_bit = 1 << 10, VGT_BUSY_bit = 1 << 11, VGT_PRIMITIVE_TYPE = 0x00008958, VGT_PRIMITIVE_TYPE__PRIM_TYPE_mask = 0x3f << 0, VGT_PRIMITIVE_TYPE__PRIM_TYPE_shift = 0, DI_PT_NONE = 0x00, DI_PT_POINTLIST = 0x01, DI_PT_LINELIST = 0x02, DI_PT_LINESTRIP = 0x03, DI_PT_TRILIST = 0x04, DI_PT_TRIFAN = 0x05, DI_PT_TRISTRIP = 0x06, DI_PT_UNUSED_0 = 0x07, DI_PT_UNUSED_1 = 0x08, DI_PT_PATCH = 0x09, DI_PT_LINELIST_ADJ = 0x0a, DI_PT_LINESTRIP_ADJ = 0x0b, DI_PT_TRILIST_ADJ = 0x0c, DI_PT_TRISTRIP_ADJ = 0x0d, DI_PT_UNUSED_3 = 0x0e, DI_PT_UNUSED_4 = 0x0f, DI_PT_TRI_WITH_WFLAGS = 0x10, DI_PT_RECTLIST = 0x11, DI_PT_LINELOOP = 0x12, DI_PT_QUADLIST = 0x13, DI_PT_QUADSTRIP = 0x14, DI_PT_POLYGON = 0x15, DI_PT_2D_COPY_RECT_LIST_V0 = 0x16, DI_PT_2D_COPY_RECT_LIST_V1 = 0x17, DI_PT_2D_COPY_RECT_LIST_V2 = 0x18, DI_PT_2D_COPY_RECT_LIST_V3 = 0x19, DI_PT_2D_FILL_RECT_LIST = 0x1a, DI_PT_2D_LINE_STRIP = 0x1b, DI_PT_2D_TRI_STRIP = 0x1c, VGT_INDEX_TYPE = 0x0000895c, INDEX_TYPE_mask = 0x03 << 0, INDEX_TYPE_shift = 0, DI_INDEX_SIZE_16_BIT = 0x00, DI_INDEX_SIZE_32_BIT = 0x01, VGT_STRMOUT_BUFFER_FILLED_SIZE_0 = 0x00008960, VGT_STRMOUT_BUFFER_FILLED_SIZE_1 = 0x00008964, VGT_STRMOUT_BUFFER_FILLED_SIZE_2 = 0x00008968, VGT_STRMOUT_BUFFER_FILLED_SIZE_3 = 0x0000896c, VGT_NUM_INDICES = 0x00008970, VGT_NUM_INSTANCES = 0x00008974, PA_CL_CNTL_STATUS = 0x00008a10, CL_BUSY_bit = 1 << 31, PA_CL_ENHANCE = 0x00008a14, CLIP_VTX_REORDER_ENA_bit = 1 << 0, NUM_CLIP_SEQ_mask = 0x03 << 1, NUM_CLIP_SEQ_shift = 1, CLIPPED_PRIM_SEQ_STALL_bit = 1 << 3, VE_NAN_PROC_DISABLE_bit = 1 << 4, PA_SU_CNTL_STATUS = 0x00008a50, SU_BUSY_bit = 1 << 31, PA_SU_LINE_STIPPLE_VALUE = 0x00008a60, LINE_STIPPLE_VALUE_mask = 0xffffff << 0, LINE_STIPPLE_VALUE_shift = 0, PA_SC_LINE_STIPPLE_STATE = 0x00008b10, CURRENT_PTR_mask = 0x0f << 0, CURRENT_PTR_shift = 0, CURRENT_COUNT_mask = 0xff << 8, CURRENT_COUNT_shift = 8, SQ_CONFIG = 0x00008c00, VC_ENABLE_bit = 1 << 0, EXPORT_SRC_C_bit = 1 << 1, CS_PRIO_mask = 0x03 << 18, CS_PRIO_shift = 18, LS_PRIO_mask = 0x03 << 20, LS_PRIO_shift = 20, HS_PRIO_mask = 0x03 << 22, HS_PRIO_shift = 22, PS_PRIO_mask = 0x03 << 24, PS_PRIO_shift = 24, VS_PRIO_mask = 0x03 << 26, VS_PRIO_shift = 26, GS_PRIO_mask = 0x03 << 28, GS_PRIO_shift = 28, ES_PRIO_mask = 0x03 << 30, ES_PRIO_shift = 30, SQ_GPR_RESOURCE_MGMT_1 = 0x00008c04, NUM_PS_GPRS_mask = 0xff << 0, NUM_PS_GPRS_shift = 0, NUM_VS_GPRS_mask = 0xff << 16, NUM_VS_GPRS_shift = 16, NUM_CLAUSE_TEMP_GPRS_mask = 0x0f << 28, NUM_CLAUSE_TEMP_GPRS_shift = 28, SQ_GPR_RESOURCE_MGMT_2 = 0x00008c08, NUM_GS_GPRS_mask = 0xff << 0, NUM_GS_GPRS_shift = 0, NUM_ES_GPRS_mask = 0xff << 16, NUM_ES_GPRS_shift = 16, SQ_GPR_RESOURCE_MGMT_3 = 0x00008c0c, NUM_HS_GPRS_mask = 0xff << 0, NUM_HS_GPRS_shift = 0, NUM_LS_GPRS_mask = 0xff << 16, NUM_LS_GPRS_shift = 16, SQ_GLOBAL_GPR_RESOURCE_MGMT_1 = 0x00008c10, PS_GGPR_BASE_mask = 0xff << 0, PS_GGPR_BASE_shift = 0, VS_GGPR_BASE_mask = 0xff << 8, VS_GGPR_BASE_shift = 8, GS_GGPR_BASE_mask = 0xff << 16, GS_GGPR_BASE_shift = 16, ES_GGPR_BASE_mask = 0xff << 24, ES_GGPR_BASE_shift = 24, SQ_GLOBAL_GPR_RESOURCE_MGMT_2 = 0x00008c14, HS_GGPR_BASE_mask = 0xff << 0, HS_GGPR_BASE_shift = 0, LS_GGPR_BASE_mask = 0xff << 8, LS_GGPR_BASE_shift = 8, CS_GGPR_BASE_mask = 0xff << 16, CS_GGPR_BASE_shift = 16, SQ_THREAD_RESOURCE_MGMT = 0x00008c18, NUM_PS_THREADS_mask = 0xff << 0, NUM_PS_THREADS_shift = 0, NUM_VS_THREADS_mask = 0xff << 8, NUM_VS_THREADS_shift = 8, NUM_GS_THREADS_mask = 0xff << 16, NUM_GS_THREADS_shift = 16, NUM_ES_THREADS_mask = 0xff << 24, NUM_ES_THREADS_shift = 24, SQ_THREAD_RESOURCE_MGMT_2 = 0x00008c1c, NUM_HS_THREADS_mask = 0xff << 0, NUM_HS_THREADS_shift = 0, NUM_LS_THREADS_mask = 0xff << 8, NUM_LS_THREADS_shift = 8, SQ_STACK_RESOURCE_MGMT_1 = 0x00008c20, NUM_PS_STACK_ENTRIES_mask = 0xfff << 0, NUM_PS_STACK_ENTRIES_shift = 0, NUM_VS_STACK_ENTRIES_mask = 0xfff << 16, NUM_VS_STACK_ENTRIES_shift = 16, SQ_STACK_RESOURCE_MGMT_2 = 0x00008c24, NUM_GS_STACK_ENTRIES_mask = 0xfff << 0, NUM_GS_STACK_ENTRIES_shift = 0, NUM_ES_STACK_ENTRIES_mask = 0xfff << 16, NUM_ES_STACK_ENTRIES_shift = 16, SQ_STACK_RESOURCE_MGMT_3 = 0x00008c28, NUM_HS_STACK_ENTRIES_mask = 0xfff << 0, NUM_HS_STACK_ENTRIES_shift = 0, NUM_LS_STACK_ENTRIES_mask = 0xfff << 16, NUM_LS_STACK_ENTRIES_shift = 16, SQ_ESGS_RING_BASE = 0x00008c40, SQ_ESGS_RING_SIZE = 0x00008c44, SQ_GSVS_RING_BASE = 0x00008c48, SQ_GSVS_RING_SIZE = 0x00008c4c, SQ_ESTMP_RING_BASE = 0x00008c50, SQ_ESTMP_RING_SIZE = 0x00008c54, SQ_GSTMP_RING_BASE = 0x00008c58, SQ_GSTMP_RING_SIZE = 0x00008c5c, SQ_VSTMP_RING_BASE = 0x00008c60, SQ_VSTMP_RING_SIZE = 0x00008c64, SQ_PSTMP_RING_BASE = 0x00008c68, SQ_PSTMP_RING_SIZE = 0x00008c6c, SQ_CONST_MEM_BASE = 0x00008df8, SQ_ALU_WORD1_OP3 = 0x00008dfc, SRC2_SEL_mask = 0x1ff << 0, SRC2_SEL_shift = 0, SQ_ALU_SRC_LDS_OQ_A = 0xdb, SQ_ALU_SRC_LDS_OQ_B = 0xdc, SQ_ALU_SRC_LDS_OQ_A_POP = 0xdd, SQ_ALU_SRC_LDS_OQ_B_POP = 0xde, SQ_ALU_SRC_LDS_DIRECT_A = 0xdf, SQ_ALU_SRC_LDS_DIRECT_B = 0xe0, SQ_ALU_SRC_TIME_HI = 0xe3, SQ_ALU_SRC_TIME_LO = 0xe4, SQ_ALU_SRC_MASK_HI = 0xe5, SQ_ALU_SRC_MASK_LO = 0xe6, SQ_ALU_SRC_HW_WAVE_ID = 0xe7, SQ_ALU_SRC_SIMD_ID = 0xe8, SQ_ALU_SRC_SE_ID = 0xe9, SQ_ALU_SRC_HW_THREADGRP_ID = 0xea, SQ_ALU_SRC_WAVE_ID_IN_GRP = 0xeb, SQ_ALU_SRC_NUM_THREADGRP_WAVES = 0xec, SQ_ALU_SRC_HW_ALU_ODD = 0xed, SQ_ALU_SRC_LOOP_IDX = 0xee, SQ_ALU_SRC_PARAM_BASE_ADDR = 0xf0, SQ_ALU_SRC_NEW_PRIM_MASK = 0xf1, SQ_ALU_SRC_PRIM_MASK_HI = 0xf2, SQ_ALU_SRC_PRIM_MASK_LO = 0xf3, SQ_ALU_SRC_1_DBL_L = 0xf4, SQ_ALU_SRC_1_DBL_M = 0xf5, SQ_ALU_SRC_0_5_DBL_L = 0xf6, SQ_ALU_SRC_0_5_DBL_M = 0xf7, SQ_ALU_SRC_0 = 0xf8, SQ_ALU_SRC_1 = 0xf9, SQ_ALU_SRC_1_INT = 0xfa, SQ_ALU_SRC_M_1_INT = 0xfb, SQ_ALU_SRC_0_5 = 0xfc, SQ_ALU_SRC_LITERAL = 0xfd, SQ_ALU_SRC_PV = 0xfe, SQ_ALU_SRC_PS = 0xff, SRC2_REL_bit = 1 << 9, SRC2_CHAN_mask = 0x03 << 10, SRC2_CHAN_shift = 10, SQ_CHAN_X = 0x00, SQ_CHAN_Y = 0x01, SQ_CHAN_Z = 0x02, SQ_CHAN_W = 0x03, SRC2_NEG_bit = 1 << 12, SQ_ALU_WORD1_OP3__ALU_INST_mask = 0x1f << 13, SQ_ALU_WORD1_OP3__ALU_INST_shift = 13, SQ_OP3_INST_BFE_UINT = 0x04, SQ_OP3_INST_BFE_INT = 0x05, SQ_OP3_INST_BFI_INT = 0x06, SQ_OP3_INST_FMA = 0x07, SQ_OP3_INST_CNDNE_64 = 0x09, SQ_OP3_INST_FMA_64 = 0x0a, SQ_OP3_INST_LERP_UINT = 0x0b, SQ_OP3_INST_BIT_ALIGN_INT = 0x0c, SQ_OP3_INST_BYTE_ALIGN_INT = 0x0d, SQ_OP3_INST_SAD_ACCUM_UINT = 0x0e, SQ_OP3_INST_SAD_ACCUM_HI_UINT = 0x0f, SQ_OP3_INST_MULADD_UINT24 = 0x10, SQ_OP3_INST_LDS_IDX_OP = 0x11, SQ_OP3_INST_MULADD = 0x14, SQ_OP3_INST_MULADD_M2 = 0x15, SQ_OP3_INST_MULADD_M4 = 0x16, SQ_OP3_INST_MULADD_D2 = 0x17, SQ_OP3_INST_MULADD_IEEE = 0x18, SQ_OP3_INST_CNDE = 0x19, SQ_OP3_INST_CNDGT = 0x1a, SQ_OP3_INST_CNDGE = 0x1b, SQ_OP3_INST_CNDE_INT = 0x1c, SQ_OP3_INST_CNDGT_INT = 0x1d, SQ_OP3_INST_CNDGE_INT = 0x1e, SQ_OP3_INST_MUL_LIT = 0x1f, SQ_ALU_WORD1_LDS_DIRECT_LITERAL_LO = 0x00008dfc, OFFSET_A_mask = 0x1fff << 0, OFFSET_A_shift = 0, STRIDE_A_mask = 0x7f << 13, STRIDE_A_shift = 13, THREAD_REL_A_bit = 1 << 22, SQ_TEX_WORD2 = 0x00008dfc, OFFSET_X_mask = 0x1f << 0, OFFSET_X_shift = 0, OFFSET_Y_mask = 0x1f << 5, OFFSET_Y_shift = 5, OFFSET_Z_mask = 0x1f << 10, OFFSET_Z_shift = 10, SAMPLER_ID_mask = 0x1f << 15, SAMPLER_ID_shift = 15, SQ_TEX_WORD2__SRC_SEL_X_mask = 0x07 << 20, SQ_TEX_WORD2__SRC_SEL_X_shift = 20, SQ_SEL_X = 0x00, SQ_SEL_Y = 0x01, SQ_SEL_Z = 0x02, SQ_SEL_W = 0x03, SQ_SEL_0 = 0x04, SQ_SEL_1 = 0x05, SRC_SEL_Y_mask = 0x07 << 23, SRC_SEL_Y_shift = 23, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SRC_SEL_Z_mask = 0x07 << 26, SRC_SEL_Z_shift = 26, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SRC_SEL_W_mask = 0x07 << 29, SRC_SEL_W_shift = 29, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_CF_ALLOC_EXPORT_WORD1 = 0x00008dfc, BURST_COUNT_mask = 0x0f << 16, BURST_COUNT_shift = 16, VALID_PIXEL_MODE_bit = 1 << 20, END_OF_PROGRAM_bit = 1 << 21, SQ_CF_ALLOC_EXPORT_WORD1__CF_INST_mask = 0xff << 22, SQ_CF_ALLOC_EXPORT_WORD1__CF_INST_shift = 22, SQ_CF_INST_MEM_STREAM0_BUF0 = 0x40, SQ_CF_INST_MEM_STREAM0_BUF1 = 0x41, SQ_CF_INST_MEM_STREAM0_BUF2 = 0x42, SQ_CF_INST_MEM_STREAM0_BUF3 = 0x43, SQ_CF_INST_MEM_STREAM1_BUF0 = 0x44, SQ_CF_INST_MEM_STREAM1_BUF1 = 0x45, SQ_CF_INST_MEM_STREAM1_BUF2 = 0x46, SQ_CF_INST_MEM_STREAM1_BUF3 = 0x47, SQ_CF_INST_MEM_STREAM2_BUF0 = 0x48, SQ_CF_INST_MEM_STREAM2_BUF1 = 0x49, SQ_CF_INST_MEM_STREAM2_BUF2 = 0x4a, SQ_CF_INST_MEM_STREAM2_BUF3 = 0x4b, SQ_CF_INST_MEM_STREAM3_BUF0 = 0x4c, SQ_CF_INST_MEM_STREAM3_BUF1 = 0x4d, SQ_CF_INST_MEM_STREAM3_BUF2 = 0x4e, SQ_CF_INST_MEM_STREAM3_BUF3 = 0x4f, SQ_CF_INST_MEM_SCRATCH = 0x50, SQ_CF_INST_MEM_RING = 0x52, SQ_CF_INST_EXPORT = 0x53, SQ_CF_INST_EXPORT_DONE = 0x54, SQ_CF_INST_MEM_EXPORT = 0x55, SQ_CF_INST_MEM_RAT = 0x56, SQ_CF_INST_MEM_RAT_CACHELESS = 0x57, SQ_CF_INST_MEM_RING1 = 0x58, SQ_CF_INST_MEM_RING2 = 0x59, SQ_CF_INST_MEM_RING3 = 0x5a, SQ_CF_INST_MEM_EXPORT_COMBINED = 0x5b, SQ_CF_INST_MEM_RAT_COMBINED_CACHELESS = 0x5c, MARK_bit = 1 << 30, BARRIER_bit = 1 << 31, SQ_CF_ALU_WORD1 = 0x00008dfc, KCACHE_MODE1_mask = 0x03 << 0, KCACHE_MODE1_shift = 0, SQ_CF_KCACHE_NOP = 0x00, SQ_CF_KCACHE_LOCK_1 = 0x01, SQ_CF_KCACHE_LOCK_2 = 0x02, SQ_CF_KCACHE_LOCK_LOOP_INDEX = 0x03, KCACHE_ADDR0_mask = 0xff << 2, KCACHE_ADDR0_shift = 2, KCACHE_ADDR1_mask = 0xff << 10, KCACHE_ADDR1_shift = 10, SQ_CF_ALU_WORD1__COUNT_mask = 0x7f << 18, SQ_CF_ALU_WORD1__COUNT_shift = 18, SQ_CF_ALU_WORD1__ALT_CONST_bit = 1 << 25, SQ_CF_ALU_WORD1__CF_INST_mask = 0x0f << 26, SQ_CF_ALU_WORD1__CF_INST_shift = 26, SQ_CF_INST_ALU = 0x08, SQ_CF_INST_ALU_PUSH_BEFORE = 0x09, SQ_CF_INST_ALU_POP_AFTER = 0x0a, SQ_CF_INST_ALU_POP2_AFTER = 0x0b, SQ_CF_INST_ALU_EXTENDED = 0x0c, SQ_CF_INST_ALU_CONTINUE = 0x0d, SQ_CF_INST_ALU_BREAK = 0x0e, SQ_CF_INST_ALU_ELSE_AFTER = 0x0f, WHOLE_QUAD_MODE_bit = 1 << 30, /* BARRIER_bit = 1 << 31, */ SQ_TEX_WORD1 = 0x00008dfc, SQ_TEX_WORD1__DST_GPR_mask = 0x7f << 0, SQ_TEX_WORD1__DST_GPR_shift = 0, SQ_TEX_WORD1__DST_REL_bit = 1 << 7, SQ_TEX_WORD1__DST_SEL_X_mask = 0x07 << 9, SQ_TEX_WORD1__DST_SEL_X_shift = 9, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_SEL_MASK = 0x07, SQ_TEX_WORD1__DST_SEL_Y_mask = 0x07 << 12, SQ_TEX_WORD1__DST_SEL_Y_shift = 12, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_TEX_WORD1__DST_SEL_Z_mask = 0x07 << 15, SQ_TEX_WORD1__DST_SEL_Z_shift = 15, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_TEX_WORD1__DST_SEL_W_mask = 0x07 << 18, SQ_TEX_WORD1__DST_SEL_W_shift = 18, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_TEX_WORD1__LOD_BIAS_mask = 0x7f << 21, SQ_TEX_WORD1__LOD_BIAS_shift = 21, COORD_TYPE_X_bit = 1 << 28, COORD_TYPE_Y_bit = 1 << 29, COORD_TYPE_Z_bit = 1 << 30, COORD_TYPE_W_bit = 1 << 31, SQ_VTX_WORD0 = 0x00008dfc, VTX_INST_mask = 0x1f << 0, VTX_INST_shift = 0, SQ_VTX_INST_FETCH = 0x00, SQ_VTX_INST_SEMANTIC = 0x01, SQ_VTX_INST_GET_BUFFER_RESINFO = 0x0e, FETCH_TYPE_mask = 0x03 << 5, FETCH_TYPE_shift = 5, SQ_VTX_FETCH_VERTEX_DATA = 0x00, SQ_VTX_FETCH_INSTANCE_DATA = 0x01, SQ_VTX_FETCH_NO_INDEX_OFFSET = 0x02, FETCH_WHOLE_QUAD_bit = 1 << 7, BUFFER_ID_mask = 0xff << 8, BUFFER_ID_shift = 8, SQ_VTX_WORD0__SRC_GPR_mask = 0x7f << 16, SQ_VTX_WORD0__SRC_GPR_shift = 16, SRC_REL_bit = 1 << 23, SQ_VTX_WORD0__SRC_SEL_X_mask = 0x03 << 24, SQ_VTX_WORD0__SRC_SEL_X_shift = 24, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ MEGA_FETCH_COUNT_mask = 0x3f << 26, MEGA_FETCH_COUNT_shift = 26, SQ_CF_ALLOC_EXPORT_WORD1_SWIZ = 0x00008dfc, SEL_X_mask = 0x07 << 0, SEL_X_shift = 0, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SEL_Y_mask = 0x07 << 3, SEL_Y_shift = 3, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SEL_Z_mask = 0x07 << 6, SEL_Z_shift = 6, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SEL_W_mask = 0x07 << 9, SEL_W_shift = 9, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_MEM_RD_WORD0 = 0x00008dfc, MEM_INST_mask = 0x1f << 0, MEM_INST_shift = 0, SQ_MEM_INST_MEM = 0x02, SQ_MEM_RD_WORD0__ELEM_SIZE_mask = 0x03 << 5, SQ_MEM_RD_WORD0__ELEM_SIZE_shift = 5, /* FETCH_WHOLE_QUAD_bit = 1 << 7, */ MEM_OP_mask = 0x07 << 8, MEM_OP_shift = 8, SQ_MEM_OP_RD_SCRATCH = 0x00, SQ_MEM_OP_RD_SCATTER = 0x02, SQ_MEM_OP_GDS = 0x04, SQ_MEM_OP_TF_WRITE = 0x05, SQ_MEM_RD_WORD0__UNCACHED_bit = 1 << 11, INDEXED_bit = 1 << 12, SQ_MEM_RD_WORD0__SRC_GPR_mask = 0x7f << 16, SQ_MEM_RD_WORD0__SRC_GPR_shift = 16, /* SRC_REL_bit = 1 << 23, */ SQ_MEM_RD_WORD0__SRC_SEL_X_mask = 0x03 << 24, SQ_MEM_RD_WORD0__SRC_SEL_X_shift = 24, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ BURST_CNT_mask = 0x0f << 26, BURST_CNT_shift = 26, SQ_ALU_WORD1 = 0x00008dfc, SQ_ALU_WORD1__ENCODING_mask = 0x07 << 15, SQ_ALU_WORD1__ENCODING_shift = 15, BANK_SWIZZLE_mask = 0x07 << 18, BANK_SWIZZLE_shift = 18, SQ_ALU_VEC_012 = 0x00, SQ_ALU_VEC_021 = 0x01, SQ_ALU_VEC_120 = 0x02, SQ_ALU_VEC_102 = 0x03, SQ_ALU_VEC_201 = 0x04, SQ_ALU_VEC_210 = 0x05, SQ_ALU_WORD1__DST_GPR_mask = 0x7f << 21, SQ_ALU_WORD1__DST_GPR_shift = 21, SQ_ALU_WORD1__DST_REL_bit = 1 << 28, DST_CHAN_mask = 0x03 << 29, DST_CHAN_shift = 29, CHAN_X = 0x00, CHAN_Y = 0x01, CHAN_Z = 0x02, CHAN_W = 0x03, SQ_ALU_WORD1__CLAMP_bit = 1 << 31, SQ_CF_ALU_WORD0_EXT = 0x00008dfc, KCACHE_BANK_INDEX_MODE0_mask = 0x03 << 4, KCACHE_BANK_INDEX_MODE0_shift = 4, SQ_CF_INDEX_NONE = 0x00, SQ_CF_INDEX_0 = 0x01, SQ_CF_INDEX_1 = 0x02, SQ_CF_INVALID = 0x03, KCACHE_BANK_INDEX_MODE1_mask = 0x03 << 6, KCACHE_BANK_INDEX_MODE1_shift = 6, /* SQ_CF_INDEX_NONE = 0x00, */ /* SQ_CF_INDEX_0 = 0x01, */ /* SQ_CF_INDEX_1 = 0x02, */ /* SQ_CF_INVALID = 0x03, */ KCACHE_BANK_INDEX_MODE2_mask = 0x03 << 8, KCACHE_BANK_INDEX_MODE2_shift = 8, /* SQ_CF_INDEX_NONE = 0x00, */ /* SQ_CF_INDEX_0 = 0x01, */ /* SQ_CF_INDEX_1 = 0x02, */ /* SQ_CF_INVALID = 0x03, */ KCACHE_BANK_INDEX_MODE3_mask = 0x03 << 10, KCACHE_BANK_INDEX_MODE3_shift = 10, /* SQ_CF_INDEX_NONE = 0x00, */ /* SQ_CF_INDEX_0 = 0x01, */ /* SQ_CF_INDEX_1 = 0x02, */ /* SQ_CF_INVALID = 0x03, */ KCACHE_BANK2_mask = 0x0f << 22, KCACHE_BANK2_shift = 22, KCACHE_BANK3_mask = 0x0f << 26, KCACHE_BANK3_shift = 26, KCACHE_MODE2_mask = 0x03 << 30, KCACHE_MODE2_shift = 30, /* SQ_CF_KCACHE_NOP = 0x00, */ /* SQ_CF_KCACHE_LOCK_1 = 0x01, */ /* SQ_CF_KCACHE_LOCK_2 = 0x02, */ /* SQ_CF_KCACHE_LOCK_LOOP_INDEX = 0x03, */ SQ_ALU_WORD0_LDS_IDX_OP = 0x00008dfc, SRC0_SEL_mask = 0x1ff << 0, SRC0_SEL_shift = 0, /* SQ_ALU_SRC_LDS_OQ_A = 0xdb, */ /* SQ_ALU_SRC_LDS_OQ_B = 0xdc, */ /* SQ_ALU_SRC_LDS_OQ_A_POP = 0xdd, */ /* SQ_ALU_SRC_LDS_OQ_B_POP = 0xde, */ /* SQ_ALU_SRC_LDS_DIRECT_A = 0xdf, */ /* SQ_ALU_SRC_LDS_DIRECT_B = 0xe0, */ /* SQ_ALU_SRC_TIME_HI = 0xe3, */ /* SQ_ALU_SRC_TIME_LO = 0xe4, */ /* SQ_ALU_SRC_MASK_HI = 0xe5, */ /* SQ_ALU_SRC_MASK_LO = 0xe6, */ /* SQ_ALU_SRC_HW_WAVE_ID = 0xe7, */ /* SQ_ALU_SRC_SIMD_ID = 0xe8, */ /* SQ_ALU_SRC_SE_ID = 0xe9, */ /* SQ_ALU_SRC_HW_THREADGRP_ID = 0xea, */ /* SQ_ALU_SRC_WAVE_ID_IN_GRP = 0xeb, */ /* SQ_ALU_SRC_NUM_THREADGRP_WAVES = 0xec, */ /* SQ_ALU_SRC_HW_ALU_ODD = 0xed, */ /* SQ_ALU_SRC_LOOP_IDX = 0xee, */ /* SQ_ALU_SRC_PARAM_BASE_ADDR = 0xf0, */ /* SQ_ALU_SRC_NEW_PRIM_MASK = 0xf1, */ /* SQ_ALU_SRC_PRIM_MASK_HI = 0xf2, */ /* SQ_ALU_SRC_PRIM_MASK_LO = 0xf3, */ /* SQ_ALU_SRC_1_DBL_L = 0xf4, */ /* SQ_ALU_SRC_1_DBL_M = 0xf5, */ /* SQ_ALU_SRC_0_5_DBL_L = 0xf6, */ /* SQ_ALU_SRC_0_5_DBL_M = 0xf7, */ /* SQ_ALU_SRC_0 = 0xf8, */ /* SQ_ALU_SRC_1 = 0xf9, */ /* SQ_ALU_SRC_1_INT = 0xfa, */ /* SQ_ALU_SRC_M_1_INT = 0xfb, */ /* SQ_ALU_SRC_0_5 = 0xfc, */ /* SQ_ALU_SRC_LITERAL = 0xfd, */ /* SQ_ALU_SRC_PV = 0xfe, */ /* SQ_ALU_SRC_PS = 0xff, */ SRC0_REL_bit = 1 << 9, SRC0_CHAN_mask = 0x03 << 10, SRC0_CHAN_shift = 10, /* SQ_CHAN_X = 0x00, */ /* SQ_CHAN_Y = 0x01, */ /* SQ_CHAN_Z = 0x02, */ /* SQ_CHAN_W = 0x03, */ IDX_OFFSET_4_bit = 1 << 12, SRC1_SEL_mask = 0x1ff << 13, SRC1_SEL_shift = 13, /* SQ_ALU_SRC_LDS_OQ_A = 0xdb, */ /* SQ_ALU_SRC_LDS_OQ_B = 0xdc, */ /* SQ_ALU_SRC_LDS_OQ_A_POP = 0xdd, */ /* SQ_ALU_SRC_LDS_OQ_B_POP = 0xde, */ /* SQ_ALU_SRC_LDS_DIRECT_A = 0xdf, */ /* SQ_ALU_SRC_LDS_DIRECT_B = 0xe0, */ /* SQ_ALU_SRC_TIME_HI = 0xe3, */ /* SQ_ALU_SRC_TIME_LO = 0xe4, */ /* SQ_ALU_SRC_MASK_HI = 0xe5, */ /* SQ_ALU_SRC_MASK_LO = 0xe6, */ /* SQ_ALU_SRC_HW_WAVE_ID = 0xe7, */ /* SQ_ALU_SRC_SIMD_ID = 0xe8, */ /* SQ_ALU_SRC_SE_ID = 0xe9, */ /* SQ_ALU_SRC_HW_THREADGRP_ID = 0xea, */ /* SQ_ALU_SRC_WAVE_ID_IN_GRP = 0xeb, */ /* SQ_ALU_SRC_NUM_THREADGRP_WAVES = 0xec, */ /* SQ_ALU_SRC_HW_ALU_ODD = 0xed, */ /* SQ_ALU_SRC_LOOP_IDX = 0xee, */ /* SQ_ALU_SRC_PARAM_BASE_ADDR = 0xf0, */ /* SQ_ALU_SRC_NEW_PRIM_MASK = 0xf1, */ /* SQ_ALU_SRC_PRIM_MASK_HI = 0xf2, */ /* SQ_ALU_SRC_PRIM_MASK_LO = 0xf3, */ /* SQ_ALU_SRC_1_DBL_L = 0xf4, */ /* SQ_ALU_SRC_1_DBL_M = 0xf5, */ /* SQ_ALU_SRC_0_5_DBL_L = 0xf6, */ /* SQ_ALU_SRC_0_5_DBL_M = 0xf7, */ /* SQ_ALU_SRC_0 = 0xf8, */ /* SQ_ALU_SRC_1 = 0xf9, */ /* SQ_ALU_SRC_1_INT = 0xfa, */ /* SQ_ALU_SRC_M_1_INT = 0xfb, */ /* SQ_ALU_SRC_0_5 = 0xfc, */ /* SQ_ALU_SRC_LITERAL = 0xfd, */ /* SQ_ALU_SRC_PV = 0xfe, */ /* SQ_ALU_SRC_PS = 0xff, */ SRC1_REL_bit = 1 << 22, SRC1_CHAN_mask = 0x03 << 23, SRC1_CHAN_shift = 23, /* SQ_CHAN_X = 0x00, */ /* SQ_CHAN_Y = 0x01, */ /* SQ_CHAN_Z = 0x02, */ /* SQ_CHAN_W = 0x03, */ IDX_OFFSET_5_bit = 1 << 25, INDEX_MODE_mask = 0x07 << 26, INDEX_MODE_shift = 26, SQ_INDEX_AR_X = 0x00, SQ_INDEX_LOOP = 0x04, SQ_INDEX_GLOBAL = 0x05, SQ_INDEX_GLOBAL_AR_X = 0x06, PRED_SEL_mask = 0x03 << 29, PRED_SEL_shift = 29, SQ_PRED_SEL_OFF = 0x00, SQ_PRED_SEL_ZERO = 0x02, SQ_PRED_SEL_ONE = 0x03, LAST_bit = 1 << 31, SQ_MEM_GDS_WORD2 = 0x00008dfc, SQ_MEM_GDS_WORD2__DST_SEL_X_mask = 0x07 << 0, SQ_MEM_GDS_WORD2__DST_SEL_X_shift = 0, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_MEM_GDS_WORD2__DST_SEL_Y_mask = 0x07 << 3, SQ_MEM_GDS_WORD2__DST_SEL_Y_shift = 3, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_MEM_GDS_WORD2__DST_SEL_Z_mask = 0x07 << 6, SQ_MEM_GDS_WORD2__DST_SEL_Z_shift = 6, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_MEM_GDS_WORD2__DST_SEL_W_mask = 0x07 << 9, SQ_MEM_GDS_WORD2__DST_SEL_W_shift = 9, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_CF_ALLOC_EXPORT_WORD0_RAT = 0x00008dfc, RAT_ID_mask = 0x0f << 0, RAT_ID_shift = 0, RAT_INST_mask = 0x3f << 4, RAT_INST_shift = 4, SQ_EXPORT_RAT_INST_NOP = 0x00, SQ_EXPORT_RAT_INST_STORE_TYPED = 0x01, SQ_EXPORT_RAT_INST_STORE_RAW = 0x02, SQ_EXPORT_RAT_INST_STORE_RAW_FDENORM = 0x03, SQ_EXPORT_RAT_INST_CMPXCHG_INT = 0x04, SQ_EXPORT_RAT_INST_CMPXCHG_FLT = 0x05, SQ_EXPORT_RAT_INST_CMPXCHG_FDENORM = 0x06, SQ_EXPORT_RAT_INST_ADD = 0x07, SQ_EXPORT_RAT_INST_SUB = 0x08, SQ_EXPORT_RAT_INST_RSUB = 0x09, SQ_EXPORT_RAT_INST_MIN_INT = 0x0a, SQ_EXPORT_RAT_INST_MIN_UINT = 0x0b, SQ_EXPORT_RAT_INST_MAX_INT = 0x0c, SQ_EXPORT_RAT_INST_MAX_UINT = 0x0d, SQ_EXPORT_RAT_INST_AND = 0x0e, SQ_EXPORT_RAT_INST_OR = 0x0f, SQ_EXPORT_RAT_INST_XOR = 0x10, SQ_EXPORT_RAT_INST_MSKOR = 0x11, SQ_EXPORT_RAT_INST_INC_UINT = 0x12, SQ_EXPORT_RAT_INST_DEC_UINT = 0x13, SQ_EXPORT_RAT_INST_NOP_RTN = 0x20, SQ_EXPORT_RAT_INST_XCHG_RTN = 0x22, SQ_EXPORT_RAT_INST_XCHG_FDENORM_RTN = 0x23, SQ_EXPORT_RAT_INST_CMPXCHG_INT_RTN = 0x24, SQ_EXPORT_RAT_INST_CMPXCHG_FLT_RTN = 0x25, SQ_EXPORT_RAT_INST_CMPXCHG_FDENORM_RTN = 0x26, SQ_EXPORT_RAT_INST_ADD_RTN = 0x27, SQ_EXPORT_RAT_INST_SUB_RTN = 0x28, SQ_EXPORT_RAT_INST_RSUB_RTN = 0x29, SQ_EXPORT_RAT_INST_MIN_INT_RTN = 0x2a, SQ_EXPORT_RAT_INST_MIN_UINT_RTN = 0x2b, SQ_EXPORT_RAT_INST_MAX_INT_RTN = 0x2c, SQ_EXPORT_RAT_INST_MAX_UINT_RTN = 0x2d, SQ_EXPORT_RAT_INST_AND_RTN = 0x2e, SQ_EXPORT_RAT_INST_OR_RTN = 0x2f, SQ_EXPORT_RAT_INST_XOR_RTN = 0x30, SQ_EXPORT_RAT_INST_MSKOR_RTN = 0x31, SQ_EXPORT_RAT_INST_INC_UINT_RTN = 0x32, SQ_EXPORT_RAT_INST_DEC_UINT_RTN = 0x33, RAT_INDEX_MODE_mask = 0x03 << 11, RAT_INDEX_MODE_shift = 11, /* SQ_CF_INDEX_NONE = 0x00, */ /* SQ_CF_INDEX_0 = 0x01, */ /* SQ_CF_INDEX_1 = 0x02, */ /* SQ_CF_INVALID = 0x03, */ SQ_CF_ALLOC_EXPORT_WORD0_RAT__TYPE_mask = 0x03 << 13, SQ_CF_ALLOC_EXPORT_WORD0_RAT__TYPE_shift = 13, SQ_EXPORT_PIXEL = 0x00, SQ_EXPORT_POS = 0x01, SQ_EXPORT_PARAM = 0x02, X_UNUSED_FOR_SX_EXPORTS = 0x03, RW_GPR_mask = 0x7f << 15, RW_GPR_shift = 15, RW_REL_bit = 1 << 22, INDEX_GPR_mask = 0x7f << 23, INDEX_GPR_shift = 23, SQ_CF_ALLOC_EXPORT_WORD0_RAT__ELEM_SIZE_mask = 0x03 << 30, SQ_CF_ALLOC_EXPORT_WORD0_RAT__ELEM_SIZE_shift = 30, SQ_CF_ALU_WORD0 = 0x00008dfc, SQ_CF_ALU_WORD0__ADDR_mask = 0x3fffff << 0, SQ_CF_ALU_WORD0__ADDR_shift = 0, KCACHE_BANK0_mask = 0x0f << 22, KCACHE_BANK0_shift = 22, KCACHE_BANK1_mask = 0x0f << 26, KCACHE_BANK1_shift = 26, KCACHE_MODE0_mask = 0x03 << 30, KCACHE_MODE0_shift = 30, /* SQ_CF_KCACHE_NOP = 0x00, */ /* SQ_CF_KCACHE_LOCK_1 = 0x01, */ /* SQ_CF_KCACHE_LOCK_2 = 0x02, */ /* SQ_CF_KCACHE_LOCK_LOOP_INDEX = 0x03, */ SQ_MEM_GDS_WORD1 = 0x00008dfc, SQ_MEM_GDS_WORD1__DST_GPR_mask = 0x7f << 0, SQ_MEM_GDS_WORD1__DST_GPR_shift = 0, DST_REL_MODE_mask = 0x03 << 7, DST_REL_MODE_shift = 7, SQ_REL_NONE = 0x00, SQ_REL_LOOP = 0x01, SQ_REL_GLOBAL = 0x02, GDS_OP_mask = 0x3f << 9, GDS_OP_shift = 9, SQ_DS_INST_ADD = 0x00, SQ_DS_INST_SUB = 0x01, SQ_DS_INST_RSUB = 0x02, SQ_DS_INST_INC = 0x03, SQ_DS_INST_DEC = 0x04, SQ_DS_INST_MIN_INT = 0x05, SQ_DS_INST_MAX_INT = 0x06, SQ_DS_INST_MIN_UINT = 0x07, SQ_DS_INST_MAX_UINT = 0x08, SQ_DS_INST_AND = 0x09, SQ_DS_INST_OR = 0x0a, SQ_DS_INST_XOR = 0x0b, SQ_DS_INST_MSKOR = 0x0c, SQ_DS_INST_WRITE = 0x0d, SQ_DS_INST_WRITE_REL = 0x0e, SQ_DS_INST_WRITE2 = 0x0f, SQ_DS_INST_CMP_STORE = 0x10, SQ_DS_INST_CMP_STORE_SPF = 0x11, SQ_DS_INST_BYTE_WRITE = 0x12, SQ_DS_INST_SHORT_WRITE = 0x13, SQ_DS_INST_ADD_RET = 0x20, SQ_DS_INST_SUB_RET = 0x21, SQ_DS_INST_RSUB_RET = 0x22, SQ_DS_INST_INC_RET = 0x23, SQ_DS_INST_DEC_RET = 0x24, SQ_DS_INST_MIN_INT_RET = 0x25, SQ_DS_INST_MAX_INT_RET = 0x26, SQ_DS_INST_MIN_UINT_RET = 0x27, SQ_DS_INST_MAX_UINT_RET = 0x28, SQ_DS_INST_AND_RET = 0x29, SQ_DS_INST_OR_RET = 0x2a, SQ_DS_INST_XOR_RET = 0x2b, SQ_DS_INST_MSKOR_RET = 0x2c, SQ_DS_INST_XCHG_RET = 0x2d, SQ_DS_INST_XCHG_REL_RET = 0x2e, SQ_DS_INST_XCHG2_RET = 0x2f, SQ_DS_INST_CMP_XCHG_RET = 0x30, SQ_DS_INST_CMP_XCHG_SPF_RET = 0x31, SQ_DS_INST_READ_RET = 0x32, SQ_DS_INST_READ_REL_RET = 0x33, SQ_DS_INST_READ2_RET = 0x34, SQ_DS_INST_READWRITE_RET = 0x35, SQ_DS_INST_BYTE_READ_RET = 0x36, SQ_DS_INST_UBYTE_READ_RET = 0x37, SQ_DS_INST_SHORT_READ_RET = 0x38, SQ_DS_INST_USHORT_READ_RET = 0x39, SQ_DS_INST_ATOMIC_ORDERED_ALLOC_RET = 0x3f, DS_OFFSET_mask = 0x7f << 16, DS_OFFSET_shift = 16, UAV_INDEX_MODE_mask = 0x03 << 24, UAV_INDEX_MODE_shift = 24, /* SQ_CF_INDEX_NONE = 0x00, */ /* SQ_CF_INDEX_0 = 0x01, */ /* SQ_CF_INDEX_1 = 0x02, */ /* SQ_CF_INVALID = 0x03, */ UAV_ID_mask = 0x0f << 26, UAV_ID_shift = 26, ALLOC_CONSUME_bit = 1 << 30, BCAST_FIRST_REQ_bit = 1 << 31, SQ_MEM_RD_WORD2 = 0x00008dfc, ARRAY_BASE_mask = 0x1fff << 0, ARRAY_BASE_shift = 0, SQ_MEM_RD_WORD2__ENDIAN_SWAP_mask = 0x03 << 16, SQ_MEM_RD_WORD2__ENDIAN_SWAP_shift = 16, SQ_ENDIAN_NONE = 0x00, SQ_ENDIAN_8IN16 = 0x01, SQ_ENDIAN_8IN32 = 0x02, SQ_MEM_RD_WORD2__ARRAY_SIZE_mask = 0xfff << 20, SQ_MEM_RD_WORD2__ARRAY_SIZE_shift = 20, SQ_CF_ALU_WORD1_EXT = 0x00008dfc, KCACHE_MODE3_mask = 0x03 << 0, KCACHE_MODE3_shift = 0, /* SQ_CF_KCACHE_NOP = 0x00, */ /* SQ_CF_KCACHE_LOCK_1 = 0x01, */ /* SQ_CF_KCACHE_LOCK_2 = 0x02, */ /* SQ_CF_KCACHE_LOCK_LOOP_INDEX = 0x03, */ KCACHE_ADDR2_mask = 0xff << 2, KCACHE_ADDR2_shift = 2, KCACHE_ADDR3_mask = 0xff << 10, KCACHE_ADDR3_shift = 10, SQ_CF_ALU_WORD1_EXT__CF_INST_mask = 0x0f << 26, SQ_CF_ALU_WORD1_EXT__CF_INST_shift = 26, /* SQ_CF_INST_ALU = 0x08, */ /* SQ_CF_INST_ALU_PUSH_BEFORE = 0x09, */ /* SQ_CF_INST_ALU_POP_AFTER = 0x0a, */ /* SQ_CF_INST_ALU_POP2_AFTER = 0x0b, */ /* SQ_CF_INST_ALU_EXTENDED = 0x0c, */ /* SQ_CF_INST_ALU_CONTINUE = 0x0d, */ /* SQ_CF_INST_ALU_BREAK = 0x0e, */ /* SQ_CF_INST_ALU_ELSE_AFTER = 0x0f, */ /* BARRIER_bit = 1 << 31, */ SQ_CF_GWS_WORD0 = 0x00008dfc, VALUE_mask = 0x3ff << 0, VALUE_shift = 0, RESOURCE_mask = 0x1f << 16, RESOURCE_shift = 16, SIGN_bit = 1 << 25, VAL_INDEX_MODE_mask = 0x03 << 26, VAL_INDEX_MODE_shift = 26, SQ_GWS_INDEX_NONE = 0x00, SQ_GWS_INDEX_0 = 0x01, SQ_GWS_INDEX_1 = 0x02, SQ_GWS_INDEX_MIX = 0x03, RSRC_INDEX_MODE_mask = 0x03 << 28, RSRC_INDEX_MODE_shift = 28, /* SQ_CF_INDEX_NONE = 0x00, */ /* SQ_CF_INDEX_0 = 0x01, */ /* SQ_CF_INDEX_1 = 0x02, */ /* SQ_CF_INVALID = 0x03, */ GWS_OPCODE_mask = 0x03 << 30, GWS_OPCODE_shift = 30, SQ_GWS_SEMA_V = 0x00, SQ_GWS_SEMA_P = 0x01, SQ_GWS_BARRIER = 0x02, SQ_GWS_INIT = 0x03, SQ_VTX_WORD2 = 0x00008dfc, SQ_VTX_WORD2__OFFSET_mask = 0xffff << 0, SQ_VTX_WORD2__OFFSET_shift = 0, SQ_VTX_WORD2__ENDIAN_SWAP_mask = 0x03 << 16, SQ_VTX_WORD2__ENDIAN_SWAP_shift = 16, /* SQ_ENDIAN_NONE = 0x00, */ /* SQ_ENDIAN_8IN16 = 0x01, */ /* SQ_ENDIAN_8IN32 = 0x02, */ CONST_BUF_NO_STRIDE_bit = 1 << 18, MEGA_FETCH_bit = 1 << 19, SQ_VTX_WORD2__ALT_CONST_bit = 1 << 20, BUFFER_INDEX_MODE_mask = 0x03 << 21, BUFFER_INDEX_MODE_shift = 21, /* SQ_CF_INDEX_NONE = 0x00, */ /* SQ_CF_INDEX_0 = 0x01, */ /* SQ_CF_INDEX_1 = 0x02, */ /* SQ_CF_INVALID = 0x03, */ SQ_CF_ALLOC_EXPORT_WORD1_BUF = 0x00008dfc, SQ_CF_ALLOC_EXPORT_WORD1_BUF__ARRAY_SIZE_mask = 0xfff << 0, SQ_CF_ALLOC_EXPORT_WORD1_BUF__ARRAY_SIZE_shift = 0, COMP_MASK_mask = 0x0f << 12, COMP_MASK_shift = 12, SQ_CF_WORD0 = 0x00008dfc, SQ_CF_WORD0__ADDR_mask = 0xffffff << 0, SQ_CF_WORD0__ADDR_shift = 0, JUMPTABLE_SEL_mask = 0x07 << 24, JUMPTABLE_SEL_shift = 24, SQ_CF_JUMPTABLE_SEL_CONST_A = 0x00, SQ_CF_JUMPTABLE_SEL_CONST_B = 0x01, SQ_CF_JUMPTABLE_SEL_CONST_C = 0x02, SQ_CF_JUMPTABLE_SEL_CONST_D = 0x03, SQ_CF_JUMPTABLE_SEL_INDEX_0 = 0x04, SQ_CF_JUMPTABLE_SEL_INDEX_1 = 0x05, SQ_CF_ALLOC_EXPORT_WORD0 = 0x00008dfc, /* ARRAY_BASE_mask = 0x1fff << 0, */ /* ARRAY_BASE_shift = 0, */ SQ_CF_ALLOC_EXPORT_WORD0__TYPE_mask = 0x03 << 13, SQ_CF_ALLOC_EXPORT_WORD0__TYPE_shift = 13, /* SQ_EXPORT_PIXEL = 0x00, */ /* SQ_EXPORT_POS = 0x01, */ /* SQ_EXPORT_PARAM = 0x02, */ /* X_UNUSED_FOR_SX_EXPORTS = 0x03, */ /* RW_GPR_mask = 0x7f << 15, */ /* RW_GPR_shift = 15, */ /* RW_REL_bit = 1 << 22, */ /* INDEX_GPR_mask = 0x7f << 23, */ /* INDEX_GPR_shift = 23, */ SQ_CF_ALLOC_EXPORT_WORD0__ELEM_SIZE_mask = 0x03 << 30, SQ_CF_ALLOC_EXPORT_WORD0__ELEM_SIZE_shift = 30, SQ_MEM_GDS_WORD0 = 0x00008dfc, /* MEM_INST_mask = 0x1f << 0, */ /* MEM_INST_shift = 0, */ /* SQ_MEM_INST_MEM = 0x02, */ /* MEM_OP_mask = 0x07 << 8, */ /* MEM_OP_shift = 8, */ /* SQ_MEM_OP_RD_SCRATCH = 0x00, */ /* SQ_MEM_OP_RD_SCATTER = 0x02, */ /* SQ_MEM_OP_GDS = 0x04, */ /* SQ_MEM_OP_TF_WRITE = 0x05, */ SQ_MEM_GDS_WORD0__SRC_GPR_mask = 0x7f << 11, SQ_MEM_GDS_WORD0__SRC_GPR_shift = 11, SRC_REL_MODE_mask = 0x03 << 18, SRC_REL_MODE_shift = 18, /* SQ_REL_NONE = 0x00, */ /* SQ_REL_LOOP = 0x01, */ /* SQ_REL_GLOBAL = 0x02, */ SQ_MEM_GDS_WORD0__SRC_SEL_X_mask = 0x07 << 20, SQ_MEM_GDS_WORD0__SRC_SEL_X_shift = 20, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SRC_SEL_Y_mask = 0x07 << 23, */ /* SRC_SEL_Y_shift = 23, */ /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SRC_SEL_Z_mask = 0x07 << 26, */ /* SRC_SEL_Z_shift = 26, */ /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_ALU_WORD1_LDS_DIRECT_LITERAL_HI = 0x00008dfc, OFFSET_B_mask = 0x1fff << 0, OFFSET_B_shift = 0, STRIDE_B_mask = 0x7f << 13, STRIDE_B_shift = 13, THREAD_REL_B_bit = 1 << 22, DIRECT_READ_32_bit = 1 << 31, SQ_VTX_WORD1 = 0x00008dfc, SQ_VTX_WORD1__DST_SEL_X_mask = 0x07 << 9, SQ_VTX_WORD1__DST_SEL_X_shift = 9, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_VTX_WORD1__DST_SEL_Y_mask = 0x07 << 12, SQ_VTX_WORD1__DST_SEL_Y_shift = 12, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_VTX_WORD1__DST_SEL_Z_mask = 0x07 << 15, SQ_VTX_WORD1__DST_SEL_Z_shift = 15, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_VTX_WORD1__DST_SEL_W_mask = 0x07 << 18, SQ_VTX_WORD1__DST_SEL_W_shift = 18, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ USE_CONST_FIELDS_bit = 1 << 21, SQ_VTX_WORD1__DATA_FORMAT_mask = 0x3f << 22, SQ_VTX_WORD1__DATA_FORMAT_shift = 22, SQ_VTX_WORD1__NUM_FORMAT_ALL_mask = 0x03 << 28, SQ_VTX_WORD1__NUM_FORMAT_ALL_shift = 28, SQ_NUM_FORMAT_NORM = 0x00, SQ_NUM_FORMAT_INT = 0x01, SQ_NUM_FORMAT_SCALED = 0x02, SQ_VTX_WORD1__FORMAT_COMP_ALL_bit = 1 << 30, SQ_VTX_WORD1__SRF_MODE_ALL_bit = 1 << 31, SQ_ALU_WORD1_OP2 = 0x00008dfc, SRC0_ABS_bit = 1 << 0, SRC1_ABS_bit = 1 << 1, UPDATE_EXECUTE_MASK_bit = 1 << 2, UPDATE_PRED_bit = 1 << 3, WRITE_MASK_bit = 1 << 4, OMOD_mask = 0x03 << 5, OMOD_shift = 5, SQ_ALU_OMOD_OFF = 0x00, SQ_ALU_OMOD_M2 = 0x01, SQ_ALU_OMOD_M4 = 0x02, SQ_ALU_OMOD_D2 = 0x03, SQ_ALU_WORD1_OP2__ALU_INST_mask = 0x7ff << 7, SQ_ALU_WORD1_OP2__ALU_INST_shift = 7, SQ_OP2_INST_ADD = 0x00, SQ_OP2_INST_MUL = 0x01, SQ_OP2_INST_MUL_IEEE = 0x02, SQ_OP2_INST_MAX = 0x03, SQ_OP2_INST_MIN = 0x04, SQ_OP2_INST_MAX_DX10 = 0x05, SQ_OP2_INST_MIN_DX10 = 0x06, SQ_OP2_INST_SETE = 0x08, SQ_OP2_INST_SETGT = 0x09, SQ_OP2_INST_SETGE = 0x0a, SQ_OP2_INST_SETNE = 0x0b, SQ_OP2_INST_SETE_DX10 = 0x0c, SQ_OP2_INST_SETGT_DX10 = 0x0d, SQ_OP2_INST_SETGE_DX10 = 0x0e, SQ_OP2_INST_SETNE_DX10 = 0x0f, SQ_OP2_INST_FRACT = 0x10, SQ_OP2_INST_TRUNC = 0x11, SQ_OP2_INST_CEIL = 0x12, SQ_OP2_INST_RNDNE = 0x13, SQ_OP2_INST_FLOOR = 0x14, SQ_OP2_INST_ASHR_INT = 0x15, SQ_OP2_INST_LSHR_INT = 0x16, SQ_OP2_INST_LSHL_INT = 0x17, SQ_OP2_INST_MOV = 0x19, SQ_OP2_INST_NOP = 0x1a, SQ_OP2_INST_PRED_SETGT_UINT = 0x1e, SQ_OP2_INST_PRED_SETGE_UINT = 0x1f, SQ_OP2_INST_PRED_SETE = 0x20, SQ_OP2_INST_PRED_SETGT = 0x21, SQ_OP2_INST_PRED_SETGE = 0x22, SQ_OP2_INST_PRED_SETNE = 0x23, SQ_OP2_INST_PRED_SET_INV = 0x24, SQ_OP2_INST_PRED_SET_POP = 0x25, SQ_OP2_INST_PRED_SET_CLR = 0x26, SQ_OP2_INST_PRED_SET_RESTORE = 0x27, SQ_OP2_INST_PRED_SETE_PUSH = 0x28, SQ_OP2_INST_PRED_SETGT_PUSH = 0x29, SQ_OP2_INST_PRED_SETGE_PUSH = 0x2a, SQ_OP2_INST_PRED_SETNE_PUSH = 0x2b, SQ_OP2_INST_KILLE = 0x2c, SQ_OP2_INST_KILLGT = 0x2d, SQ_OP2_INST_KILLGE = 0x2e, SQ_OP2_INST_KILLNE = 0x2f, SQ_OP2_INST_AND_INT = 0x30, SQ_OP2_INST_OR_INT = 0x31, SQ_OP2_INST_XOR_INT = 0x32, SQ_OP2_INST_NOT_INT = 0x33, SQ_OP2_INST_ADD_INT = 0x34, SQ_OP2_INST_SUB_INT = 0x35, SQ_OP2_INST_MAX_INT = 0x36, SQ_OP2_INST_MIN_INT = 0x37, SQ_OP2_INST_MAX_UINT = 0x38, SQ_OP2_INST_MIN_UINT = 0x39, SQ_OP2_INST_SETE_INT = 0x3a, SQ_OP2_INST_SETGT_INT = 0x3b, SQ_OP2_INST_SETGE_INT = 0x3c, SQ_OP2_INST_SETNE_INT = 0x3d, SQ_OP2_INST_SETGT_UINT = 0x3e, SQ_OP2_INST_SETGE_UINT = 0x3f, SQ_OP2_INST_KILLGT_UINT = 0x40, SQ_OP2_INST_KILLGE_UINT = 0x41, SQ_OP2_INST_PRED_SETE_INT = 0x42, SQ_OP2_INST_PRED_SETGT_INT = 0x43, SQ_OP2_INST_PRED_SETGE_INT = 0x44, SQ_OP2_INST_PRED_SETNE_INT = 0x45, SQ_OP2_INST_KILLE_INT = 0x46, SQ_OP2_INST_KILLGT_INT = 0x47, SQ_OP2_INST_KILLGE_INT = 0x48, SQ_OP2_INST_KILLNE_INT = 0x49, SQ_OP2_INST_PRED_SETE_PUSH_INT = 0x4a, SQ_OP2_INST_PRED_SETGT_PUSH_INT = 0x4b, SQ_OP2_INST_PRED_SETGE_PUSH_INT = 0x4c, SQ_OP2_INST_PRED_SETNE_PUSH_INT = 0x4d, SQ_OP2_INST_PRED_SETLT_PUSH_INT = 0x4e, SQ_OP2_INST_PRED_SETLE_PUSH_INT = 0x4f, SQ_OP2_INST_FLT_TO_INT = 0x50, SQ_OP2_INST_BFREV_INT = 0x51, SQ_OP2_INST_ADDC_UINT = 0x52, SQ_OP2_INST_SUBB_UINT = 0x53, SQ_OP2_INST_GROUP_BARRIER = 0x54, SQ_OP2_INST_GROUP_SEQ_BEGIN = 0x55, SQ_OP2_INST_GROUP_SEQ_END = 0x56, SQ_OP2_INST_SET_MODE = 0x57, SQ_OP2_INST_SET_CF_IDX0 = 0x58, SQ_OP2_INST_SET_CF_IDX1 = 0x59, SQ_OP2_INST_SET_LDS_SIZE = 0x5a, SQ_OP2_INST_EXP_IEEE = 0x81, SQ_OP2_INST_LOG_CLAMPED = 0x82, SQ_OP2_INST_LOG_IEEE = 0x83, SQ_OP2_INST_RECIP_CLAMPED = 0x84, SQ_OP2_INST_RECIP_FF = 0x85, SQ_OP2_INST_RECIP_IEEE = 0x86, SQ_OP2_INST_RECIPSQRT_CLAMPED = 0x87, SQ_OP2_INST_RECIPSQRT_FF = 0x88, SQ_OP2_INST_RECIPSQRT_IEEE = 0x89, SQ_OP2_INST_SQRT_IEEE = 0x8a, SQ_OP2_INST_SIN = 0x8d, SQ_OP2_INST_COS = 0x8e, SQ_OP2_INST_MULLO_INT = 0x8f, SQ_OP2_INST_MULHI_INT = 0x90, SQ_OP2_INST_MULLO_UINT = 0x91, SQ_OP2_INST_MULHI_UINT = 0x92, SQ_OP2_INST_RECIP_INT = 0x93, SQ_OP2_INST_RECIP_UINT = 0x94, SQ_OP2_INST_RECIP_64 = 0x95, SQ_OP2_INST_RECIP_CLAMPED_64 = 0x96, SQ_OP2_INST_RECIPSQRT_64 = 0x97, SQ_OP2_INST_RECIPSQRT_CLAMPED_64 = 0x98, SQ_OP2_INST_SQRT_64 = 0x99, SQ_OP2_INST_FLT_TO_UINT = 0x9a, SQ_OP2_INST_INT_TO_FLT = 0x9b, SQ_OP2_INST_UINT_TO_FLT = 0x9c, SQ_OP2_INST_BFM_INT = 0xa0, SQ_OP2_INST_FLT32_TO_FLT16 = 0xa2, SQ_OP2_INST_FLT16_TO_FLT32 = 0xa3, SQ_OP2_INST_UBYTE0_FLT = 0xa4, SQ_OP2_INST_UBYTE1_FLT = 0xa5, SQ_OP2_INST_UBYTE2_FLT = 0xa6, SQ_OP2_INST_UBYTE3_FLT = 0xa7, SQ_OP2_INST_BCNT_INT = 0xaa, SQ_OP2_INST_FFBH_UINT = 0xab, SQ_OP2_INST_FFBL_INT = 0xac, SQ_OP2_INST_FFBH_INT = 0xad, SQ_OP2_INST_FLT_TO_UINT4 = 0xae, SQ_OP2_INST_DOT_IEEE = 0xaf, SQ_OP2_INST_FLT_TO_INT_RPI = 0xb0, SQ_OP2_INST_FLT_TO_INT_FLOOR = 0xb1, SQ_OP2_INST_MULHI_UINT24 = 0xb2, SQ_OP2_INST_MBCNT_32HI_INT = 0xb3, SQ_OP2_INST_OFFSET_TO_FLT = 0xb4, SQ_OP2_INST_MUL_UINT24 = 0xb5, SQ_OP2_INST_BCNT_ACCUM_PREV_INT = 0xb6, SQ_OP2_INST_MBCNT_32LO_ACCUM_PREV_INT = 0xb7, SQ_OP2_INST_SETE_64 = 0xb8, SQ_OP2_INST_SETNE_64 = 0xb9, SQ_OP2_INST_SETGT_64 = 0xba, SQ_OP2_INST_SETGE_64 = 0xbb, SQ_OP2_INST_MIN_64 = 0xbc, SQ_OP2_INST_MAX_64 = 0xbd, SQ_OP2_INST_DOT4 = 0xbe, SQ_OP2_INST_DOT4_IEEE = 0xbf, SQ_OP2_INST_CUBE = 0xc0, SQ_OP2_INST_MAX4 = 0xc1, SQ_OP2_INST_FREXP_64 = 0xc4, SQ_OP2_INST_LDEXP_64 = 0xc5, SQ_OP2_INST_FRACT_64 = 0xc6, SQ_OP2_INST_PRED_SETGT_64 = 0xc7, SQ_OP2_INST_PRED_SETE_64 = 0xc8, SQ_OP2_INST_PRED_SETGE_64 = 0xc9, SQ_OP2_INST_MUL_64 = 0xca, SQ_OP2_INST_ADD_64 = 0xcb, SQ_OP2_INST_MOVA_INT = 0xcc, SQ_OP2_INST_FLT64_TO_FLT32 = 0xcd, SQ_OP2_INST_FLT32_TO_FLT64 = 0xce, SQ_OP2_INST_SAD_ACCUM_PREV_UINT = 0xcf, SQ_OP2_INST_DOT = 0xd0, SQ_OP2_INST_MUL_PREV = 0xd1, SQ_OP2_INST_MUL_IEEE_PREV = 0xd2, SQ_OP2_INST_ADD_PREV = 0xd3, SQ_OP2_INST_MULADD_PREV = 0xd4, SQ_OP2_INST_MULADD_IEEE_PREV = 0xd5, SQ_OP2_INST_INTERP_XY = 0xd6, SQ_OP2_INST_INTERP_ZW = 0xd7, SQ_OP2_INST_INTERP_X = 0xd8, SQ_OP2_INST_INTERP_Z = 0xd9, SQ_OP2_INST_STORE_FLAGS = 0xda, SQ_OP2_INST_LOAD_STORE_FLAGS = 0xdb, SQ_OP2_INST_INTERP_LOAD_P0 = 0xe0, SQ_OP2_INST_INTERP_LOAD_P10 = 0xe1, SQ_OP2_INST_INTERP_LOAD_P20 = 0xe2, SQ_CF_WORD1 = 0x00008dfc, POP_COUNT_mask = 0x07 << 0, POP_COUNT_shift = 0, CF_CONST_mask = 0x1f << 3, CF_CONST_shift = 3, COND_mask = 0x03 << 8, COND_shift = 8, SQ_CF_COND_ACTIVE = 0x00, SQ_CF_COND_FALSE = 0x01, SQ_CF_COND_BOOL = 0x02, SQ_CF_COND_NOT_BOOL = 0x03, SQ_CF_WORD1__COUNT_mask = 0x3f << 10, SQ_CF_WORD1__COUNT_shift = 10, /* VALID_PIXEL_MODE_bit = 1 << 20, */ /* END_OF_PROGRAM_bit = 1 << 21, */ SQ_CF_WORD1__CF_INST_mask = 0xff << 22, SQ_CF_WORD1__CF_INST_shift = 22, SQ_CF_INST_NOP = 0x00, SQ_CF_INST_TC = 0x01, SQ_CF_INST_VC = 0x02, SQ_CF_INST_GDS = 0x03, SQ_CF_INST_LOOP_START = 0x04, SQ_CF_INST_LOOP_END = 0x05, SQ_CF_INST_LOOP_START_DX10 = 0x06, SQ_CF_INST_LOOP_START_NO_AL = 0x07, SQ_CF_INST_LOOP_CONTINUE = 0x08, SQ_CF_INST_LOOP_BREAK = 0x09, SQ_CF_INST_JUMP = 0x0a, SQ_CF_INST_PUSH = 0x0b, SQ_CF_INST_ELSE = 0x0d, SQ_CF_INST_POP = 0x0e, SQ_CF_INST_CALL = 0x12, SQ_CF_INST_CALL_FS = 0x13, SQ_CF_INST_RETURN = 0x14, SQ_CF_INST_EMIT_VERTEX = 0x15, SQ_CF_INST_EMIT_CUT_VERTEX = 0x16, SQ_CF_INST_CUT_VERTEX = 0x17, SQ_CF_INST_KILL = 0x18, SQ_CF_INST_WAIT_ACK = 0x1a, SQ_CF_INST_TC_ACK = 0x1b, SQ_CF_INST_VC_ACK = 0x1c, SQ_CF_INST_JUMPTABLE = 0x1d, SQ_CF_INST_GLOBAL_WAVE_SYNC = 0x1e, SQ_CF_INST_HALT = 0x1f, /* WHOLE_QUAD_MODE_bit = 1 << 30, */ /* BARRIER_bit = 1 << 31, */ SQ_VTX_WORD1_SEM = 0x00008dfc, SEMANTIC_ID_mask = 0xff << 0, SEMANTIC_ID_shift = 0, SQ_TEX_WORD0 = 0x00008dfc, TEX_INST_mask = 0x1f << 0, TEX_INST_shift = 0, SQ_TEX_INST_LD = 0x03, SQ_TEX_INST_GET_TEXTURE_RESINFO = 0x04, SQ_TEX_INST_GET_NUMBER_OF_SAMPLES = 0x05, SQ_TEX_INST_GET_LOD = 0x06, SQ_TEX_INST_GET_GRADIENTS_H = 0x07, SQ_TEX_INST_GET_GRADIENTS_V = 0x08, SQ_TEX_INST_SET_TEXTURE_OFFSETS = 0x09, SQ_TEX_INST_KEEP_GRADIENTS = 0x0a, SQ_TEX_INST_SET_GRADIENTS_H = 0x0b, SQ_TEX_INST_SET_GRADIENTS_V = 0x0c, SQ_TEX_INST_PASS = 0x0d, SQ_TEX_INST_SAMPLE = 0x10, SQ_TEX_INST_SAMPLE_L = 0x11, SQ_TEX_INST_SAMPLE_LB = 0x12, SQ_TEX_INST_SAMPLE_LZ = 0x13, SQ_TEX_INST_SAMPLE_G = 0x14, SQ_TEX_INST_GATHER4 = 0x15, SQ_TEX_INST_SAMPLE_G_LB = 0x16, SQ_TEX_INST_GATHER4_O = 0x17, SQ_TEX_INST_SAMPLE_C = 0x18, SQ_TEX_INST_SAMPLE_C_L = 0x19, SQ_TEX_INST_SAMPLE_C_LB = 0x1a, SQ_TEX_INST_SAMPLE_C_LZ = 0x1b, SQ_TEX_INST_SAMPLE_C_G = 0x1c, SQ_TEX_INST_GATHER4_C = 0x1d, SQ_TEX_INST_SAMPLE_C_G_LB = 0x1e, SQ_TEX_INST_GATHER4_C_O = 0x1f, INST_MOD_mask = 0x03 << 5, INST_MOD_shift = 5, /* FETCH_WHOLE_QUAD_bit = 1 << 7, */ RESOURCE_ID_mask = 0xff << 8, RESOURCE_ID_shift = 8, SQ_TEX_WORD0__SRC_GPR_mask = 0x7f << 16, SQ_TEX_WORD0__SRC_GPR_shift = 16, /* SRC_REL_bit = 1 << 23, */ SQ_TEX_WORD0__ALT_CONST_bit = 1 << 24, RESOURCE_INDEX_MODE_mask = 0x03 << 25, RESOURCE_INDEX_MODE_shift = 25, /* SQ_CF_INDEX_NONE = 0x00, */ /* SQ_CF_INDEX_0 = 0x01, */ /* SQ_CF_INDEX_1 = 0x02, */ /* SQ_CF_INVALID = 0x03, */ SAMPLER_INDEX_MODE_mask = 0x03 << 27, SAMPLER_INDEX_MODE_shift = 27, /* SQ_CF_INDEX_NONE = 0x00, */ /* SQ_CF_INDEX_0 = 0x01, */ /* SQ_CF_INDEX_1 = 0x02, */ /* SQ_CF_INVALID = 0x03, */ SQ_VTX_WORD1_GPR = 0x00008dfc, SQ_VTX_WORD1_GPR__DST_GPR_mask = 0x7f << 0, SQ_VTX_WORD1_GPR__DST_GPR_shift = 0, SQ_VTX_WORD1_GPR__DST_REL_bit = 1 << 7, SQ_ALU_WORD1_LDS_IDX_OP = 0x00008dfc, /* SRC2_SEL_mask = 0x1ff << 0, */ /* SRC2_SEL_shift = 0, */ /* SQ_ALU_SRC_LDS_OQ_A = 0xdb, */ /* SQ_ALU_SRC_LDS_OQ_B = 0xdc, */ /* SQ_ALU_SRC_LDS_OQ_A_POP = 0xdd, */ /* SQ_ALU_SRC_LDS_OQ_B_POP = 0xde, */ /* SQ_ALU_SRC_LDS_DIRECT_A = 0xdf, */ /* SQ_ALU_SRC_LDS_DIRECT_B = 0xe0, */ /* SQ_ALU_SRC_TIME_HI = 0xe3, */ /* SQ_ALU_SRC_TIME_LO = 0xe4, */ /* SQ_ALU_SRC_MASK_HI = 0xe5, */ /* SQ_ALU_SRC_MASK_LO = 0xe6, */ /* SQ_ALU_SRC_HW_WAVE_ID = 0xe7, */ /* SQ_ALU_SRC_SIMD_ID = 0xe8, */ /* SQ_ALU_SRC_SE_ID = 0xe9, */ /* SQ_ALU_SRC_HW_THREADGRP_ID = 0xea, */ /* SQ_ALU_SRC_WAVE_ID_IN_GRP = 0xeb, */ /* SQ_ALU_SRC_NUM_THREADGRP_WAVES = 0xec, */ /* SQ_ALU_SRC_HW_ALU_ODD = 0xed, */ /* SQ_ALU_SRC_LOOP_IDX = 0xee, */ /* SQ_ALU_SRC_PARAM_BASE_ADDR = 0xf0, */ /* SQ_ALU_SRC_NEW_PRIM_MASK = 0xf1, */ /* SQ_ALU_SRC_PRIM_MASK_HI = 0xf2, */ /* SQ_ALU_SRC_PRIM_MASK_LO = 0xf3, */ /* SQ_ALU_SRC_1_DBL_L = 0xf4, */ /* SQ_ALU_SRC_1_DBL_M = 0xf5, */ /* SQ_ALU_SRC_0_5_DBL_L = 0xf6, */ /* SQ_ALU_SRC_0_5_DBL_M = 0xf7, */ /* SQ_ALU_SRC_0 = 0xf8, */ /* SQ_ALU_SRC_1 = 0xf9, */ /* SQ_ALU_SRC_1_INT = 0xfa, */ /* SQ_ALU_SRC_M_1_INT = 0xfb, */ /* SQ_ALU_SRC_0_5 = 0xfc, */ /* SQ_ALU_SRC_LITERAL = 0xfd, */ /* SQ_ALU_SRC_PV = 0xfe, */ /* SQ_ALU_SRC_PS = 0xff, */ /* SRC2_REL_bit = 1 << 9, */ /* SRC2_CHAN_mask = 0x03 << 10, */ /* SRC2_CHAN_shift = 10, */ /* SQ_CHAN_X = 0x00, */ /* SQ_CHAN_Y = 0x01, */ /* SQ_CHAN_Z = 0x02, */ /* SQ_CHAN_W = 0x03, */ IDX_OFFSET_1_bit = 1 << 12, SQ_ALU_WORD1_LDS_IDX_OP__ALU_INST_mask = 0x1f << 13, SQ_ALU_WORD1_LDS_IDX_OP__ALU_INST_shift = 13, /* SQ_OP3_INST_BFE_UINT = 0x04, */ /* SQ_OP3_INST_BFE_INT = 0x05, */ /* SQ_OP3_INST_BFI_INT = 0x06, */ /* SQ_OP3_INST_FMA = 0x07, */ /* SQ_OP3_INST_CNDNE_64 = 0x09, */ /* SQ_OP3_INST_FMA_64 = 0x0a, */ /* SQ_OP3_INST_LERP_UINT = 0x0b, */ /* SQ_OP3_INST_BIT_ALIGN_INT = 0x0c, */ /* SQ_OP3_INST_BYTE_ALIGN_INT = 0x0d, */ /* SQ_OP3_INST_SAD_ACCUM_UINT = 0x0e, */ /* SQ_OP3_INST_SAD_ACCUM_HI_UINT = 0x0f, */ /* SQ_OP3_INST_MULADD_UINT24 = 0x10, */ /* SQ_OP3_INST_LDS_IDX_OP = 0x11, */ /* SQ_OP3_INST_MULADD = 0x14, */ /* SQ_OP3_INST_MULADD_M2 = 0x15, */ /* SQ_OP3_INST_MULADD_M4 = 0x16, */ /* SQ_OP3_INST_MULADD_D2 = 0x17, */ /* SQ_OP3_INST_MULADD_IEEE = 0x18, */ /* SQ_OP3_INST_CNDE = 0x19, */ /* SQ_OP3_INST_CNDGT = 0x1a, */ /* SQ_OP3_INST_CNDGE = 0x1b, */ /* SQ_OP3_INST_CNDE_INT = 0x1c, */ /* SQ_OP3_INST_CNDGT_INT = 0x1d, */ /* SQ_OP3_INST_CNDGE_INT = 0x1e, */ /* SQ_OP3_INST_MUL_LIT = 0x1f, */ /* BANK_SWIZZLE_mask = 0x07 << 18, */ /* BANK_SWIZZLE_shift = 18, */ /* SQ_ALU_VEC_012 = 0x00, */ /* SQ_ALU_VEC_021 = 0x01, */ /* SQ_ALU_VEC_120 = 0x02, */ /* SQ_ALU_VEC_102 = 0x03, */ /* SQ_ALU_VEC_201 = 0x04, */ /* SQ_ALU_VEC_210 = 0x05, */ LDS_OP_mask = 0x3f << 21, LDS_OP_shift = 21, /* SQ_DS_INST_ADD = 0x00, */ /* SQ_DS_INST_SUB = 0x01, */ /* SQ_DS_INST_RSUB = 0x02, */ /* SQ_DS_INST_INC = 0x03, */ /* SQ_DS_INST_DEC = 0x04, */ /* SQ_DS_INST_MIN_INT = 0x05, */ /* SQ_DS_INST_MAX_INT = 0x06, */ /* SQ_DS_INST_MIN_UINT = 0x07, */ /* SQ_DS_INST_MAX_UINT = 0x08, */ /* SQ_DS_INST_AND = 0x09, */ /* SQ_DS_INST_OR = 0x0a, */ /* SQ_DS_INST_XOR = 0x0b, */ /* SQ_DS_INST_MSKOR = 0x0c, */ /* SQ_DS_INST_WRITE = 0x0d, */ /* SQ_DS_INST_WRITE_REL = 0x0e, */ /* SQ_DS_INST_WRITE2 = 0x0f, */ /* SQ_DS_INST_CMP_STORE = 0x10, */ /* SQ_DS_INST_CMP_STORE_SPF = 0x11, */ /* SQ_DS_INST_BYTE_WRITE = 0x12, */ /* SQ_DS_INST_SHORT_WRITE = 0x13, */ /* SQ_DS_INST_ADD_RET = 0x20, */ /* SQ_DS_INST_SUB_RET = 0x21, */ /* SQ_DS_INST_RSUB_RET = 0x22, */ /* SQ_DS_INST_INC_RET = 0x23, */ /* SQ_DS_INST_DEC_RET = 0x24, */ /* SQ_DS_INST_MIN_INT_RET = 0x25, */ /* SQ_DS_INST_MAX_INT_RET = 0x26, */ /* SQ_DS_INST_MIN_UINT_RET = 0x27, */ /* SQ_DS_INST_MAX_UINT_RET = 0x28, */ /* SQ_DS_INST_AND_RET = 0x29, */ /* SQ_DS_INST_OR_RET = 0x2a, */ /* SQ_DS_INST_XOR_RET = 0x2b, */ /* SQ_DS_INST_MSKOR_RET = 0x2c, */ /* SQ_DS_INST_XCHG_RET = 0x2d, */ /* SQ_DS_INST_XCHG_REL_RET = 0x2e, */ /* SQ_DS_INST_XCHG2_RET = 0x2f, */ /* SQ_DS_INST_CMP_XCHG_RET = 0x30, */ /* SQ_DS_INST_CMP_XCHG_SPF_RET = 0x31, */ /* SQ_DS_INST_READ_RET = 0x32, */ /* SQ_DS_INST_READ_REL_RET = 0x33, */ /* SQ_DS_INST_READ2_RET = 0x34, */ /* SQ_DS_INST_READWRITE_RET = 0x35, */ /* SQ_DS_INST_BYTE_READ_RET = 0x36, */ /* SQ_DS_INST_UBYTE_READ_RET = 0x37, */ /* SQ_DS_INST_SHORT_READ_RET = 0x38, */ /* SQ_DS_INST_USHORT_READ_RET = 0x39, */ /* SQ_DS_INST_ATOMIC_ORDERED_ALLOC_RET = 0x3f, */ IDX_OFFSET_0_bit = 1 << 27, IDX_OFFSET_2_bit = 1 << 28, /* DST_CHAN_mask = 0x03 << 29, */ /* DST_CHAN_shift = 29, */ /* CHAN_X = 0x00, */ /* CHAN_Y = 0x01, */ /* CHAN_Z = 0x02, */ /* CHAN_W = 0x03, */ IDX_OFFSET_3_bit = 1 << 31, SQ_CF_ENCODING_WORD1 = 0x00008dfc, SQ_CF_ENCODING_WORD1__ENCODING_mask = 0x03 << 28, SQ_CF_ENCODING_WORD1__ENCODING_shift = 28, SQ_CF_ENCODING_INST_CF = 0x00, SQ_CF_ENCODING_INST_ALLOC_EXPORT = 0x01, SQ_CF_ENCODING_INST_ALU0 = 0x02, SQ_CF_ENCODING_INST_ALU1 = 0x03, SQ_ALU_WORD0 = 0x00008dfc, /* SRC0_SEL_mask = 0x1ff << 0, */ /* SRC0_SEL_shift = 0, */ /* SQ_ALU_SRC_LDS_OQ_A = 0xdb, */ /* SQ_ALU_SRC_LDS_OQ_B = 0xdc, */ /* SQ_ALU_SRC_LDS_OQ_A_POP = 0xdd, */ /* SQ_ALU_SRC_LDS_OQ_B_POP = 0xde, */ /* SQ_ALU_SRC_LDS_DIRECT_A = 0xdf, */ /* SQ_ALU_SRC_LDS_DIRECT_B = 0xe0, */ /* SQ_ALU_SRC_TIME_HI = 0xe3, */ /* SQ_ALU_SRC_TIME_LO = 0xe4, */ /* SQ_ALU_SRC_MASK_HI = 0xe5, */ /* SQ_ALU_SRC_MASK_LO = 0xe6, */ /* SQ_ALU_SRC_HW_WAVE_ID = 0xe7, */ /* SQ_ALU_SRC_SIMD_ID = 0xe8, */ /* SQ_ALU_SRC_SE_ID = 0xe9, */ /* SQ_ALU_SRC_HW_THREADGRP_ID = 0xea, */ /* SQ_ALU_SRC_WAVE_ID_IN_GRP = 0xeb, */ /* SQ_ALU_SRC_NUM_THREADGRP_WAVES = 0xec, */ /* SQ_ALU_SRC_HW_ALU_ODD = 0xed, */ /* SQ_ALU_SRC_LOOP_IDX = 0xee, */ /* SQ_ALU_SRC_PARAM_BASE_ADDR = 0xf0, */ /* SQ_ALU_SRC_NEW_PRIM_MASK = 0xf1, */ /* SQ_ALU_SRC_PRIM_MASK_HI = 0xf2, */ /* SQ_ALU_SRC_PRIM_MASK_LO = 0xf3, */ /* SQ_ALU_SRC_1_DBL_L = 0xf4, */ /* SQ_ALU_SRC_1_DBL_M = 0xf5, */ /* SQ_ALU_SRC_0_5_DBL_L = 0xf6, */ /* SQ_ALU_SRC_0_5_DBL_M = 0xf7, */ /* SQ_ALU_SRC_0 = 0xf8, */ /* SQ_ALU_SRC_1 = 0xf9, */ /* SQ_ALU_SRC_1_INT = 0xfa, */ /* SQ_ALU_SRC_M_1_INT = 0xfb, */ /* SQ_ALU_SRC_0_5 = 0xfc, */ /* SQ_ALU_SRC_LITERAL = 0xfd, */ /* SQ_ALU_SRC_PV = 0xfe, */ /* SQ_ALU_SRC_PS = 0xff, */ /* SRC0_REL_bit = 1 << 9, */ /* SRC0_CHAN_mask = 0x03 << 10, */ /* SRC0_CHAN_shift = 10, */ /* SQ_CHAN_X = 0x00, */ /* SQ_CHAN_Y = 0x01, */ /* SQ_CHAN_Z = 0x02, */ /* SQ_CHAN_W = 0x03, */ SRC0_NEG_bit = 1 << 12, /* SRC1_SEL_mask = 0x1ff << 13, */ /* SRC1_SEL_shift = 13, */ /* SQ_ALU_SRC_LDS_OQ_A = 0xdb, */ /* SQ_ALU_SRC_LDS_OQ_B = 0xdc, */ /* SQ_ALU_SRC_LDS_OQ_A_POP = 0xdd, */ /* SQ_ALU_SRC_LDS_OQ_B_POP = 0xde, */ /* SQ_ALU_SRC_LDS_DIRECT_A = 0xdf, */ /* SQ_ALU_SRC_LDS_DIRECT_B = 0xe0, */ /* SQ_ALU_SRC_TIME_HI = 0xe3, */ /* SQ_ALU_SRC_TIME_LO = 0xe4, */ /* SQ_ALU_SRC_MASK_HI = 0xe5, */ /* SQ_ALU_SRC_MASK_LO = 0xe6, */ /* SQ_ALU_SRC_HW_WAVE_ID = 0xe7, */ /* SQ_ALU_SRC_SIMD_ID = 0xe8, */ /* SQ_ALU_SRC_SE_ID = 0xe9, */ /* SQ_ALU_SRC_HW_THREADGRP_ID = 0xea, */ /* SQ_ALU_SRC_WAVE_ID_IN_GRP = 0xeb, */ /* SQ_ALU_SRC_NUM_THREADGRP_WAVES = 0xec, */ /* SQ_ALU_SRC_HW_ALU_ODD = 0xed, */ /* SQ_ALU_SRC_LOOP_IDX = 0xee, */ /* SQ_ALU_SRC_PARAM_BASE_ADDR = 0xf0, */ /* SQ_ALU_SRC_NEW_PRIM_MASK = 0xf1, */ /* SQ_ALU_SRC_PRIM_MASK_HI = 0xf2, */ /* SQ_ALU_SRC_PRIM_MASK_LO = 0xf3, */ /* SQ_ALU_SRC_1_DBL_L = 0xf4, */ /* SQ_ALU_SRC_1_DBL_M = 0xf5, */ /* SQ_ALU_SRC_0_5_DBL_L = 0xf6, */ /* SQ_ALU_SRC_0_5_DBL_M = 0xf7, */ /* SQ_ALU_SRC_0 = 0xf8, */ /* SQ_ALU_SRC_1 = 0xf9, */ /* SQ_ALU_SRC_1_INT = 0xfa, */ /* SQ_ALU_SRC_M_1_INT = 0xfb, */ /* SQ_ALU_SRC_0_5 = 0xfc, */ /* SQ_ALU_SRC_LITERAL = 0xfd, */ /* SQ_ALU_SRC_PV = 0xfe, */ /* SQ_ALU_SRC_PS = 0xff, */ /* SRC1_REL_bit = 1 << 22, */ /* SRC1_CHAN_mask = 0x03 << 23, */ /* SRC1_CHAN_shift = 23, */ /* SQ_CHAN_X = 0x00, */ /* SQ_CHAN_Y = 0x01, */ /* SQ_CHAN_Z = 0x02, */ /* SQ_CHAN_W = 0x03, */ SRC1_NEG_bit = 1 << 25, /* INDEX_MODE_mask = 0x07 << 26, */ /* INDEX_MODE_shift = 26, */ /* SQ_INDEX_AR_X = 0x00, */ /* SQ_INDEX_LOOP = 0x04, */ /* SQ_INDEX_GLOBAL = 0x05, */ /* SQ_INDEX_GLOBAL_AR_X = 0x06, */ /* PRED_SEL_mask = 0x03 << 29, */ /* PRED_SEL_shift = 29, */ /* SQ_PRED_SEL_OFF = 0x00, */ /* SQ_PRED_SEL_ZERO = 0x02, */ /* SQ_PRED_SEL_ONE = 0x03, */ /* LAST_bit = 1 << 31, */ SQ_MEM_RD_WORD1 = 0x00008dfc, SQ_MEM_RD_WORD1__DST_GPR_mask = 0x7f << 0, SQ_MEM_RD_WORD1__DST_GPR_shift = 0, SQ_MEM_RD_WORD1__DST_REL_bit = 1 << 7, SQ_MEM_RD_WORD1__DST_SEL_X_mask = 0x07 << 9, SQ_MEM_RD_WORD1__DST_SEL_X_shift = 9, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_MEM_RD_WORD1__DST_SEL_Y_mask = 0x07 << 12, SQ_MEM_RD_WORD1__DST_SEL_Y_shift = 12, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_MEM_RD_WORD1__DST_SEL_Z_mask = 0x07 << 15, SQ_MEM_RD_WORD1__DST_SEL_Z_shift = 15, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_MEM_RD_WORD1__DST_SEL_W_mask = 0x07 << 18, SQ_MEM_RD_WORD1__DST_SEL_W_shift = 18, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_MEM_RD_WORD1__DATA_FORMAT_mask = 0x3f << 22, SQ_MEM_RD_WORD1__DATA_FORMAT_shift = 22, SQ_MEM_RD_WORD1__NUM_FORMAT_ALL_mask = 0x03 << 28, SQ_MEM_RD_WORD1__NUM_FORMAT_ALL_shift = 28, /* SQ_NUM_FORMAT_NORM = 0x00, */ /* SQ_NUM_FORMAT_INT = 0x01, */ /* SQ_NUM_FORMAT_SCALED = 0x02, */ SQ_MEM_RD_WORD1__FORMAT_COMP_ALL_bit = 1 << 30, SQ_MEM_RD_WORD1__SRF_MODE_ALL_bit = 1 << 31, SQ_LSTMP_RING_BASE = 0x00008e10, SQ_LSTMP_RING_SIZE = 0x00008e14, SQ_HSTMP_RING_BASE = 0x00008e18, SQ_HSTMP_RING_SIZE = 0x00008e1c, SX_EXPORT_BUFFER_SIZES = 0x0000900c, COLOR_BUFFER_SIZE_mask = 0xff << 0, COLOR_BUFFER_SIZE_shift = 0, POSITION_BUFFER_SIZE_mask = 0xff << 8, POSITION_BUFFER_SIZE_shift = 8, SMX_BUFFER_SIZE_mask = 0xff << 16, SMX_BUFFER_SIZE_shift = 16, SX_MEMORY_EXPORT_BASE = 0x00009010, SX_MEMORY_EXPORT_SIZE = 0x00009014, SPI_CONFIG_CNTL = 0x00009100, GPR_WRITE_PRIORITY_mask = 0x3ffff << 0, GPR_WRITE_PRIORITY_shift = 0, SPI_CONFIG_CNTL_1 = 0x0000913c, VTX_DONE_DELAY_mask = 0x0f << 0, VTX_DONE_DELAY_shift = 0, X_DELAY_14_CLKS = 0x00, X_DELAY_16_CLKS = 0x01, X_DELAY_18_CLKS = 0x02, X_DELAY_20_CLKS = 0x03, X_DELAY_22_CLKS = 0x04, X_DELAY_24_CLKS = 0x05, X_DELAY_26_CLKS = 0x06, X_DELAY_28_CLKS = 0x07, X_DELAY_30_CLKS = 0x08, X_DELAY_32_CLKS = 0x09, X_DELAY_34_CLKS = 0x0a, X_DELAY_4_CLKS = 0x0b, X_DELAY_6_CLKS = 0x0c, X_DELAY_8_CLKS = 0x0d, X_DELAY_10_CLKS = 0x0e, X_DELAY_12_CLKS = 0x0f, INTERP_ONE_PRIM_PER_ROW_bit = 1 << 4, BC_OPTIMIZE_DISABLE_bit = 1 << 5, PC_LIMIT_ENABLE_bit = 1 << 6, PC_LIMIT_STRICT_bit = 1 << 7, PC_LIMIT_SIZE_mask = 0xffff << 16, PC_LIMIT_SIZE_shift = 16, TD_CNTL = 0x00009494, SYNC_PHASE_SH_mask = 0x03 << 0, SYNC_PHASE_SH_shift = 0, PAD_STALL_EN_bit = 1 << 8, GATHER4_FLOAT_MODE_bit = 1 << 16, TD_STATUS = 0x00009498, BUSY_bit = 1 << 31, TA_CNTL_AUX = 0x00009508, TA_CNTL_AUX__DISABLE_CUBE_WRAP_bit = 1 << 0, DISABLE_CUBE_ANISO_bit = 1 << 1, GETLOD_SELECT_mask = 0x03 << 2, GETLOD_SELECT_shift = 2, X_SAMPLER_AND_RESOURCE_CLAMPED_LOD_IN_RESOURCE= 0x00, DISABLE_IDLE_STALL_bit = 1 << 4, TEX_COORD_PRECISION_bit = 1 << 28, LOD_LOG2_TRUNC_bit = 1 << 29, DB_ZPASS_COUNT_LOW = 0x00009870, DB_ZPASS_COUNT_HI = 0x00009874, COUNT_HI_mask = 0x7fffffff << 0, COUNT_HI_shift = 0, TD_PS_BORDER_COLOR_INDEX = 0x0000a400, INDEX_mask = 0x1f << 0, INDEX_shift = 0, TD_PS_BORDER_COLOR_RED = 0x0000a404, TD_PS_BORDER_COLOR_GREEN = 0x0000a408, TD_PS_BORDER_COLOR_BLUE = 0x0000a40c, TD_PS_BORDER_COLOR_ALPHA = 0x0000a410, TD_VS_BORDER_COLOR_INDEX = 0x0000a414, /* INDEX_mask = 0x1f << 0, */ /* INDEX_shift = 0, */ TD_VS_BORDER_COLOR_RED = 0x0000a418, TD_VS_BORDER_COLOR_GREEN = 0x0000a41c, TD_VS_BORDER_COLOR_BLUE = 0x0000a420, TD_VS_BORDER_COLOR_ALPHA = 0x0000a424, TD_GS_BORDER_COLOR_INDEX = 0x0000a428, /* INDEX_mask = 0x1f << 0, */ /* INDEX_shift = 0, */ TD_GS_BORDER_COLOR_RED = 0x0000a42c, TD_GS_BORDER_COLOR_GREEN = 0x0000a430, TD_GS_BORDER_COLOR_BLUE = 0x0000a434, TD_GS_BORDER_COLOR_ALPHA = 0x0000a438, TD_HS_BORDER_COLOR_INDEX = 0x0000a43c, /* INDEX_mask = 0x1f << 0, */ /* INDEX_shift = 0, */ TD_HS_BORDER_COLOR_RED = 0x0000a440, TD_HS_BORDER_COLOR_GREEN = 0x0000a444, TD_HS_BORDER_COLOR_BLUE = 0x0000a448, TD_HS_BORDER_COLOR_ALPHA = 0x0000a44c, TD_LS_BORDER_COLOR_INDEX = 0x0000a450, /* INDEX_mask = 0x1f << 0, */ /* INDEX_shift = 0, */ TD_LS_BORDER_COLOR_RED = 0x0000a454, TD_LS_BORDER_COLOR_GREEN = 0x0000a458, TD_LS_BORDER_COLOR_BLUE = 0x0000a45c, TD_LS_BORDER_COLOR_ALPHA = 0x0000a460, TD_CS_BORDER_COLOR_INDEX = 0x0000a464, /* INDEX_mask = 0x1f << 0, */ /* INDEX_shift = 0, */ TD_CS_BORDER_COLOR_RED = 0x0000a468, TD_CS_BORDER_COLOR_GREEN = 0x0000a46c, TD_CS_BORDER_COLOR_BLUE = 0x0000a470, TD_CS_BORDER_COLOR_ALPHA = 0x0000a474, DB_RENDER_CONTROL = 0x00028000, DEPTH_CLEAR_ENABLE_bit = 1 << 0, STENCIL_CLEAR_ENABLE_bit = 1 << 1, DEPTH_COPY_bit = 1 << 2, STENCIL_COPY_bit = 1 << 3, RESUMMARIZE_ENABLE_bit = 1 << 4, STENCIL_COMPRESS_DISABLE_bit = 1 << 5, DEPTH_COMPRESS_DISABLE_bit = 1 << 6, COPY_CENTROID_bit = 1 << 7, COPY_SAMPLE_mask = 0x07 << 8, COPY_SAMPLE_shift = 8, COLOR_DISABLE_bit = 1 << 12, DB_COUNT_CONTROL = 0x00028004, ZPASS_INCREMENT_DISABLE_bit = 1 << 0, PERFECT_ZPASS_COUNTS_bit = 1 << 1, DB_DEPTH_VIEW = 0x00028008, SLICE_START_mask = 0x7ff << 0, SLICE_START_shift = 0, SLICE_MAX_mask = 0x7ff << 13, SLICE_MAX_shift = 13, Z_READ_ONLY_bit = 1 << 24, STENCIL_READ_ONLY_bit = 1 << 25, DB_RENDER_OVERRIDE = 0x0002800c, FORCE_HIZ_ENABLE_mask = 0x03 << 0, FORCE_HIZ_ENABLE_shift = 0, FORCE_OFF = 0x00, FORCE_ENABLE = 0x01, FORCE_DISABLE = 0x02, FORCE_RESERVED = 0x03, FORCE_HIS_ENABLE0_mask = 0x03 << 2, FORCE_HIS_ENABLE0_shift = 2, /* FORCE_OFF = 0x00, */ /* FORCE_ENABLE = 0x01, */ /* FORCE_DISABLE = 0x02, */ /* FORCE_RESERVED = 0x03, */ FORCE_HIS_ENABLE1_mask = 0x03 << 4, FORCE_HIS_ENABLE1_shift = 4, /* FORCE_OFF = 0x00, */ /* FORCE_ENABLE = 0x01, */ /* FORCE_DISABLE = 0x02, */ /* FORCE_RESERVED = 0x03, */ FORCE_SHADER_Z_ORDER_bit = 1 << 6, FAST_Z_DISABLE_bit = 1 << 7, FAST_STENCIL_DISABLE_bit = 1 << 8, NOOP_CULL_DISABLE_bit = 1 << 9, FORCE_COLOR_KILL_bit = 1 << 10, FORCE_Z_READ_bit = 1 << 11, FORCE_STENCIL_READ_bit = 1 << 12, FORCE_FULL_Z_RANGE_mask = 0x03 << 13, FORCE_FULL_Z_RANGE_shift = 13, /* FORCE_OFF = 0x00, */ /* FORCE_ENABLE = 0x01, */ /* FORCE_DISABLE = 0x02, */ /* FORCE_RESERVED = 0x03, */ FORCE_QC_SMASK_CONFLICT_bit = 1 << 15, DISABLE_VIEWPORT_CLAMP_bit = 1 << 16, IGNORE_SC_ZRANGE_bit = 1 << 17, DISABLE_FULLY_COVERED_bit = 1 << 18, FORCE_Z_LIMIT_SUMM_mask = 0x03 << 19, FORCE_Z_LIMIT_SUMM_shift = 19, FORCE_SUMM_OFF = 0x00, FORCE_SUMM_MINZ = 0x01, FORCE_SUMM_MAXZ = 0x02, FORCE_SUMM_BOTH = 0x03, MAX_TILES_IN_DTT_mask = 0x1f << 21, MAX_TILES_IN_DTT_shift = 21, DISABLE_PIXEL_RATE_TILES_bit = 1 << 26, FORCE_Z_DIRTY_bit = 1 << 27, FORCE_STENCIL_DIRTY_bit = 1 << 28, FORCE_Z_VALID_bit = 1 << 29, FORCE_STENCIL_VALID_bit = 1 << 30, PRESERVE_COMPRESSION_bit = 1 << 31, DB_RENDER_OVERRIDE2 = 0x00028010, PARTIAL_SQUAD_LAUNCH_CONTROL_mask = 0x03 << 0, PARTIAL_SQUAD_LAUNCH_CONTROL_shift = 0, PSLC_AUTO = 0x00, PSLC_ON_HANG_ONLY = 0x01, PSLC_ASAP = 0x02, PSLC_COUNTDOWN = 0x03, PARTIAL_SQUAD_LAUNCH_COUNTDOWN_mask = 0x07 << 2, PARTIAL_SQUAD_LAUNCH_COUNTDOWN_shift = 2, DISABLE_ZMASK_EXPCLEAR_OPTIMIZATIO_bit = 1 << 5, DB_HTILE_DATA_BASE = 0x00028014, DB_STENCIL_CLEAR = 0x00028028, DB_STENCIL_CLEAR__CLEAR_mask = 0xff << 0, DB_STENCIL_CLEAR__CLEAR_shift = 0, MIN_mask = 0xff << 16, MIN_shift = 16, DB_DEPTH_CLEAR = 0x0002802c, PA_SC_SCREEN_SCISSOR_TL = 0x00028030, PA_SC_SCREEN_SCISSOR_TL__TL_X_mask = 0xffff << 0, PA_SC_SCREEN_SCISSOR_TL__TL_X_shift = 0, PA_SC_SCREEN_SCISSOR_TL__TL_Y_mask = 0xffff << 16, PA_SC_SCREEN_SCISSOR_TL__TL_Y_shift = 16, PA_SC_SCREEN_SCISSOR_BR = 0x00028034, PA_SC_SCREEN_SCISSOR_BR__BR_X_mask = 0xffff << 0, PA_SC_SCREEN_SCISSOR_BR__BR_X_shift = 0, PA_SC_SCREEN_SCISSOR_BR__BR_Y_mask = 0xffff << 16, PA_SC_SCREEN_SCISSOR_BR__BR_Y_shift = 16, DB_Z_INFO = 0x00028040, DB_Z_INFO__FORMAT_mask = 0x03 << 0, DB_Z_INFO__FORMAT_shift = 0, Z_INVALID = 0x00, Z_16 = 0x01, Z_24 = 0x02, Z_32_FLOAT = 0x03, DB_Z_INFO__ARRAY_MODE_mask = 0x0f << 4, DB_Z_INFO__ARRAY_MODE_shift = 4, ARRAY_LINEAR_GENERAL = 0x00, ARRAY_LINEAR_ALIGNED = 0x01, ARRAY_1D_TILED_THIN1 = 0x02, ARRAY_2D_TILED_THIN1 = 0x04, DB_Z_INFO__TILE_SPLIT_mask = 0x07 << 8, DB_Z_INFO__TILE_SPLIT_shift = 8, ADDR_SURF_TILE_SPLIT_64B = 0x00, ADDR_SURF_TILE_SPLIT_128B = 0x01, ADDR_SURF_TILE_SPLIT_256B = 0x02, ADDR_SURF_TILE_SPLIT_512B = 0x03, ADDR_SURF_TILE_SPLIT_1KB = 0x04, ADDR_SURF_TILE_SPLIT_2KB = 0x05, ADDR_SURF_TILE_SPLIT_4KB = 0x06, DB_Z_INFO__NUM_BANKS_mask = 0x03 << 12, DB_Z_INFO__NUM_BANKS_shift = 12, ADDR_SURF_2_BANK = 0x00, ADDR_SURF_4_BANK = 0x01, ADDR_SURF_8_BANK = 0x02, ADDR_SURF_16_BANK = 0x03, DB_Z_INFO__BANK_WIDTH_mask = 0x03 << 16, DB_Z_INFO__BANK_WIDTH_shift = 16, ADDR_SURF_BANK_WIDTH_1 = 0x00, ADDR_SURF_BANK_WIDTH_2 = 0x01, ADDR_SURF_BANK_WIDTH_4 = 0x02, ADDR_SURF_BANK_WIDTH_8 = 0x03, DB_Z_INFO__BANK_HEIGHT_mask = 0x03 << 20, DB_Z_INFO__BANK_HEIGHT_shift = 20, ADDR_SURF_BANK_HEIGHT_1 = 0x00, ADDR_SURF_BANK_HEIGHT_2 = 0x01, ADDR_SURF_BANK_HEIGHT_4 = 0x02, ADDR_SURF_BANK_HEIGHT_8 = 0x03, DB_Z_INFO__MACRO_TILE_ASPECT_mask = 0x03 << 24, DB_Z_INFO__MACRO_TILE_ASPECT_shift = 24, ADDR_SURF_MACRO_ASPECT_1 = 0x00, ADDR_SURF_MACRO_ASPECT_2 = 0x01, ADDR_SURF_MACRO_ASPECT_4 = 0x02, ADDR_SURF_MACRO_ASPECT_8 = 0x03, ALLOW_EXPCLEAR_bit = 1 << 27, READ_SIZE_bit = 1 << 28, TILE_SURFACE_ENABLE_bit = 1 << 29, DB_Z_INFO__TILE_COMPACT_bit = 1 << 30, ZRANGE_PRECISION_bit = 1 << 31, DB_STENCIL_INFO = 0x00028044, DB_STENCIL_INFO__FORMAT_bit = 1 << 0, DB_STENCIL_INFO__TILE_SPLIT_mask = 0x07 << 8, DB_STENCIL_INFO__TILE_SPLIT_shift = 8, /* ADDR_SURF_TILE_SPLIT_64B = 0x00, */ /* ADDR_SURF_TILE_SPLIT_128B = 0x01, */ /* ADDR_SURF_TILE_SPLIT_256B = 0x02, */ /* ADDR_SURF_TILE_SPLIT_512B = 0x03, */ /* ADDR_SURF_TILE_SPLIT_1KB = 0x04, */ /* ADDR_SURF_TILE_SPLIT_2KB = 0x05, */ /* ADDR_SURF_TILE_SPLIT_4KB = 0x06, */ DB_Z_READ_BASE = 0x00028048, DB_STENCIL_READ_BASE = 0x0002804c, DB_Z_WRITE_BASE = 0x00028050, DB_STENCIL_WRITE_BASE = 0x00028054, DB_DEPTH_SIZE = 0x00028058, PITCH_TILE_MAX_mask = 0x7ff << 0, PITCH_TILE_MAX_shift = 0, HEIGHT_TILE_MAX_mask = 0x7ff << 11, HEIGHT_TILE_MAX_shift = 11, DB_DEPTH_SLICE = 0x0002805c, SLICE_TILE_MAX_mask = 0x3fffff << 0, SLICE_TILE_MAX_shift = 0, SQ_ALU_CONST_BUFFER_SIZE_PS_0 = 0x00028140, SQ_ALU_CONST_BUFFER_SIZE_PS_0_num = 16, SQ_ALU_CONST_BUFFER_SIZE_PS_0__DATA_mask = 0x1ff << 0, SQ_ALU_CONST_BUFFER_SIZE_PS_0__DATA_shift = 0, SQ_ALU_CONST_BUFFER_SIZE_VS_0 = 0x00028180, SQ_ALU_CONST_BUFFER_SIZE_VS_0_num = 16, SQ_ALU_CONST_BUFFER_SIZE_VS_0__DATA_mask = 0x1ff << 0, SQ_ALU_CONST_BUFFER_SIZE_VS_0__DATA_shift = 0, SQ_ALU_CONST_BUFFER_SIZE_GS_0 = 0x000281c0, SQ_ALU_CONST_BUFFER_SIZE_GS_0_num = 16, SQ_ALU_CONST_BUFFER_SIZE_GS_0__DATA_mask = 0x1ff << 0, SQ_ALU_CONST_BUFFER_SIZE_GS_0__DATA_shift = 0, PA_SC_WINDOW_OFFSET = 0x00028200, WINDOW_X_OFFSET_mask = 0xffff << 0, WINDOW_X_OFFSET_shift = 0, WINDOW_Y_OFFSET_mask = 0xffff << 16, WINDOW_Y_OFFSET_shift = 16, PA_SC_WINDOW_SCISSOR_TL = 0x00028204, PA_SC_WINDOW_SCISSOR_TL__TL_X_mask = 0x7fff << 0, PA_SC_WINDOW_SCISSOR_TL__TL_X_shift = 0, PA_SC_WINDOW_SCISSOR_TL__TL_Y_mask = 0x7fff << 16, PA_SC_WINDOW_SCISSOR_TL__TL_Y_shift = 16, WINDOW_OFFSET_DISABLE_bit = 1 << 31, PA_SC_WINDOW_SCISSOR_BR = 0x00028208, PA_SC_WINDOW_SCISSOR_BR__BR_X_mask = 0x7fff << 0, PA_SC_WINDOW_SCISSOR_BR__BR_X_shift = 0, PA_SC_WINDOW_SCISSOR_BR__BR_Y_mask = 0x7fff << 16, PA_SC_WINDOW_SCISSOR_BR__BR_Y_shift = 16, PA_SC_CLIPRECT_RULE = 0x0002820c, CLIP_RULE_mask = 0xffff << 0, CLIP_RULE_shift = 0, PA_SC_CLIPRECT_0_TL = 0x00028210, PA_SC_CLIPRECT_0_TL_num = 4, PA_SC_CLIPRECT_0_TL_offset = 8, PA_SC_CLIPRECT_0_TL__TL_X_mask = 0x7fff << 0, PA_SC_CLIPRECT_0_TL__TL_X_shift = 0, PA_SC_CLIPRECT_0_TL__TL_Y_mask = 0x7fff << 16, PA_SC_CLIPRECT_0_TL__TL_Y_shift = 16, PA_SC_CLIPRECT_0_BR = 0x00028214, PA_SC_CLIPRECT_0_BR_num = 4, PA_SC_CLIPRECT_0_BR_offset = 8, PA_SC_CLIPRECT_0_BR__BR_X_mask = 0x7fff << 0, PA_SC_CLIPRECT_0_BR__BR_X_shift = 0, PA_SC_CLIPRECT_0_BR__BR_Y_mask = 0x7fff << 16, PA_SC_CLIPRECT_0_BR__BR_Y_shift = 16, PA_SC_EDGERULE = 0x00028230, ER_TRI_mask = 0x0f << 0, ER_TRI_shift = 0, ER_POINT_mask = 0x0f << 4, ER_POINT_shift = 4, ER_RECT_mask = 0x0f << 8, ER_RECT_shift = 8, ER_LINE_LR_mask = 0x3f << 12, ER_LINE_LR_shift = 12, ER_LINE_RL_mask = 0x3f << 18, ER_LINE_RL_shift = 18, ER_LINE_TB_mask = 0x0f << 24, ER_LINE_TB_shift = 24, ER_LINE_BT_mask = 0x0f << 28, ER_LINE_BT_shift = 28, PA_SU_HARDWARE_SCREEN_OFFSET = 0x00028234, HW_SCREEN_OFFSET_X_mask = 0x1f << 0, HW_SCREEN_OFFSET_X_shift = 0, HW_SCREEN_OFFSET_Y_mask = 0x1f << 8, HW_SCREEN_OFFSET_Y_shift = 8, CB_TARGET_MASK = 0x00028238, TARGET0_ENABLE_mask = 0x0f << 0, TARGET0_ENABLE_shift = 0, TARGET1_ENABLE_mask = 0x0f << 4, TARGET1_ENABLE_shift = 4, TARGET2_ENABLE_mask = 0x0f << 8, TARGET2_ENABLE_shift = 8, TARGET3_ENABLE_mask = 0x0f << 12, TARGET3_ENABLE_shift = 12, TARGET4_ENABLE_mask = 0x0f << 16, TARGET4_ENABLE_shift = 16, TARGET5_ENABLE_mask = 0x0f << 20, TARGET5_ENABLE_shift = 20, TARGET6_ENABLE_mask = 0x0f << 24, TARGET6_ENABLE_shift = 24, TARGET7_ENABLE_mask = 0x0f << 28, TARGET7_ENABLE_shift = 28, CB_SHADER_MASK = 0x0002823c, OUTPUT0_ENABLE_mask = 0x0f << 0, OUTPUT0_ENABLE_shift = 0, OUTPUT1_ENABLE_mask = 0x0f << 4, OUTPUT1_ENABLE_shift = 4, OUTPUT2_ENABLE_mask = 0x0f << 8, OUTPUT2_ENABLE_shift = 8, OUTPUT3_ENABLE_mask = 0x0f << 12, OUTPUT3_ENABLE_shift = 12, OUTPUT4_ENABLE_mask = 0x0f << 16, OUTPUT4_ENABLE_shift = 16, OUTPUT5_ENABLE_mask = 0x0f << 20, OUTPUT5_ENABLE_shift = 20, OUTPUT6_ENABLE_mask = 0x0f << 24, OUTPUT6_ENABLE_shift = 24, OUTPUT7_ENABLE_mask = 0x0f << 28, OUTPUT7_ENABLE_shift = 28, PA_SC_GENERIC_SCISSOR_TL = 0x00028240, PA_SC_GENERIC_SCISSOR_TL__TL_X_mask = 0x7fff << 0, PA_SC_GENERIC_SCISSOR_TL__TL_X_shift = 0, PA_SC_GENERIC_SCISSOR_TL__TL_Y_mask = 0x7fff << 16, PA_SC_GENERIC_SCISSOR_TL__TL_Y_shift = 16, /* WINDOW_OFFSET_DISABLE_bit = 1 << 31, */ PA_SC_GENERIC_SCISSOR_BR = 0x00028244, PA_SC_GENERIC_SCISSOR_BR__BR_X_mask = 0x7fff << 0, PA_SC_GENERIC_SCISSOR_BR__BR_X_shift = 0, PA_SC_GENERIC_SCISSOR_BR__BR_Y_mask = 0x7fff << 16, PA_SC_GENERIC_SCISSOR_BR__BR_Y_shift = 16, PA_SC_VPORT_SCISSOR_0_TL = 0x00028250, PA_SC_VPORT_SCISSOR_0_TL_num = 16, PA_SC_VPORT_SCISSOR_0_TL_offset = 8, PA_SC_VPORT_SCISSOR_0_TL__TL_X_mask = 0x7fff << 0, PA_SC_VPORT_SCISSOR_0_TL__TL_X_shift = 0, PA_SC_VPORT_SCISSOR_0_TL__TL_Y_mask = 0x7fff << 16, PA_SC_VPORT_SCISSOR_0_TL__TL_Y_shift = 16, /* WINDOW_OFFSET_DISABLE_bit = 1 << 31, */ PA_SC_VPORT_SCISSOR_0_BR = 0x00028254, PA_SC_VPORT_SCISSOR_0_BR_num = 16, PA_SC_VPORT_SCISSOR_0_BR_offset = 8, PA_SC_VPORT_SCISSOR_0_BR__BR_X_mask = 0x7fff << 0, PA_SC_VPORT_SCISSOR_0_BR__BR_X_shift = 0, PA_SC_VPORT_SCISSOR_0_BR__BR_Y_mask = 0x7fff << 16, PA_SC_VPORT_SCISSOR_0_BR__BR_Y_shift = 16, PA_SC_VPORT_ZMIN_0 = 0x000282d0, PA_SC_VPORT_ZMIN_0_num = 16, PA_SC_VPORT_ZMIN_0_offset = 8, PA_SC_VPORT_ZMAX_0 = 0x000282d4, PA_SC_VPORT_ZMAX_0_num = 16, PA_SC_VPORT_ZMAX_0_offset = 8, SX_MISC = 0x00028350, MULTIPASS_bit = 1 << 0, SQ_VTX_SEMANTIC_0 = 0x00028380, SQ_VTX_SEMANTIC_0_num = 32, /* SEMANTIC_ID_mask = 0xff << 0, */ /* SEMANTIC_ID_shift = 0, */ VGT_MAX_VTX_INDX = 0x00028400, VGT_MIN_VTX_INDX = 0x00028404, VGT_INDX_OFFSET = 0x00028408, VGT_MULTI_PRIM_IB_RESET_INDX = 0x0002840c, SX_ALPHA_TEST_CONTROL = 0x00028410, ALPHA_FUNC_mask = 0x07 << 0, ALPHA_FUNC_shift = 0, REF_NEVER = 0x00, REF_LESS = 0x01, REF_EQUAL = 0x02, REF_LEQUAL = 0x03, REF_GREATER = 0x04, REF_NOTEQUAL = 0x05, REF_GEQUAL = 0x06, REF_ALWAYS = 0x07, ALPHA_TEST_ENABLE_bit = 1 << 3, ALPHA_TEST_BYPASS_bit = 1 << 8, CB_BLEND_RED = 0x00028414, CB_BLEND_GREEN = 0x00028418, CB_BLEND_BLUE = 0x0002841c, CB_BLEND_ALPHA = 0x00028420, DB_STENCILREFMASK = 0x00028430, STENCILREF_mask = 0xff << 0, STENCILREF_shift = 0, STENCILMASK_mask = 0xff << 8, STENCILMASK_shift = 8, STENCILWRITEMASK_mask = 0xff << 16, STENCILWRITEMASK_shift = 16, DB_STENCILREFMASK_BF = 0x00028434, STENCILREF_BF_mask = 0xff << 0, STENCILREF_BF_shift = 0, STENCILMASK_BF_mask = 0xff << 8, STENCILMASK_BF_shift = 8, STENCILWRITEMASK_BF_mask = 0xff << 16, STENCILWRITEMASK_BF_shift = 16, SX_ALPHA_REF = 0x00028438, PA_CL_VPORT_XSCALE_0 = 0x0002843c, PA_CL_VPORT_XSCALE_0_num = 16, PA_CL_VPORT_XSCALE_0_offset = 24, PA_CL_VPORT_XOFFSET_0 = 0x00028440, PA_CL_VPORT_XOFFSET_0_num = 16, PA_CL_VPORT_XOFFSET_0_offset = 24, PA_CL_VPORT_YSCALE_0 = 0x00028444, PA_CL_VPORT_YSCALE_0_num = 16, PA_CL_VPORT_YSCALE_0_offset = 24, PA_CL_VPORT_YOFFSET_0 = 0x00028448, PA_CL_VPORT_YOFFSET_0_num = 16, PA_CL_VPORT_YOFFSET_0_offset = 24, PA_CL_VPORT_ZSCALE_0 = 0x0002844c, PA_CL_VPORT_ZSCALE_0_num = 16, PA_CL_VPORT_ZSCALE_0_offset = 24, PA_CL_VPORT_ZOFFSET_0 = 0x00028450, PA_CL_VPORT_ZOFFSET_0_num = 16, PA_CL_VPORT_ZOFFSET_0_offset = 24, PA_CL_UCP_0_X = 0x000285bc, PA_CL_UCP_0_X_num = 6, PA_CL_UCP_0_X_offset = 16, PA_CL_UCP_0_Y = 0x000285c0, PA_CL_UCP_0_Y_num = 6, PA_CL_UCP_0_Y_offset = 16, PA_CL_UCP_0_Z = 0x000285c4, PA_CL_UCP_0_Z_num = 6, PA_CL_UCP_0_Z_offset = 16, PA_CL_UCP_0_W = 0x000285c8, PA_CL_UCP_0_W_num = 6, PA_CL_UCP_0_W_offset = 16, SPI_VS_OUT_ID_0 = 0x0002861c, SPI_VS_OUT_ID_0_num = 10, SEMANTIC_0_mask = 0xff << 0, SEMANTIC_0_shift = 0, SEMANTIC_1_mask = 0xff << 8, SEMANTIC_1_shift = 8, SEMANTIC_2_mask = 0xff << 16, SEMANTIC_2_shift = 16, SEMANTIC_3_mask = 0xff << 24, SEMANTIC_3_shift = 24, SPI_PS_INPUT_CNTL_0 = 0x00028644, SPI_PS_INPUT_CNTL_0_num = 32, SEMANTIC_mask = 0xff << 0, SEMANTIC_shift = 0, DEFAULT_VAL_mask = 0x03 << 8, DEFAULT_VAL_shift = 8, X_0_0F = 0x00, FLAT_SHADE_bit = 1 << 10, CYL_WRAP_mask = 0x0f << 13, CYL_WRAP_shift = 13, PT_SPRITE_TEX_bit = 1 << 17, SPI_VS_OUT_CONFIG = 0x000286c4, VS_PER_COMPONENT_bit = 1 << 0, VS_EXPORT_COUNT_mask = 0x1f << 1, VS_EXPORT_COUNT_shift = 1, VS_EXPORTS_FOG_bit = 1 << 8, VS_OUT_FOG_VEC_ADDR_mask = 0x1f << 9, VS_OUT_FOG_VEC_ADDR_shift = 9, SPI_PS_IN_CONTROL_0 = 0x000286cc, NUM_INTERP_mask = 0x3f << 0, NUM_INTERP_shift = 0, POSITION_ENA_bit = 1 << 8, POSITION_CENTROID_bit = 1 << 9, POSITION_ADDR_mask = 0x1f << 10, POSITION_ADDR_shift = 10, PARAM_GEN_mask = 0x0f << 15, PARAM_GEN_shift = 15, PERSP_GRADIENT_ENA_bit = 1 << 28, LINEAR_GRADIENT_ENA_bit = 1 << 29, POSITION_SAMPLE_bit = 1 << 30, SPI_PS_IN_CONTROL_1 = 0x000286d0, FRONT_FACE_ENA_bit = 1 << 8, FRONT_FACE_ALL_BITS_bit = 1 << 11, FRONT_FACE_ADDR_mask = 0x1f << 12, FRONT_FACE_ADDR_shift = 12, FOG_ADDR_mask = 0x7f << 17, FOG_ADDR_shift = 17, FIXED_PT_POSITION_ENA_bit = 1 << 24, FIXED_PT_POSITION_ADDR_mask = 0x1f << 25, FIXED_PT_POSITION_ADDR_shift = 25, POSITION_ULC_bit = 1 << 30, SPI_INTERP_CONTROL_0 = 0x000286d4, FLAT_SHADE_ENA_bit = 1 << 0, PNT_SPRITE_ENA_bit = 1 << 1, PNT_SPRITE_OVRD_X_mask = 0x07 << 2, PNT_SPRITE_OVRD_X_shift = 2, SPI_PNT_SPRITE_SEL_0 = 0x00, SPI_PNT_SPRITE_SEL_1 = 0x01, SPI_PNT_SPRITE_SEL_S = 0x02, SPI_PNT_SPRITE_SEL_T = 0x03, SPI_PNT_SPRITE_SEL_NONE = 0x04, PNT_SPRITE_OVRD_Y_mask = 0x07 << 5, PNT_SPRITE_OVRD_Y_shift = 5, /* SPI_PNT_SPRITE_SEL_0 = 0x00, */ /* SPI_PNT_SPRITE_SEL_1 = 0x01, */ /* SPI_PNT_SPRITE_SEL_S = 0x02, */ /* SPI_PNT_SPRITE_SEL_T = 0x03, */ /* SPI_PNT_SPRITE_SEL_NONE = 0x04, */ PNT_SPRITE_OVRD_Z_mask = 0x07 << 8, PNT_SPRITE_OVRD_Z_shift = 8, /* SPI_PNT_SPRITE_SEL_0 = 0x00, */ /* SPI_PNT_SPRITE_SEL_1 = 0x01, */ /* SPI_PNT_SPRITE_SEL_S = 0x02, */ /* SPI_PNT_SPRITE_SEL_T = 0x03, */ /* SPI_PNT_SPRITE_SEL_NONE = 0x04, */ PNT_SPRITE_OVRD_W_mask = 0x07 << 11, PNT_SPRITE_OVRD_W_shift = 11, /* SPI_PNT_SPRITE_SEL_0 = 0x00, */ /* SPI_PNT_SPRITE_SEL_1 = 0x01, */ /* SPI_PNT_SPRITE_SEL_S = 0x02, */ /* SPI_PNT_SPRITE_SEL_T = 0x03, */ /* SPI_PNT_SPRITE_SEL_NONE = 0x04, */ PNT_SPRITE_TOP_1_bit = 1 << 14, SPI_INPUT_Z = 0x000286d8, PROVIDE_Z_TO_SPI_bit = 1 << 0, SPI_FOG_CNTL = 0x000286dc, PASS_FOG_THROUGH_PS_bit = 1 << 0, SPI_BARYC_CNTL = 0x000286e0, PERSP_CENTER_ENA_mask = 0x03 << 0, PERSP_CENTER_ENA_shift = 0, X_OFF = 0x00, PERSP_CENTER_ENA__X_ON_AT_CENTER = 0x01, PERSP_CENTER_ENA__X_ON_AT_CENTROID = 0x02, PERSP_CENTROID_ENA_mask = 0x03 << 4, PERSP_CENTROID_ENA_shift = 4, /* X_OFF = 0x00, */ PERSP_CENTROID_ENA__X_ON_AT_CENTROID = 0x01, PERSP_CENTROID_ENA__X_ON_AT_CENTER = 0x02, PERSP_SAMPLE_ENA_mask = 0x03 << 8, PERSP_SAMPLE_ENA_shift = 8, /* X_OFF = 0x00, */ PERSP_PULL_MODEL_ENA_mask = 0x03 << 12, PERSP_PULL_MODEL_ENA_shift = 12, /* X_OFF = 0x00, */ LINEAR_CENTER_ENA_mask = 0x03 << 16, LINEAR_CENTER_ENA_shift = 16, /* X_OFF = 0x00, */ LINEAR_CENTER_ENA__X_ON_AT_CENTER = 0x01, LINEAR_CENTER_ENA__X_ON_AT_CENTROID = 0x02, LINEAR_CENTROID_ENA_mask = 0x03 << 20, LINEAR_CENTROID_ENA_shift = 20, /* X_OFF = 0x00, */ LINEAR_CENTROID_ENA__X_ON_AT_CENTROID = 0x01, LINEAR_CENTROID_ENA__X_ON_AT_CENTER = 0x02, LINEAR_SAMPLE_ENA_mask = 0x03 << 24, LINEAR_SAMPLE_ENA_shift = 24, /* X_OFF = 0x00, */ SPI_PS_IN_CONTROL_2 = 0x000286e4, LINE_STIPPLE_TEX_ADDR_mask = 0xff << 0, LINE_STIPPLE_TEX_ADDR_shift = 0, LINE_STIPPLE_TEX_ENA_bit = 1 << 8, CB_BLEND0_CONTROL = 0x00028780, CB_BLEND0_CONTROL_num = 8, COLOR_SRCBLEND_mask = 0x1f << 0, COLOR_SRCBLEND_shift = 0, BLEND_ZERO = 0x00, BLEND_ONE = 0x01, BLEND_SRC_COLOR = 0x02, BLEND_ONE_MINUS_SRC_COLOR = 0x03, BLEND_SRC_ALPHA = 0x04, BLEND_ONE_MINUS_SRC_ALPHA = 0x05, BLEND_DST_ALPHA = 0x06, BLEND_ONE_MINUS_DST_ALPHA = 0x07, BLEND_DST_COLOR = 0x08, BLEND_ONE_MINUS_DST_COLOR = 0x09, BLEND_SRC_ALPHA_SATURATE = 0x0a, BLEND_BOTH_SRC_ALPHA = 0x0b, BLEND_BOTH_INV_SRC_ALPHA = 0x0c, BLEND_CONSTANT_COLOR = 0x0d, BLEND_ONE_MINUS_CONSTANT_COLOR = 0x0e, BLEND_SRC1_COLOR = 0x0f, BLEND_INV_SRC1_COLOR = 0x10, BLEND_SRC1_ALPHA = 0x11, BLEND_INV_SRC1_ALPHA = 0x12, BLEND_CONSTANT_ALPHA = 0x13, BLEND_ONE_MINUS_CONSTANT_ALPHA = 0x14, COLOR_COMB_FCN_mask = 0x07 << 5, COLOR_COMB_FCN_shift = 5, COMB_DST_PLUS_SRC = 0x00, COMB_SRC_MINUS_DST = 0x01, COMB_MIN_DST_SRC = 0x02, COMB_MAX_DST_SRC = 0x03, COMB_DST_MINUS_SRC = 0x04, COLOR_DESTBLEND_mask = 0x1f << 8, COLOR_DESTBLEND_shift = 8, /* BLEND_ZERO = 0x00, */ /* BLEND_ONE = 0x01, */ /* BLEND_SRC_COLOR = 0x02, */ /* BLEND_ONE_MINUS_SRC_COLOR = 0x03, */ /* BLEND_SRC_ALPHA = 0x04, */ /* BLEND_ONE_MINUS_SRC_ALPHA = 0x05, */ /* BLEND_DST_ALPHA = 0x06, */ /* BLEND_ONE_MINUS_DST_ALPHA = 0x07, */ /* BLEND_DST_COLOR = 0x08, */ /* BLEND_ONE_MINUS_DST_COLOR = 0x09, */ /* BLEND_SRC_ALPHA_SATURATE = 0x0a, */ /* BLEND_BOTH_SRC_ALPHA = 0x0b, */ /* BLEND_BOTH_INV_SRC_ALPHA = 0x0c, */ /* BLEND_CONSTANT_COLOR = 0x0d, */ /* BLEND_ONE_MINUS_CONSTANT_COLOR = 0x0e, */ /* BLEND_SRC1_COLOR = 0x0f, */ /* BLEND_INV_SRC1_COLOR = 0x10, */ /* BLEND_SRC1_ALPHA = 0x11, */ /* BLEND_INV_SRC1_ALPHA = 0x12, */ /* BLEND_CONSTANT_ALPHA = 0x13, */ /* BLEND_ONE_MINUS_CONSTANT_ALPHA = 0x14, */ ALPHA_SRCBLEND_mask = 0x1f << 16, ALPHA_SRCBLEND_shift = 16, /* BLEND_ZERO = 0x00, */ /* BLEND_ONE = 0x01, */ /* BLEND_SRC_COLOR = 0x02, */ /* BLEND_ONE_MINUS_SRC_COLOR = 0x03, */ /* BLEND_SRC_ALPHA = 0x04, */ /* BLEND_ONE_MINUS_SRC_ALPHA = 0x05, */ /* BLEND_DST_ALPHA = 0x06, */ /* BLEND_ONE_MINUS_DST_ALPHA = 0x07, */ /* BLEND_DST_COLOR = 0x08, */ /* BLEND_ONE_MINUS_DST_COLOR = 0x09, */ /* BLEND_SRC_ALPHA_SATURATE = 0x0a, */ /* BLEND_BOTH_SRC_ALPHA = 0x0b, */ /* BLEND_BOTH_INV_SRC_ALPHA = 0x0c, */ /* BLEND_CONSTANT_COLOR = 0x0d, */ /* BLEND_ONE_MINUS_CONSTANT_COLOR = 0x0e, */ /* BLEND_SRC1_COLOR = 0x0f, */ /* BLEND_INV_SRC1_COLOR = 0x10, */ /* BLEND_SRC1_ALPHA = 0x11, */ /* BLEND_INV_SRC1_ALPHA = 0x12, */ /* BLEND_CONSTANT_ALPHA = 0x13, */ /* BLEND_ONE_MINUS_CONSTANT_ALPHA = 0x14, */ ALPHA_COMB_FCN_mask = 0x07 << 21, ALPHA_COMB_FCN_shift = 21, /* COMB_DST_PLUS_SRC = 0x00, */ /* COMB_SRC_MINUS_DST = 0x01, */ /* COMB_MIN_DST_SRC = 0x02, */ /* COMB_MAX_DST_SRC = 0x03, */ /* COMB_DST_MINUS_SRC = 0x04, */ ALPHA_DESTBLEND_mask = 0x1f << 24, ALPHA_DESTBLEND_shift = 24, /* BLEND_ZERO = 0x00, */ /* BLEND_ONE = 0x01, */ /* BLEND_SRC_COLOR = 0x02, */ /* BLEND_ONE_MINUS_SRC_COLOR = 0x03, */ /* BLEND_SRC_ALPHA = 0x04, */ /* BLEND_ONE_MINUS_SRC_ALPHA = 0x05, */ /* BLEND_DST_ALPHA = 0x06, */ /* BLEND_ONE_MINUS_DST_ALPHA = 0x07, */ /* BLEND_DST_COLOR = 0x08, */ /* BLEND_ONE_MINUS_DST_COLOR = 0x09, */ /* BLEND_SRC_ALPHA_SATURATE = 0x0a, */ /* BLEND_BOTH_SRC_ALPHA = 0x0b, */ /* BLEND_BOTH_INV_SRC_ALPHA = 0x0c, */ /* BLEND_CONSTANT_COLOR = 0x0d, */ /* BLEND_ONE_MINUS_CONSTANT_COLOR = 0x0e, */ /* BLEND_SRC1_COLOR = 0x0f, */ /* BLEND_INV_SRC1_COLOR = 0x10, */ /* BLEND_SRC1_ALPHA = 0x11, */ /* BLEND_INV_SRC1_ALPHA = 0x12, */ /* BLEND_CONSTANT_ALPHA = 0x13, */ /* BLEND_ONE_MINUS_CONSTANT_ALPHA = 0x14, */ SEPARATE_ALPHA_BLEND_bit = 1 << 29, CB_BLEND0_CONTROL__ENABLE_bit = 1 << 30, PA_CL_POINT_X_RAD = 0x000287d4, PA_CL_POINT_Y_RAD = 0x000287d8, PA_CL_POINT_SIZE = 0x000287dc, PA_CL_POINT_CULL_RAD = 0x000287e0, VGT_DMA_BASE_HI = 0x000287e4, VGT_DMA_BASE_HI__BASE_ADDR_mask = 0xff << 0, VGT_DMA_BASE_HI__BASE_ADDR_shift = 0, VGT_DMA_BASE = 0x000287e8, VGT_DRAW_INITIATOR = 0x000287f0, SOURCE_SELECT_mask = 0x03 << 0, SOURCE_SELECT_shift = 0, DI_SRC_SEL_DMA = 0x00, DI_SRC_SEL_IMMEDIATE = 0x01, DI_SRC_SEL_AUTO_INDEX = 0x02, DI_SRC_SEL_RESERVED = 0x03, MAJOR_MODE_mask = 0x03 << 2, MAJOR_MODE_shift = 2, DI_MAJOR_MODE_0 = 0x00, DI_MAJOR_MODE_1 = 0x01, NOT_EOP_bit = 1 << 5, USE_OPAQUE_bit = 1 << 6, VGT_IMMED_DATA = 0x000287f4, VGT_EVENT_ADDRESS_REG = 0x000287f8, ADDRESS_LOW_mask = 0xfffffff << 0, ADDRESS_LOW_shift = 0, DB_DEPTH_CONTROL = 0x00028800, STENCIL_ENABLE_bit = 1 << 0, Z_ENABLE_bit = 1 << 1, Z_WRITE_ENABLE_bit = 1 << 2, ZFUNC_mask = 0x07 << 4, ZFUNC_shift = 4, FRAG_NEVER = 0x00, FRAG_LESS = 0x01, FRAG_EQUAL = 0x02, FRAG_LEQUAL = 0x03, FRAG_GREATER = 0x04, FRAG_NOTEQUAL = 0x05, FRAG_GEQUAL = 0x06, FRAG_ALWAYS = 0x07, BACKFACE_ENABLE_bit = 1 << 7, STENCILFUNC_mask = 0x07 << 8, STENCILFUNC_shift = 8, /* REF_NEVER = 0x00, */ /* REF_LESS = 0x01, */ /* REF_EQUAL = 0x02, */ /* REF_LEQUAL = 0x03, */ /* REF_GREATER = 0x04, */ /* REF_NOTEQUAL = 0x05, */ /* REF_GEQUAL = 0x06, */ /* REF_ALWAYS = 0x07, */ STENCILFAIL_mask = 0x07 << 11, STENCILFAIL_shift = 11, STENCIL_KEEP = 0x00, STENCIL_ZERO = 0x01, STENCIL_REPLACE = 0x02, STENCIL_INCR_CLAMP = 0x03, STENCIL_DECR_CLAMP = 0x04, STENCIL_INVERT = 0x05, STENCIL_INCR_WRAP = 0x06, STENCIL_DECR_WRAP = 0x07, STENCILZPASS_mask = 0x07 << 14, STENCILZPASS_shift = 14, /* STENCIL_KEEP = 0x00, */ /* STENCIL_ZERO = 0x01, */ /* STENCIL_REPLACE = 0x02, */ /* STENCIL_INCR_CLAMP = 0x03, */ /* STENCIL_DECR_CLAMP = 0x04, */ /* STENCIL_INVERT = 0x05, */ /* STENCIL_INCR_WRAP = 0x06, */ /* STENCIL_DECR_WRAP = 0x07, */ STENCILZFAIL_mask = 0x07 << 17, STENCILZFAIL_shift = 17, /* STENCIL_KEEP = 0x00, */ /* STENCIL_ZERO = 0x01, */ /* STENCIL_REPLACE = 0x02, */ /* STENCIL_INCR_CLAMP = 0x03, */ /* STENCIL_DECR_CLAMP = 0x04, */ /* STENCIL_INVERT = 0x05, */ /* STENCIL_INCR_WRAP = 0x06, */ /* STENCIL_DECR_WRAP = 0x07, */ STENCILFUNC_BF_mask = 0x07 << 20, STENCILFUNC_BF_shift = 20, /* REF_NEVER = 0x00, */ /* REF_LESS = 0x01, */ /* REF_EQUAL = 0x02, */ /* REF_LEQUAL = 0x03, */ /* REF_GREATER = 0x04, */ /* REF_NOTEQUAL = 0x05, */ /* REF_GEQUAL = 0x06, */ /* REF_ALWAYS = 0x07, */ STENCILFAIL_BF_mask = 0x07 << 23, STENCILFAIL_BF_shift = 23, /* STENCIL_KEEP = 0x00, */ /* STENCIL_ZERO = 0x01, */ /* STENCIL_REPLACE = 0x02, */ /* STENCIL_INCR_CLAMP = 0x03, */ /* STENCIL_DECR_CLAMP = 0x04, */ /* STENCIL_INVERT = 0x05, */ /* STENCIL_INCR_WRAP = 0x06, */ /* STENCIL_DECR_WRAP = 0x07, */ STENCILZPASS_BF_mask = 0x07 << 26, STENCILZPASS_BF_shift = 26, /* STENCIL_KEEP = 0x00, */ /* STENCIL_ZERO = 0x01, */ /* STENCIL_REPLACE = 0x02, */ /* STENCIL_INCR_CLAMP = 0x03, */ /* STENCIL_DECR_CLAMP = 0x04, */ /* STENCIL_INVERT = 0x05, */ /* STENCIL_INCR_WRAP = 0x06, */ /* STENCIL_DECR_WRAP = 0x07, */ STENCILZFAIL_BF_mask = 0x07 << 29, STENCILZFAIL_BF_shift = 29, /* STENCIL_KEEP = 0x00, */ /* STENCIL_ZERO = 0x01, */ /* STENCIL_REPLACE = 0x02, */ /* STENCIL_INCR_CLAMP = 0x03, */ /* STENCIL_DECR_CLAMP = 0x04, */ /* STENCIL_INVERT = 0x05, */ /* STENCIL_INCR_WRAP = 0x06, */ /* STENCIL_DECR_WRAP = 0x07, */ CB_COLOR_CONTROL = 0x00028808, DEGAMMA_ENABLE_bit = 1 << 3, CB_COLOR_CONTROL__MODE_mask = 0x07 << 4, CB_COLOR_CONTROL__MODE_shift = 4, CB_DISABLE = 0x00, CB_NORMAL = 0x01, CB_ELIMINATE_FAST_CLEAR = 0x02, CB_RESOLVE = 0x03, CB_DECOMPRESS = 0x04, CB_FMASK_DECOMPRESS = 0x05, ROP3_mask = 0xff << 16, ROP3_shift = 16, DB_SHADER_CONTROL = 0x0002880c, Z_EXPORT_ENABLE_bit = 1 << 0, STENCIL_REF_EXPORT_ENABLE_bit = 1 << 1, Z_ORDER_mask = 0x03 << 4, Z_ORDER_shift = 4, LATE_Z = 0x00, EARLY_Z_THEN_LATE_Z = 0x01, RE_Z = 0x02, EARLY_Z_THEN_RE_Z = 0x03, KILL_ENABLE_bit = 1 << 6, COVERAGE_TO_MASK_ENABLE_bit = 1 << 7, MASK_EXPORT_ENABLE_bit = 1 << 8, DUAL_EXPORT_ENABLE_bit = 1 << 9, EXEC_ON_HIER_FAIL_bit = 1 << 10, EXEC_ON_NOOP_bit = 1 << 11, ALPHA_TO_MASK_DISABLE_bit = 1 << 12, DB_SOURCE_FORMAT_mask = 0x03 << 13, DB_SOURCE_FORMAT_shift = 13, EXPORT_DB_FULL = 0x00, EXPORT_DB_FOUR16 = 0x01, EXPORT_DB_TWO = 0x02, DEPTH_BEFORE_SHADER_bit = 1 << 15, CONSERVATIVE_Z_EXPORT_mask = 0x03 << 16, CONSERVATIVE_Z_EXPORT_shift = 16, EXPORT_ANY_Z = 0x00, EXPORT_LESS_THAN_Z = 0x01, EXPORT_GREATER_THAN_Z = 0x02, EXPORT_RESERVED = 0x03, PA_CL_CLIP_CNTL = 0x00028810, UCP_ENA_0_bit = 1 << 0, UCP_ENA_1_bit = 1 << 1, UCP_ENA_2_bit = 1 << 2, UCP_ENA_3_bit = 1 << 3, UCP_ENA_4_bit = 1 << 4, UCP_ENA_5_bit = 1 << 5, PS_UCP_Y_SCALE_NEG_bit = 1 << 13, PS_UCP_MODE_mask = 0x03 << 14, PS_UCP_MODE_shift = 14, CLIP_DISABLE_bit = 1 << 16, UCP_CULL_ONLY_ENA_bit = 1 << 17, BOUNDARY_EDGE_FLAG_ENA_bit = 1 << 18, DX_CLIP_SPACE_DEF_bit = 1 << 19, DIS_CLIP_ERR_DETECT_bit = 1 << 20, VTX_KILL_OR_bit = 1 << 21, DX_RASTERIZATION_KILL_bit = 1 << 22, DX_LINEAR_ATTR_CLIP_ENA_bit = 1 << 24, VTE_VPORT_PROVOKE_DISABLE_bit = 1 << 25, ZCLIP_NEAR_DISABLE_bit = 1 << 26, ZCLIP_FAR_DISABLE_bit = 1 << 27, PA_SU_SC_MODE_CNTL = 0x00028814, CULL_FRONT_bit = 1 << 0, CULL_BACK_bit = 1 << 1, FACE_bit = 1 << 2, POLY_MODE_mask = 0x03 << 3, POLY_MODE_shift = 3, X_DISABLE_POLY_MODE = 0x00, X_DUAL_MODE = 0x01, POLYMODE_FRONT_PTYPE_mask = 0x07 << 5, POLYMODE_FRONT_PTYPE_shift = 5, X_DRAW_POINTS = 0x00, X_DRAW_LINES = 0x01, X_DRAW_TRIANGLES = 0x02, POLYMODE_BACK_PTYPE_mask = 0x07 << 8, POLYMODE_BACK_PTYPE_shift = 8, /* X_DRAW_POINTS = 0x00, */ /* X_DRAW_LINES = 0x01, */ /* X_DRAW_TRIANGLES = 0x02, */ POLY_OFFSET_FRONT_ENABLE_bit = 1 << 11, POLY_OFFSET_BACK_ENABLE_bit = 1 << 12, POLY_OFFSET_PARA_ENABLE_bit = 1 << 13, VTX_WINDOW_OFFSET_ENABLE_bit = 1 << 16, PROVOKING_VTX_LAST_bit = 1 << 19, PERSP_CORR_DIS_bit = 1 << 20, MULTI_PRIM_IB_ENA_bit = 1 << 21, PA_CL_VTE_CNTL = 0x00028818, VPORT_X_SCALE_ENA_bit = 1 << 0, VPORT_X_OFFSET_ENA_bit = 1 << 1, VPORT_Y_SCALE_ENA_bit = 1 << 2, VPORT_Y_OFFSET_ENA_bit = 1 << 3, VPORT_Z_SCALE_ENA_bit = 1 << 4, VPORT_Z_OFFSET_ENA_bit = 1 << 5, VTX_XY_FMT_bit = 1 << 8, VTX_Z_FMT_bit = 1 << 9, VTX_W0_FMT_bit = 1 << 10, PA_CL_VS_OUT_CNTL = 0x0002881c, CLIP_DIST_ENA_0_bit = 1 << 0, CLIP_DIST_ENA_1_bit = 1 << 1, CLIP_DIST_ENA_2_bit = 1 << 2, CLIP_DIST_ENA_3_bit = 1 << 3, CLIP_DIST_ENA_4_bit = 1 << 4, CLIP_DIST_ENA_5_bit = 1 << 5, CLIP_DIST_ENA_6_bit = 1 << 6, CLIP_DIST_ENA_7_bit = 1 << 7, CULL_DIST_ENA_0_bit = 1 << 8, CULL_DIST_ENA_1_bit = 1 << 9, CULL_DIST_ENA_2_bit = 1 << 10, CULL_DIST_ENA_3_bit = 1 << 11, CULL_DIST_ENA_4_bit = 1 << 12, CULL_DIST_ENA_5_bit = 1 << 13, CULL_DIST_ENA_6_bit = 1 << 14, CULL_DIST_ENA_7_bit = 1 << 15, USE_VTX_POINT_SIZE_bit = 1 << 16, USE_VTX_EDGE_FLAG_bit = 1 << 17, USE_VTX_RENDER_TARGET_INDX_bit = 1 << 18, USE_VTX_VIEWPORT_INDX_bit = 1 << 19, USE_VTX_KILL_FLAG_bit = 1 << 20, VS_OUT_MISC_VEC_ENA_bit = 1 << 21, VS_OUT_CCDIST0_VEC_ENA_bit = 1 << 22, VS_OUT_CCDIST1_VEC_ENA_bit = 1 << 23, PA_CL_NANINF_CNTL = 0x00028820, VTE_XY_INF_DISCARD_bit = 1 << 0, VTE_Z_INF_DISCARD_bit = 1 << 1, VTE_W_INF_DISCARD_bit = 1 << 2, VTE_0XNANINF_IS_0_bit = 1 << 3, VTE_XY_NAN_RETAIN_bit = 1 << 4, VTE_Z_NAN_RETAIN_bit = 1 << 5, VTE_W_NAN_RETAIN_bit = 1 << 6, VTE_W_RECIP_NAN_IS_0_bit = 1 << 7, VS_XY_NAN_TO_INF_bit = 1 << 8, VS_XY_INF_RETAIN_bit = 1 << 9, VS_Z_NAN_TO_INF_bit = 1 << 10, VS_Z_INF_RETAIN_bit = 1 << 11, VS_W_NAN_TO_INF_bit = 1 << 12, VS_W_INF_RETAIN_bit = 1 << 13, VS_CLIP_DIST_INF_DISCARD_bit = 1 << 14, VTE_NO_OUTPUT_NEG_0_bit = 1 << 20, PA_SU_LINE_STIPPLE_CNTL = 0x00028824, LINE_STIPPLE_RESET_mask = 0x03 << 0, LINE_STIPPLE_RESET_shift = 0, EXPAND_FULL_LENGTH_bit = 1 << 2, FRACTIONAL_ACCUM_bit = 1 << 3, DIAMOND_ADJUST_bit = 1 << 4, PA_SU_LINE_STIPPLE_SCALE = 0x00028828, PA_SU_PRIM_FILTER_CNTL = 0x0002882c, TRIANGLE_FILTER_DISABLE_bit = 1 << 0, LINE_FILTER_DISABLE_bit = 1 << 1, POINT_FILTER_DISABLE_bit = 1 << 2, RECTANGLE_FILTER_DISABLE_bit = 1 << 3, TRIANGLE_EXPAND_ENA_bit = 1 << 4, LINE_EXPAND_ENA_bit = 1 << 5, POINT_EXPAND_ENA_bit = 1 << 6, RECTANGLE_EXPAND_ENA_bit = 1 << 7, PRIM_EXPAND_CONSTANT_mask = 0xff << 8, PRIM_EXPAND_CONSTANT_shift = 8, SQ_LSTMP_RING_ITEMSIZE = 0x00028830, ITEMSIZE_mask = 0x7fff << 0, ITEMSIZE_shift = 0, SQ_HSTMP_RING_ITEMSIZE = 0x00028834, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_PGM_START_PS = 0x00028840, SQ_PGM_RESOURCES_PS = 0x00028844, NUM_GPRS_mask = 0xff << 0, NUM_GPRS_shift = 0, STACK_SIZE_mask = 0xff << 8, STACK_SIZE_shift = 8, DX10_CLAMP_bit = 1 << 21, UNCACHED_FIRST_INST_bit = 1 << 28, CLAMP_CONSTS_bit = 1 << 31, SQ_PGM_RESOURCES_2_PS = 0x00028848, SINGLE_ROUND_mask = 0x03 << 0, SINGLE_ROUND_shift = 0, SQ_ROUND_NEAREST_EVEN = 0x00, SQ_ROUND_PLUS_INFINITY = 0x01, SQ_ROUND_MINUS_INFINITY = 0x02, SQ_ROUND_TO_ZERO = 0x03, DOUBLE_ROUND_mask = 0x03 << 2, DOUBLE_ROUND_shift = 2, /* SQ_ROUND_NEAREST_EVEN = 0x00, */ /* SQ_ROUND_PLUS_INFINITY = 0x01, */ /* SQ_ROUND_MINUS_INFINITY = 0x02, */ /* SQ_ROUND_TO_ZERO = 0x03, */ ALLOW_SINGLE_DENORM_IN_bit = 1 << 4, ALLOW_SINGLE_DENORM_OUT_bit = 1 << 5, ALLOW_DOUBLE_DENORM_IN_bit = 1 << 6, ALLOW_DOUBLE_DENORM_OUT_bit = 1 << 7, SQ_PGM_EXPORTS_PS = 0x0002884c, EXPORT_MODE_mask = 0x1f << 0, EXPORT_MODE_shift = 0, SQ_PGM_START_VS = 0x0002885c, SQ_PGM_RESOURCES_VS = 0x00028860, /* NUM_GPRS_mask = 0xff << 0, */ /* NUM_GPRS_shift = 0, */ /* STACK_SIZE_mask = 0xff << 8, */ /* STACK_SIZE_shift = 8, */ /* DX10_CLAMP_bit = 1 << 21, */ /* UNCACHED_FIRST_INST_bit = 1 << 28, */ SQ_PGM_RESOURCES_2_VS = 0x00028864, /* SINGLE_ROUND_mask = 0x03 << 0, */ /* SINGLE_ROUND_shift = 0, */ /* SQ_ROUND_NEAREST_EVEN = 0x00, */ /* SQ_ROUND_PLUS_INFINITY = 0x01, */ /* SQ_ROUND_MINUS_INFINITY = 0x02, */ /* SQ_ROUND_TO_ZERO = 0x03, */ /* DOUBLE_ROUND_mask = 0x03 << 2, */ /* DOUBLE_ROUND_shift = 2, */ /* SQ_ROUND_NEAREST_EVEN = 0x00, */ /* SQ_ROUND_PLUS_INFINITY = 0x01, */ /* SQ_ROUND_MINUS_INFINITY = 0x02, */ /* SQ_ROUND_TO_ZERO = 0x03, */ /* ALLOW_SINGLE_DENORM_IN_bit = 1 << 4, */ /* ALLOW_SINGLE_DENORM_OUT_bit = 1 << 5, */ /* ALLOW_DOUBLE_DENORM_IN_bit = 1 << 6, */ /* ALLOW_DOUBLE_DENORM_OUT_bit = 1 << 7, */ SQ_PGM_START_GS = 0x00028874, SQ_PGM_RESOURCES_GS = 0x00028878, /* NUM_GPRS_mask = 0xff << 0, */ /* NUM_GPRS_shift = 0, */ /* STACK_SIZE_mask = 0xff << 8, */ /* STACK_SIZE_shift = 8, */ /* DX10_CLAMP_bit = 1 << 21, */ /* UNCACHED_FIRST_INST_bit = 1 << 28, */ SQ_PGM_RESOURCES_2_GS = 0x0002887c, /* SINGLE_ROUND_mask = 0x03 << 0, */ /* SINGLE_ROUND_shift = 0, */ /* SQ_ROUND_NEAREST_EVEN = 0x00, */ /* SQ_ROUND_PLUS_INFINITY = 0x01, */ /* SQ_ROUND_MINUS_INFINITY = 0x02, */ /* SQ_ROUND_TO_ZERO = 0x03, */ /* DOUBLE_ROUND_mask = 0x03 << 2, */ /* DOUBLE_ROUND_shift = 2, */ /* SQ_ROUND_NEAREST_EVEN = 0x00, */ /* SQ_ROUND_PLUS_INFINITY = 0x01, */ /* SQ_ROUND_MINUS_INFINITY = 0x02, */ /* SQ_ROUND_TO_ZERO = 0x03, */ /* ALLOW_SINGLE_DENORM_IN_bit = 1 << 4, */ /* ALLOW_SINGLE_DENORM_OUT_bit = 1 << 5, */ /* ALLOW_DOUBLE_DENORM_IN_bit = 1 << 6, */ /* ALLOW_DOUBLE_DENORM_OUT_bit = 1 << 7, */ SQ_PGM_START_ES = 0x0002888c, SQ_PGM_RESOURCES_ES = 0x00028890, /* NUM_GPRS_mask = 0xff << 0, */ /* NUM_GPRS_shift = 0, */ /* STACK_SIZE_mask = 0xff << 8, */ /* STACK_SIZE_shift = 8, */ /* DX10_CLAMP_bit = 1 << 21, */ /* UNCACHED_FIRST_INST_bit = 1 << 28, */ SQ_PGM_RESOURCES_2_ES = 0x00028894, /* SINGLE_ROUND_mask = 0x03 << 0, */ /* SINGLE_ROUND_shift = 0, */ /* SQ_ROUND_NEAREST_EVEN = 0x00, */ /* SQ_ROUND_PLUS_INFINITY = 0x01, */ /* SQ_ROUND_MINUS_INFINITY = 0x02, */ /* SQ_ROUND_TO_ZERO = 0x03, */ /* DOUBLE_ROUND_mask = 0x03 << 2, */ /* DOUBLE_ROUND_shift = 2, */ /* SQ_ROUND_NEAREST_EVEN = 0x00, */ /* SQ_ROUND_PLUS_INFINITY = 0x01, */ /* SQ_ROUND_MINUS_INFINITY = 0x02, */ /* SQ_ROUND_TO_ZERO = 0x03, */ /* ALLOW_SINGLE_DENORM_IN_bit = 1 << 4, */ /* ALLOW_SINGLE_DENORM_OUT_bit = 1 << 5, */ /* ALLOW_DOUBLE_DENORM_IN_bit = 1 << 6, */ /* ALLOW_DOUBLE_DENORM_OUT_bit = 1 << 7, */ SQ_PGM_START_FS = 0x000288a4, SQ_PGM_RESOURCES_FS = 0x000288a8, /* NUM_GPRS_mask = 0xff << 0, */ /* NUM_GPRS_shift = 0, */ /* STACK_SIZE_mask = 0xff << 8, */ /* STACK_SIZE_shift = 8, */ /* DX10_CLAMP_bit = 1 << 21, */ SQ_PGM_START_HS = 0x000288b8, SQ_PGM_RESOURCES_HS = 0x000288bc, /* NUM_GPRS_mask = 0xff << 0, */ /* NUM_GPRS_shift = 0, */ /* STACK_SIZE_mask = 0xff << 8, */ /* STACK_SIZE_shift = 8, */ /* DX10_CLAMP_bit = 1 << 21, */ /* UNCACHED_FIRST_INST_bit = 1 << 28, */ SQ_PGM_RESOURCES_2_HS = 0x000288c0, /* SINGLE_ROUND_mask = 0x03 << 0, */ /* SINGLE_ROUND_shift = 0, */ /* SQ_ROUND_NEAREST_EVEN = 0x00, */ /* SQ_ROUND_PLUS_INFINITY = 0x01, */ /* SQ_ROUND_MINUS_INFINITY = 0x02, */ /* SQ_ROUND_TO_ZERO = 0x03, */ /* DOUBLE_ROUND_mask = 0x03 << 2, */ /* DOUBLE_ROUND_shift = 2, */ /* SQ_ROUND_NEAREST_EVEN = 0x00, */ /* SQ_ROUND_PLUS_INFINITY = 0x01, */ /* SQ_ROUND_MINUS_INFINITY = 0x02, */ /* SQ_ROUND_TO_ZERO = 0x03, */ /* ALLOW_SINGLE_DENORM_IN_bit = 1 << 4, */ /* ALLOW_SINGLE_DENORM_OUT_bit = 1 << 5, */ /* ALLOW_DOUBLE_DENORM_IN_bit = 1 << 6, */ /* ALLOW_DOUBLE_DENORM_OUT_bit = 1 << 7, */ SQ_PGM_START_LS = 0x000288d0, SQ_PGM_RESOURCES_LS = 0x000288d4, /* NUM_GPRS_mask = 0xff << 0, */ /* NUM_GPRS_shift = 0, */ /* STACK_SIZE_mask = 0xff << 8, */ /* STACK_SIZE_shift = 8, */ /* DX10_CLAMP_bit = 1 << 21, */ /* UNCACHED_FIRST_INST_bit = 1 << 28, */ SQ_PGM_RESOURCES_2_LS = 0x000288d8, /* SINGLE_ROUND_mask = 0x03 << 0, */ /* SINGLE_ROUND_shift = 0, */ /* SQ_ROUND_NEAREST_EVEN = 0x00, */ /* SQ_ROUND_PLUS_INFINITY = 0x01, */ /* SQ_ROUND_MINUS_INFINITY = 0x02, */ /* SQ_ROUND_TO_ZERO = 0x03, */ /* DOUBLE_ROUND_mask = 0x03 << 2, */ /* DOUBLE_ROUND_shift = 2, */ /* SQ_ROUND_NEAREST_EVEN = 0x00, */ /* SQ_ROUND_PLUS_INFINITY = 0x01, */ /* SQ_ROUND_MINUS_INFINITY = 0x02, */ /* SQ_ROUND_TO_ZERO = 0x03, */ /* ALLOW_SINGLE_DENORM_IN_bit = 1 << 4, */ /* ALLOW_SINGLE_DENORM_OUT_bit = 1 << 5, */ /* ALLOW_DOUBLE_DENORM_IN_bit = 1 << 6, */ /* ALLOW_DOUBLE_DENORM_OUT_bit = 1 << 7, */ SQ_VTX_SEMANTIC_CLEAR = 0x000288f0, SQ_ESGS_RING_ITEMSIZE = 0x00028900, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_GSVS_RING_ITEMSIZE = 0x00028904, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_ESTMP_RING_ITEMSIZE = 0x00028908, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_GSTMP_RING_ITEMSIZE = 0x0002890c, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_VSTMP_RING_ITEMSIZE = 0x00028910, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_PSTMP_RING_ITEMSIZE = 0x00028914, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_GS_VERT_ITEMSIZE = 0x0002891c, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_GS_VERT_ITEMSIZE_1 = 0x00028920, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_GS_VERT_ITEMSIZE_2 = 0x00028924, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_GS_VERT_ITEMSIZE_3 = 0x00028928, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_GSVS_RING_OFFSET_1 = 0x0002892c, SQ_GSVS_RING_OFFSET_1__OFFSET_mask = 0x7fff << 0, SQ_GSVS_RING_OFFSET_1__OFFSET_shift = 0, SQ_GSVS_RING_OFFSET_2 = 0x00028930, SQ_GSVS_RING_OFFSET_2__OFFSET_mask = 0x7fff << 0, SQ_GSVS_RING_OFFSET_2__OFFSET_shift = 0, SQ_GSVS_RING_OFFSET_3 = 0x00028934, SQ_GSVS_RING_OFFSET_3__OFFSET_mask = 0x7fff << 0, SQ_GSVS_RING_OFFSET_3__OFFSET_shift = 0, SQ_ALU_CONST_CACHE_PS_0 = 0x00028940, SQ_ALU_CONST_CACHE_PS_0_num = 16, SQ_ALU_CONST_CACHE_VS_0 = 0x00028980, SQ_ALU_CONST_CACHE_VS_0_num = 16, SQ_ALU_CONST_CACHE_GS_0 = 0x000289c0, SQ_ALU_CONST_CACHE_GS_0_num = 16, PA_SU_POINT_SIZE = 0x00028a00, HEIGHT_mask = 0xffff << 0, HEIGHT_shift = 0, PA_SU_POINT_SIZE__WIDTH_mask = 0xffff << 16, PA_SU_POINT_SIZE__WIDTH_shift = 16, PA_SU_POINT_MINMAX = 0x00028a04, MIN_SIZE_mask = 0xffff << 0, MIN_SIZE_shift = 0, PA_SU_POINT_MINMAX__MAX_SIZE_mask = 0xffff << 16, PA_SU_POINT_MINMAX__MAX_SIZE_shift = 16, PA_SU_LINE_CNTL = 0x00028a08, PA_SU_LINE_CNTL__WIDTH_mask = 0xffff << 0, PA_SU_LINE_CNTL__WIDTH_shift = 0, PA_SC_LINE_STIPPLE = 0x00028a0c, LINE_PATTERN_mask = 0xffff << 0, LINE_PATTERN_shift = 0, REPEAT_COUNT_mask = 0xff << 16, REPEAT_COUNT_shift = 16, PATTERN_BIT_ORDER_bit = 1 << 28, AUTO_RESET_CNTL_mask = 0x03 << 29, AUTO_RESET_CNTL_shift = 29, VGT_OUTPUT_PATH_CNTL = 0x00028a10, PATH_SELECT_mask = 0x07 << 0, PATH_SELECT_shift = 0, VGT_OUTPATH_VTX_REUSE = 0x00, VGT_OUTPATH_TESS_EN = 0x01, VGT_OUTPATH_PASSTHRU = 0x02, VGT_OUTPATH_GS_BLOCK = 0x03, VGT_OUTPATH_HS_BLOCK = 0x04, VGT_HOS_CNTL = 0x00028a14, TESS_MODE_mask = 0x03 << 0, TESS_MODE_shift = 0, VGT_HOS_MAX_TESS_LEVEL = 0x00028a18, VGT_HOS_MIN_TESS_LEVEL = 0x00028a1c, VGT_HOS_REUSE_DEPTH = 0x00028a20, REUSE_DEPTH_mask = 0xff << 0, REUSE_DEPTH_shift = 0, VGT_GROUP_PRIM_TYPE = 0x00028a24, VGT_GROUP_PRIM_TYPE__PRIM_TYPE_mask = 0x1f << 0, VGT_GROUP_PRIM_TYPE__PRIM_TYPE_shift = 0, VGT_GRP_3D_POINT = 0x00, VGT_GRP_3D_LINE = 0x01, VGT_GRP_3D_TRI = 0x02, VGT_GRP_3D_RECT = 0x03, VGT_GRP_3D_QUAD = 0x04, VGT_GRP_2D_COPY_RECT_V0 = 0x05, VGT_GRP_2D_COPY_RECT_V1 = 0x06, VGT_GRP_2D_COPY_RECT_V2 = 0x07, VGT_GRP_2D_COPY_RECT_V3 = 0x08, VGT_GRP_2D_FILL_RECT = 0x09, VGT_GRP_2D_LINE = 0x0a, VGT_GRP_2D_TRI = 0x0b, VGT_GRP_PRIM_INDEX_LINE = 0x0c, VGT_GRP_PRIM_INDEX_TRI = 0x0d, VGT_GRP_PRIM_INDEX_QUAD = 0x0e, VGT_GRP_3D_LINE_ADJ = 0x0f, VGT_GRP_3D_TRI_ADJ = 0x10, VGT_GRP_3D_PATCH = 0x11, RETAIN_ORDER_bit = 1 << 14, RETAIN_QUADS_bit = 1 << 15, PRIM_ORDER_mask = 0x07 << 16, PRIM_ORDER_shift = 16, VGT_GRP_LIST = 0x00, VGT_GRP_STRIP = 0x01, VGT_GRP_FAN = 0x02, VGT_GRP_LOOP = 0x03, VGT_GRP_POLYGON = 0x04, VGT_GROUP_FIRST_DECR = 0x00028a28, FIRST_DECR_mask = 0x0f << 0, FIRST_DECR_shift = 0, VGT_GROUP_DECR = 0x00028a2c, DECR_mask = 0x0f << 0, DECR_shift = 0, VGT_GROUP_VECT_0_CNTL = 0x00028a30, COMP_X_EN_bit = 1 << 0, COMP_Y_EN_bit = 1 << 1, COMP_Z_EN_bit = 1 << 2, COMP_W_EN_bit = 1 << 3, VGT_GROUP_VECT_0_CNTL__STRIDE_mask = 0xff << 8, VGT_GROUP_VECT_0_CNTL__STRIDE_shift = 8, SHIFT_mask = 0xff << 16, SHIFT_shift = 16, VGT_GROUP_VECT_1_CNTL = 0x00028a34, /* COMP_X_EN_bit = 1 << 0, */ /* COMP_Y_EN_bit = 1 << 1, */ /* COMP_Z_EN_bit = 1 << 2, */ /* COMP_W_EN_bit = 1 << 3, */ VGT_GROUP_VECT_1_CNTL__STRIDE_mask = 0xff << 8, VGT_GROUP_VECT_1_CNTL__STRIDE_shift = 8, /* SHIFT_mask = 0xff << 16, */ /* SHIFT_shift = 16, */ VGT_GROUP_VECT_0_FMT_CNTL = 0x00028a38, X_CONV_mask = 0x0f << 0, X_CONV_shift = 0, VGT_GRP_INDEX_16 = 0x00, VGT_GRP_INDEX_32 = 0x01, VGT_GRP_UINT_16 = 0x02, VGT_GRP_UINT_32 = 0x03, VGT_GRP_SINT_16 = 0x04, VGT_GRP_SINT_32 = 0x05, VGT_GRP_FLOAT_32 = 0x06, VGT_GRP_AUTO_PRIM = 0x07, VGT_GRP_FIX_1_23_TO_FLOAT = 0x08, X_OFFSET_mask = 0x0f << 4, X_OFFSET_shift = 4, Y_CONV_mask = 0x0f << 8, Y_CONV_shift = 8, /* VGT_GRP_INDEX_16 = 0x00, */ /* VGT_GRP_INDEX_32 = 0x01, */ /* VGT_GRP_UINT_16 = 0x02, */ /* VGT_GRP_UINT_32 = 0x03, */ /* VGT_GRP_SINT_16 = 0x04, */ /* VGT_GRP_SINT_32 = 0x05, */ /* VGT_GRP_FLOAT_32 = 0x06, */ /* VGT_GRP_AUTO_PRIM = 0x07, */ /* VGT_GRP_FIX_1_23_TO_FLOAT = 0x08, */ Y_OFFSET_mask = 0x0f << 12, Y_OFFSET_shift = 12, Z_CONV_mask = 0x0f << 16, Z_CONV_shift = 16, /* VGT_GRP_INDEX_16 = 0x00, */ /* VGT_GRP_INDEX_32 = 0x01, */ /* VGT_GRP_UINT_16 = 0x02, */ /* VGT_GRP_UINT_32 = 0x03, */ /* VGT_GRP_SINT_16 = 0x04, */ /* VGT_GRP_SINT_32 = 0x05, */ /* VGT_GRP_FLOAT_32 = 0x06, */ /* VGT_GRP_AUTO_PRIM = 0x07, */ /* VGT_GRP_FIX_1_23_TO_FLOAT = 0x08, */ Z_OFFSET_mask = 0x0f << 20, Z_OFFSET_shift = 20, W_CONV_mask = 0x0f << 24, W_CONV_shift = 24, /* VGT_GRP_INDEX_16 = 0x00, */ /* VGT_GRP_INDEX_32 = 0x01, */ /* VGT_GRP_UINT_16 = 0x02, */ /* VGT_GRP_UINT_32 = 0x03, */ /* VGT_GRP_SINT_16 = 0x04, */ /* VGT_GRP_SINT_32 = 0x05, */ /* VGT_GRP_FLOAT_32 = 0x06, */ /* VGT_GRP_AUTO_PRIM = 0x07, */ /* VGT_GRP_FIX_1_23_TO_FLOAT = 0x08, */ W_OFFSET_mask = 0x0f << 28, W_OFFSET_shift = 28, VGT_GROUP_VECT_1_FMT_CNTL = 0x00028a3c, /* X_CONV_mask = 0x0f << 0, */ /* X_CONV_shift = 0, */ /* VGT_GRP_INDEX_16 = 0x00, */ /* VGT_GRP_INDEX_32 = 0x01, */ /* VGT_GRP_UINT_16 = 0x02, */ /* VGT_GRP_UINT_32 = 0x03, */ /* VGT_GRP_SINT_16 = 0x04, */ /* VGT_GRP_SINT_32 = 0x05, */ /* VGT_GRP_FLOAT_32 = 0x06, */ /* VGT_GRP_AUTO_PRIM = 0x07, */ /* VGT_GRP_FIX_1_23_TO_FLOAT = 0x08, */ /* X_OFFSET_mask = 0x0f << 4, */ /* X_OFFSET_shift = 4, */ /* Y_CONV_mask = 0x0f << 8, */ /* Y_CONV_shift = 8, */ /* VGT_GRP_INDEX_16 = 0x00, */ /* VGT_GRP_INDEX_32 = 0x01, */ /* VGT_GRP_UINT_16 = 0x02, */ /* VGT_GRP_UINT_32 = 0x03, */ /* VGT_GRP_SINT_16 = 0x04, */ /* VGT_GRP_SINT_32 = 0x05, */ /* VGT_GRP_FLOAT_32 = 0x06, */ /* VGT_GRP_AUTO_PRIM = 0x07, */ /* VGT_GRP_FIX_1_23_TO_FLOAT = 0x08, */ /* Y_OFFSET_mask = 0x0f << 12, */ /* Y_OFFSET_shift = 12, */ /* Z_CONV_mask = 0x0f << 16, */ /* Z_CONV_shift = 16, */ /* VGT_GRP_INDEX_16 = 0x00, */ /* VGT_GRP_INDEX_32 = 0x01, */ /* VGT_GRP_UINT_16 = 0x02, */ /* VGT_GRP_UINT_32 = 0x03, */ /* VGT_GRP_SINT_16 = 0x04, */ /* VGT_GRP_SINT_32 = 0x05, */ /* VGT_GRP_FLOAT_32 = 0x06, */ /* VGT_GRP_AUTO_PRIM = 0x07, */ /* VGT_GRP_FIX_1_23_TO_FLOAT = 0x08, */ /* Z_OFFSET_mask = 0x0f << 20, */ /* Z_OFFSET_shift = 20, */ /* W_CONV_mask = 0x0f << 24, */ /* W_CONV_shift = 24, */ /* VGT_GRP_INDEX_16 = 0x00, */ /* VGT_GRP_INDEX_32 = 0x01, */ /* VGT_GRP_UINT_16 = 0x02, */ /* VGT_GRP_UINT_32 = 0x03, */ /* VGT_GRP_SINT_16 = 0x04, */ /* VGT_GRP_SINT_32 = 0x05, */ /* VGT_GRP_FLOAT_32 = 0x06, */ /* VGT_GRP_AUTO_PRIM = 0x07, */ /* VGT_GRP_FIX_1_23_TO_FLOAT = 0x08, */ /* W_OFFSET_mask = 0x0f << 28, */ /* W_OFFSET_shift = 28, */ VGT_GS_MODE = 0x00028a40, VGT_GS_MODE__MODE_mask = 0x03 << 0, VGT_GS_MODE__MODE_shift = 0, GS_OFF = 0x00, GS_SCENARIO_A = 0x01, GS_SCENARIO_B = 0x02, GS_SCENARIO_G = 0x03, GS_SCENARIO_C = 0x04, SPRITE_EN = 0x05, ES_PASSTHRU_bit = 1 << 2, CUT_MODE_mask = 0x03 << 3, CUT_MODE_shift = 3, GS_CUT_1024 = 0x00, GS_CUT_512 = 0x01, GS_CUT_256 = 0x02, GS_CUT_128 = 0x03, MODE_HI_bit = 1 << 8, PA_SC_MODE_CNTL_0 = 0x00028a48, MSAA_ENABLE_bit = 1 << 0, VPORT_SCISSOR_ENABLE_bit = 1 << 1, LINE_STIPPLE_ENABLE_bit = 1 << 2, VGT_ENHANCE = 0x00028a50, VGT_GS_PER_ES = 0x00028a54, GS_PER_ES_mask = 0x7ff << 0, GS_PER_ES_shift = 0, VGT_ES_PER_GS = 0x00028a58, ES_PER_GS_mask = 0x7ff << 0, ES_PER_GS_shift = 0, VGT_GS_PER_VS = 0x00028a5c, GS_PER_VS_mask = 0x0f << 0, GS_PER_VS_shift = 0, VGT_GS_OUT_PRIM_TYPE = 0x00028a6c, OUTPRIM_TYPE_mask = 0x3f << 0, OUTPRIM_TYPE_shift = 0, POINTLIST = 0x00, LINESTRIP = 0x01, TRISTRIP = 0x02, VGT_DMA_SIZE = 0x00028a74, VGT_DMA_MAX_SIZE = 0x00028a78, VGT_DMA_INDEX_TYPE = 0x00028a7c, /* INDEX_TYPE_mask = 0x03 << 0, */ /* INDEX_TYPE_shift = 0, */ VGT_INDEX_16 = 0x00, VGT_INDEX_32 = 0x01, SWAP_MODE_mask = 0x03 << 2, SWAP_MODE_shift = 2, VGT_DMA_SWAP_NONE = 0x00, VGT_DMA_SWAP_16_BIT = 0x01, VGT_DMA_SWAP_32_BIT = 0x02, VGT_DMA_SWAP_WORD = 0x03, VGT_PRIMITIVEID_EN = 0x00028a84, PRIMITIVEID_EN_bit = 1 << 0, VGT_DMA_NUM_INSTANCES = 0x00028a88, VGT_EVENT_INITIATOR = 0x00028a90, EVENT_TYPE_mask = 0x3f << 0, EVENT_TYPE_shift = 0, SAMPLE_STREAMOUTSTATS1 = 0x01, SAMPLE_STREAMOUTSTATS2 = 0x02, SAMPLE_STREAMOUTSTATS3 = 0x03, CACHE_FLUSH_TS = 0x04, CONTEXT_DONE = 0x05, CACHE_FLUSH = 0x06, CS_PARTIAL_FLUSH = 0x07, RST_PIX_CNT = 0x0d, VS_PARTIAL_FLUSH = 0x0f, PS_PARTIAL_FLUSH = 0x10, FLUSH_HS_OUTPUT = 0x11, FLUSH_LS_OUTPUT = 0x12, CACHE_FLUSH_AND_INV_TS_EVENT = 0x14, ZPASS_DONE = 0x15, CACHE_FLUSH_AND_INV_EVENT = 0x16, PERFCOUNTER_START = 0x17, PERFCOUNTER_STOP = 0x18, PIPELINESTAT_START = 0x19, PIPELINESTAT_STOP = 0x1a, PERFCOUNTER_SAMPLE = 0x1b, FLUSH_ES_OUTPUT = 0x1c, FLUSH_GS_OUTPUT = 0x1d, SAMPLE_PIPELINESTAT = 0x1e, SO_VGTSTREAMOUT_FLUSH = 0x1f, SAMPLE_STREAMOUTSTATS = 0x20, RESET_VTX_CNT = 0x21, BLOCK_CONTEXT_DONE = 0x22, CS_CONTEXT_DONE = 0x23, VGT_FLUSH = 0x24, SQ_NON_EVENT = 0x26, SC_SEND_DB_VPZ = 0x27, BOTTOM_OF_PIPE_TS = 0x28, FLUSH_SX_TS = 0x29, DB_CACHE_FLUSH_AND_INV = 0x2a, FLUSH_AND_INV_DB_DATA_TS = 0x2b, FLUSH_AND_INV_DB_META = 0x2c, FLUSH_AND_INV_CB_DATA_TS = 0x2d, FLUSH_AND_INV_CB_META = 0x2e, CS_DONE = 0x2f, PS_DONE = 0x30, FLUSH_AND_INV_CB_PIXEL_DATA = 0x31, ADDRESS_HI_mask = 0xff << 19, ADDRESS_HI_shift = 19, EXTENDED_EVENT_bit = 1 << 27, VGT_MULTI_PRIM_IB_RESET_EN = 0x00028a94, RESET_EN_bit = 1 << 0, VGT_INSTANCE_STEP_RATE_0 = 0x00028aa0, VGT_INSTANCE_STEP_RATE_1 = 0x00028aa4, VGT_REUSE_OFF = 0x00028ab4, REUSE_OFF_bit = 1 << 0, VGT_VTX_CNT_EN = 0x00028ab8, VTX_CNT_EN_bit = 1 << 0, DB_HTILE_SURFACE = 0x00028abc, HTILE_WIDTH_bit = 1 << 0, HTILE_HEIGHT_bit = 1 << 1, LINEAR_bit = 1 << 2, FULL_CACHE_bit = 1 << 3, HTILE_USES_PRELOAD_WIN_bit = 1 << 4, PRELOAD_bit = 1 << 5, PREFETCH_WIDTH_mask = 0x3f << 6, PREFETCH_WIDTH_shift = 6, PREFETCH_HEIGHT_mask = 0x3f << 12, PREFETCH_HEIGHT_shift = 12, DB_SRESULTS_COMPARE_STATE0 = 0x00028ac0, COMPAREFUNC0_mask = 0x07 << 0, COMPAREFUNC0_shift = 0, /* REF_NEVER = 0x00, */ /* REF_LESS = 0x01, */ /* REF_EQUAL = 0x02, */ /* REF_LEQUAL = 0x03, */ /* REF_GREATER = 0x04, */ /* REF_NOTEQUAL = 0x05, */ /* REF_GEQUAL = 0x06, */ /* REF_ALWAYS = 0x07, */ COMPAREVALUE0_mask = 0xff << 4, COMPAREVALUE0_shift = 4, COMPAREMASK0_mask = 0xff << 12, COMPAREMASK0_shift = 12, ENABLE0_bit = 1 << 24, DB_SRESULTS_COMPARE_STATE1 = 0x00028ac4, COMPAREFUNC1_mask = 0x07 << 0, COMPAREFUNC1_shift = 0, /* REF_NEVER = 0x00, */ /* REF_LESS = 0x01, */ /* REF_EQUAL = 0x02, */ /* REF_LEQUAL = 0x03, */ /* REF_GREATER = 0x04, */ /* REF_NOTEQUAL = 0x05, */ /* REF_GEQUAL = 0x06, */ /* REF_ALWAYS = 0x07, */ COMPAREVALUE1_mask = 0xff << 4, COMPAREVALUE1_shift = 4, COMPAREMASK1_mask = 0xff << 12, COMPAREMASK1_shift = 12, ENABLE1_bit = 1 << 24, DB_PRELOAD_CONTROL = 0x00028ac8, START_X_mask = 0xff << 0, START_X_shift = 0, START_Y_mask = 0xff << 8, START_Y_shift = 8, MAX_X_mask = 0xff << 16, MAX_X_shift = 16, MAX_Y_mask = 0xff << 24, MAX_Y_shift = 24, VGT_STRMOUT_BUFFER_SIZE_0 = 0x00028ad0, VGT_STRMOUT_VTX_STRIDE_0 = 0x00028ad4, VGT_STRMOUT_VTX_STRIDE_0__STRIDE_mask = 0x3ff << 0, VGT_STRMOUT_VTX_STRIDE_0__STRIDE_shift = 0, VGT_STRMOUT_BUFFER_BASE_0 = 0x00028ad8, VGT_STRMOUT_BUFFER_OFFSET_0 = 0x00028adc, VGT_STRMOUT_BUFFER_SIZE_1 = 0x00028ae0, VGT_STRMOUT_VTX_STRIDE_1 = 0x00028ae4, VGT_STRMOUT_VTX_STRIDE_1__STRIDE_mask = 0x3ff << 0, VGT_STRMOUT_VTX_STRIDE_1__STRIDE_shift = 0, VGT_STRMOUT_BUFFER_BASE_1 = 0x00028ae8, VGT_STRMOUT_BUFFER_OFFSET_1 = 0x00028aec, VGT_STRMOUT_BUFFER_SIZE_2 = 0x00028af0, VGT_STRMOUT_VTX_STRIDE_2 = 0x00028af4, VGT_STRMOUT_VTX_STRIDE_2__STRIDE_mask = 0x3ff << 0, VGT_STRMOUT_VTX_STRIDE_2__STRIDE_shift = 0, VGT_STRMOUT_BUFFER_BASE_2 = 0x00028af8, VGT_STRMOUT_BUFFER_OFFSET_2 = 0x00028afc, VGT_STRMOUT_BUFFER_SIZE_3 = 0x00028b00, VGT_STRMOUT_VTX_STRIDE_3 = 0x00028b04, VGT_STRMOUT_VTX_STRIDE_3__STRIDE_mask = 0x3ff << 0, VGT_STRMOUT_VTX_STRIDE_3__STRIDE_shift = 0, VGT_STRMOUT_BUFFER_BASE_3 = 0x00028b08, VGT_STRMOUT_BUFFER_OFFSET_3 = 0x00028b0c, VGT_STRMOUT_BASE_OFFSET_0 = 0x00028b10, VGT_STRMOUT_BASE_OFFSET_1 = 0x00028b14, VGT_STRMOUT_BASE_OFFSET_2 = 0x00028b18, VGT_STRMOUT_BASE_OFFSET_3 = 0x00028b1c, VGT_STRMOUT_DRAW_OPAQUE_OFFSET = 0x00028b28, VGT_STRMOUT_DRAW_OPAQUE_BUFFER_FILLED_SIZE = 0x00028b2c, VGT_STRMOUT_DRAW_OPAQUE_VERTEX_STRIDE = 0x00028b30, VERTEX_STRIDE_mask = 0x1ff << 0, VERTEX_STRIDE_shift = 0, VGT_GS_MAX_VERT_OUT = 0x00028b38, MAX_VERT_OUT_mask = 0x7ff << 0, MAX_VERT_OUT_shift = 0, VGT_STRMOUT_BASE_OFFSET_HI_0 = 0x00028b44, VGT_STRMOUT_BASE_OFFSET_HI_0__BASE_OFFSET_mask = 0x3f << 0, VGT_STRMOUT_BASE_OFFSET_HI_0__BASE_OFFSET_shift = 0, VGT_STRMOUT_BASE_OFFSET_HI_1 = 0x00028b48, VGT_STRMOUT_BASE_OFFSET_HI_1__BASE_OFFSET_mask = 0x3f << 0, VGT_STRMOUT_BASE_OFFSET_HI_1__BASE_OFFSET_shift = 0, VGT_STRMOUT_BASE_OFFSET_HI_2 = 0x00028b4c, VGT_STRMOUT_BASE_OFFSET_HI_2__BASE_OFFSET_mask = 0x3f << 0, VGT_STRMOUT_BASE_OFFSET_HI_2__BASE_OFFSET_shift = 0, VGT_STRMOUT_BASE_OFFSET_HI_3 = 0x00028b50, VGT_STRMOUT_BASE_OFFSET_HI_3__BASE_OFFSET_mask = 0x3f << 0, VGT_STRMOUT_BASE_OFFSET_HI_3__BASE_OFFSET_shift = 0, VGT_SHADER_STAGES_EN = 0x00028b54, LS_EN_mask = 0x03 << 0, LS_EN_shift = 0, LS_STAGE_OFF = 0x00, LS_STAGE_ON = 0x01, CS_STAGE_ON = 0x02, HS_EN_bit = 1 << 2, ES_EN_mask = 0x03 << 3, ES_EN_shift = 3, ES_STAGE_OFF = 0x00, ES_STAGE_DS = 0x01, ES_STAGE_REAL = 0x02, GS_EN_bit = 1 << 5, VS_EN_mask = 0x03 << 6, VS_EN_shift = 6, VS_STAGE_REAL = 0x00, VS_STAGE_DS = 0x01, VS_STAGE_COPY_SHADER = 0x02, VGT_LS_HS_CONFIG = 0x00028b58, NUM_PATCHES_mask = 0xff << 0, NUM_PATCHES_shift = 0, HS_NUM_INPUT_CP_mask = 0x3f << 8, HS_NUM_INPUT_CP_shift = 8, HS_NUM_OUTPUT_CP_mask = 0x3f << 14, HS_NUM_OUTPUT_CP_shift = 14, VGT_LS_SIZE = 0x00028b5c, VGT_LS_SIZE__SIZE_mask = 0xff << 0, VGT_LS_SIZE__SIZE_shift = 0, PATCH_CP_SIZE_mask = 0x1fff << 8, PATCH_CP_SIZE_shift = 8, VGT_HS_SIZE = 0x00028b60, VGT_HS_SIZE__SIZE_mask = 0xff << 0, VGT_HS_SIZE__SIZE_shift = 0, /* PATCH_CP_SIZE_mask = 0x1fff << 8, */ /* PATCH_CP_SIZE_shift = 8, */ VGT_LS_HS_ALLOC = 0x00028b64, HS_TOTAL_OUTPUT_mask = 0x1fff << 0, HS_TOTAL_OUTPUT_shift = 0, LS_HS_TOTAL_OUTPUT_mask = 0x1fff << 13, LS_HS_TOTAL_OUTPUT_shift = 13, VGT_HS_PATCH_CONST = 0x00028b68, VGT_HS_PATCH_CONST__SIZE_mask = 0x1fff << 0, VGT_HS_PATCH_CONST__SIZE_shift = 0, VGT_HS_PATCH_CONST__STRIDE_mask = 0x1fff << 13, VGT_HS_PATCH_CONST__STRIDE_shift = 13, DB_ALPHA_TO_MASK = 0x00028b70, ALPHA_TO_MASK_ENABLE_bit = 1 << 0, ALPHA_TO_MASK_OFFSET0_mask = 0x03 << 8, ALPHA_TO_MASK_OFFSET0_shift = 8, ALPHA_TO_MASK_OFFSET1_mask = 0x03 << 10, ALPHA_TO_MASK_OFFSET1_shift = 10, ALPHA_TO_MASK_OFFSET2_mask = 0x03 << 12, ALPHA_TO_MASK_OFFSET2_shift = 12, ALPHA_TO_MASK_OFFSET3_mask = 0x03 << 14, ALPHA_TO_MASK_OFFSET3_shift = 14, OFFSET_ROUND_bit = 1 << 16, PA_SU_POLY_OFFSET_DB_FMT_CNTL = 0x00028b78, POLY_OFFSET_NEG_NUM_DB_BITS_mask = 0xff << 0, POLY_OFFSET_NEG_NUM_DB_BITS_shift = 0, POLY_OFFSET_DB_IS_FLOAT_FMT_bit = 1 << 8, PA_SU_POLY_OFFSET_CLAMP = 0x00028b7c, PA_SU_POLY_OFFSET_FRONT_SCALE = 0x00028b80, PA_SU_POLY_OFFSET_FRONT_OFFSET = 0x00028b84, PA_SU_POLY_OFFSET_BACK_SCALE = 0x00028b88, PA_SU_POLY_OFFSET_BACK_OFFSET = 0x00028b8c, VGT_GS_INSTANCE_CNT = 0x00028b90, VGT_GS_INSTANCE_CNT__ENABLE_bit = 1 << 0, CNT_mask = 0x7f << 2, CNT_shift = 2, VGT_STRMOUT_CONFIG = 0x00028b94, STREAMOUT_0_EN_bit = 1 << 0, STREAMOUT_1_EN_bit = 1 << 1, STREAMOUT_2_EN_bit = 1 << 2, STREAMOUT_3_EN_bit = 1 << 3, RAST_STREAM_mask = 0x07 << 4, RAST_STREAM_shift = 4, VGT_STRMOUT_BUFFER_CONFIG = 0x00028b98, STREAM_0_BUFFER_EN_mask = 0x0f << 0, STREAM_0_BUFFER_EN_shift = 0, STREAM_1_BUFFER_EN_mask = 0x0f << 4, STREAM_1_BUFFER_EN_shift = 4, STREAM_2_BUFFER_EN_mask = 0x0f << 8, STREAM_2_BUFFER_EN_shift = 8, STREAM_3_BUFFER_EN_mask = 0x0f << 12, STREAM_3_BUFFER_EN_shift = 12, CB_IMMED0_BASE = 0x00028b9c, CB_IMMED0_BASE_num = 12, PA_SC_LINE_CNTL = 0x00028c00, EXPAND_LINE_WIDTH_bit = 1 << 9, LAST_PIXEL_bit = 1 << 10, PERPENDICULAR_ENDCAP_ENA_bit = 1 << 11, DX10_DIAMOND_TEST_ENA_bit = 1 << 12, PA_SC_AA_CONFIG = 0x00028c04, MSAA_NUM_SAMPLES_mask = 0x03 << 0, MSAA_NUM_SAMPLES_shift = 0, AA_MASK_CENTROID_DTMN_bit = 1 << 4, MAX_SAMPLE_DIST_mask = 0x0f << 13, MAX_SAMPLE_DIST_shift = 13, PA_SU_VTX_CNTL = 0x00028c08, PIX_CENTER_bit = 1 << 0, PA_SU_VTX_CNTL__ROUND_MODE_mask = 0x03 << 1, PA_SU_VTX_CNTL__ROUND_MODE_shift = 1, X_TRUNCATE = 0x00, X_ROUND = 0x01, X_ROUND_TO_EVEN = 0x02, X_ROUND_TO_ODD = 0x03, QUANT_MODE_mask = 0x07 << 3, QUANT_MODE_shift = 3, X_1_16TH = 0x00, X_1_8TH = 0x01, X_1_4TH = 0x02, X_1_2 = 0x03, X_1 = 0x04, X_1_256TH = 0x05, X_1_1024TH = 0x06, X_1_4096TH = 0x07, PA_CL_GB_VERT_CLIP_ADJ = 0x00028c0c, PA_CL_GB_VERT_DISC_ADJ = 0x00028c10, PA_CL_GB_HORZ_CLIP_ADJ = 0x00028c14, PA_CL_GB_HORZ_DISC_ADJ = 0x00028c18, PA_SC_AA_SAMPLE_LOCS_0 = 0x00028c1c, S0_X_mask = 0x0f << 0, S0_X_shift = 0, S0_Y_mask = 0x0f << 4, S0_Y_shift = 4, S1_X_mask = 0x0f << 8, S1_X_shift = 8, S1_Y_mask = 0x0f << 12, S1_Y_shift = 12, S2_X_mask = 0x0f << 16, S2_X_shift = 16, S2_Y_mask = 0x0f << 20, S2_Y_shift = 20, S3_X_mask = 0x0f << 24, S3_X_shift = 24, S3_Y_mask = 0x0f << 28, S3_Y_shift = 28, PA_SC_AA_SAMPLE_LOCS_1 = 0x00028c20, /* S0_X_mask = 0x0f << 0, */ /* S0_X_shift = 0, */ /* S0_Y_mask = 0x0f << 4, */ /* S0_Y_shift = 4, */ /* S1_X_mask = 0x0f << 8, */ /* S1_X_shift = 8, */ /* S1_Y_mask = 0x0f << 12, */ /* S1_Y_shift = 12, */ /* S2_X_mask = 0x0f << 16, */ /* S2_X_shift = 16, */ /* S2_Y_mask = 0x0f << 20, */ /* S2_Y_shift = 20, */ /* S3_X_mask = 0x0f << 24, */ /* S3_X_shift = 24, */ /* S3_Y_mask = 0x0f << 28, */ /* S3_Y_shift = 28, */ PA_SC_AA_SAMPLE_LOCS_2 = 0x00028c24, /* S0_X_mask = 0x0f << 0, */ /* S0_X_shift = 0, */ /* S0_Y_mask = 0x0f << 4, */ /* S0_Y_shift = 4, */ /* S1_X_mask = 0x0f << 8, */ /* S1_X_shift = 8, */ /* S1_Y_mask = 0x0f << 12, */ /* S1_Y_shift = 12, */ /* S2_X_mask = 0x0f << 16, */ /* S2_X_shift = 16, */ /* S2_Y_mask = 0x0f << 20, */ /* S2_Y_shift = 20, */ /* S3_X_mask = 0x0f << 24, */ /* S3_X_shift = 24, */ /* S3_Y_mask = 0x0f << 28, */ /* S3_Y_shift = 28, */ PA_SC_AA_SAMPLE_LOCS_3 = 0x00028c28, /* S0_X_mask = 0x0f << 0, */ /* S0_X_shift = 0, */ /* S0_Y_mask = 0x0f << 4, */ /* S0_Y_shift = 4, */ /* S1_X_mask = 0x0f << 8, */ /* S1_X_shift = 8, */ /* S1_Y_mask = 0x0f << 12, */ /* S1_Y_shift = 12, */ /* S2_X_mask = 0x0f << 16, */ /* S2_X_shift = 16, */ /* S2_Y_mask = 0x0f << 20, */ /* S2_Y_shift = 20, */ /* S3_X_mask = 0x0f << 24, */ /* S3_X_shift = 24, */ /* S3_Y_mask = 0x0f << 28, */ /* S3_Y_shift = 28, */ PA_SC_AA_SAMPLE_LOCS_4 = 0x00028c2c, /* S0_X_mask = 0x0f << 0, */ /* S0_X_shift = 0, */ /* S0_Y_mask = 0x0f << 4, */ /* S0_Y_shift = 4, */ /* S1_X_mask = 0x0f << 8, */ /* S1_X_shift = 8, */ /* S1_Y_mask = 0x0f << 12, */ /* S1_Y_shift = 12, */ /* S2_X_mask = 0x0f << 16, */ /* S2_X_shift = 16, */ /* S2_Y_mask = 0x0f << 20, */ /* S2_Y_shift = 20, */ /* S3_X_mask = 0x0f << 24, */ /* S3_X_shift = 24, */ /* S3_Y_mask = 0x0f << 28, */ /* S3_Y_shift = 28, */ PA_SC_AA_SAMPLE_LOCS_5 = 0x00028c30, /* S0_X_mask = 0x0f << 0, */ /* S0_X_shift = 0, */ /* S0_Y_mask = 0x0f << 4, */ /* S0_Y_shift = 4, */ /* S1_X_mask = 0x0f << 8, */ /* S1_X_shift = 8, */ /* S1_Y_mask = 0x0f << 12, */ /* S1_Y_shift = 12, */ /* S2_X_mask = 0x0f << 16, */ /* S2_X_shift = 16, */ /* S2_Y_mask = 0x0f << 20, */ /* S2_Y_shift = 20, */ /* S3_X_mask = 0x0f << 24, */ /* S3_X_shift = 24, */ /* S3_Y_mask = 0x0f << 28, */ /* S3_Y_shift = 28, */ PA_SC_AA_SAMPLE_LOCS_6 = 0x00028c34, /* S0_X_mask = 0x0f << 0, */ /* S0_X_shift = 0, */ /* S0_Y_mask = 0x0f << 4, */ /* S0_Y_shift = 4, */ /* S1_X_mask = 0x0f << 8, */ /* S1_X_shift = 8, */ /* S1_Y_mask = 0x0f << 12, */ /* S1_Y_shift = 12, */ /* S2_X_mask = 0x0f << 16, */ /* S2_X_shift = 16, */ /* S2_Y_mask = 0x0f << 20, */ /* S2_Y_shift = 20, */ /* S3_X_mask = 0x0f << 24, */ /* S3_X_shift = 24, */ /* S3_Y_mask = 0x0f << 28, */ /* S3_Y_shift = 28, */ PA_SC_AA_SAMPLE_LOCS_7 = 0x00028c38, /* S0_X_mask = 0x0f << 0, */ /* S0_X_shift = 0, */ /* S0_Y_mask = 0x0f << 4, */ /* S0_Y_shift = 4, */ /* S1_X_mask = 0x0f << 8, */ /* S1_X_shift = 8, */ /* S1_Y_mask = 0x0f << 12, */ /* S1_Y_shift = 12, */ /* S2_X_mask = 0x0f << 16, */ /* S2_X_shift = 16, */ /* S2_Y_mask = 0x0f << 20, */ /* S2_Y_shift = 20, */ /* S3_X_mask = 0x0f << 24, */ /* S3_X_shift = 24, */ /* S3_Y_mask = 0x0f << 28, */ /* S3_Y_shift = 28, */ PA_SC_AA_MASK = 0x00028c3c, VGT_VERTEX_REUSE_BLOCK_CNTL = 0x00028c58, VTX_REUSE_DEPTH_mask = 0xff << 0, VTX_REUSE_DEPTH_shift = 0, VGT_OUT_DEALLOC_CNTL = 0x00028c5c, DEALLOC_DIST_mask = 0x7f << 0, DEALLOC_DIST_shift = 0, CB_COLOR0_BASE = 0x00028c60, CB_COLOR0_BASE_num = 12, CB_COLOR0_BASE_offset = 51, CB_COLOR0_PITCH = 0x00028c64, CB_COLOR0_PITCH_num = 12, CB_COLOR0_PITCH_offset = 51, CB_COLOR0_PITCH__TILE_MAX_mask = 0x7ff << 0, CB_COLOR0_PITCH__TILE_MAX_shift = 0, CB_COLOR0_SLICE = 0x00028c68, CB_COLOR0_SLICE_num = 12, CB_COLOR0_SLICE_offset = 51, CB_COLOR0_SLICE__TILE_MAX_mask = 0x3fffff << 0, CB_COLOR0_SLICE__TILE_MAX_shift = 0, CB_COLOR0_VIEW = 0x00028c6c, CB_COLOR0_VIEW_num = 12, CB_COLOR0_VIEW_offset = 51, /* SLICE_START_mask = 0x7ff << 0, */ /* SLICE_START_shift = 0, */ /* SLICE_MAX_mask = 0x7ff << 13, */ /* SLICE_MAX_shift = 13, */ CB_COLOR0_INFO = 0x00028c70, CB_COLOR0_INFO_num = 12, CB_COLOR0_INFO_offset = 51, ENDIAN_mask = 0x03 << 0, ENDIAN_shift = 0, ENDIAN_NONE = 0x00, ENDIAN_8IN16 = 0x01, ENDIAN_8IN32 = 0x02, ENDIAN_8IN64 = 0x03, CB_COLOR0_INFO__FORMAT_mask = 0x3f << 2, CB_COLOR0_INFO__FORMAT_shift = 2, COLOR_INVALID = 0x00, COLOR_8 = 0x01, COLOR_16 = 0x05, COLOR_16_FLOAT = 0x06, COLOR_8_8 = 0x07, COLOR_5_6_5 = 0x08, COLOR_1_5_5_5 = 0x0a, COLOR_4_4_4_4 = 0x0b, COLOR_5_5_5_1 = 0x0c, COLOR_32 = 0x0d, COLOR_32_FLOAT = 0x0e, COLOR_16_16 = 0x0f, COLOR_16_16_FLOAT = 0x10, COLOR_8_24 = 0x11, COLOR_24_8 = 0x13, COLOR_10_11_11 = 0x15, COLOR_10_11_11_FLOAT = 0x16, COLOR_2_10_10_10 = 0x19, COLOR_8_8_8_8 = 0x1a, COLOR_10_10_10_2 = 0x1b, COLOR_X24_8_32_FLOAT = 0x1c, COLOR_32_32 = 0x1d, COLOR_32_32_FLOAT = 0x1e, COLOR_16_16_16_16 = 0x1f, COLOR_16_16_16_16_FLOAT = 0x20, COLOR_32_32_32_32 = 0x22, COLOR_32_32_32_32_FLOAT = 0x23, CB_COLOR0_INFO__ARRAY_MODE_mask = 0x0f << 8, CB_COLOR0_INFO__ARRAY_MODE_shift = 8, /* ARRAY_LINEAR_GENERAL = 0x00, */ /* ARRAY_LINEAR_ALIGNED = 0x01, */ /* ARRAY_1D_TILED_THIN1 = 0x02, */ /* ARRAY_2D_TILED_THIN1 = 0x04, */ NUMBER_TYPE_mask = 0x07 << 12, NUMBER_TYPE_shift = 12, NUMBER_UNORM = 0x00, NUMBER_SNORM = 0x01, NUMBER_UINT = 0x04, NUMBER_SINT = 0x05, NUMBER_SRGB = 0x06, NUMBER_FLOAT = 0x07, COMP_SWAP_mask = 0x03 << 15, COMP_SWAP_shift = 15, SWAP_STD = 0x00, SWAP_ALT = 0x01, SWAP_STD_REV = 0x02, SWAP_ALT_REV = 0x03, FAST_CLEAR_bit = 1 << 17, COMPRESSION_bit = 1 << 18, BLEND_CLAMP_bit = 1 << 19, BLEND_BYPASS_bit = 1 << 20, SIMPLE_FLOAT_bit = 1 << 21, CB_COLOR0_INFO__ROUND_MODE_bit = 1 << 22, CB_COLOR0_INFO__TILE_COMPACT_bit = 1 << 23, SOURCE_FORMAT_mask = 0x03 << 24, SOURCE_FORMAT_shift = 24, EXPORT_4C_32BPC = 0x00, EXPORT_4C_16BPC = 0x01, RAT_bit = 1 << 26, RESOURCE_TYPE_mask = 0x07 << 27, RESOURCE_TYPE_shift = 27, BUFFER = 0x00, TEXTURE1D = 0x01, TEXTURE1DARRAY = 0x02, TEXTURE2D = 0x03, TEXTURE2DARRAY = 0x04, TEXTURE3D = 0x05, CB_COLOR0_ATTRIB = 0x00028c74, CB_COLOR0_ATTRIB_num = 12, CB_COLOR0_ATTRIB_offset = 51, IGNORE_SHADER_ENGINE_TILING_bit = 1 << 3, CB_COLOR0_ATTRIB__NON_DISP_TILING_ORDER_bit = 1 << 4, CB_COLOR0_ATTRIB__TILE_SPLIT_mask = 0x0f << 5, CB_COLOR0_ATTRIB__TILE_SPLIT_shift = 5, /* ADDR_SURF_TILE_SPLIT_64B = 0x00, */ /* ADDR_SURF_TILE_SPLIT_128B = 0x01, */ /* ADDR_SURF_TILE_SPLIT_256B = 0x02, */ /* ADDR_SURF_TILE_SPLIT_512B = 0x03, */ /* ADDR_SURF_TILE_SPLIT_1KB = 0x04, */ /* ADDR_SURF_TILE_SPLIT_2KB = 0x05, */ /* ADDR_SURF_TILE_SPLIT_4KB = 0x06, */ CB_COLOR0_ATTRIB__NUM_BANKS_mask = 0x03 << 10, CB_COLOR0_ATTRIB__NUM_BANKS_shift = 10, /* ADDR_SURF_2_BANK = 0x00, */ /* ADDR_SURF_4_BANK = 0x01, */ /* ADDR_SURF_8_BANK = 0x02, */ /* ADDR_SURF_16_BANK = 0x03, */ CB_COLOR0_ATTRIB__BANK_WIDTH_mask = 0x03 << 13, CB_COLOR0_ATTRIB__BANK_WIDTH_shift = 13, /* ADDR_SURF_BANK_WIDTH_1 = 0x00, */ /* ADDR_SURF_BANK_WIDTH_2 = 0x01, */ /* ADDR_SURF_BANK_WIDTH_4 = 0x02, */ /* ADDR_SURF_BANK_WIDTH_8 = 0x03, */ CB_COLOR0_ATTRIB__BANK_HEIGHT_mask = 0x03 << 16, CB_COLOR0_ATTRIB__BANK_HEIGHT_shift = 16, /* ADDR_SURF_BANK_HEIGHT_1 = 0x00, */ /* ADDR_SURF_BANK_HEIGHT_2 = 0x01, */ /* ADDR_SURF_BANK_HEIGHT_4 = 0x02, */ /* ADDR_SURF_BANK_HEIGHT_8 = 0x03, */ CB_COLOR0_ATTRIB__MACRO_TILE_ASPECT_mask = 0x03 << 19, CB_COLOR0_ATTRIB__MACRO_TILE_ASPECT_shift = 19, /* ADDR_SURF_MACRO_ASPECT_1 = 0x00, */ /* ADDR_SURF_MACRO_ASPECT_2 = 0x01, */ /* ADDR_SURF_MACRO_ASPECT_4 = 0x02, */ /* ADDR_SURF_MACRO_ASPECT_8 = 0x03, */ FMASK_BANK_HEIGHT_mask = 0x03 << 22, FMASK_BANK_HEIGHT_shift = 22, /* ADDR_SURF_BANK_HEIGHT_1 = 0x00, */ /* ADDR_SURF_BANK_HEIGHT_2 = 0x01, */ /* ADDR_SURF_BANK_HEIGHT_4 = 0x02, */ /* ADDR_SURF_BANK_HEIGHT_8 = 0x03, */ CB_COLOR0_DIM = 0x00028c78, CB_COLOR0_DIM_num = 12, CB_COLOR0_DIM_offset = 51, WIDTH_MAX_mask = 0xffff << 0, WIDTH_MAX_shift = 0, HEIGHT_MAX_mask = 0xffff << 16, HEIGHT_MAX_shift = 16, CB_COLOR0_CMASK = 0x00028c7c, CB_COLOR0_CMASK_num = 8, CB_COLOR0_CMASK_offset = 60, CB_COLOR0_CMASK_SLICE = 0x00028c80, CB_COLOR0_CMASK_SLICE_num = 8, CB_COLOR0_CMASK_SLICE_offset = 60, CB_COLOR0_CMASK_SLICE__TILE_MAX_mask = 0x3fff << 0, CB_COLOR0_CMASK_SLICE__TILE_MAX_shift = 0, CB_COLOR0_FMASK = 0x00028c84, CB_COLOR0_FMASK_num = 8, CB_COLOR0_FMASK_offset = 60, CB_COLOR0_FMASK_SLICE = 0x00028c88, CB_COLOR0_FMASK_SLICE_num = 8, CB_COLOR0_FMASK_SLICE_offset = 60, CB_COLOR0_FMASK_SLICE__TILE_MAX_mask = 0x3fffff << 0, CB_COLOR0_FMASK_SLICE__TILE_MAX_shift = 0, CB_COLOR0_CLEAR_WORD0 = 0x00028c8c, CB_COLOR0_CLEAR_WORD0_num = 8, CB_COLOR0_CLEAR_WORD0_offset = 60, CB_COLOR0_CLEAR_WORD1 = 0x00028c90, CB_COLOR0_CLEAR_WORD1_num = 8, CB_COLOR0_CLEAR_WORD1_offset = 60, CB_COLOR0_CLEAR_WORD2 = 0x00028c94, CB_COLOR0_CLEAR_WORD2_num = 8, CB_COLOR0_CLEAR_WORD2_offset = 60, CB_COLOR0_CLEAR_WORD3 = 0x00028c98, CB_COLOR0_CLEAR_WORD3_num = 8, CB_COLOR0_CLEAR_WORD3_offset = 60, SQ_ALU_CONST_CACHE_HS_0 = 0x00028f00, SQ_ALU_CONST_CACHE_HS_0_num = 16, SQ_ALU_CONST_CACHE_LS_0 = 0x00028f40, SQ_ALU_CONST_CACHE_LS_0_num = 16, SQ_ALU_CONST_BUFFER_SIZE_HS_0 = 0x00028f80, SQ_ALU_CONST_BUFFER_SIZE_HS_0_num = 16, SQ_ALU_CONST_BUFFER_SIZE_HS_0__DATA_mask = 0x1ff << 0, SQ_ALU_CONST_BUFFER_SIZE_HS_0__DATA_shift = 0, SQ_ALU_CONST_BUFFER_SIZE_LS_0 = 0x00028fc0, SQ_ALU_CONST_BUFFER_SIZE_LS_0_num = 16, SQ_ALU_CONST_BUFFER_SIZE_LS_0__DATA_mask = 0x1ff << 0, SQ_ALU_CONST_BUFFER_SIZE_LS_0__DATA_shift = 0, SQ_VTX_CONSTANT_WORD0_0 = 0x00030000, SQ_TEX_RESOURCE_WORD0_0 = 0x00030000, DIM_mask = 0x07 << 0, DIM_shift = 0, SQ_TEX_DIM_1D = 0x00, SQ_TEX_DIM_2D = 0x01, SQ_TEX_DIM_3D = 0x02, SQ_TEX_DIM_CUBEMAP = 0x03, SQ_TEX_DIM_1D_ARRAY = 0x04, SQ_TEX_DIM_2D_ARRAY = 0x05, SQ_TEX_DIM_2D_MSAA = 0x06, SQ_TEX_DIM_2D_ARRAY_MSAA = 0x07, /* IGNORE_SHADER_ENGINE_TILING_bit = 1 << 3, */ SQ_TEX_RESOURCE_WORD0_0__NON_DISP_TILING_ORDER_bit= 1 << 5, PITCH_mask = 0xfff << 6, PITCH_shift = 6, TEX_WIDTH_mask = 0x3fff << 18, TEX_WIDTH_shift = 18, SQ_VTX_CONSTANT_WORD1_0 = 0x00030004, SQ_TEX_RESOURCE_WORD1_0 = 0x00030004, TEX_HEIGHT_mask = 0x3fff << 0, TEX_HEIGHT_shift = 0, TEX_DEPTH_mask = 0x1fff << 14, TEX_DEPTH_shift = 14, SQ_TEX_RESOURCE_WORD1_0__ARRAY_MODE_mask = 0x0f << 28, SQ_TEX_RESOURCE_WORD1_0__ARRAY_MODE_shift = 28, SQ_VTX_CONSTANT_WORD2_0 = 0x00030008, BASE_ADDRESS_HI_mask = 0xff << 0, BASE_ADDRESS_HI_shift = 0, SQ_VTX_CONSTANT_WORD2_0__STRIDE_mask = 0x7ff << 8, SQ_VTX_CONSTANT_WORD2_0__STRIDE_shift = 8, SQ_VTX_CONSTANT_WORD2_0__CLAMP_X_bit = 1 << 19, SQ_VTX_CONSTANT_WORD2_0__DATA_FORMAT_mask = 0x3f << 20, SQ_VTX_CONSTANT_WORD2_0__DATA_FORMAT_shift = 20, SQ_VTX_CONSTANT_WORD2_0__NUM_FORMAT_ALL_mask = 0x03 << 26, SQ_VTX_CONSTANT_WORD2_0__NUM_FORMAT_ALL_shift = 26, /* SQ_NUM_FORMAT_NORM = 0x00, */ /* SQ_NUM_FORMAT_INT = 0x01, */ /* SQ_NUM_FORMAT_SCALED = 0x02, */ SQ_VTX_CONSTANT_WORD2_0__FORMAT_COMP_ALL_bit = 1 << 28, SQ_VTX_CONSTANT_WORD2_0__SRF_MODE_ALL_bit = 1 << 29, SQ_VTX_CONSTANT_WORD2_0__ENDIAN_SWAP_mask = 0x03 << 30, SQ_VTX_CONSTANT_WORD2_0__ENDIAN_SWAP_shift = 30, /* SQ_ENDIAN_NONE = 0x00, */ /* SQ_ENDIAN_8IN16 = 0x01, */ /* SQ_ENDIAN_8IN32 = 0x02, */ SQ_TEX_RESOURCE_WORD2_0 = 0x00030008, SQ_VTX_CONSTANT_WORD3_0 = 0x0003000c, SQ_VTX_CONSTANT_WORD3_0__UNCACHED_bit = 1 << 2, SQ_VTX_CONSTANT_WORD3_0__DST_SEL_X_mask = 0x07 << 3, SQ_VTX_CONSTANT_WORD3_0__DST_SEL_X_shift = 3, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_VTX_CONSTANT_WORD3_0__DST_SEL_Y_mask = 0x07 << 6, SQ_VTX_CONSTANT_WORD3_0__DST_SEL_Y_shift = 6, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_VTX_CONSTANT_WORD3_0__DST_SEL_Z_mask = 0x07 << 9, SQ_VTX_CONSTANT_WORD3_0__DST_SEL_Z_shift = 9, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_VTX_CONSTANT_WORD3_0__DST_SEL_W_mask = 0x07 << 12, SQ_VTX_CONSTANT_WORD3_0__DST_SEL_W_shift = 12, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_TEX_RESOURCE_WORD3_0 = 0x0003000c, SQ_TEX_RESOURCE_WORD4_0 = 0x00030010, FORMAT_COMP_X_mask = 0x03 << 0, FORMAT_COMP_X_shift = 0, SQ_FORMAT_COMP_UNSIGNED = 0x00, SQ_FORMAT_COMP_SIGNED = 0x01, SQ_FORMAT_COMP_UNSIGNED_BIASED = 0x02, FORMAT_COMP_Y_mask = 0x03 << 2, FORMAT_COMP_Y_shift = 2, /* SQ_FORMAT_COMP_UNSIGNED = 0x00, */ /* SQ_FORMAT_COMP_SIGNED = 0x01, */ /* SQ_FORMAT_COMP_UNSIGNED_BIASED = 0x02, */ FORMAT_COMP_Z_mask = 0x03 << 4, FORMAT_COMP_Z_shift = 4, /* SQ_FORMAT_COMP_UNSIGNED = 0x00, */ /* SQ_FORMAT_COMP_SIGNED = 0x01, */ /* SQ_FORMAT_COMP_UNSIGNED_BIASED = 0x02, */ FORMAT_COMP_W_mask = 0x03 << 6, FORMAT_COMP_W_shift = 6, /* SQ_FORMAT_COMP_UNSIGNED = 0x00, */ /* SQ_FORMAT_COMP_SIGNED = 0x01, */ /* SQ_FORMAT_COMP_UNSIGNED_BIASED = 0x02, */ SQ_TEX_RESOURCE_WORD4_0__NUM_FORMAT_ALL_mask = 0x03 << 8, SQ_TEX_RESOURCE_WORD4_0__NUM_FORMAT_ALL_shift = 8, /* SQ_NUM_FORMAT_NORM = 0x00, */ /* SQ_NUM_FORMAT_INT = 0x01, */ /* SQ_NUM_FORMAT_SCALED = 0x02, */ SQ_TEX_RESOURCE_WORD4_0__SRF_MODE_ALL_bit = 1 << 10, SQ_TEX_RESOURCE_WORD4_0__FORCE_DEGAMMA_bit = 1 << 11, SQ_TEX_RESOURCE_WORD4_0__ENDIAN_SWAP_mask = 0x03 << 12, SQ_TEX_RESOURCE_WORD4_0__ENDIAN_SWAP_shift = 12, /* SQ_ENDIAN_NONE = 0x00, */ /* SQ_ENDIAN_8IN16 = 0x01, */ /* SQ_ENDIAN_8IN32 = 0x02, */ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask = 0x07 << 16, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift = 16, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask = 0x07 << 19, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift = 19, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask = 0x07 << 22, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift = 22, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask = 0x07 << 25, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift = 25, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ BASE_LEVEL_mask = 0x0f << 28, BASE_LEVEL_shift = 28, SQ_VTX_CONSTANT_WORD4_0 = 0x00030010, SQ_TEX_RESOURCE_WORD5_0 = 0x00030014, LAST_LEVEL_mask = 0x0f << 0, LAST_LEVEL_shift = 0, BASE_ARRAY_mask = 0x1fff << 4, BASE_ARRAY_shift = 4, LAST_ARRAY_mask = 0x1fff << 17, LAST_ARRAY_shift = 17, SQ_TEX_RESOURCE_WORD6_0 = 0x00030018, PERF_MODULATION_mask = 0x07 << 3, PERF_MODULATION_shift = 3, INTERLACED_bit = 1 << 6, SQ_TEX_RESOURCE_WORD6_0__MIN_LOD_mask = 0xfff << 8, SQ_TEX_RESOURCE_WORD6_0__MIN_LOD_shift = 8, SQ_TEX_RESOURCE_WORD6_0__TILE_SPLIT_mask = 0x07 << 29, SQ_TEX_RESOURCE_WORD6_0__TILE_SPLIT_shift = 29, SQ_ADDR_SURF_TILE_SPLIT_64B = 0x00, SQ_ADDR_SURF_TILE_SPLIT_128B = 0x01, SQ_ADDR_SURF_TILE_SPLIT_256B = 0x02, SQ_ADDR_SURF_TILE_SPLIT_512B = 0x03, SQ_ADDR_SURF_TILE_SPLIT_1KB = 0x04, SQ_ADDR_SURF_TILE_SPLIT_2KB = 0x05, SQ_ADDR_SURF_TILE_SPLIT_4KB = 0x06, SQ_VTX_CONSTANT_WORD7_0 = 0x0003001c, SQ_VTX_CONSTANT_WORD7_0__TYPE_mask = 0x03 << 30, SQ_VTX_CONSTANT_WORD7_0__TYPE_shift = 30, SQ_TEX_VTX_INVALID_TEXTURE = 0x00, SQ_TEX_VTX_INVALID_BUFFER = 0x01, SQ_TEX_VTX_VALID_TEXTURE = 0x02, SQ_TEX_VTX_VALID_BUFFER = 0x03, SQ_TEX_RESOURCE_WORD7_0 = 0x0003001c, SQ_TEX_RESOURCE_WORD7_0__DATA_FORMAT_mask = 0x3f << 0, SQ_TEX_RESOURCE_WORD7_0__DATA_FORMAT_shift = 0, SQ_TEX_RESOURCE_WORD7_0__MACRO_TILE_ASPECT_mask = 0x03 << 6, SQ_TEX_RESOURCE_WORD7_0__MACRO_TILE_ASPECT_shift = 6, SQ_ADDR_SURF_MACRO_ASPECT_1 = 0x00, SQ_ADDR_SURF_MACRO_ASPECT_2 = 0x01, SQ_ADDR_SURF_MACRO_ASPECT_4 = 0x02, SQ_ADDR_SURF_MACRO_ASPECT_8 = 0x03, SQ_TEX_RESOURCE_WORD7_0__BANK_WIDTH_mask = 0x03 << 8, SQ_TEX_RESOURCE_WORD7_0__BANK_WIDTH_shift = 8, SQ_ADDR_SURF_BANK_WH_1 = 0x00, SQ_ADDR_SURF_BANK_WH_2 = 0x01, SQ_ADDR_SURF_BANK_WH_4 = 0x02, SQ_ADDR_SURF_BANK_WH_8 = 0x03, SQ_TEX_RESOURCE_WORD7_0__BANK_HEIGHT_mask = 0x03 << 10, SQ_TEX_RESOURCE_WORD7_0__BANK_HEIGHT_shift = 10, /* SQ_ADDR_SURF_BANK_WH_1 = 0x00, */ /* SQ_ADDR_SURF_BANK_WH_2 = 0x01, */ /* SQ_ADDR_SURF_BANK_WH_4 = 0x02, */ /* SQ_ADDR_SURF_BANK_WH_8 = 0x03, */ DEPTH_SAMPLE_ORDER_bit = 1 << 15, SQ_TEX_RESOURCE_WORD7_0__NUM_BANKS_mask = 0x03 << 16, SQ_TEX_RESOURCE_WORD7_0__NUM_BANKS_shift = 16, SQ_ADDR_SURF_2_BANK = 0x00, SQ_ADDR_SURF_4_BANK = 0x01, SQ_ADDR_SURF_8_BANK = 0x02, SQ_ADDR_SURF_16_BANK = 0x03, SQ_TEX_RESOURCE_WORD7_0__TYPE_mask = 0x03 << 30, SQ_TEX_RESOURCE_WORD7_0__TYPE_shift = 30, /* SQ_TEX_VTX_INVALID_TEXTURE = 0x00, */ /* SQ_TEX_VTX_INVALID_BUFFER = 0x01, */ /* SQ_TEX_VTX_VALID_TEXTURE = 0x02, */ /* SQ_TEX_VTX_VALID_BUFFER = 0x03, */ SQ_LOOP_CONST_DX10_0 = 0x0003a200, SQ_LOOP_CONST_0 = 0x0003a200, SQ_LOOP_CONST_0__COUNT_mask = 0xfff << 0, SQ_LOOP_CONST_0__COUNT_shift = 0, INIT_mask = 0xfff << 12, INIT_shift = 12, INC_mask = 0xff << 24, INC_shift = 24, SQ_JUMPTABLE_CONST_0 = 0x0003a200, CONST_A_mask = 0xff << 0, CONST_A_shift = 0, CONST_B_mask = 0xff << 8, CONST_B_shift = 8, CONST_C_mask = 0xff << 16, CONST_C_shift = 16, CONST_D_mask = 0xff << 24, CONST_D_shift = 24, SQ_BOOL_CONST_0 = 0x0003a500, SQ_BOOL_CONST_0_num = 6, SQ_TEX_SAMPLER_WORD0_0 = 0x0003c000, SQ_TEX_SAMPLER_WORD0_0__CLAMP_X_mask = 0x07 << 0, SQ_TEX_SAMPLER_WORD0_0__CLAMP_X_shift = 0, SQ_TEX_WRAP = 0x00, SQ_TEX_MIRROR = 0x01, SQ_TEX_CLAMP_LAST_TEXEL = 0x02, SQ_TEX_MIRROR_ONCE_LAST_TEXEL = 0x03, SQ_TEX_CLAMP_HALF_BORDER = 0x04, SQ_TEX_MIRROR_ONCE_HALF_BORDER = 0x05, SQ_TEX_CLAMP_BORDER = 0x06, SQ_TEX_MIRROR_ONCE_BORDER = 0x07, CLAMP_Y_mask = 0x07 << 3, CLAMP_Y_shift = 3, /* SQ_TEX_WRAP = 0x00, */ /* SQ_TEX_MIRROR = 0x01, */ /* SQ_TEX_CLAMP_LAST_TEXEL = 0x02, */ /* SQ_TEX_MIRROR_ONCE_LAST_TEXEL = 0x03, */ /* SQ_TEX_CLAMP_HALF_BORDER = 0x04, */ /* SQ_TEX_MIRROR_ONCE_HALF_BORDER = 0x05, */ /* SQ_TEX_CLAMP_BORDER = 0x06, */ /* SQ_TEX_MIRROR_ONCE_BORDER = 0x07, */ CLAMP_Z_mask = 0x07 << 6, CLAMP_Z_shift = 6, /* SQ_TEX_WRAP = 0x00, */ /* SQ_TEX_MIRROR = 0x01, */ /* SQ_TEX_CLAMP_LAST_TEXEL = 0x02, */ /* SQ_TEX_MIRROR_ONCE_LAST_TEXEL = 0x03, */ /* SQ_TEX_CLAMP_HALF_BORDER = 0x04, */ /* SQ_TEX_MIRROR_ONCE_HALF_BORDER = 0x05, */ /* SQ_TEX_CLAMP_BORDER = 0x06, */ /* SQ_TEX_MIRROR_ONCE_BORDER = 0x07, */ XY_MAG_FILTER_mask = 0x03 << 9, XY_MAG_FILTER_shift = 9, SQ_TEX_XY_FILTER_POINT = 0x00, SQ_TEX_XY_FILTER_BILINEAR = 0x01, XY_MIN_FILTER_mask = 0x03 << 11, XY_MIN_FILTER_shift = 11, /* SQ_TEX_XY_FILTER_POINT = 0x00, */ /* SQ_TEX_XY_FILTER_BILINEAR = 0x01, */ Z_FILTER_mask = 0x03 << 13, Z_FILTER_shift = 13, SQ_TEX_Z_FILTER_NONE = 0x00, SQ_TEX_Z_FILTER_POINT = 0x01, SQ_TEX_Z_FILTER_LINEAR = 0x02, MIP_FILTER_mask = 0x03 << 15, MIP_FILTER_shift = 15, /* SQ_TEX_Z_FILTER_NONE = 0x00, */ /* SQ_TEX_Z_FILTER_POINT = 0x01, */ /* SQ_TEX_Z_FILTER_LINEAR = 0x02, */ BORDER_COLOR_TYPE_mask = 0x03 << 20, BORDER_COLOR_TYPE_shift = 20, SQ_TEX_BORDER_COLOR_TRANS_BLACK = 0x00, SQ_TEX_BORDER_COLOR_OPAQUE_BLACK = 0x01, SQ_TEX_BORDER_COLOR_OPAQUE_WHITE = 0x02, SQ_TEX_BORDER_COLOR_REGISTER = 0x03, DEPTH_COMPARE_FUNCTION_mask = 0x07 << 22, DEPTH_COMPARE_FUNCTION_shift = 22, SQ_TEX_DEPTH_COMPARE_NEVER = 0x00, SQ_TEX_DEPTH_COMPARE_LESS = 0x01, SQ_TEX_DEPTH_COMPARE_EQUAL = 0x02, SQ_TEX_DEPTH_COMPARE_LESSEQUAL = 0x03, SQ_TEX_DEPTH_COMPARE_GREATER = 0x04, SQ_TEX_DEPTH_COMPARE_NOTEQUAL = 0x05, SQ_TEX_DEPTH_COMPARE_GREATEREQUAL = 0x06, SQ_TEX_DEPTH_COMPARE_ALWAYS = 0x07, CHROMA_KEY_mask = 0x03 << 25, CHROMA_KEY_shift = 25, SQ_TEX_CHROMA_KEY_DISABLED = 0x00, SQ_TEX_CHROMA_KEY_KILL = 0x01, SQ_TEX_CHROMA_KEY_BLEND = 0x02, SQ_TEX_SAMPLER_WORD1_0 = 0x0003c004, SQ_TEX_SAMPLER_WORD1_0__MIN_LOD_mask = 0xfff << 0, SQ_TEX_SAMPLER_WORD1_0__MIN_LOD_shift = 0, MAX_LOD_mask = 0xfff << 12, MAX_LOD_shift = 12, PERF_MIP_mask = 0x0f << 24, PERF_MIP_shift = 24, PERF_Z_mask = 0x0f << 28, PERF_Z_shift = 28, SQ_TEX_SAMPLER_WORD2_0 = 0x0003c008, SQ_TEX_SAMPLER_WORD2_0__LOD_BIAS_mask = 0x3fff << 0, SQ_TEX_SAMPLER_WORD2_0__LOD_BIAS_shift = 0, LOD_BIAS_SEC_mask = 0x3f << 14, LOD_BIAS_SEC_shift = 14, MC_COORD_TRUNCATE_bit = 1 << 20, SQ_TEX_SAMPLER_WORD2_0__FORCE_DEGAMMA_bit = 1 << 21, TRUNCATE_COORD_bit = 1 << 28, SQ_TEX_SAMPLER_WORD2_0__DISABLE_CUBE_WRAP_bit = 1 << 29, SQ_TEX_SAMPLER_WORD2_0__TYPE_bit = 1 << 31, SQ_VTX_BASE_VTX_LOC = 0x0003cff0, SQ_VTX_START_INST_LOC = 0x0003cff4, SQ_TEX_SAMPLER_CLEAR = 0x0003ff00, SQ_TEX_RESOURCE_CLEAR = 0x0003ff04, SQ_LOOP_BOOL_CLEAR = 0x0003ff08, } ; #endif /* _EVERGREEN_REG_AUTO_H */ xf86-video-ati-7.3.0/src/r600_shader.h0000664000175000017500000003435212177731114014106 00000000000000/* * RadeonHD R6xx, R7xx DRI driver * * Copyright (C) 2008-2009 Alexander Deucher * Copyright (C) 2008-2009 Matthias Hopf * * 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 * BRIAN PAUL 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. */ /* * Shader macros */ #ifndef __SHADER_H__ #define __SHADER_H__ #include "radeon.h" /* Restrictions of ALU instructions * order of scalar ops is always x,y,z,w,t(rans), last to be indicated by last==1. * max of 3 different src GPRs per instr. * max of 4 different cfile constant components per instr. * max of 2 (different) constants (any type) for t. * bank swizzle (see below). * GPR write stalls read of same register. Auto-replaced by PV/PS, NOP needed if registers are relative to * different indices (gpr,loop,nothing). * may use constant registers or constant cache, but not both. */ /* Bank_swizzle: (pp. 297ff) * Only one of each x,y,z,w GPR component can be loaded per cycle (3 cycles per instr, called 0-2). * per scalar instruction bank_swizzle can select which cycle each operand comes from. e.g.: * SRC0 SRC1 SRC2 SWIZZLE cycle0 cycle1 cycle2 * 1.x 2.x 012 1.x 2.x - * 3.x 1.y 201 1.y - 3.x * 2.x 1.y 102 (1.y) (2.x) - * If data is read in a cycle, multiple scalar instructions can reference it. * Special case: square() - i.e. same component in src0+src1 doesn't need read port -> ignores swizzle for src1. * No restrictions for constants or PV/PS. * t can load multiple components in a single cycle slot, but has to share cycles with xyzw. * t with single constant may not load GPRs or PV/PS in cycle 0 (carefull with ALU_TRANS_210). * t with two constants may only load GPRs or PV/PS in cycle 2. */ /* Oder of instructions: All CF, All ALU, All Tex/Vtx fetches */ // CF insts // addr #define ADDR(x) (x) // pc #define POP_COUNT(x) (x) // const #define CF_CONST(x) (x) // cond #define COND(x) (x) // SQ_COND_* // count #define I_COUNT(x) ((x) ? ((x) - 1) : 0) //r7xx #define COUNT_3(x) (x) // call count #define CALL_COUNT(x) (x) // eop #define END_OF_PROGRAM(x) (x) // vpm #define VALID_PIXEL_MODE(x) (x) // cf inst #define CF_INST(x) (x) // SQ_CF_INST_* // wqm #define WHOLE_QUAD_MODE(x) (x) // barrier #define BARRIER(x) (x) //kb0 #define KCACHE_BANK0(x) (x) //kb1 #define KCACHE_BANK1(x) (x) // km0/1 #define KCACHE_MODE0(x) (x) #define KCACHE_MODE1(x) (x) // SQ_CF_KCACHE_* // #define KCACHE_ADDR0(x) (x) #define KCACHE_ADDR1(x) (x) // uw #define USES_WATERFALL(x) (x) #define ARRAY_BASE(x) (x) // export pixel #define CF_PIXEL_MRT0 0 #define CF_PIXEL_MRT1 1 #define CF_PIXEL_MRT2 2 #define CF_PIXEL_MRT3 3 #define CF_PIXEL_MRT4 4 #define CF_PIXEL_MRT5 5 #define CF_PIXEL_MRT6 6 #define CF_PIXEL_MRT7 7 // *_FOG: r6xx only #define CF_PIXEL_MRT0_FOG 16 #define CF_PIXEL_MRT1_FOG 17 #define CF_PIXEL_MRT2_FOG 18 #define CF_PIXEL_MRT3_FOG 19 #define CF_PIXEL_MRT4_FOG 20 #define CF_PIXEL_MRT5_FOG 21 #define CF_PIXEL_MRT6_FOG 22 #define CF_PIXEL_MRT7_FOG 23 #define CF_PIXEL_Z 61 // export pos #define CF_POS0 60 #define CF_POS1 61 #define CF_POS2 62 #define CF_POS3 63 // export param // 0...31 #define TYPE(x) (x) // SQ_EXPORT_* #if 0 // type export #define SQ_EXPORT_PIXEL 0 #define SQ_EXPORT_POS 1 #define SQ_EXPORT_PARAM 2 // reserved 3 // type mem #define SQ_EXPORT_WRITE 0 #define SQ_EXPORT_WRITE_IND 1 #define SQ_EXPORT_WRITE_ACK 2 #define SQ_EXPORT_WRITE_IND_ACK 3 #endif #define RW_GPR(x) (x) #define RW_REL(x) (x) #define ABSOLUTE 0 #define RELATIVE 1 #define INDEX_GPR(x) (x) #define ELEM_SIZE(x) (x ? (x - 1) : 0) #define COMP_MASK(x) (x) #define R6xx_ELEM_LOOP(x) (x) #define BURST_COUNT(x) (x ? (x - 1) : 0) // swiz #define SRC_SEL_X(x) (x) // SQ_SEL_* each #define SRC_SEL_Y(x) (x) #define SRC_SEL_Z(x) (x) #define SRC_SEL_W(x) (x) #define CF_DWORD0(addr) cpu_to_le32((addr)) // R7xx has another entry (COUNT3), but that is only used for adding a bit to count. // We allow one more bit for count in the argument of the macro on R7xx instead. // R6xx: [0,7] R7xx: [1,16] #define CF_DWORD1(pc, cf_const, cond, count, call_count, eop, vpm, cf_inst, wqm, b) \ cpu_to_le32((((pc) << 0) | ((cf_const) << 3) | ((cond) << 8) | (((count) & 7) << 10) | (((count) >> 3) << 19) | \ ((call_count) << 13) | ((eop) << 21) | ((vpm) << 22) | ((cf_inst) << 23) | ((wqm) << 30) | ((b) << 31))) #define CF_ALU_DWORD0(addr, kb0, kb1, km0) cpu_to_le32((((addr) << 0) | ((kb0) << 22) | ((kb1) << 26) | ((km0) << 30))) #define CF_ALU_DWORD1(km1, kcache_addr0, kcache_addr1, count, uw, cf_inst, wqm, b) \ cpu_to_le32((((km1) << 0) | ((kcache_addr0) << 2) | ((kcache_addr1) << 10) | \ ((count) << 18) | ((uw) << 25) | ((cf_inst) << 26) | ((wqm) << 30) | ((b) << 31))) #define CF_ALLOC_IMP_EXP_DWORD0(array_base, type, rw_gpr, rr, index_gpr, es) \ cpu_to_le32((((array_base) << 0) | ((type) << 13) | ((rw_gpr) << 15) | ((rr) << 22) | ((index_gpr) << 23) | \ ((es) << 30))) // R7xx apparently doesn't have the ELEM_LOOP entry any more // We still expose it, but ELEM_LOOP is explicitely R6xx now. // TODO: is this just forgotten in the docs, or really not available any more? #define CF_ALLOC_IMP_EXP_DWORD1_BUF(array_size, comp_mask, el, bc, eop, vpm, cf_inst, wqm, b) \ cpu_to_le32((((array_size) << 0) | ((comp_mask) << 12) | ((el) << 16) | ((bc) << 17) | \ ((eop) << 21) | ((vpm) << 22) | ((cf_inst) << 23) | ((wqm) << 30) | ((b) << 31))) #define CF_ALLOC_IMP_EXP_DWORD1_SWIZ(sel_x, sel_y, sel_z, sel_w, el, bc, eop, vpm, cf_inst, wqm, b) \ cpu_to_le32((((sel_x) << 0) | ((sel_y) << 3) | ((sel_z) << 6) | ((sel_w) << 9) | ((el) << 16) | \ ((bc) << 17) | ((eop) << 21) | ((vpm) << 22) | ((cf_inst) << 23) | \ ((wqm) << 30) | ((b) << 31))) // ALU clause insts #define SRC0_SEL(x) (x) #define SRC1_SEL(x) (x) #define SRC2_SEL(x) (x) // src[0-2]_sel // 0-127 GPR // 128-159 kcache constants bank 0 // 160-191 kcache constants bank 1 // 248-255 special SQ_ALU_SRC_* (0, 1, etc.) #define ALU_SRC_GPR_BASE 0 #define ALU_SRC_KCACHE0_BASE 128 #define ALU_SRC_KCACHE1_BASE 160 #define ALU_SRC_CFILE_BASE 256 #define SRC0_REL(x) (x) #define SRC1_REL(x) (x) #define SRC2_REL(x) (x) // elem #define SRC0_ELEM(x) (x) #define SRC1_ELEM(x) (x) #define SRC2_ELEM(x) (x) #define ELEM_X 0 #define ELEM_Y 1 #define ELEM_Z 2 #define ELEM_W 3 // neg #define SRC0_NEG(x) (x) #define SRC1_NEG(x) (x) #define SRC2_NEG(x) (x) // im #define INDEX_MODE(x) (x) // SQ_INDEX_* // ps #define PRED_SEL(x) (x) // SQ_PRED_SEL_* // last #define LAST(x) (x) // abs #define SRC0_ABS(x) (x) #define SRC1_ABS(x) (x) // uem #define UPDATE_EXECUTE_MASK(x) (x) // up #define UPDATE_PRED(x) (x) // wm #define WRITE_MASK(x) (x) // fm #define FOG_MERGE(x) (x) // omod #define OMOD(x) (x) // SQ_ALU_OMOD_* // alu inst #define ALU_INST(x) (x) // SQ_ALU_INST_* //bs #define BANK_SWIZZLE(x) (x) // SQ_ALU_VEC_* #define DST_GPR(x) (x) #define DST_REL(x) (x) #define DST_ELEM(x) (x) #define CLAMP(x) (x) #define ALU_DWORD0(src0_sel, s0r, s0e, s0n, src1_sel, s1r, s1e, s1n, im, ps, last) \ cpu_to_le32((((src0_sel) << 0) | ((s0r) << 9) | ((s0e) << 10) | ((s0n) << 12) | \ ((src1_sel) << 13) | ((s1r) << 22) | ((s1e) << 23) | ((s1n) << 25) | \ ((im) << 26) | ((ps) << 29) | ((last) << 31))) // R7xx has alu_inst at a different slot, and no fog merge any more (no fix function fog any more) #define R6xx_ALU_DWORD1_OP2(s0a, s1a, uem, up, wm, fm, omod, alu_inst, bs, dst_gpr, dr, de, clamp) \ cpu_to_le32((((s0a) << 0) | ((s1a) << 1) | ((uem) << 2) | ((up) << 3) | ((wm) << 4) | \ ((fm) << 5) | ((omod) << 6) | ((alu_inst) << 8) | ((bs) << 18) | ((dst_gpr) << 21) | \ ((dr) << 28) | ((de) << 29) | ((clamp) << 31))) #define R7xx_ALU_DWORD1_OP2(s0a, s1a, uem, up, wm, omod, alu_inst, bs, dst_gpr, dr, de, clamp) \ cpu_to_le32((((s0a) << 0) | ((s1a) << 1) | ((uem) << 2) | ((up) << 3) | ((wm) << 4) | \ ((omod) << 5) | ((alu_inst) << 7) | ((bs) << 18) | ((dst_gpr) << 21) | \ ((dr) << 28) | ((de) << 29) | ((clamp) << 31))) // This is a general chipset macro, but due to selection by chipid typically not usable in static arrays // Fog is NOT USED on R7xx, even if specified. #define ALU_DWORD1_OP2(chipfamily, s0a, s1a, uem, up, wm, fm, omod, alu_inst, bs, dst_gpr, dr, de, clamp) \ ((chipfamily) < CHIP_FAMILY_RV770 ? \ R6xx_ALU_DWORD1_OP2(s0a, s1a, uem, up, wm, fm, omod, alu_inst, bs, dst_gpr, dr, de, clamp) : \ R7xx_ALU_DWORD1_OP2(s0a, s1a, uem, up, wm, omod, alu_inst, bs, dst_gpr, dr, de, clamp)) #define ALU_DWORD1_OP3(src2_sel, s2r, s2e, s2n, alu_inst, bs, dst_gpr, dr, de, clamp) \ cpu_to_le32((((src2_sel) << 0) | ((s2r) << 9) | ((s2e) << 10) | ((s2n) << 12) | \ ((alu_inst) << 13) | ((bs) << 18) | ((dst_gpr) << 21) | ((dr) << 28) | \ ((de) << 29) | ((clamp) << 31))) // VTX clause insts // vxt insts #define VTX_INST(x) (x) // SQ_VTX_INST_* // fetch type #define FETCH_TYPE(x) (x) // SQ_VTX_FETCH_* #define FETCH_WHOLE_QUAD(x) (x) #define BUFFER_ID(x) (x) #define SRC_GPR(x) (x) #define SRC_REL(x) (x) #define MEGA_FETCH_COUNT(x) ((x) ? ((x) - 1) : 0) #define SEMANTIC_ID(x) (x) #define DST_SEL_X(x) (x) #define DST_SEL_Y(x) (x) #define DST_SEL_Z(x) (x) #define DST_SEL_W(x) (x) #define USE_CONST_FIELDS(x) (x) #define DATA_FORMAT(x) (x) // num format #define NUM_FORMAT_ALL(x) (x) // SQ_NUM_FORMAT_* // format comp #define FORMAT_COMP_ALL(x) (x) // SQ_FORMAT_COMP_* // sma #define SRF_MODE_ALL(x) (x) #define SRF_MODE_ZERO_CLAMP_MINUS_ONE 0 #define SRF_MODE_NO_ZERO 1 #define OFFSET(x) (x) // endian swap #define ENDIAN_SWAP(x) (x) // SQ_ENDIAN_* #define CONST_BUF_NO_STRIDE(x) (x) // mf #define MEGA_FETCH(x) (x) #define VTX_DWORD0(vtx_inst, ft, fwq, buffer_id, src_gpr, sr, ssx, mfc) \ cpu_to_le32((((vtx_inst) << 0) | ((ft) << 5) | ((fwq) << 7) | ((buffer_id) << 8) | \ ((src_gpr) << 16) | ((sr) << 23) | ((ssx) << 24) | ((mfc) << 26))) #define VTX_DWORD1_SEM(semantic_id, dsx, dsy, dsz, dsw, ucf, data_format, nfa, fca, sma) \ cpu_to_le32((((semantic_id) << 0) | ((dsx) << 9) | ((dsy) << 12) | ((dsz) << 15) | ((dsw) << 18) | \ ((ucf) << 21) | ((data_format) << 22) | ((nfa) << 28) | ((fca) << 30) | ((sma) << 31))) #define VTX_DWORD1_GPR(dst_gpr, dr, dsx, dsy, dsz, dsw, ucf, data_format, nfa, fca, sma) \ cpu_to_le32((((dst_gpr) << 0) | ((dr) << 7) | ((dsx) << 9) | ((dsy) << 12) | ((dsz) << 15) | ((dsw) << 18) | \ ((ucf) << 21) | ((data_format) << 22) | ((nfa) << 28) | ((fca) << 30) | ((sma) << 31))) #define VTX_DWORD2(offset, es, cbns, mf) \ cpu_to_le32((((offset) << 0) | ((es) << 16) | ((cbns) << 18) | ((mf) << 19))) #define VTX_DWORD_PAD cpu_to_le32(0x00000000) // TEX clause insts // tex insts #define TEX_INST(x) (x) // SQ_TEX_INST_* #define BC_FRAC_MODE(x) (x) #define FETCH_WHOLE_QUAD(x) (x) #define RESOURCE_ID(x) (x) #define R7xx_ALT_CONST(x) (x) #define LOD_BIAS(x) (x) //ct #define COORD_TYPE_X(x) (x) #define COORD_TYPE_Y(x) (x) #define COORD_TYPE_Z(x) (x) #define COORD_TYPE_W(x) (x) #define TEX_UNNORMALIZED 0 #define TEX_NORMALIZED 1 #define OFFSET_X(x) (((int)(x) * 2) & 0x1f) /* 4:1-bits 2's-complement fixed-point: [-8.0..7.5] */ #define OFFSET_Y(x) (((int)(x) * 2) & 0x1f) #define OFFSET_Z(x) (((int)(x) * 2) & 0x1f) #define SAMPLER_ID(x) (x) // R7xx has an additional parameter ALT_CONST. We always expose it, but ALT_CONST is R7xx only #define TEX_DWORD0(tex_inst, bfm, fwq, resource_id, src_gpr, sr, ac) \ cpu_to_le32((((tex_inst) << 0) | ((bfm) << 5) | ((fwq) << 7) | ((resource_id) << 8) | \ ((src_gpr) << 16) | ((sr) << 23) | ((ac) << 24))) #define TEX_DWORD1(dst_gpr, dr, dsx, dsy, dsz, dsw, lod_bias, ctx, cty, ctz, ctw) \ cpu_to_le32((((dst_gpr) << 0) | ((dr) << 7) | ((dsx) << 9) | ((dsy) << 12) | ((dsz) << 15) | ((dsw) << 18) | \ ((lod_bias) << 21) | ((ctx) << 28) | ((cty) << 29) | ((ctz) << 30) | ((ctw) << 31))) #define TEX_DWORD2(offset_x, offset_y, offset_z, sampler_id, ssx, ssy, ssz, ssw) \ cpu_to_le32((((offset_x) << 0) | ((offset_y) << 5) | ((offset_z) << 10) | ((sampler_id) << 15) | \ ((ssx) << 20) | ((ssy) << 23) | ((ssz) << 26) | ((ssw) << 29))) #define TEX_DWORD_PAD cpu_to_le32(0x00000000) extern int R600_solid_vs(RADEONChipFamily ChipSet, uint32_t* vs); extern int R600_solid_ps(RADEONChipFamily ChipSet, uint32_t* ps); extern int R600_copy_vs(RADEONChipFamily ChipSet, uint32_t* vs); extern int R600_copy_ps(RADEONChipFamily ChipSet, uint32_t* ps); extern int R600_xv_vs(RADEONChipFamily ChipSet, uint32_t* shader); extern int R600_xv_ps(RADEONChipFamily ChipSet, uint32_t* shader); extern int R600_comp_vs(RADEONChipFamily ChipSet, uint32_t* vs); extern int R600_comp_ps(RADEONChipFamily ChipSet, uint32_t* ps); #endif xf86-video-ati-7.3.0/src/evergreen_state.h0000664000175000017500000002552412177731114015254 00000000000000/* * Copyright 2010 Advanced Micro Devices, 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: Alex Deucher * */ #ifndef __EVERGREEN_STATE_H__ #define __EVERGREEN_STATE_H__ typedef int bool_t; #define CLEAR(x) memset (&x, 0, sizeof(x)) /* Sequencer / thread handling */ typedef struct { int ps_prio; int vs_prio; int gs_prio; int es_prio; int hs_prio; int ls_prio; int cs_prio; int num_ps_gprs; int num_vs_gprs; int num_gs_gprs; int num_es_gprs; int num_hs_gprs; int num_ls_gprs; int num_cs_gprs; int num_temp_gprs; int num_ps_threads; int num_vs_threads; int num_gs_threads; int num_es_threads; int num_hs_threads; int num_ls_threads; int num_ps_stack_entries; int num_vs_stack_entries; int num_gs_stack_entries; int num_es_stack_entries; int num_hs_stack_entries; int num_ls_stack_entries; } sq_config_t; /* Color buffer / render target */ typedef struct { int id; int w; int h; uint64_t base; int format; int endian; int array_mode; // tiling int non_disp_tiling; int number_type; int read_size; int comp_swap; int tile_mode; int blend_clamp; int clear_color; int blend_bypass; int simple_float; int round_mode; int tile_compact; int source_format; int resource_type; int fast_clear; int compression; int rat; /* 2D related CB state */ uint32_t pmask; int rop; int blend_enable; uint32_t blendcntl; struct radeon_bo *bo; struct radeon_surface *surface; } cb_config_t; /* Shader */ typedef struct { uint64_t shader_addr; uint32_t shader_size; int num_gprs; int stack_size; int dx10_clamp; int clamp_consts; int export_mode; int uncached_first_inst; int single_round; int double_round; int allow_sdi; int allow_sd0; int allow_ddi; int allow_ddo; struct radeon_bo *bo; } shader_config_t; /* Shader consts */ typedef struct { int type; int size_bytes; uint64_t const_addr; struct radeon_bo *bo; uint32_t *cpu_ptr; } const_config_t; /* Vertex buffer / vtx resource */ typedef struct { int id; uint64_t vb_addr; uint32_t vtx_num_entries; uint32_t vtx_size_dw; int clamp_x; int format; int num_format_all; int format_comp_all; int srf_mode_all; int endian; int mem_req_size; int dst_sel_x; int dst_sel_y; int dst_sel_z; int dst_sel_w; int uncached; struct radeon_bo *bo; } vtx_resource_t; /* Texture resource */ typedef struct { int id; int w; int h; int pitch; int depth; int dim; int array_mode; int tile_type; int format; uint64_t base; uint64_t mip_base; uint32_t size; int format_comp_x; int format_comp_y; int format_comp_z; int format_comp_w; int num_format_all; int srf_mode_all; int force_degamma; int endian; int dst_sel_x; int dst_sel_y; int dst_sel_z; int dst_sel_w; int base_level; int last_level; int base_array; int last_array; int perf_modulation; int interlaced; int min_lod; struct radeon_bo *bo; struct radeon_bo *mip_bo; struct radeon_surface *surface; } tex_resource_t; /* Texture sampler */ typedef struct { int id; /* Clamping */ int clamp_x, clamp_y, clamp_z; int border_color; /* Filtering */ int xy_mag_filter, xy_min_filter; int z_filter; int mip_filter; bool_t high_precision_filter; /* ? */ int perf_mip; /* ? 0-7 */ int perf_z; /* ? 3 */ /* LoD selection */ int min_lod, max_lod; /* 0-0x3ff */ int lod_bias; /* 0-0xfff (signed?) */ int lod_bias2; /* ? 0-0xfff (signed?) */ bool_t lod_uses_minor_axis; /* ? */ /* Other stuff */ bool_t point_sampling_clamp; /* ? */ bool_t tex_array_override; /* ? */ bool_t mc_coord_truncate; /* ? */ bool_t force_degamma; /* ? */ bool_t fetch_4; /* ? */ bool_t sample_is_pcf; /* ? */ bool_t type; /* ? */ int depth_compare; /* only depth textures? */ int chroma_key; int truncate_coord; bool_t disable_cube_wrap; } tex_sampler_t; /* Draw command */ typedef struct { uint32_t prim_type; uint32_t vgt_draw_initiator; uint32_t index_type; uint32_t num_instances; uint32_t num_indices; } draw_config_t; #define BEGIN_BATCH(n) \ do { \ radeon_ddx_cs_start(pScrn, (n), __FILE__, __func__, __LINE__); \ } while(0) #define END_BATCH() \ do { \ radeon_cs_end(info->cs, __FILE__, __func__, __LINE__); \ } while(0) #define RELOC_BATCH(bo, rd, wd) \ do { \ int _ret; \ _ret = radeon_cs_write_reloc(info->cs, (bo), (rd), (wd), 0); \ if (_ret) ErrorF("reloc emit failure %d (%s %d)\n", _ret, __func__, __LINE__); \ } while(0) #define E32(dword) \ do { \ radeon_cs_write_dword(info->cs, (dword)); \ } while (0) #define EFLOAT(val) \ do { \ union { float f; uint32_t d; } a; \ a.f = (val); \ E32(a.d); \ } while (0) #define PACK3(cmd, num) \ do { \ E32(RADEON_CP_PACKET3 | ((cmd) << 8) | ((((num) - 1) & 0x3fff) << 16)); \ } while (0) /* write num registers, start at reg */ /* If register falls in a special area, special commands are issued */ #define PACK0(reg, num) \ do { \ if ((reg) >= SET_CONFIG_REG_offset && (reg) < SET_CONFIG_REG_end) { \ PACK3(IT_SET_CONFIG_REG, (num) + 1); \ E32(((reg) - SET_CONFIG_REG_offset) >> 2); \ } else if ((reg) >= SET_CONTEXT_REG_offset && (reg) < SET_CONTEXT_REG_end) { \ PACK3(IT_SET_CONTEXT_REG, (num) + 1); \ E32(((reg) - SET_CONTEXT_REG_offset) >> 2); \ } else if ((reg) >= SET_RESOURCE_offset && (reg) < SET_RESOURCE_end) { \ PACK3(IT_SET_RESOURCE, num + 1); \ E32(((reg) - SET_RESOURCE_offset) >> 2); \ } else if ((reg) >= SET_SAMPLER_offset && (reg) < SET_SAMPLER_end) { \ PACK3(IT_SET_SAMPLER, (num) + 1); \ E32((reg - SET_SAMPLER_offset) >> 2); \ } else if ((reg) >= SET_CTL_CONST_offset && (reg) < SET_CTL_CONST_end) { \ PACK3(IT_SET_CTL_CONST, (num) + 1); \ E32(((reg) - SET_CTL_CONST_offset) >> 2); \ } else if ((reg) >= SET_LOOP_CONST_offset && (reg) < SET_LOOP_CONST_end) { \ PACK3(IT_SET_LOOP_CONST, (num) + 1); \ E32(((reg) - SET_LOOP_CONST_offset) >> 2); \ } else if ((reg) >= SET_BOOL_CONST_offset && (reg) < SET_BOOL_CONST_end) { \ PACK3(IT_SET_BOOL_CONST, (num) + 1); \ E32(((reg) - SET_BOOL_CONST_offset) >> 2); \ } else { \ E32(CP_PACKET0 ((reg), (num) - 1)); \ } \ } while (0) /* write a single register */ #define EREG(reg, val) \ do { \ PACK0((reg), 1); \ E32((val)); \ } while (0) void evergreen_start_3d(ScrnInfoPtr pScrn); void evergreen_set_render_target(ScrnInfoPtr pScrn, cb_config_t *cb_conf, uint32_t domain); void evergreen_set_blend_color(ScrnInfoPtr pScrn, float *color); void evergreen_cp_wait_vline_sync(ScrnInfoPtr pScrn, PixmapPtr pPix, xf86CrtcPtr crtc, int start, int stop); void evergreen_set_spi(ScrnInfoPtr pScrn, int vs_export_count, int num_interp); void evergreen_fs_setup(ScrnInfoPtr pScrn, shader_config_t *fs_conf, uint32_t domain); void evergreen_vs_setup(ScrnInfoPtr pScrn, shader_config_t *vs_conf, uint32_t domain); void evergreen_ps_setup(ScrnInfoPtr pScrn, shader_config_t *ps_conf, uint32_t domain); void evergreen_set_alu_consts(ScrnInfoPtr pScrn, const_config_t *const_conf, uint32_t domain); void evergreen_set_bool_consts(ScrnInfoPtr pScrn, int offset, uint32_t val); void evergreen_set_tex_resource(ScrnInfoPtr pScrn, tex_resource_t *tex_res, uint32_t domain); void evergreen_set_tex_sampler(ScrnInfoPtr pScrn, tex_sampler_t *s); void evergreen_set_screen_scissor(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2); void evergreen_set_vport_scissor(ScrnInfoPtr pScrn, int id, int x1, int y1, int x2, int y2); void evergreen_set_generic_scissor(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2); void evergreen_set_window_scissor(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2); void evergreen_set_clip_rect(ScrnInfoPtr pScrn, int id, int x1, int y1, int x2, int y2); void evergreen_set_default_state(ScrnInfoPtr pScrn); void cayman_set_default_state(ScrnInfoPtr pScrn); void evergreen_draw_auto(ScrnInfoPtr pScrn, draw_config_t *draw_conf); void evergreen_finish_op(ScrnInfoPtr pScrn, int vtx_size); extern Bool R600SetAccelState(ScrnInfoPtr pScrn, struct r600_accel_object *src0, struct r600_accel_object *src1, struct r600_accel_object *dst, uint32_t vs_offset, uint32_t ps_offset, int rop, Pixel planemask); extern Bool RADEONPrepareAccess_CS(PixmapPtr pPix, int index); extern void RADEONFinishAccess_CS(PixmapPtr pPix, int index); extern void *RADEONEXACreatePixmap(ScreenPtr pScreen, int size, int align); extern void *RADEONEXACreatePixmap2(ScreenPtr pScreen, int width, int height, int depth, int usage_hint, int bitsPerPixel, int *new_pitch); extern void RADEONEXADestroyPixmap(ScreenPtr pScreen, void *driverPriv); extern struct radeon_bo *radeon_get_pixmap_bo(PixmapPtr pPix); extern Bool RADEONEXAPixmapIsOffscreen(PixmapPtr pPix); extern Bool RADEONEXASharePixmapBacking(PixmapPtr ppix, ScreenPtr slave, void **handle_p); extern Bool RADEONEXASetSharedPixmapBacking(PixmapPtr ppix, void *handle); #endif xf86-video-ati-7.3.0/src/radeon_kms.c0000664000175000017500000013620212256365366014215 00000000000000/* * 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: * Dave Airlie * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include /* Driver data structures */ #include "radeon.h" #include "radeon_reg.h" #include "radeon_probe.h" #include "micmap.h" #include "radeon_version.h" #include "shadow.h" #include "atipciids.h" /* DPMS */ #ifdef HAVE_XEXTPROTO_71 #include #else #define DPMS_SERVER #include #endif #include "radeon_chipinfo_gen.h" #include "radeon_bo_gem.h" #include "radeon_cs_gem.h" #include "radeon_vbo.h" extern SymTabRec RADEONChipsets[]; static Bool radeon_setup_kernel_mem(ScreenPtr pScreen); const OptionInfoRec RADEONOptions_KMS[] = { { OPTION_NOACCEL, "NoAccel", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_SW_CURSOR, "SWcursor", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_PAGE_FLIP, "EnablePageFlip", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_COLOR_TILING, "ColorTiling", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_COLOR_TILING_2D,"ColorTiling2D", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_RENDER_ACCEL, "RenderAccel", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_SUBPIXEL_ORDER, "SubPixelOrder", OPTV_ANYSTR, {0}, FALSE }, #ifdef USE_GLAMOR { OPTION_ACCELMETHOD, "AccelMethod", OPTV_STRING, {0}, FALSE }, #endif { OPTION_EXA_VSYNC, "EXAVSync", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_EXA_PIXMAPS, "EXAPixmaps", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_ZAPHOD_HEADS, "ZaphodHeads", OPTV_STRING, {0}, FALSE }, { OPTION_PAGE_FLIP, "EnablePageFlip", OPTV_BOOLEAN, {0}, FALSE }, { OPTION_SWAPBUFFERS_WAIT,"SwapbuffersWait", OPTV_BOOLEAN, {0}, FALSE }, { -1, NULL, OPTV_NONE, {0}, FALSE } }; const OptionInfoRec *RADEONOptionsWeak(void) { return RADEONOptions_KMS; } void radeon_cs_flush_indirect(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; int ret; if (!info->cs->cdw) return; /* release the current VBO so we don't block on mapping it later */ if (info->accel_state->vbo.vb_offset && info->accel_state->vbo.vb_bo) { radeon_vbo_put(pScrn, &info->accel_state->vbo); info->accel_state->vbo.vb_start_op = -1; } /* release the current VBO so we don't block on mapping it later */ if (info->accel_state->cbuf.vb_bo) { radeon_vbo_put(pScrn, &info->accel_state->cbuf); info->accel_state->cbuf.vb_start_op = -1; } radeon_cs_emit(info->cs); radeon_cs_erase(info->cs); if (accel_state->use_vbos) radeon_vbo_flush_bos(pScrn); ret = radeon_cs_space_check_with_bo(info->cs, accel_state->vbo.vb_bo, RADEON_GEM_DOMAIN_GTT, 0); if (ret) ErrorF("space check failed in flush\n"); if (info->reemit_current2d && info->state_2d.op) info->reemit_current2d(pScrn, info->state_2d.op); if (info->dri2.enabled) { info->accel_state->XInited3D = FALSE; info->accel_state->engineMode = EXA_ENGINEMODE_UNKNOWN; } } void radeon_ddx_cs_start(ScrnInfoPtr pScrn, int n, const char *file, const char *func, int line) { RADEONInfoPtr info = RADEONPTR(pScrn); if (info->cs->cdw + n > info->cs->ndw) { radeon_cs_flush_indirect(pScrn); } radeon_cs_begin(info->cs, n, file, func, line); } extern _X_EXPORT int gRADEONEntityIndex; static int getRADEONEntityIndex(void) { return gRADEONEntityIndex; } RADEONEntPtr RADEONEntPriv(ScrnInfoPtr pScrn) { DevUnion *pPriv; RADEONInfoPtr info = RADEONPTR(pScrn); pPriv = xf86GetEntityPrivate(info->pEnt->index, getRADEONEntityIndex()); return pPriv->ptr; } /* Allocate our private RADEONInfoRec */ static Bool RADEONGetRec(ScrnInfoPtr pScrn) { if (pScrn->driverPrivate) return TRUE; pScrn->driverPrivate = xnfcalloc(sizeof(RADEONInfoRec), 1); return TRUE; } /* Free our private RADEONInfoRec */ static void RADEONFreeRec(ScrnInfoPtr pScrn) { RADEONInfoPtr info; if (!pScrn || !pScrn->driverPrivate) return; info = RADEONPTR(pScrn); if (info->dri2.drm_fd > 0) { DevUnion *pPriv; RADEONEntPtr pRADEONEnt; pPriv = xf86GetEntityPrivate(pScrn->entityList[0], getRADEONEntityIndex()); pRADEONEnt = pPriv->ptr; pRADEONEnt->fd_ref--; if (!pRADEONEnt->fd_ref) { drmClose(pRADEONEnt->fd); pRADEONEnt->fd = 0; } } if (info->accel_state) { free(info->accel_state); info->accel_state = NULL; } free(pScrn->driverPrivate); pScrn->driverPrivate = NULL; } static void * radeonShadowWindow(ScreenPtr screen, CARD32 row, CARD32 offset, int mode, CARD32 *size, void *closure) { ScrnInfoPtr pScrn = xf86ScreenToScrn(screen); RADEONInfoPtr info = RADEONPTR(pScrn); int stride; stride = (pScrn->displayWidth * pScrn->bitsPerPixel) / 8; *size = stride; return ((uint8_t *)info->front_bo->ptr + row * stride + offset); } static Bool RADEONCreateScreenResources_KMS(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); PixmapPtr pixmap; struct radeon_surface *surface; pScreen->CreateScreenResources = info->CreateScreenResources; if (!(*pScreen->CreateScreenResources)(pScreen)) return FALSE; pScreen->CreateScreenResources = RADEONCreateScreenResources_KMS; if (!drmmode_set_desired_modes(pScrn, &info->drmmode)) return FALSE; drmmode_uevent_init(pScrn, &info->drmmode); if (info->r600_shadow_fb) { pixmap = pScreen->GetScreenPixmap(pScreen); if (!shadowAdd(pScreen, pixmap, shadowUpdatePackedWeak(), radeonShadowWindow, 0, NULL)) return FALSE; } if (info->dri2.enabled || info->use_glamor) { if (info->front_bo) { PixmapPtr pPix = pScreen->GetScreenPixmap(pScreen); radeon_set_pixmap_bo(pPix, info->front_bo); surface = radeon_get_pixmap_surface(pPix); if (surface) { *surface = info->front_surface; } } } if (info->use_glamor) radeon_glamor_create_screen_resources(pScreen); return TRUE; } #ifdef RADEON_PIXMAP_SHARING static void redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty) { ScrnInfoPtr pScrn = xf86ScreenToScrn(screen); RegionRec pixregion; PixmapRegionInit(&pixregion, dirty->slave_dst); DamageRegionAppend(&dirty->slave_dst->drawable, &pixregion); PixmapSyncDirtyHelper(dirty, &pixregion); radeon_cs_flush_indirect(pScrn); DamageRegionProcessPending(&dirty->slave_dst->drawable); RegionUninit(&pixregion); } static void radeon_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 RADEONBlockHandler_KMS(BLOCKHANDLER_ARGS_DECL) { SCREEN_PTR(arg); ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); pScreen->BlockHandler = info->BlockHandler; (*pScreen->BlockHandler) (BLOCKHANDLER_ARGS); pScreen->BlockHandler = RADEONBlockHandler_KMS; if (info->use_glamor) radeon_glamor_flush(pScrn); radeon_cs_flush_indirect(pScrn); #ifdef RADEON_PIXMAP_SHARING radeon_dirty_update(pScreen); #endif } static void radeon_flush_callback(CallbackListPtr *list, pointer user_data, pointer call_data) { ScrnInfoPtr pScrn = user_data; if (pScrn->vtSema) { radeon_cs_flush_indirect(pScrn); radeon_glamor_flush(pScrn); } } static Bool RADEONIsFastFBWorking(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); struct drm_radeon_info ginfo; int r; uint32_t tmp = 0; #ifndef RADEON_INFO_FASTFB_WORKING #define RADEON_INFO_FASTFB_WORKING 0x14 #endif memset(&ginfo, 0, sizeof(ginfo)); ginfo.request = RADEON_INFO_FASTFB_WORKING; ginfo.value = (uintptr_t)&tmp; r = drmCommandWriteRead(info->dri2.drm_fd, DRM_RADEON_INFO, &ginfo, sizeof(ginfo)); if (r) { return FALSE; } if (tmp == 1) return TRUE; return FALSE; } static Bool RADEONIsFusionGARTWorking(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); struct drm_radeon_info ginfo; int r; uint32_t tmp; #ifndef RADEON_INFO_FUSION_GART_WORKING #define RADEON_INFO_FUSION_GART_WORKING 0x0c #endif memset(&ginfo, 0, sizeof(ginfo)); ginfo.request = RADEON_INFO_FUSION_GART_WORKING; ginfo.value = (uintptr_t)&tmp; r = drmCommandWriteRead(info->dri2.drm_fd, DRM_RADEON_INFO, &ginfo, sizeof(ginfo)); if (r) { return FALSE; } if (tmp == 1) return TRUE; return FALSE; } static Bool RADEONIsAccelWorking(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); struct drm_radeon_info ginfo; int r; uint32_t tmp; #ifndef RADEON_INFO_ACCEL_WORKING #define RADEON_INFO_ACCEL_WORKING 0x03 #endif #ifndef RADEON_INFO_ACCEL_WORKING2 #define RADEON_INFO_ACCEL_WORKING2 0x05 #endif memset(&ginfo, 0, sizeof(ginfo)); if (info->dri2.pKernelDRMVersion->version_minor >= 5) ginfo.request = RADEON_INFO_ACCEL_WORKING2; else ginfo.request = RADEON_INFO_ACCEL_WORKING; ginfo.value = (uintptr_t)&tmp; r = drmCommandWriteRead(info->dri2.drm_fd, DRM_RADEON_INFO, &ginfo, sizeof(ginfo)); if (r) { /* If kernel is too old before 2.6.32 than assume accel is working */ if (r == -EINVAL) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Kernel too old missing accel " "information, assuming accel is working\n"); return TRUE; } return FALSE; } if (tmp) return TRUE; return FALSE; } /* This is called by RADEONPreInit to set up the default visual */ static Bool RADEONPreInitVisual(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); if (!xf86SetDepthBpp(pScrn, 0, 0, 0, Support32bppFb)) return FALSE; switch (pScrn->depth) { case 8: case 15: case 16: case 24: break; default: xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Given depth (%d) is not supported by %s driver\n", pScrn->depth, RADEON_DRIVER_NAME); return FALSE; } xf86PrintDepthBpp(pScrn); info->pix24bpp = xf86GetBppFromDepth(pScrn, pScrn->depth); info->pixel_bytes = pScrn->bitsPerPixel / 8; if (info->pix24bpp == 24) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Radeon does NOT support 24bpp\n"); return FALSE; } xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Pixel depth = %d bits stored in %d byte%s (%d bpp pixmaps)\n", pScrn->depth, info->pixel_bytes, info->pixel_bytes > 1 ? "s" : "", info->pix24bpp); if (!xf86SetDefaultVisual(pScrn, -1)) return FALSE; if (pScrn->depth > 8 && pScrn->defaultVisual != TrueColor) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Default visual (%s) is not supported at depth %d\n", xf86GetVisualName(pScrn->defaultVisual), pScrn->depth); return FALSE; } return TRUE; } /* This is called by RADEONPreInit to handle all color weight issues */ static Bool RADEONPreInitWeight(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); /* Save flag for 6 bit DAC to use for setting CRTC registers. Otherwise use an 8 bit DAC, even if xf86SetWeight sets pScrn->rgbBits to some value other than 8. */ info->dac6bits = FALSE; if (pScrn->depth > 8) { rgb defaultWeight = { 0, 0, 0 }; if (!xf86SetWeight(pScrn, defaultWeight, defaultWeight)) return FALSE; } else { pScrn->rgbBits = 8; } xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Using %d bits per RGB (%d bit DAC)\n", pScrn->rgbBits, info->dac6bits ? 6 : 8); return TRUE; } static Bool RADEONPreInitAccel_KMS(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); if (!(info->accel_state = calloc(1, sizeof(struct radeon_accel_state)))) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Unable to allocate accel_state rec!\n"); return FALSE; } /* Check whether direct mapping is used for fast fb access*/ if (RADEONIsFastFBWorking(pScrn)) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Direct mapping of fb aperture is enabled for fast fb access.\n"); info->is_fast_fb = TRUE; } if (xf86ReturnOptValBool(info->Options, OPTION_NOACCEL, info->ChipFamily == CHIP_FAMILY_HAWAII) || (!RADEONIsAccelWorking(pScrn))) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "GPU accel disabled or not working, using shadowfb for KMS\n"); shadowfb: info->r600_shadow_fb = TRUE; if (!xf86LoadSubModule(pScrn, "shadow")) info->r600_shadow_fb = FALSE; return TRUE; } #ifdef DRI2 info->dri2.available = !!xf86LoadSubModule(pScrn, "dri2"); #endif if (radeon_glamor_pre_init(pScrn)) return TRUE; if (info->ChipFamily >= CHIP_FAMILY_TAHITI) { goto shadowfb; } else if (info->ChipFamily == CHIP_FAMILY_PALM) { info->accel_state->allowHWDFS = RADEONIsFusionGARTWorking(pScrn); } else info->accel_state->allowHWDFS = TRUE; if ((info->ChipFamily == CHIP_FAMILY_RS100) || (info->ChipFamily == CHIP_FAMILY_RS200) || (info->ChipFamily == CHIP_FAMILY_RS300) || (info->ChipFamily == CHIP_FAMILY_RS400) || (info->ChipFamily == CHIP_FAMILY_RS480) || (info->ChipFamily == CHIP_FAMILY_RS600) || (info->ChipFamily == CHIP_FAMILY_RS690) || (info->ChipFamily == CHIP_FAMILY_RS740)) info->accel_state->has_tcl = FALSE; else { info->accel_state->has_tcl = TRUE; } { int errmaj = 0, errmin = 0; info->exaReq.majorversion = EXA_VERSION_MAJOR; info->exaReq.minorversion = EXA_VERSION_MINOR; if (!LoadSubModule(pScrn->module, "exa", NULL, NULL, NULL, &info->exaReq, &errmaj, &errmin)) { LoaderErrorMsg(NULL, "exa", errmaj, errmin); return FALSE; } } return TRUE; } static Bool RADEONPreInitChipType_KMS(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); int i; info->Chipset = PCI_DEV_DEVICE_ID(info->PciInfo); pScrn->chipset = (char *)xf86TokenToString(RADEONChipsets, info->Chipset); if (!pScrn->chipset) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "ChipID 0x%04x is not recognized\n", info->Chipset); return FALSE; } if (info->Chipset < 0) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Chipset \"%s\" is not recognized\n", pScrn->chipset); return FALSE; } xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Chipset: \"%s\" (ChipID = 0x%04x)\n", pScrn->chipset, info->Chipset); for (i = 0; i < sizeof(RADEONCards) / sizeof(RADEONCardInfo); i++) { if (info->Chipset == RADEONCards[i].pci_device_id) { RADEONCardInfo *card = &RADEONCards[i]; info->ChipFamily = card->chip_family; break; } } #ifdef RENDER info->RenderAccel = xf86ReturnOptValBool(info->Options, OPTION_RENDER_ACCEL, info->Chipset != PCI_CHIP_RN50_515E && info->Chipset != PCI_CHIP_RN50_5969); #endif return TRUE; } static Bool radeon_open_drm_master(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); struct pci_device *dev = info->PciInfo; char *busid; drmSetVersion sv; int err; if (pRADEONEnt->fd) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, " reusing fd for second head\n"); info->dri2.drm_fd = pRADEONEnt->fd; pRADEONEnt->fd_ref++; goto out; } #if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,9,99,901,0) XNFasprintf(&busid, "pci:%04x:%02x:%02x.%d", dev->domain, dev->bus, dev->dev, dev->func); #else busid = XNFprintf("pci:%04x:%02x:%02x.%d", dev->domain, dev->bus, dev->dev, dev->func); #endif info->dri2.drm_fd = drmOpen(NULL, busid); if (info->dri2.drm_fd == -1) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[drm] Failed to open DRM device for %s: %s\n", busid, strerror(errno)); free(busid); return FALSE; } free(busid); /* Check that what we opened was a master or a master-capable FD, * by setting the version of the interface we'll use to talk to it. * (see DRIOpenDRMMaster() in DRI1) */ sv.drm_di_major = 1; sv.drm_di_minor = 1; sv.drm_dd_major = -1; sv.drm_dd_minor = -1; err = drmSetInterfaceVersion(info->dri2.drm_fd, &sv); if (err != 0) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[drm] failed to set drm interface version.\n"); drmClose(info->dri2.drm_fd); info->dri2.drm_fd = -1; return FALSE; } pRADEONEnt->fd = info->dri2.drm_fd; pRADEONEnt->fd_ref = 1; out: info->drmmode.fd = info->dri2.drm_fd; return TRUE; } static Bool r600_get_tile_config(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); struct drm_radeon_info ginfo; int r; uint32_t tmp; if (info->ChipFamily < CHIP_FAMILY_R600) return FALSE; #ifndef RADEON_INFO_TILING_CONFIG #define RADEON_INFO_TILING_CONFIG 0x6 #endif memset(&ginfo, 0, sizeof(ginfo)); ginfo.request = RADEON_INFO_TILING_CONFIG; ginfo.value = (uintptr_t)&tmp; r = drmCommandWriteRead(info->dri2.drm_fd, DRM_RADEON_INFO, &ginfo, sizeof(ginfo)); if (r) return FALSE; info->tile_config = tmp; info->r7xx_bank_op = 0; if (info->ChipFamily >= CHIP_FAMILY_CEDAR) { if (info->dri2.pKernelDRMVersion->version_minor >= 7) { switch (info->tile_config & 0xf) { case 0: info->num_channels = 1; break; case 1: info->num_channels = 2; break; case 2: info->num_channels = 4; break; case 3: info->num_channels = 8; break; default: return FALSE; } switch((info->tile_config & 0xf0) >> 4) { case 0: info->num_banks = 4; break; case 1: info->num_banks = 8; break; case 2: info->num_banks = 16; break; default: return FALSE; } switch ((info->tile_config & 0xf00) >> 8) { case 0: info->group_bytes = 256; break; case 1: info->group_bytes = 512; break; default: return FALSE; } } else return FALSE; } else { switch((info->tile_config & 0xe) >> 1) { case 0: info->num_channels = 1; break; case 1: info->num_channels = 2; break; case 2: info->num_channels = 4; break; case 3: info->num_channels = 8; break; default: return FALSE; } switch((info->tile_config & 0x30) >> 4) { case 0: info->num_banks = 4; break; case 1: info->num_banks = 8; break; default: return FALSE; } switch((info->tile_config & 0xc0) >> 6) { case 0: info->group_bytes = 256; break; case 1: info->group_bytes = 512; break; default: return FALSE; } } info->have_tiling_info = TRUE; return TRUE; } static void RADEONSetupCapabilities(ScrnInfoPtr pScrn) { #ifdef RADEON_PIXMAP_SHARING RADEONInfoPtr info = RADEONPTR(pScrn); uint64_t value; int ret; pScrn->capabilities = 0; ret = drmGetCap(info->dri2.drm_fd, DRM_CAP_PRIME, &value); if (ret == 0) { if (value & DRM_PRIME_CAP_EXPORT) pScrn->capabilities |= RR_Capability_SourceOutput | RR_Capability_SinkOffload; if (value & DRM_PRIME_CAP_IMPORT) pScrn->capabilities |= RR_Capability_SourceOffload | RR_Capability_SinkOutput; } #endif } Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags) { RADEONInfoPtr info; RADEONEntPtr pRADEONEnt; DevUnion* pPriv; Gamma zeros = { 0.0, 0.0, 0.0 }; uint32_t tiling = 0; int cpp; xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, "RADEONPreInit_KMS\n"); if (pScrn->numEntities != 1) return FALSE; if (!RADEONGetRec(pScrn)) return FALSE; info = RADEONPTR(pScrn); info->IsSecondary = FALSE; info->IsPrimary = FALSE; info->pEnt = xf86GetEntityInfo(pScrn->entityList[pScrn->numEntities - 1]); if (info->pEnt->location.type != BUS_PCI #ifdef XSERVER_PLATFORM_BUS && info->pEnt->location.type != BUS_PLATFORM #endif ) goto fail; pPriv = xf86GetEntityPrivate(pScrn->entityList[0], getRADEONEntityIndex()); pRADEONEnt = pPriv->ptr; if(xf86IsEntityShared(pScrn->entityList[0])) { if(xf86IsPrimInitDone(pScrn->entityList[0])) { info->IsSecondary = TRUE; pRADEONEnt->pSecondaryScrn = pScrn; } else { info->IsPrimary = TRUE; xf86SetPrimInitDone(pScrn->entityList[0]); pRADEONEnt->pPrimaryScrn = pScrn; pRADEONEnt->HasSecondary = FALSE; } } info->PciInfo = xf86GetPciInfoForEntity(info->pEnt->index); pScrn->monitor = pScrn->confScreen->monitor; if (!RADEONPreInitVisual(pScrn)) goto fail; xf86CollectOptions(pScrn, NULL); if (!(info->Options = malloc(sizeof(RADEONOptions_KMS)))) goto fail; memcpy(info->Options, RADEONOptions_KMS, sizeof(RADEONOptions_KMS)); xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, info->Options); if (!RADEONPreInitWeight(pScrn)) goto fail; if (!RADEONPreInitChipType_KMS(pScrn)) goto fail; if (radeon_open_drm_master(pScrn) == FALSE) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Kernel modesetting setup failed\n"); goto fail; } info->dri2.available = FALSE; info->dri2.enabled = FALSE; info->dri2.pKernelDRMVersion = drmGetVersion(info->dri2.drm_fd); if (info->dri2.pKernelDRMVersion == NULL) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "RADEONDRIGetVersion failed to get the DRM version\n"); goto fail; } if (!RADEONPreInitAccel_KMS(pScrn)) goto fail; info->allowColorTiling2D = FALSE; RADEONSetupCapabilities(pScrn); /* don't enable tiling if accel is not enabled */ if (!info->r600_shadow_fb) { Bool colorTilingDefault = xorgGetVersion() >= XORG_VERSION_NUMERIC(1,9,4,901,0) && info->ChipFamily >= CHIP_FAMILY_R300 && /* this check could be removed sometime after a big mesa release * with proper bit, in the meantime you need to set tiling option in * xorg configuration files */ info->ChipFamily <= CHIP_FAMILY_HAINAN && !info->is_fast_fb; /* 2D color tiling */ if (info->ChipFamily >= CHIP_FAMILY_R600) { info->allowColorTiling2D = xf86ReturnOptValBool(info->Options, OPTION_COLOR_TILING_2D, info->ChipFamily <= CHIP_FAMILY_HAINAN); } if (info->ChipFamily >= CHIP_FAMILY_R600) { /* set default group bytes, overridden by kernel info below */ info->group_bytes = 256; info->have_tiling_info = FALSE; if (info->dri2.pKernelDRMVersion->version_minor >= 6) { if (r600_get_tile_config(pScrn)) { info->allowColorTiling = xf86ReturnOptValBool(info->Options, OPTION_COLOR_TILING, colorTilingDefault); /* need working DFS for tiling */ if ((info->ChipFamily == CHIP_FAMILY_PALM) && (!info->accel_state->allowHWDFS)) info->allowColorTiling = FALSE; } else info->allowColorTiling = FALSE; } else xf86DrvMsg(pScrn->scrnIndex, X_INFO, "R6xx+ KMS Color Tiling requires radeon drm 2.6.0 or newer\n"); } else info->allowColorTiling = xf86ReturnOptValBool(info->Options, OPTION_COLOR_TILING, colorTilingDefault); } else info->allowColorTiling = FALSE; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "KMS Color Tiling: %sabled\n", info->allowColorTiling ? "en" : "dis"); xf86DrvMsg(pScrn->scrnIndex, X_INFO, "KMS Color Tiling 2D: %sabled\n", info->allowColorTiling2D ? "en" : "dis"); if (info->dri2.pKernelDRMVersion->version_minor >= 8) { info->allowPageFlip = xf86ReturnOptValBool(info->Options, OPTION_PAGE_FLIP, TRUE); xf86DrvMsg(pScrn->scrnIndex, X_INFO, "KMS Pageflipping: %sabled\n", info->allowPageFlip ? "en" : "dis"); } info->swapBuffersWait = xf86ReturnOptValBool(info->Options, OPTION_SWAPBUFFERS_WAIT, TRUE); xf86DrvMsg(pScrn->scrnIndex, X_INFO, "SwapBuffers wait for vsync: %sabled\n", info->swapBuffersWait ? "en" : "dis"); if (drmmode_pre_init(pScrn, &info->drmmode, pScrn->bitsPerPixel / 8) == FALSE) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Kernel modesetting setup failed\n"); goto fail; } if (info->drmmode.mode_res->count_crtcs == 1) pRADEONEnt->HasCRTC2 = FALSE; else pRADEONEnt->HasCRTC2 = TRUE; /* fix up cloning on rn50 cards * since they only have one crtc sometimes the xserver doesn't assign * a crtc to one of the outputs even though both outputs have common modes * which results in only one monitor being enabled. Assign a crtc here so * that both outputs light up. */ if (info->ChipFamily == CHIP_FAMILY_RV100 && !pRADEONEnt->HasCRTC2) { 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]; /* XXX: double check crtc mode */ if ((output->probed_modes != NULL) && (output->crtc == NULL)) output->crtc = xf86_config->crtc[0]; } } /* set cursor size */ if (info->ChipFamily >= CHIP_FAMILY_BONAIRE) { info->cursor_w = CURSOR_WIDTH_CIK; info->cursor_h = CURSOR_HEIGHT_CIK; } else { info->cursor_w = CURSOR_WIDTH; info->cursor_h = CURSOR_HEIGHT; } { struct drm_radeon_gem_info mminfo; if (!drmCommandWriteRead(info->dri2.drm_fd, DRM_RADEON_GEM_INFO, &mminfo, sizeof(mminfo))) { info->vram_size = mminfo.vram_visible; info->gart_size = mminfo.gart_size; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "mem size init: gart size :%llx vram size: s:%llx visible:%llx\n", (unsigned long long)mminfo.gart_size, (unsigned long long)mminfo.vram_size, (unsigned long long)mminfo.vram_visible); } } if (!info->use_glamor) { info->exa_pixmaps = xf86ReturnOptValBool(info->Options, OPTION_EXA_PIXMAPS, (info->vram_size > (32 * 1024 * 1024) && info->RenderAccel && !info->is_fast_fb)); if (info->exa_pixmaps) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "EXA: Driver will allow EXA pixmaps in VRAM\n"); else xf86DrvMsg(pScrn->scrnIndex, X_INFO, "EXA: Driver will not allow EXA pixmaps in VRAM\n"); } /* no tiled scanout on r6xx+ yet */ if (info->allowColorTiling) { if (info->ChipFamily >= CHIP_FAMILY_R600) tiling |= RADEON_TILING_MICRO; else tiling |= RADEON_TILING_MACRO; } cpp = pScrn->bitsPerPixel / 8; pScrn->displayWidth = RADEON_ALIGN(pScrn->virtualX, drmmode_get_pitch_align(pScrn, cpp, tiling)); /* Set display resolution */ xf86SetDpi(pScrn, 0, 0); /* Get ScreenInit function */ if (!xf86LoadSubModule(pScrn, "fb")) return FALSE; if (!xf86SetGamma(pScrn, zeros)) return FALSE; if (!xf86ReturnOptValBool(info->Options, OPTION_SW_CURSOR, FALSE)) { if (!xf86LoadSubModule(pScrn, "ramdac")) return FALSE; } if (pScrn->modes == NULL #ifdef XSERVER_PLATFORM_BUS && !pScrn->is_gpu #endif ) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No modes.\n"); goto fail; } return TRUE; fail: RADEONFreeRec(pScrn); return FALSE; } static Bool RADEONCursorInit_KMS(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); return xf86_cursors_init (pScreen, info->cursor_w, info->cursor_h, (HARDWARE_CURSOR_TRUECOLOR_AT_8BPP | HARDWARE_CURSOR_AND_SOURCE_WITH_MASK | HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1 | HARDWARE_CURSOR_UPDATE_UNHIDDEN | HARDWARE_CURSOR_ARGB)); } void RADEONBlank(ScrnInfoPtr pScrn) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); xf86OutputPtr output; xf86CrtcPtr crtc; int o, c; for (c = 0; c < xf86_config->num_crtc; c++) { crtc = xf86_config->crtc[c]; for (o = 0; o < xf86_config->num_output; o++) { output = xf86_config->output[o]; if (output->crtc != crtc) continue; output->funcs->dpms(output, DPMSModeOff); } crtc->funcs->dpms(crtc, DPMSModeOff); } } void RADEONUnblank(ScrnInfoPtr pScrn) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); xf86OutputPtr output; xf86CrtcPtr crtc; int o, c; for (c = 0; c < xf86_config->num_crtc; c++) { crtc = xf86_config->crtc[c]; if(!crtc->enabled) continue; crtc->funcs->dpms(crtc, DPMSModeOn); for (o = 0; o < xf86_config->num_output; o++) { output = xf86_config->output[o]; if (output->crtc != crtc) continue; output->funcs->dpms(output, DPMSModeOn); } } } static Bool RADEONSaveScreen_KMS(ScreenPtr pScreen, int mode) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); Bool unblank; xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, "RADEONSaveScreen(%d)\n", mode); unblank = xf86IsUnblank(mode); if (unblank) SetTimeSinceLastInputEvent(); if ((pScrn != NULL) && pScrn->vtSema) { if (unblank) RADEONUnblank(pScrn); else RADEONBlank(pScrn); } return TRUE; } /* Called at the end of each server generation. Restore the original * text mode, unmap video memory, and unwrap and call the saved * CloseScreen function. */ static Bool RADEONCloseScreen_KMS(CLOSE_SCREEN_ARGS_DECL) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, "RADEONCloseScreen\n"); drmmode_uevent_fini(pScrn, &info->drmmode); radeon_cs_flush_indirect(pScrn); DeleteCallback(&FlushCallback, radeon_flush_callback, pScrn); if (info->accel_state->exa) { exaDriverFini(pScreen); free(info->accel_state->exa); info->accel_state->exa = NULL; } if (info->accel_state->use_vbos) radeon_vbo_free_lists(pScrn); drmDropMaster(info->dri2.drm_fd); drmmode_fini(pScrn, &info->drmmode); if (info->dri2.enabled) radeon_dri2_close_screen(pScreen); pScrn->vtSema = FALSE; xf86ClearPrimInitDone(info->pEnt->index); pScreen->BlockHandler = info->BlockHandler; pScreen->CloseScreen = info->CloseScreen; return (*pScreen->CloseScreen)(CLOSE_SCREEN_ARGS); } void RADEONFreeScreen_KMS(FREE_SCREEN_ARGS_DECL) { SCRN_INFO_PTR(arg); RADEONInfoPtr info = RADEONPTR(pScrn); xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, "RADEONFreeScreen\n"); /* when server quits at PreInit, we don't need do this anymore*/ if (!info) return; RADEONFreeRec(pScrn); } Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); int subPixelOrder = SubPixelUnknown; char* s; void *front_ptr; int ret; pScrn->fbOffset = 0; miClearVisualTypes(); if (!miSetVisualTypes(pScrn->depth, miGetDefaultVisualMask(pScrn->depth), pScrn->rgbBits, pScrn->defaultVisual)) return FALSE; miSetPixmapDepths (); ret = drmSetMaster(info->dri2.drm_fd); if (ret) { ErrorF("Unable to retrieve master\n"); return FALSE; } info->directRenderingEnabled = FALSE; if (info->r600_shadow_fb == FALSE) info->directRenderingEnabled = radeon_dri2_screen_init(pScreen); info->surf_man = radeon_surface_manager_new(info->dri2.drm_fd); if (!info->bufmgr) info->bufmgr = radeon_bo_manager_gem_ctor(info->dri2.drm_fd); if (!info->bufmgr) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "failed to initialise GEM buffer manager"); return FALSE; } drmmode_set_bufmgr(pScrn, &info->drmmode, info->bufmgr); if (!info->csm) info->csm = radeon_cs_manager_gem_ctor(info->dri2.drm_fd); if (!info->csm) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "failed to initialise command submission manager"); return FALSE; } if (!info->cs) info->cs = radeon_cs_create(info->csm, RADEON_BUFFER_SIZE/4); if (!info->cs) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "failed to initialise command submission buffer"); return FALSE; } radeon_cs_set_limit(info->cs, RADEON_GEM_DOMAIN_GTT, info->gart_size); radeon_cs_space_set_flush(info->cs, (void(*)(void *))radeon_cs_flush_indirect, pScrn); if (!radeon_setup_kernel_mem(pScreen)) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "radeon_setup_kernel_mem failed\n"); return FALSE; } front_ptr = info->front_bo->ptr; if (info->r600_shadow_fb) { info->fb_shadow = calloc(1, pScrn->displayWidth * pScrn->virtualY * ((pScrn->bitsPerPixel + 7) >> 3)); if (info->fb_shadow == NULL) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to allocate shadow framebuffer\n"); info->r600_shadow_fb = FALSE; } else { if (!fbScreenInit(pScreen, info->fb_shadow, pScrn->virtualX, pScrn->virtualY, pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth, pScrn->bitsPerPixel)) return FALSE; } } if (info->r600_shadow_fb == FALSE) { /* Init fb layer */ if (!fbScreenInit(pScreen, front_ptr, pScrn->virtualX, pScrn->virtualY, pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth, pScrn->bitsPerPixel)) return FALSE; } xf86SetBlackWhitePixels(pScreen); if (pScrn->bitsPerPixel > 8) { VisualPtr visual; 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; } } } /* Must be after RGB order fixed */ fbPictureInit (pScreen, 0, 0); #ifdef RENDER if ((s = xf86GetOptValString(info->Options, OPTION_SUBPIXEL_ORDER))) { if (strcmp(s, "RGB") == 0) subPixelOrder = SubPixelHorizontalRGB; else if (strcmp(s, "BGR") == 0) subPixelOrder = SubPixelHorizontalBGR; else if (strcmp(s, "NONE") == 0) subPixelOrder = SubPixelNone; PictureSetSubpixelOrder (pScreen, subPixelOrder); } #endif pScrn->vtSema = TRUE; xf86SetBackingStore(pScreen); if (info->directRenderingEnabled) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Direct rendering enabled\n"); } else { xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Direct rendering disabled\n"); } if (info->r600_shadow_fb) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Acceleration disabled\n"); info->accelOn = FALSE; } else { xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, "Initializing Acceleration\n"); if (RADEONAccelInit(pScreen)) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Acceleration enabled\n"); info->accelOn = TRUE; } else { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Acceleration initialization failed\n"); xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Acceleration disabled\n"); info->accelOn = FALSE; } } /* Init DPMS */ xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, "Initializing DPMS\n"); xf86DPMSInit(pScreen, xf86DPMSSet, 0); xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, "Initializing Cursor\n"); /* Set Silken Mouse */ xf86SetSilkenMouse(pScreen); /* Cursor setup */ miDCInitialize(pScreen, xf86GetPointerScreenFuncs()); if (!xf86ReturnOptValBool(info->Options, OPTION_SW_CURSOR, FALSE)) { if (RADEONCursorInit_KMS(pScreen)) { } } /* DGA setup */ #ifdef XFreeXDGA /* DGA is dangerous on kms as the base and framebuffer location may change: * http://lists.freedesktop.org/archives/xorg-devel/2009-September/002113.html */ /* xf86DiDGAInit(pScreen, info->LinearAddr + pScrn->fbOffset); */ #endif if (info->r600_shadow_fb == FALSE) { /* Init Xv */ xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, "Initializing Xv\n"); RADEONInitVideo(pScreen); } if (info->r600_shadow_fb == TRUE) { if (!shadowSetup(pScreen)) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Shadowfb initialization failed\n"); return FALSE; } } pScrn->pScreen = pScreen; /* Provide SaveScreen & wrap BlockHandler and CloseScreen */ /* Wrap CloseScreen */ info->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = RADEONCloseScreen_KMS; pScreen->SaveScreen = RADEONSaveScreen_KMS; info->BlockHandler = pScreen->BlockHandler; pScreen->BlockHandler = RADEONBlockHandler_KMS; if (!AddCallback(&FlushCallback, radeon_flush_callback, pScrn)) return FALSE; info->CreateScreenResources = pScreen->CreateScreenResources; pScreen->CreateScreenResources = RADEONCreateScreenResources_KMS; #ifdef RADEON_PIXMAP_SHARING pScreen->StartPixmapTracking = PixmapStartDirtyTracking; pScreen->StopPixmapTracking = PixmapStopDirtyTracking; #endif if (!xf86CrtcScreenInit (pScreen)) return FALSE; /* Wrap pointer motion to flip touch screen around */ // info->PointerMoved = pScrn->PointerMoved; // pScrn->PointerMoved = RADEONPointerMoved; if (!drmmode_setup_colormap(pScreen, pScrn)) return FALSE; /* Note unused options */ if (serverGeneration == 1) xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options); drmmode_init(pScrn, &info->drmmode); xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, "RADEONScreenInit finished\n"); info->accel_state->XInited3D = FALSE; info->accel_state->engineMode = EXA_ENGINEMODE_UNKNOWN; return TRUE; } Bool RADEONEnterVT_KMS(VT_FUNC_ARGS_DECL) { SCRN_INFO_PTR(arg); RADEONInfoPtr info = RADEONPTR(pScrn); int ret; xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, "RADEONEnterVT_KMS\n"); ret = drmSetMaster(info->dri2.drm_fd); if (ret) ErrorF("Unable to retrieve master\n"); info->accel_state->XInited3D = FALSE; info->accel_state->engineMode = EXA_ENGINEMODE_UNKNOWN; pScrn->vtSema = TRUE; if (!drmmode_set_desired_modes(pScrn, &info->drmmode)) return FALSE; return TRUE; } void RADEONLeaveVT_KMS(VT_FUNC_ARGS_DECL) { SCRN_INFO_PTR(arg); RADEONInfoPtr info = RADEONPTR(pScrn); xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, "RADEONLeaveVT_KMS\n"); drmDropMaster(info->dri2.drm_fd); xf86RotateFreeShadow(pScrn); xf86_hide_cursors (pScrn); info->accel_state->XInited3D = FALSE; info->accel_state->engineMode = EXA_ENGINEMODE_UNKNOWN; xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG, "Ok, leaving now...\n"); } Bool RADEONSwitchMode_KMS(SWITCH_MODE_ARGS_DECL) { SCRN_INFO_PTR(arg); Bool ret; ret = xf86SetSingleMode (pScrn, mode, RR_Rotate_0); return ret; } void RADEONAdjustFrame_KMS(ADJUST_FRAME_ARGS_DECL) { SCRN_INFO_PTR(arg); RADEONInfoPtr info = RADEONPTR(pScrn); drmmode_adjust_frame(pScrn, &info->drmmode, x, y); return; } static Bool radeon_setup_kernel_mem(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); int cpp = info->pixel_bytes; uint32_t screen_size; int pitch, base_align; uint32_t tiling_flags = 0; struct radeon_surface surface; if (info->accel_state->exa != NULL) { xf86DrvMsg(pScreen->myNum, X_ERROR, "Memory map already initialized\n"); return FALSE; } if (!info->use_glamor && info->r600_shadow_fb == FALSE) { info->accel_state->exa = exaDriverAlloc(); if (info->accel_state->exa == NULL) { xf86DrvMsg(pScreen->myNum, X_ERROR, "exaDriverAlloc failed\n"); return FALSE; } } if (info->allowColorTiling) { if (info->ChipFamily >= CHIP_FAMILY_R600) { if (info->allowColorTiling2D) { tiling_flags |= RADEON_TILING_MACRO; } else { tiling_flags |= RADEON_TILING_MICRO; } } else tiling_flags |= RADEON_TILING_MACRO; } pitch = RADEON_ALIGN(pScrn->virtualX, drmmode_get_pitch_align(pScrn, cpp, tiling_flags)) * cpp; screen_size = RADEON_ALIGN(pScrn->virtualY, drmmode_get_height_align(pScrn, tiling_flags)) * pitch; base_align = drmmode_get_base_align(pScrn, cpp, tiling_flags); if (info->ChipFamily >= CHIP_FAMILY_R600) { if(!info->surf_man) { xf86DrvMsg(pScreen->myNum, X_ERROR, "failed to initialise surface manager\n"); return FALSE; } memset(&surface, 0, sizeof(struct radeon_surface)); surface.npix_x = pScrn->virtualX; surface.npix_y = pScrn->virtualY; surface.npix_z = 1; surface.blk_w = 1; surface.blk_h = 1; surface.blk_d = 1; surface.array_size = 1; surface.last_level = 0; surface.bpe = cpp; surface.nsamples = 1; surface.flags = RADEON_SURF_SCANOUT; /* we are requiring a recent enough libdrm version */ surface.flags |= RADEON_SURF_HAS_TILE_MODE_INDEX; surface.flags |= RADEON_SURF_SET(RADEON_SURF_TYPE_2D, TYPE); surface.flags |= RADEON_SURF_SET(RADEON_SURF_MODE_LINEAR_ALIGNED, MODE); if (tiling_flags & RADEON_TILING_MICRO) { surface.flags = RADEON_SURF_CLR(surface.flags, MODE); surface.flags |= RADEON_SURF_SET(RADEON_SURF_MODE_1D, MODE); } if (tiling_flags & RADEON_TILING_MACRO) { surface.flags = RADEON_SURF_CLR(surface.flags, MODE); surface.flags |= RADEON_SURF_SET(RADEON_SURF_MODE_2D, MODE); } if (radeon_surface_best(info->surf_man, &surface)) { xf86DrvMsg(pScreen->myNum, X_ERROR, "radeon_surface_best failed\n"); return FALSE; } if (radeon_surface_init(info->surf_man, &surface)) { xf86DrvMsg(pScreen->myNum, X_ERROR, "radeon_surface_init failed\n"); return FALSE; } pitch = surface.level[0].pitch_bytes; screen_size = surface.bo_size; base_align = surface.bo_alignment; tiling_flags = 0; switch (surface.level[0].mode) { case RADEON_SURF_MODE_2D: tiling_flags |= RADEON_TILING_MACRO; tiling_flags |= surface.bankw << RADEON_TILING_EG_BANKW_SHIFT; tiling_flags |= surface.bankh << RADEON_TILING_EG_BANKH_SHIFT; tiling_flags |= surface.mtilea << RADEON_TILING_EG_MACRO_TILE_ASPECT_SHIFT; tiling_flags |= eg_tile_split(surface.tile_split) << RADEON_TILING_EG_TILE_SPLIT_SHIFT; break; case RADEON_SURF_MODE_1D: tiling_flags |= RADEON_TILING_MICRO; break; default: break; } info->front_surface = surface; } { int cursor_size; int c; cursor_size = info->cursor_w * info->cursor_h * 4; cursor_size = RADEON_ALIGN(cursor_size, RADEON_GPU_PAGE_SIZE); for (c = 0; c < xf86_config->num_crtc; c++) { /* cursor objects */ if (info->cursor_bo[c] == NULL) { info->cursor_bo[c] = radeon_bo_open(info->bufmgr, 0, cursor_size, 0, RADEON_GEM_DOMAIN_VRAM, 0); if (!info->cursor_bo[c]) { ErrorF("Failed to allocate cursor buffer memory\n"); return FALSE; } if (radeon_bo_map(info->cursor_bo[c], 1)) { ErrorF("Failed to map cursor buffer memory\n"); } drmmode_set_cursor(pScrn, &info->drmmode, c, info->cursor_bo[c]); } } } screen_size = RADEON_ALIGN(screen_size, RADEON_GPU_PAGE_SIZE); if (info->front_bo == NULL) { info->front_bo = radeon_bo_open(info->bufmgr, 0, screen_size, base_align, RADEON_GEM_DOMAIN_VRAM, 0); if (info->r600_shadow_fb == TRUE) { if (radeon_bo_map(info->front_bo, 1)) { ErrorF("Failed to map cursor buffer memory\n"); } } #if X_BYTE_ORDER == X_BIG_ENDIAN switch (cpp) { case 4: tiling_flags |= RADEON_TILING_SWAP_32BIT; break; case 2: tiling_flags |= RADEON_TILING_SWAP_16BIT; break; } if (info->ChipFamily < CHIP_FAMILY_R600 && info->r600_shadow_fb && tiling_flags) tiling_flags |= RADEON_TILING_SURFACE; #endif if (tiling_flags) radeon_bo_set_tiling(info->front_bo, tiling_flags, pitch); } pScrn->displayWidth = pitch / cpp; xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Front buffer size: %dK\n", info->front_bo->size/1024); radeon_kms_update_vram_limit(pScrn, screen_size); return TRUE; } void radeon_kms_update_vram_limit(ScrnInfoPtr pScrn, uint32_t new_fb_size) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); RADEONInfoPtr info = RADEONPTR(pScrn); uint64_t remain_size_bytes; int c; for (c = 0; c < xf86_config->num_crtc; c++) { if (info->cursor_bo[c] != NULL) { new_fb_size += (64 * 4 * 64); } } remain_size_bytes = info->vram_size - new_fb_size; remain_size_bytes = (remain_size_bytes / 10) * 9; if (remain_size_bytes > 0xffffffff) remain_size_bytes = 0xffffffff; radeon_cs_set_limit(info->cs, RADEON_GEM_DOMAIN_VRAM, (uint32_t)remain_size_bytes); xf86DrvMsg(pScrn->scrnIndex, X_INFO, "VRAM usage limit set to %uK\n", (uint32_t)remain_size_bytes / 1024); } /* Used to disallow modes that are not supported by the hardware */ ModeStatus RADEONValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flag) { SCRN_INFO_PTR(arg); RADEONInfoPtr info = RADEONPTR(pScrn); RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn); /* * RN50 has effective maximum mode bandwidth of about 300MiB/s. * XXX should really do this for all chips by properly computing * memory bandwidth and an overhead factor. */ if (info->ChipFamily == CHIP_FAMILY_RV100 && !pRADEONEnt->HasCRTC2) { if (xf86ModeBandwidth(mode, pScrn->bitsPerPixel) > 300) return MODE_BANDWIDTH; } /* There are problems with double scan mode at high clocks * They're likely related PLL and display buffer settings. * Disable these modes for now. */ if (mode->Flags & V_DBLSCAN) { if ((mode->CrtcHDisplay >= 1024) || (mode->CrtcVDisplay >= 768)) return MODE_CLOCK_RANGE; } return MODE_OK; } xf86-video-ati-7.3.0/src/cayman_shader.h0000664000175000017500000002360612177731114014667 00000000000000/* * Cayman shaders * * Copyright (C) 2011 Advanced Micro Devices, 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 * BRIAN PAUL 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. */ /* * Shader macros */ #ifndef __SHADER_H__ #define __SHADER_H__ #include "radeon.h" /* Oder of instructions: All CF, All ALU, All Tex/Vtx fetches */ // CF insts // addr #define ADDR(x) (x) // jumptable #define JUMPTABLE_SEL(x) (x) // pc #define POP_COUNT(x) (x) // const #define CF_CONST(x) (x) // cond #define COND(x) (x) // SQ_COND_* // count #define I_COUNT(x) ((x) ? ((x) - 1) : 0) // vpm #define VALID_PIXEL_MODE(x) (x) // cf inst #define CF_INST(x) (x) // SQ_CF_INST_* // wqm #define WHOLE_QUAD_MODE(x) (x) // barrier #define BARRIER(x) (x) //kb0 #define KCACHE_BANK0(x) (x) //kb1 #define KCACHE_BANK1(x) (x) // km0/1 #define KCACHE_MODE0(x) (x) #define KCACHE_MODE1(x) (x) // SQ_CF_KCACHE_* // #define KCACHE_ADDR0(x) (x) #define KCACHE_ADDR1(x) (x) #define ALT_CONST(x) (x) #define ARRAY_BASE(x) (x) // export pixel #define CF_PIXEL_MRT0 0 #define CF_PIXEL_MRT1 1 #define CF_PIXEL_MRT2 2 #define CF_PIXEL_MRT3 3 #define CF_PIXEL_MRT4 4 #define CF_PIXEL_MRT5 5 #define CF_PIXEL_MRT6 6 #define CF_PIXEL_MRT7 7 // computed Z #define CF_COMPUTED_Z 61 // export pos #define CF_POS0 60 #define CF_POS1 61 #define CF_POS2 62 #define CF_POS3 63 // export param // 0...31 #define TYPE(x) (x) // SQ_EXPORT_* #define RW_GPR(x) (x) #define RW_REL(x) (x) #define ABSOLUTE 0 #define RELATIVE 1 #define INDEX_GPR(x) (x) #define ELEM_SIZE(x) (x ? (x - 1) : 0) #define BURST_COUNT(x) (x ? (x - 1) : 0) #define MARK(x) (x) // swiz #define SRC_SEL_X(x) (x) // SQ_SEL_* each #define SRC_SEL_Y(x) (x) #define SRC_SEL_Z(x) (x) #define SRC_SEL_W(x) (x) #define CF_DWORD0(addr, jmptbl) cpu_to_le32(((addr) | ((jmptbl) << 24))) #define CF_DWORD1(pc, cf_const, cond, count, vpm, cf_inst, b) \ cpu_to_le32((((pc) << 0) | ((cf_const) << 3) | ((cond) << 8) | ((count) << 10) | \ ((vpm) << 20) | ((cf_inst) << 22) | ((b) << 31))) #define CF_ALU_DWORD0(addr, kb0, kb1, km0) cpu_to_le32((((addr) << 0) | ((kb0) << 22) | ((kb1) << 26) | ((km0) << 30))) #define CF_ALU_DWORD1(km1, kcache_addr0, kcache_addr1, count, alt_const, cf_inst, wqm, b) \ cpu_to_le32((((km1) << 0) | ((kcache_addr0) << 2) | ((kcache_addr1) << 10) | \ ((count) << 18) | ((alt_const) << 25) | ((cf_inst) << 26) | ((wqm) << 30) | ((b) << 31))) #define CF_ALLOC_IMP_EXP_DWORD0(array_base, type, rw_gpr, rr, index_gpr, es) \ cpu_to_le32((((array_base) << 0) | ((type) << 13) | ((rw_gpr) << 15) | ((rr) << 22) | \ ((index_gpr) << 23) | ((es) << 30))) #define CF_ALLOC_IMP_EXP_DWORD1_SWIZ(sel_x, sel_y, sel_z, sel_w, bc, vpm, cf_inst, m, b) \ cpu_to_le32((((sel_x) << 0) | ((sel_y) << 3) | ((sel_z) << 6) | ((sel_w) << 9) | \ ((bc) << 16) | ((vpm) << 20) | ((cf_inst) << 22) | ((m) << 30) | ((b) << 31))) // ALU clause insts #define SRC0_SEL(x) (x) #define SRC1_SEL(x) (x) #define SRC2_SEL(x) (x) // src[0-2]_sel // 0-127 GPR // 128-159 kcache constants bank 0 // 160-191 kcache constants bank 1 // 192-255 inline const values // 256-287 kcache constants bank 2 // 288-319 kcache constants bank 3 // 219-255 special SQ_ALU_SRC_* (0, 1, etc.) // 488-520 src param space #define ALU_SRC_GPR_BASE 0 #define ALU_SRC_KCACHE0_BASE 128 #define ALU_SRC_KCACHE1_BASE 160 #define ALU_SRC_INLINE_K_BASE 192 #define ALU_SRC_KCACHE2_BASE 256 #define ALU_SRC_KCACHE3_BASE 288 #define ALU_SRC_PARAM_BASE 448 #define SRC0_REL(x) (x) #define SRC1_REL(x) (x) #define SRC2_REL(x) (x) // elem #define SRC0_ELEM(x) (x) #define SRC1_ELEM(x) (x) #define SRC2_ELEM(x) (x) #define ELEM_X 0 #define ELEM_Y 1 #define ELEM_Z 2 #define ELEM_W 3 // neg #define SRC0_NEG(x) (x) #define SRC1_NEG(x) (x) #define SRC2_NEG(x) (x) // im #define INDEX_MODE(x) (x) // SQ_INDEX_* // ps #define PRED_SEL(x) (x) // SQ_PRED_SEL_* // last #define LAST(x) (x) // abs #define SRC0_ABS(x) (x) #define SRC1_ABS(x) (x) // uem #define UPDATE_EXECUTE_MASK(x) (x) // up #define UPDATE_PRED(x) (x) // wm #define WRITE_MASK(x) (x) // omod #define OMOD(x) (x) // SQ_ALU_OMOD_* // alu inst #define ALU_INST(x) (x) // SQ_ALU_INST_* //bs #define BANK_SWIZZLE(x) (x) // SQ_ALU_VEC_* #define DST_GPR(x) (x) #define DST_REL(x) (x) #define DST_ELEM(x) (x) #define CLAMP(x) (x) #define ALU_DWORD0(src0_sel, s0r, s0e, s0n, src1_sel, s1r, s1e, s1n, im, ps, last) \ cpu_to_le32((((src0_sel) << 0) | ((s0r) << 9) | ((s0e) << 10) | ((s0n) << 12) | \ ((src1_sel) << 13) | ((s1r) << 22) | ((s1e) << 23) | ((s1n) << 25) | \ ((im) << 26) | ((ps) << 29) | ((last) << 31))) #define ALU_DWORD1_OP2(s0a, s1a, uem, up, wm, omod, alu_inst, bs, dst_gpr, dr, de, clamp) \ cpu_to_le32((((s0a) << 0) | ((s1a) << 1) | ((uem) << 2) | ((up) << 3) | ((wm) << 4) | \ ((omod) << 5) | ((alu_inst) << 7) | ((bs) << 18) | ((dst_gpr) << 21) | \ ((dr) << 28) | ((de) << 29) | ((clamp) << 31))) #define ALU_DWORD1_OP3(src2_sel, s2r, s2e, s2n, alu_inst, bs, dst_gpr, dr, de, clamp) \ cpu_to_le32((((src2_sel) << 0) | ((s2r) << 9) | ((s2e) << 10) | ((s2n) << 12) | \ ((alu_inst) << 13) | ((bs) << 18) | ((dst_gpr) << 21) | ((dr) << 28) | \ ((de) << 29) | ((clamp) << 31))) // VTX clause insts // vxt insts #define VTX_INST(x) (x) // SQ_VTX_INST_* // fetch type #define FETCH_TYPE(x) (x) // SQ_VTX_FETCH_* #define FETCH_WHOLE_QUAD(x) (x) #define BUFFER_ID(x) (x) #define SRC_GPR(x) (x) #define SRC_REL(x) (x) #define STRUCTURED_READ(x) (x) #define LDS_REQ(x) (x) #define COALESCED_READ(x) (x) #define DST_SEL_X(x) (x) #define DST_SEL_Y(x) (x) #define DST_SEL_Z(x) (x) #define DST_SEL_W(x) (x) #define USE_CONST_FIELDS(x) (x) #define DATA_FORMAT(x) (x) // num format #define NUM_FORMAT_ALL(x) (x) // SQ_NUM_FORMAT_* // format comp #define FORMAT_COMP_ALL(x) (x) // SQ_FORMAT_COMP_* // sma #define SRF_MODE_ALL(x) (x) #define SRF_MODE_ZERO_CLAMP_MINUS_ONE 0 #define SRF_MODE_NO_ZERO 1 #define OFFSET(x) (x) // endian swap #define ENDIAN_SWAP(x) (x) // SQ_ENDIAN_* #define CONST_BUF_NO_STRIDE(x) (x) #define BUFFER_INDEX_MODE(x) (x) #define VTX_DWORD0(vtx_inst, ft, fwq, buffer_id, src_gpr, sr, ssx, ssy, str, ldsr, cr) \ cpu_to_le32((((vtx_inst) << 0) | ((ft) << 5) | ((fwq) << 7) | ((buffer_id) << 8) | \ ((src_gpr) << 16) | ((sr) << 23) | ((ssx) << 24) | ((ssy) << 26) | \ ((str) << 28) | ((ldsr) << 30) | ((cr) << 31))) #define VTX_DWORD1_GPR(dst_gpr, dr, dsx, dsy, dsz, dsw, ucf, data_format, nfa, fca, sma) \ cpu_to_le32((((dst_gpr) << 0) | ((dr) << 7) | ((dsx) << 9) | ((dsy) << 12) | ((dsz) << 15) | ((dsw) << 18) | \ ((ucf) << 21) | ((data_format) << 22) | ((nfa) << 28) | ((fca) << 30) | ((sma) << 31))) #define VTX_DWORD2(offset, es, cbns, alt_const, bim) \ cpu_to_le32((((offset) << 0) | ((es) << 16) | ((cbns) << 18) | ((alt_const) << 20) | ((bim) << 21))) #define VTX_DWORD_PAD cpu_to_le32(0x00000000) // TEX clause insts // tex insts #define TEX_INST(x) (x) // SQ_TEX_INST_* #define INST_MOD(x) (x) #define FETCH_WHOLE_QUAD(x) (x) #define RESOURCE_ID(x) (x) #define RESOURCE_INDEX_MODE(x) (x) #define SAMPLER_INDEX_MODE(x) (x) #define LOD_BIAS(x) (x) //ct #define COORD_TYPE_X(x) (x) #define COORD_TYPE_Y(x) (x) #define COORD_TYPE_Z(x) (x) #define COORD_TYPE_W(x) (x) #define TEX_UNNORMALIZED 0 #define TEX_NORMALIZED 1 #define OFFSET_X(x) (((int)(x) * 2) & 0x1f) /* 4:1-bits 2's-complement fixed-point: [-8.0..7.5] */ #define OFFSET_Y(x) (((int)(x) * 2) & 0x1f) #define OFFSET_Z(x) (((int)(x) * 2) & 0x1f) #define SAMPLER_ID(x) (x) #define TEX_DWORD0(tex_inst, im, fwq, resource_id, src_gpr, sr, ac, rim, sim) \ cpu_to_le32((((tex_inst) << 0) | ((im) << 5) | ((fwq) << 7) | ((resource_id) << 8) | \ ((src_gpr) << 16) | ((sr) << 23) | ((ac) << 24) | ((rim) << 25) | ((sim) << 27))) #define TEX_DWORD1(dst_gpr, dr, dsx, dsy, dsz, dsw, lod_bias, ctx, cty, ctz, ctw) \ cpu_to_le32((((dst_gpr) << 0) | ((dr) << 7) | ((dsx) << 9) | ((dsy) << 12) | ((dsz) << 15) | ((dsw) << 18) | \ ((lod_bias) << 21) | ((ctx) << 28) | ((cty) << 29) | ((ctz) << 30) | ((ctw) << 31))) #define TEX_DWORD2(offset_x, offset_y, offset_z, sampler_id, ssx, ssy, ssz, ssw) \ cpu_to_le32((((offset_x) << 0) | ((offset_y) << 5) | ((offset_z) << 10) | ((sampler_id) << 15) | \ ((ssx) << 20) | ((ssy) << 23) | ((ssz) << 26) | ((ssw) << 29))) #define TEX_DWORD_PAD cpu_to_le32(0x00000000) #endif xf86-video-ati-7.3.0/src/radeon_probe.c0000664000175000017500000001770212256365366014535 00000000000000/* * Copyright 2000 ATI Technologies Inc., Markham, Ontario, and * VA Linux Systems Inc., Fremont, California. * * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation on the rights to use, copy, modify, merge, * publish, distribute, 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 * NON-INFRINGEMENT. IN NO EVENT SHALL ATI, VA LINUX SYSTEMS AND/OR * THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include /* * Authors: * Kevin E. Martin * Rickard E. Faith * KMS support - Dave Airlie */ #include "radeon_probe.h" #include "radeon_version.h" #include "atipciids.h" #include "atipcirename.h" #include "xf86.h" #include "xf86drmMode.h" #include "dri.h" #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) #include #endif #ifdef XSERVER_PLATFORM_BUS #include #endif #include "radeon_chipset_gen.h" #include "radeon_pci_chipset_gen.h" #include "radeon_pci_device_match_gen.h" _X_EXPORT int gRADEONEntityIndex = -1; /* Return the options for supported chipset 'n'; NULL otherwise */ static const OptionInfoRec * RADEONAvailableOptions(int chipid, int busid) { return RADEONOptionsWeak(); } /* Return the string name for supported chipset 'n'; NULL otherwise. */ static void RADEONIdentify(int flags) { xf86PrintChipsets(RADEON_NAME, "Driver for ATI Radeon chipsets", RADEONChipsets); } static Bool radeon_kernel_mode_enabled(ScrnInfoPtr pScrn, struct pci_device *pci_dev) { char *busIdString; int ret; if (!xf86LoaderCheckSymbol("DRICreatePCIBusID")) { xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0, "[KMS] No DRICreatePCIBusID symbol, no kernel modesetting.\n"); return FALSE; } busIdString = DRICreatePCIBusID(pci_dev); ret = drmCheckModesettingSupported(busIdString); #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) if (ret) { if (xf86LoadKernelModule("radeonkms")) ret = drmCheckModesettingSupported(busIdString); } #endif free(busIdString); if (ret) { xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0, "[KMS] drm report modesetting isn't supported.\n"); return FALSE; } xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, 0, "[KMS] Kernel modesetting enabled.\n"); return TRUE; } static Bool radeon_get_scrninfo(int entity_num, void *pci_dev) { ScrnInfoPtr pScrn = NULL; EntityInfoPtr pEnt; pScrn = xf86ConfigPciEntity(pScrn, 0, entity_num, RADEONPciChipsets, NULL, NULL, NULL, NULL, NULL); if (!pScrn) return FALSE; if (pci_dev) { if (!radeon_kernel_mode_enabled(pScrn, pci_dev)) { return FALSE; } } pScrn->driverVersion = RADEON_VERSION_CURRENT; pScrn->driverName = RADEON_DRIVER_NAME; pScrn->name = RADEON_NAME; pScrn->Probe = NULL; pScrn->PreInit = RADEONPreInit_KMS; pScrn->ScreenInit = RADEONScreenInit_KMS; pScrn->SwitchMode = RADEONSwitchMode_KMS; pScrn->AdjustFrame = RADEONAdjustFrame_KMS; pScrn->EnterVT = RADEONEnterVT_KMS; pScrn->LeaveVT = RADEONLeaveVT_KMS; pScrn->FreeScreen = RADEONFreeScreen_KMS; pScrn->ValidMode = RADEONValidMode; pEnt = xf86GetEntityInfo(entity_num); /* Create a RADEONEntity for all chips, even with old single head * Radeon, need to use pRADEONEnt for new monitor detection routines. */ { DevUnion *pPriv; RADEONEntPtr pRADEONEnt; xf86SetEntitySharable(entity_num); if (gRADEONEntityIndex == -1) gRADEONEntityIndex = xf86AllocateEntityPrivateIndex(); pPriv = xf86GetEntityPrivate(pEnt->index, gRADEONEntityIndex); xf86SetEntityInstanceForScreen(pScrn, pEnt->index, xf86GetNumEntityInstances(pEnt->index) - 1); if (!pPriv->ptr) { pPriv->ptr = xnfcalloc(sizeof(RADEONEntRec), 1); pRADEONEnt = pPriv->ptr; pRADEONEnt->HasSecondary = FALSE; } else { pRADEONEnt = pPriv->ptr; pRADEONEnt->HasSecondary = TRUE; } } free(pEnt); return TRUE; } static Bool radeon_pci_probe( DriverPtr pDriver, int entity_num, struct pci_device *device, intptr_t match_data ) { return radeon_get_scrninfo(entity_num, (void *)device); } static Bool RADEONDriverFunc(ScrnInfoPtr scrn, xorgDriverFuncOp op, void *data) { xorgHWFlags *flag; switch (op) { case GET_REQUIRED_HW_INTERFACES: flag = (CARD32 *)data; (*flag) = 0; return TRUE; default: return FALSE; } } #ifdef XSERVER_PLATFORM_BUS static Bool radeon_platform_probe(DriverPtr pDriver, int entity_num, int flags, struct xf86_platform_device *dev, intptr_t match_data) { ScrnInfoPtr pScrn; int scr_flags = 0; EntityInfoPtr pEnt; if (!dev->pdev) return FALSE; if (flags & PLATFORM_PROBE_GPU_SCREEN) scr_flags = XF86_ALLOCATE_GPU_SCREEN; pScrn = xf86AllocateScreen(pDriver, scr_flags); if (xf86IsEntitySharable(entity_num)) xf86SetEntityShared(entity_num); xf86AddEntityToScreen(pScrn, entity_num); if (!radeon_kernel_mode_enabled(pScrn, dev->pdev)) return FALSE; pScrn->driverVersion = RADEON_VERSION_CURRENT; pScrn->driverName = RADEON_DRIVER_NAME; pScrn->name = RADEON_NAME; pScrn->Probe = NULL; pScrn->PreInit = RADEONPreInit_KMS; pScrn->ScreenInit = RADEONScreenInit_KMS; pScrn->SwitchMode = RADEONSwitchMode_KMS; pScrn->AdjustFrame = RADEONAdjustFrame_KMS; pScrn->EnterVT = RADEONEnterVT_KMS; pScrn->LeaveVT = RADEONLeaveVT_KMS; pScrn->FreeScreen = RADEONFreeScreen_KMS; pScrn->ValidMode = RADEONValidMode; pEnt = xf86GetEntityInfo(entity_num); /* Create a RADEONEntity for all chips, even with old single head * Radeon, need to use pRADEONEnt for new monitor detection routines. */ { DevUnion *pPriv; RADEONEntPtr pRADEONEnt; xf86SetEntitySharable(entity_num); if (gRADEONEntityIndex == -1) gRADEONEntityIndex = xf86AllocateEntityPrivateIndex(); pPriv = xf86GetEntityPrivate(pEnt->index, gRADEONEntityIndex); xf86SetEntityInstanceForScreen(pScrn, pEnt->index, xf86GetNumEntityInstances(pEnt->index) - 1); if (!pPriv->ptr) { pPriv->ptr = xnfcalloc(sizeof(RADEONEntRec), 1); pRADEONEnt = pPriv->ptr; pRADEONEnt->HasSecondary = FALSE; } else { pRADEONEnt = pPriv->ptr; pRADEONEnt->HasSecondary = TRUE; } } free(pEnt); return TRUE; } #endif _X_EXPORT DriverRec RADEON = { RADEON_VERSION_CURRENT, RADEON_DRIVER_NAME, RADEONIdentify, NULL, RADEONAvailableOptions, NULL, 0, RADEONDriverFunc, radeon_device_match, radeon_pci_probe, #ifdef XSERVER_PLATFORM_BUS radeon_platform_probe #endif }; xf86-video-ati-7.3.0/src/ati.c0000664000175000017500000002400312177731114012631 00000000000000/* * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * 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 Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE 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. */ /*************************************************************************/ /* * Author: Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * This is the ATI driver for XFree86. * * John Donne once said "No man is an island", and I am most certainly not an * exception. Contributions, intentional or not, to this and previous versions * of this driver by the following are hereby acknowledged: * * Thomas Roell, Per Lindqvist, Doug Evans, Rik Faith, Arthur Tateishi, * Alain Hebert, Ton van Rosmalen, David Chambers, William Shubert, * ATI Technologies Incorporated, Robert Wolff, David Dawes, Mark Weaver, * Hans Nasten, Kevin Martin, Frederic Rienthaler, Marc Bolduc, Reuben Sumner, * Benjamin T. Yang, James Fast Kane, Randall Hopper, W. Marcus Miller, * Henrik Harmsen, Christian Lupien, Precision Insight Incorporated, * Mark Vojkovich, Huw D M Davies, Andrew C Aitchison, Ani Joshi, * Kostas Gewrgiou, Jakub Jelinek, David S. Miller, A E Lawrence, * Linus Torvalds, William Blew, Ignacio Garcia Etxebarria, Patrick Chase, * Vladimir Dergachev, Egbert Eich, Mike A. Harris * * ... and, many, many others from around the world. * * In addition, this work would not have been possible without the active * support, both moral and otherwise, of the staff and management of Computing * and Network Services at the University of Alberta, in Edmonton, Alberta, * Canada. * * The driver is intended to support all ATI adapters since their VGA Wonder * V3, including OEM counterparts. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "atipcirename.h" #include "ati.h" #include "atipciids.h" #include "ativersion.h" /* names duplicated from version headers */ #define MACH64_DRIVER_NAME "mach64" #define R128_DRIVER_NAME "r128" #define RADEON_DRIVER_NAME "radeon" enum { ATI_CHIP_FAMILY_NONE = 0, ATI_CHIP_FAMILY_Mach64, ATI_CHIP_FAMILY_Rage128, ATI_CHIP_FAMILY_Radeon }; static int ATIChipID(const uint16_t); /* domain defines (stolen from xserver) */ #if (defined(__alpha__) || defined(__ia64__)) && defined (linux) # define PCI_DOM_MASK 0x01fful #else # define PCI_DOM_MASK 0x0ffu #endif #define PCI_DOM_FROM_BUS(bus) (((bus) >> 8) & (PCI_DOM_MASK)) #define PCI_BUS_NO_DOMAIN(bus) ((bus) & 0xffu) static struct pci_device* ati_device_get_from_busid(int bus, int dev, int func) { return pci_device_find_by_slot(PCI_DOM_FROM_BUS(bus), PCI_BUS_NO_DOMAIN(bus), dev, func); } #ifndef XSERVER_PLATFORM_BUS static struct pci_device* ati_device_get_primary(void) { struct pci_device *device = NULL; struct pci_device_iterator *device_iter; device_iter = pci_slot_match_iterator_create(NULL); while ((device = pci_device_next(device_iter)) != NULL) { if (xf86IsPrimaryPci(device)) break; } pci_iterator_destroy(device_iter); return device; } #else static struct pci_device * ati_device_get_indexed(int index) { struct pci_device *device = NULL; struct pci_device_iterator *device_iter; int count = 0; device_iter = pci_slot_match_iterator_create(NULL); while ((device = pci_device_next(device_iter)) != NULL) { if (device->vendor_id == PCI_VENDOR_ATI) { if (count == index) return device; count++; } } return NULL; } #endif void ati_gdev_subdriver(pointer options) { int nATIGDev, nMach64GDev, nR128GDev, nRadeonGDev; GDevPtr *ATIGDevs; Bool load_mach64 = FALSE, load_r128 = FALSE, load_radeon = FALSE; int i; /* let the subdrivers configure for themselves */ if (xf86ServerIsOnlyDetecting()) return; /* get Device sections with Driver "ati" */ nATIGDev = xf86MatchDevice(ATI_DRIVER_NAME, &ATIGDevs); nMach64GDev = xf86MatchDevice(MACH64_DRIVER_NAME, NULL); nR128GDev = xf86MatchDevice(R128_DRIVER_NAME, NULL); nRadeonGDev = xf86MatchDevice(RADEON_DRIVER_NAME, NULL); for (i = 0; i < nATIGDev; i++) { GDevPtr ati_gdev = ATIGDevs[i]; pciVideoPtr device = NULL; int chip_family; /* get pci device for the Device section */ if (ati_gdev->busID) { int bus, dev, func; if (!xf86ParsePciBusString(ati_gdev->busID, &bus, &dev, &func)) continue; device = ati_device_get_from_busid(bus, dev, func); } #ifdef XSERVER_PLATFORM_BUS else device = ati_device_get_indexed(i); #else else { device = ati_device_get_primary(); } #endif if (!device) continue; /* check for non-ati devices and prehistoric mach32 */ if ((PCI_DEV_VENDOR_ID(device) != PCI_VENDOR_ATI) || (PCI_DEV_DEVICE_ID(device) == PCI_CHIP_MACH32)) continue; /* replace Driver line in the Device section */ chip_family = ATIChipID(PCI_DEV_DEVICE_ID(device)); if (chip_family == ATI_CHIP_FAMILY_Mach64) { ati_gdev->driver = MACH64_DRIVER_NAME; load_mach64 = TRUE; } if (chip_family == ATI_CHIP_FAMILY_Rage128) { ati_gdev->driver = R128_DRIVER_NAME; load_r128 = TRUE; } if (chip_family == ATI_CHIP_FAMILY_Radeon) { ati_gdev->driver = RADEON_DRIVER_NAME; load_radeon = TRUE; } } free(ATIGDevs); /* load subdrivers as primary modules and only if they do not get loaded * from other device sections */ if (load_mach64 && (nMach64GDev == 0)) xf86LoadOneModule(MACH64_DRIVER_NAME, options); if (load_r128 && (nR128GDev == 0)) xf86LoadOneModule(R128_DRIVER_NAME, options); if (load_radeon && (nRadeonGDev == 0)) xf86LoadOneModule(RADEON_DRIVER_NAME, options); } /* * ATIChipID -- * * This returns the ATI_CHIP_FAMILY_* value associated with a particular ChipID. */ static int ATIChipID(const uint16_t ChipID) { switch (ChipID) { case PCI_CHIP_MACH64GX: case PCI_CHIP_MACH64CX: case PCI_CHIP_MACH64CT: case PCI_CHIP_MACH64ET: case PCI_CHIP_MACH64VT: case PCI_CHIP_MACH64GT: case PCI_CHIP_MACH64VU: case PCI_CHIP_MACH64GU: case PCI_CHIP_MACH64LG: case PCI_CHIP_MACH64VV: case PCI_CHIP_MACH64GV: case PCI_CHIP_MACH64GW: case PCI_CHIP_MACH64GY: case PCI_CHIP_MACH64GZ: case PCI_CHIP_MACH64GB: case PCI_CHIP_MACH64GD: case PCI_CHIP_MACH64GI: case PCI_CHIP_MACH64GP: case PCI_CHIP_MACH64GQ: case PCI_CHIP_MACH64LB: case PCI_CHIP_MACH64LD: case PCI_CHIP_MACH64LI: case PCI_CHIP_MACH64LP: case PCI_CHIP_MACH64LQ: case PCI_CHIP_MACH64GL: case PCI_CHIP_MACH64GM: case PCI_CHIP_MACH64GN: case PCI_CHIP_MACH64GO: case PCI_CHIP_MACH64GR: case PCI_CHIP_MACH64GS: case PCI_CHIP_MACH64LM: case PCI_CHIP_MACH64LN: case PCI_CHIP_MACH64LR: case PCI_CHIP_MACH64LS: return ATI_CHIP_FAMILY_Mach64; case PCI_CHIP_RAGE128RE: case PCI_CHIP_RAGE128RF: case PCI_CHIP_RAGE128RG: case PCI_CHIP_RAGE128SK: case PCI_CHIP_RAGE128SL: case PCI_CHIP_RAGE128SM: case PCI_CHIP_RAGE128SN: case PCI_CHIP_RAGE128RK: case PCI_CHIP_RAGE128RL: case PCI_CHIP_RAGE128SE: case PCI_CHIP_RAGE128SF: case PCI_CHIP_RAGE128SG: case PCI_CHIP_RAGE128SH: case PCI_CHIP_RAGE128PA: case PCI_CHIP_RAGE128PB: case PCI_CHIP_RAGE128PC: case PCI_CHIP_RAGE128PD: case PCI_CHIP_RAGE128PE: case PCI_CHIP_RAGE128PF: case PCI_CHIP_RAGE128PG: case PCI_CHIP_RAGE128PH: case PCI_CHIP_RAGE128PI: case PCI_CHIP_RAGE128PJ: case PCI_CHIP_RAGE128PK: case PCI_CHIP_RAGE128PL: case PCI_CHIP_RAGE128PM: case PCI_CHIP_RAGE128PN: case PCI_CHIP_RAGE128PO: case PCI_CHIP_RAGE128PP: case PCI_CHIP_RAGE128PQ: case PCI_CHIP_RAGE128PR: case PCI_CHIP_RAGE128PS: case PCI_CHIP_RAGE128PT: case PCI_CHIP_RAGE128PU: case PCI_CHIP_RAGE128PV: case PCI_CHIP_RAGE128PW: case PCI_CHIP_RAGE128PX: case PCI_CHIP_RAGE128TF: case PCI_CHIP_RAGE128TL: case PCI_CHIP_RAGE128TR: case PCI_CHIP_RAGE128TS: case PCI_CHIP_RAGE128TT: case PCI_CHIP_RAGE128TU: case PCI_CHIP_RAGE128LE: case PCI_CHIP_RAGE128LF: #if 0 case PCI_CHIP_RAGE128LK: case PCI_CHIP_RAGE128LL: #endif case PCI_CHIP_RAGE128MF: case PCI_CHIP_RAGE128ML: return ATI_CHIP_FAMILY_Rage128; default: return ATI_CHIP_FAMILY_Radeon; } } xf86-video-ati-7.3.0/src/radeon_textured_videofuncs.c0000664000175000017500000043650612177731114017514 00000000000000/* * Copyright 2008 Alex Deucher * * 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. * * * Based on radeon_exa_render.c and kdrive ati_video.c by Eric Anholt, et al. * */ #define VTX_OUT_6(_dstX, _dstY, _srcX, _srcY, _maskX, _maskY) \ do { \ OUT_RING(F_TO_DW(_dstX)); \ OUT_RING(F_TO_DW(_dstY)); \ OUT_RING(F_TO_DW(_srcX)); \ OUT_RING(F_TO_DW(_srcY)); \ OUT_RING(F_TO_DW(_maskX)); \ OUT_RING(F_TO_DW(_maskY)); \ } while (0) #define VTX_OUT_4(_dstX, _dstY, _srcX, _srcY) \ do { \ OUT_RING(F_TO_DW(_dstX)); \ OUT_RING(F_TO_DW(_dstY)); \ OUT_RING(F_TO_DW(_srcX)); \ OUT_RING(F_TO_DW(_srcY)); \ } while (0) static Bool RADEONPrepareTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) { RADEONInfoPtr info = RADEONPTR(pScrn); PixmapPtr pPixmap = pPriv->pPixmap; struct radeon_exa_pixmap_priv *driver_priv; struct radeon_bo *src_bo = pPriv->src_bo[pPriv->currentBuffer]; uint32_t txformat, txsize, txpitch; uint32_t dst_pitch, dst_format; uint32_t colorpitch; int pixel_shift; int scissor_w = MIN(pPixmap->drawable.width, 2048) - 1; int scissor_h = MIN(pPixmap->drawable.height, 2048) - 1; int ret; radeon_cs_space_reset_bos(info->cs); radeon_cs_space_add_persistent_bo(info->cs, src_bo, RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM, 0); if (pPriv->bicubic_enabled) radeon_cs_space_add_persistent_bo(info->cs, info->bicubic_bo, RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM, 0); driver_priv = exaGetPixmapDriverPrivate(pPixmap); radeon_cs_space_add_persistent_bo(info->cs, driver_priv->bo, 0, RADEON_GEM_DOMAIN_VRAM); ret = radeon_cs_space_check(info->cs); if (ret) { ErrorF("Not enough RAM to hw accel xv operation\n"); return FALSE; } pixel_shift = pPixmap->drawable.bitsPerPixel >> 4; dst_pitch = exaGetPixmapPitch(pPixmap); RADEON_SWITCH_TO_3D(); /* Same for R100/R200 */ switch (pPixmap->drawable.bitsPerPixel) { case 16: if (pPixmap->drawable.depth == 15) dst_format = RADEON_COLOR_FORMAT_ARGB1555; else dst_format = RADEON_COLOR_FORMAT_RGB565; break; case 32: dst_format = RADEON_COLOR_FORMAT_ARGB8888; break; default: return FALSE; } if (pPriv->id == FOURCC_I420 || pPriv->id == FOURCC_YV12) { pPriv->is_planar = TRUE; txformat = RADEON_TXFORMAT_Y8; } else { pPriv->is_planar = FALSE; if (pPriv->id == FOURCC_UYVY) txformat = RADEON_TXFORMAT_YVYU422; else txformat = RADEON_TXFORMAT_VYUY422; } txformat |= RADEON_TXFORMAT_NON_POWER2; colorpitch = dst_pitch >> pixel_shift; if (RADEONTilingEnabled(pScrn, pPixmap)) colorpitch |= RADEON_COLOR_TILE_ENABLE; BEGIN_ACCEL_RELOC(4,2); OUT_RING_REG(RADEON_RB3D_CNTL, dst_format); EMIT_WRITE_OFFSET(RADEON_RB3D_COLOROFFSET, 0, pPixmap); EMIT_COLORPITCH(RADEON_RB3D_COLORPITCH, colorpitch, pPixmap); OUT_RING_REG(RADEON_RB3D_BLENDCNTL, RADEON_SRC_BLEND_GL_ONE | RADEON_DST_BLEND_GL_ZERO); ADVANCE_RING(); if (pPriv->is_planar) { /* need 2 texcoord sets (even though they are identical) due to denormalization! hw apparently can't premultiply same coord set by different texture size */ pPriv->vtx_count = 6; txsize = (((((pPriv->w + 1 ) >> 1) - 1) & 0x7ff) | (((((pPriv->h + 1 ) >> 1) - 1) & 0x7ff) << RADEON_TEX_VSIZE_SHIFT)); txpitch = RADEON_ALIGN(pPriv->src_pitch >> 1, 64); txpitch -= 32; BEGIN_ACCEL_RELOC(23, 3); OUT_RING_REG(RADEON_SE_VTX_FMT, (RADEON_SE_VTX_FMT_XY | RADEON_SE_VTX_FMT_ST0 | RADEON_SE_VTX_FMT_ST1)); OUT_RING_REG(RADEON_PP_CNTL, (RADEON_TEX_0_ENABLE | RADEON_TEX_BLEND_0_ENABLE | RADEON_TEX_1_ENABLE | RADEON_TEX_BLEND_1_ENABLE | RADEON_TEX_2_ENABLE | RADEON_TEX_BLEND_2_ENABLE | RADEON_PLANAR_YUV_ENABLE)); /* Y */ OUT_RING_REG(RADEON_PP_TXFILTER_0, RADEON_MAG_FILTER_LINEAR | RADEON_MIN_FILTER_LINEAR | RADEON_CLAMP_S_CLAMP_LAST | RADEON_CLAMP_T_CLAMP_LAST | RADEON_YUV_TO_RGB); OUT_RING_REG(RADEON_PP_TXFORMAT_0, txformat | RADEON_TXFORMAT_ST_ROUTE_STQ0); OUT_TEXTURE_REG(RADEON_PP_TXOFFSET_0, 0, src_bo); OUT_RING_REG(RADEON_PP_TXCBLEND_0, RADEON_COLOR_ARG_A_ZERO | RADEON_COLOR_ARG_B_ZERO | RADEON_COLOR_ARG_C_T0_COLOR | RADEON_BLEND_CTL_ADD | RADEON_CLAMP_TX); OUT_RING_REG(RADEON_PP_TXABLEND_0, RADEON_ALPHA_ARG_A_ZERO | RADEON_ALPHA_ARG_B_ZERO | RADEON_ALPHA_ARG_C_T0_ALPHA | RADEON_BLEND_CTL_ADD | RADEON_CLAMP_TX); OUT_RING_REG(RADEON_PP_TEX_SIZE_0, (pPriv->w - 1) | ((pPriv->h - 1) << RADEON_TEX_VSIZE_SHIFT)); OUT_RING_REG(RADEON_PP_TEX_PITCH_0, pPriv->src_pitch - 32); /* U */ OUT_RING_REG(RADEON_PP_TXFILTER_1, RADEON_MAG_FILTER_LINEAR | RADEON_MIN_FILTER_LINEAR | RADEON_CLAMP_S_CLAMP_LAST | RADEON_CLAMP_T_CLAMP_LAST); OUT_RING_REG(RADEON_PP_TXFORMAT_1, txformat | RADEON_TXFORMAT_ST_ROUTE_STQ1); OUT_TEXTURE_REG(RADEON_PP_TXOFFSET_1, pPriv->planeu_offset, src_bo); OUT_RING_REG(RADEON_PP_TXCBLEND_1, RADEON_COLOR_ARG_A_ZERO | RADEON_COLOR_ARG_B_ZERO | RADEON_COLOR_ARG_C_T0_COLOR | RADEON_BLEND_CTL_ADD | RADEON_CLAMP_TX); OUT_RING_REG(RADEON_PP_TXABLEND_1, RADEON_ALPHA_ARG_A_ZERO | RADEON_ALPHA_ARG_B_ZERO | RADEON_ALPHA_ARG_C_T0_ALPHA | RADEON_BLEND_CTL_ADD | RADEON_CLAMP_TX); OUT_RING_REG(RADEON_PP_TEX_SIZE_1, txsize); OUT_RING_REG(RADEON_PP_TEX_PITCH_1, txpitch); /* V */ OUT_RING_REG(RADEON_PP_TXFILTER_2, RADEON_MAG_FILTER_LINEAR | RADEON_MIN_FILTER_LINEAR | RADEON_CLAMP_S_CLAMP_LAST | RADEON_CLAMP_T_CLAMP_LAST); OUT_RING_REG(RADEON_PP_TXFORMAT_2, txformat | RADEON_TXFORMAT_ST_ROUTE_STQ1); OUT_TEXTURE_REG(RADEON_PP_TXOFFSET_2, pPriv->planev_offset, src_bo); OUT_RING_REG(RADEON_PP_TXCBLEND_2, RADEON_COLOR_ARG_A_ZERO | RADEON_COLOR_ARG_B_ZERO | RADEON_COLOR_ARG_C_T0_COLOR | RADEON_BLEND_CTL_ADD | RADEON_CLAMP_TX); OUT_RING_REG(RADEON_PP_TXABLEND_2, RADEON_ALPHA_ARG_A_ZERO | RADEON_ALPHA_ARG_B_ZERO | RADEON_ALPHA_ARG_C_T0_ALPHA | RADEON_BLEND_CTL_ADD | RADEON_CLAMP_TX); OUT_RING_REG(RADEON_PP_TEX_SIZE_2, txsize); OUT_RING_REG(RADEON_PP_TEX_PITCH_2, txpitch); ADVANCE_RING(); } else { pPriv->vtx_count = 4; BEGIN_ACCEL_RELOC(9, 1); OUT_RING_REG(RADEON_SE_VTX_FMT, (RADEON_SE_VTX_FMT_XY | RADEON_SE_VTX_FMT_ST0)); OUT_RING_REG(RADEON_PP_CNTL, RADEON_TEX_0_ENABLE | RADEON_TEX_BLEND_0_ENABLE); OUT_RING_REG(RADEON_PP_TXFILTER_0, RADEON_MAG_FILTER_LINEAR | RADEON_MIN_FILTER_LINEAR | RADEON_CLAMP_S_CLAMP_LAST | RADEON_CLAMP_T_CLAMP_LAST | RADEON_YUV_TO_RGB); OUT_RING_REG(RADEON_PP_TXFORMAT_0, txformat | RADEON_TXFORMAT_ST_ROUTE_STQ0); OUT_TEXTURE_REG(RADEON_PP_TXOFFSET_0, 0, src_bo); OUT_RING_REG(RADEON_PP_TXCBLEND_0, RADEON_COLOR_ARG_A_ZERO | RADEON_COLOR_ARG_B_ZERO | RADEON_COLOR_ARG_C_T0_COLOR | RADEON_BLEND_CTL_ADD | RADEON_CLAMP_TX); OUT_RING_REG(RADEON_PP_TXABLEND_0, RADEON_ALPHA_ARG_A_ZERO | RADEON_ALPHA_ARG_B_ZERO | RADEON_ALPHA_ARG_C_T0_ALPHA | RADEON_BLEND_CTL_ADD | RADEON_CLAMP_TX); OUT_RING_REG(RADEON_PP_TEX_SIZE_0, (pPriv->w - 1) | ((pPriv->h - 1) << RADEON_TEX_VSIZE_SHIFT)); OUT_RING_REG(RADEON_PP_TEX_PITCH_0, pPriv->src_pitch - 32); ADVANCE_RING(); } BEGIN_RING(2*2); OUT_RING_REG(RADEON_RE_TOP_LEFT, 0); OUT_RING_REG(RADEON_RE_WIDTH_HEIGHT, ((scissor_w << RADEON_RE_WIDTH_SHIFT) | (scissor_h << RADEON_RE_HEIGHT_SHIFT))); ADVANCE_RING(); if (pPriv->vsync) { xf86CrtcPtr crtc; if (pPriv->desired_crtc) crtc = pPriv->desired_crtc; else crtc = radeon_pick_best_crtc(pScrn, FALSE, pPriv->drw_x, pPriv->drw_x + pPriv->dst_w, pPriv->drw_y, pPriv->drw_y + pPriv->dst_h); if (crtc) RADEONWaitForVLine(pScrn, pPixmap, crtc, pPriv->drw_y - crtc->y, (pPriv->drw_y - crtc->y) + pPriv->dst_h); } return TRUE; } static void RADEONDisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) { RADEONInfoPtr info = RADEONPTR(pScrn); PixmapPtr pPixmap = pPriv->pPixmap; int dstxoff, dstyoff; BoxPtr pBox = REGION_RECTS(&pPriv->clip); int nBox = REGION_NUM_RECTS(&pPriv->clip); #ifdef COMPOSITE dstxoff = -pPixmap->screen_x + pPixmap->drawable.x; dstyoff = -pPixmap->screen_y + pPixmap->drawable.y; #else dstxoff = 0; dstyoff = 0; #endif if (!RADEONPrepareTexturedVideo(pScrn, pPriv)) return; /* * Rendering of the actual polygon is done in two different * ways depending on chip generation: * * < R300: * * These chips can render a rectangle in one pass, so * handling is pretty straight-forward. * * >= R300: * * These chips can accept a quad, but will render it as * two triangles which results in a diagonal tear. Instead * We render a single, large triangle and use the scissor * functionality to restrict it to the desired rectangle. * Due to guardband limits on r3xx/r4xx, we can only use * the single triangle up to 2560/4021 pixels; above that we * render as a quad. */ while (nBox) { int draw_size = 3 * pPriv->vtx_count + 5; int loop_boxes; if (draw_size > radeon_cs_space_remaining(pScrn)) { radeon_cs_flush_indirect(pScrn); if (!RADEONPrepareTexturedVideo(pScrn, pPriv)) return; } loop_boxes = MIN(radeon_cs_space_remaining(pScrn) / draw_size, nBox); nBox -= loop_boxes; BEGIN_RING(loop_boxes * 3 * pPriv->vtx_count + 5); OUT_RING(CP_PACKET3(RADEON_CP_PACKET3_3D_DRAW_IMMD, loop_boxes * 3 * pPriv->vtx_count + 1)); if (pPriv->is_planar) OUT_RING(RADEON_CP_VC_FRMT_XY | RADEON_CP_VC_FRMT_ST0 | RADEON_CP_VC_FRMT_ST1); else OUT_RING(RADEON_CP_VC_FRMT_XY | RADEON_CP_VC_FRMT_ST0); OUT_RING(RADEON_CP_VC_CNTL_PRIM_TYPE_RECT_LIST | RADEON_CP_VC_CNTL_PRIM_WALK_RING | RADEON_CP_VC_CNTL_MAOS_ENABLE | RADEON_CP_VC_CNTL_VTX_FMT_RADEON_MODE | ((loop_boxes * 3) << RADEON_CP_VC_CNTL_NUM_SHIFT)); while (loop_boxes--) { float srcX, srcY, srcw, srch; int dstX, dstY, dstw, dsth; dstX = pBox->x1 + dstxoff; dstY = pBox->y1 + dstyoff; dstw = pBox->x2 - pBox->x1; dsth = pBox->y2 - pBox->y1; srcX = pPriv->src_x; srcX += ((pBox->x1 - pPriv->drw_x) * pPriv->src_w) / (float)pPriv->dst_w; srcY = pPriv->src_y; srcY += ((pBox->y1 - pPriv->drw_y) * pPriv->src_h) / (float)pPriv->dst_h; srcw = (pPriv->src_w * dstw) / (float)pPriv->dst_w; srch = (pPriv->src_h * dsth) / (float)pPriv->dst_h; if (pPriv->is_planar) { /* * Just render a rect (using three coords). */ VTX_OUT_6((float)dstX, (float)(dstY + dsth), (float)srcX / pPriv->w, (float)(srcY + srch) / pPriv->h, (float)srcX / pPriv->w, (float)(srcY + srch) / pPriv->h); VTX_OUT_6((float)(dstX + dstw), (float)(dstY + dsth), (float)(srcX + srcw) / pPriv->w, (float)(srcY + srch) / pPriv->h, (float)(srcX + srcw) / pPriv->w, (float)(srcY + srch) / pPriv->h); VTX_OUT_6((float)(dstX + dstw), (float)dstY, (float)(srcX + srcw) / pPriv->w, (float)srcY / pPriv->h, (float)(srcX + srcw) / pPriv->w, (float)srcY / pPriv->h); } else { /* * Just render a rect (using three coords). */ VTX_OUT_4((float)dstX, (float)(dstY + dsth), (float)srcX / pPriv->w, (float)(srcY + srch) / pPriv->h); VTX_OUT_4((float)(dstX + dstw), (float)(dstY + dsth), (float)(srcX + srcw) / pPriv->w, (float)(srcY + srch) / pPriv->h); VTX_OUT_4((float)(dstX + dstw), (float)dstY, (float)(srcX + srcw) / pPriv->w, (float)srcY / pPriv->h); } pBox++; } OUT_RING_REG(RADEON_WAIT_UNTIL, RADEON_WAIT_3D_IDLECLEAN); ADVANCE_RING(); } DamageDamageRegion(pPriv->pDraw, &pPriv->clip); } static Bool R200PrepareTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) { RADEONInfoPtr info = RADEONPTR(pScrn); PixmapPtr pPixmap = pPriv->pPixmap; struct radeon_exa_pixmap_priv *driver_priv; struct radeon_bo *src_bo = pPriv->src_bo[pPriv->currentBuffer]; uint32_t txformat; uint32_t txfilter, txsize, txpitch; uint32_t dst_pitch, dst_format; uint32_t colorpitch; int pixel_shift; int scissor_w = MIN(pPixmap->drawable.width, 2048) - 1; int scissor_h = MIN(pPixmap->drawable.height, 2048) - 1; /* note: in contrast to r300, use input biasing on uv components */ const float Loff = -0.0627; float uvcosf, uvsinf; float yco, yoff; float uco[3], vco[3]; float bright, cont, sat; int ref = pPriv->transform_index; float ucscale = 0.25, vcscale = 0.25; Bool needux8 = FALSE, needvx8 = FALSE; int ret; radeon_cs_space_reset_bos(info->cs); radeon_cs_space_add_persistent_bo(info->cs, src_bo, RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM, 0); if (pPriv->bicubic_enabled) radeon_cs_space_add_persistent_bo(info->cs, info->bicubic_bo, RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM, 0); driver_priv = exaGetPixmapDriverPrivate(pPixmap); radeon_cs_space_add_persistent_bo(info->cs, driver_priv->bo, 0, RADEON_GEM_DOMAIN_VRAM); ret = radeon_cs_space_check(info->cs); if (ret) { ErrorF("Not enough RAM to hw accel xv operation\n"); return FALSE; } pixel_shift = pPixmap->drawable.bitsPerPixel >> 4; dst_pitch = exaGetPixmapPitch(pPixmap); RADEON_SWITCH_TO_3D(); /* Same for R100/R200 */ switch (pPixmap->drawable.bitsPerPixel) { case 16: if (pPixmap->drawable.depth == 15) dst_format = RADEON_COLOR_FORMAT_ARGB1555; else dst_format = RADEON_COLOR_FORMAT_RGB565; break; case 32: dst_format = RADEON_COLOR_FORMAT_ARGB8888; break; default: return FALSE; } if (pPriv->id == FOURCC_I420 || pPriv->id == FOURCC_YV12) { pPriv->is_planar = TRUE; txformat = RADEON_TXFORMAT_I8; } else { pPriv->is_planar = FALSE; if (pPriv->id == FOURCC_UYVY) txformat = RADEON_TXFORMAT_YVYU422; else txformat = RADEON_TXFORMAT_VYUY422; } txformat |= RADEON_TXFORMAT_NON_POWER2; colorpitch = dst_pitch >> pixel_shift; if (RADEONTilingEnabled(pScrn, pPixmap)) colorpitch |= RADEON_COLOR_TILE_ENABLE; BEGIN_ACCEL_RELOC(4,2); OUT_RING_REG(RADEON_RB3D_CNTL, dst_format); EMIT_WRITE_OFFSET(RADEON_RB3D_COLOROFFSET, 0, pPixmap); EMIT_COLORPITCH(RADEON_RB3D_COLORPITCH, colorpitch, pPixmap); OUT_RING_REG(RADEON_RB3D_BLENDCNTL, RADEON_SRC_BLEND_GL_ONE | RADEON_DST_BLEND_GL_ZERO); ADVANCE_RING(); txfilter = R200_MAG_FILTER_LINEAR | R200_MIN_FILTER_LINEAR | R200_CLAMP_S_CLAMP_LAST | R200_CLAMP_T_CLAMP_LAST; /* contrast can cause constant overflow, clamp */ cont = RTFContrast(pPriv->contrast); if (cont * trans[ref].RefLuma > 2.0) cont = 2.0 / trans[ref].RefLuma; /* brightness is only from -0.5 to 0.5 should be safe */ bright = RTFBrightness(pPriv->brightness); /* saturation can also cause overflow, clamp */ sat = RTFSaturation(pPriv->saturation); if (sat * trans[ref].RefBCb > 4.0) sat = 4.0 / trans[ref].RefBCb; uvcosf = sat * cos(RTFHue(pPriv->hue)); uvsinf = sat * 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; yoff = Loff * yco + bright; if ((uco[0] > 2.0) || (uco[2] > 2.0)) { needux8 = TRUE; ucscale = 0.125; } if ((vco[0] > 2.0) || (vco[2] > 2.0)) { needvx8 = TRUE; vcscale = 0.125; } if (pPriv->is_planar) { /* need 2 texcoord sets (even though they are identical) due to denormalization! hw apparently can't premultiply same coord set by different texture size */ pPriv->vtx_count = 6; txsize = (((((pPriv->w + 1 ) >> 1) - 1) & 0x7ff) | (((((pPriv->h + 1 ) >> 1) - 1) & 0x7ff) << RADEON_TEX_VSIZE_SHIFT)); txpitch = RADEON_ALIGN(pPriv->src_pitch >> 1, 64); txpitch -= 32; BEGIN_ACCEL_RELOC(36, 3); OUT_RING_REG(RADEON_PP_CNTL, RADEON_TEX_0_ENABLE | RADEON_TEX_1_ENABLE | RADEON_TEX_2_ENABLE | RADEON_TEX_BLEND_0_ENABLE | RADEON_TEX_BLEND_1_ENABLE | RADEON_TEX_BLEND_2_ENABLE); OUT_RING_REG(R200_SE_VTX_FMT_0, R200_VTX_XY); OUT_RING_REG(R200_SE_VTX_FMT_1, (2 << R200_VTX_TEX0_COMP_CNT_SHIFT) | (2 << R200_VTX_TEX1_COMP_CNT_SHIFT)); OUT_RING_REG(R200_PP_TXFILTER_0, txfilter); OUT_RING_REG(R200_PP_TXFORMAT_0, txformat); OUT_RING_REG(R200_PP_TXFORMAT_X_0, 0); OUT_RING_REG(R200_PP_TXSIZE_0, (pPriv->w - 1) | ((pPriv->h - 1) << RADEON_TEX_VSIZE_SHIFT)); OUT_RING_REG(R200_PP_TXPITCH_0, pPriv->src_pitch - 32); OUT_TEXTURE_REG(R200_PP_TXOFFSET_0, 0, src_bo); OUT_RING_REG(R200_PP_TXFILTER_1, txfilter); OUT_RING_REG(R200_PP_TXFORMAT_1, txformat | R200_TXFORMAT_ST_ROUTE_STQ1); OUT_RING_REG(R200_PP_TXFORMAT_X_1, 0); OUT_RING_REG(R200_PP_TXSIZE_1, txsize); OUT_RING_REG(R200_PP_TXPITCH_1, txpitch); OUT_TEXTURE_REG(R200_PP_TXOFFSET_1, pPriv->planeu_offset, src_bo); OUT_RING_REG(R200_PP_TXFILTER_2, txfilter); OUT_RING_REG(R200_PP_TXFORMAT_2, txformat | R200_TXFORMAT_ST_ROUTE_STQ1); OUT_RING_REG(R200_PP_TXFORMAT_X_2, 0); OUT_RING_REG(R200_PP_TXSIZE_2, txsize); OUT_RING_REG(R200_PP_TXPITCH_2, txpitch); OUT_TEXTURE_REG(R200_PP_TXOFFSET_2, pPriv->planev_offset, src_bo); /* similar to r300 code. Note the big problem is that hardware constants * are 8 bits only, representing 0.0-1.0. We can get that up (using bias * + scale) to -1.0-1.0 (but precision will suffer). AFAIK the hw actually * has 12 bits fractional precision (plus 1 sign bit, 3 range bits) but * the constants not. To get larger range can use output scale, but for * that 2.018 value we need a total scale by 8, which means the constants * really have no accuracy whatsoever (5 fractional bits only). * The only direct way to get high precision "constants" into the fragment * pipe I know of is to use the texcoord interpolator (not color, this one * is 8 bit only too), which seems a bit expensive. We're lucky though it * seems the values we need seem to fit better than worst case (get about * 6 fractional bits for this instead of 5, at least when not correcting for * hue/saturation/contrast/brightness, which is the same as for vco - yco and * yoff get 8 fractional bits). Try to preserve as much accuracy as possible * even with non-default saturation/hue/contrast/brightness adjustments, * it gets a little crazy and ultimately precision might still be lacking. * * A higher precision (8 fractional bits) version might just put uco into * a texcoord, and calculate a new vcoconst in the shader, like so: * cohelper = {1.0, 0.0, 0.0} - shouldn't use 0.5 since not exactly representable * vco = {1.5958 - 1.0, -0.8129 + 1.0, 1.0} * vcocalc = ADD temp, bias/scale(cohelper), vco * would in total use 4 tex units, 4 instructions which seems fairly * balanced for this architecture (instead of 3 + 3 for the solution here) * * temp = MAD(yco, yuv.yyyy, yoff) * temp = MAD(uco, yuv.uuuu, temp) * result = MAD(vco, yuv.vvvv, temp) * * note first mad produces actually scalar, hence we transform * it into a dp2a to get 8 bit precision of yco instead of 7 - * That's assuming hw correctly expands consts to internal precision. * (y * 1 + y * (yco - 1) + yoff) * temp = DP2A / 2 (yco, yuv.yyyy, yoff) * temp = MAD (uco / 4, yuv.uuuu * 2, temp) * result = MAD x2 (vco / 2, yuv.vvvv, temp) * * vco, uco need bias (and hence scale too) * */ /* MAD temp0 / 2, const0.a * 2, temp0, -const0.rgb */ OUT_RING_REG(R200_PP_TXCBLEND_0, R200_TXC_ARG_A_TFACTOR_COLOR | R200_TXC_ARG_B_R0_COLOR | R200_TXC_ARG_C_TFACTOR_COLOR | (yoff < 0 ? R200_TXC_NEG_ARG_C : 0) | R200_TXC_OP_DOT2_ADD); OUT_RING_REG(R200_PP_TXCBLEND2_0, (0 << R200_TXC_TFACTOR_SEL_SHIFT) | R200_TXC_SCALE_INV2 | R200_TXC_CLAMP_8_8 | R200_TXC_OUTPUT_REG_R0); OUT_RING_REG(R200_PP_TXABLEND_0, R200_TXA_ARG_A_ZERO | R200_TXA_ARG_B_ZERO | R200_TXA_ARG_C_ZERO | R200_TXA_OP_MADD); OUT_RING_REG(R200_PP_TXABLEND2_0, R200_TXA_OUTPUT_REG_NONE); /* MAD temp0, (const1 - 0.5) * 2, (temp1 - 0.5) * 2, temp0 */ OUT_RING_REG(R200_PP_TXCBLEND_1, R200_TXC_ARG_A_TFACTOR_COLOR | R200_TXC_BIAS_ARG_A | R200_TXC_SCALE_ARG_A | R200_TXC_ARG_B_R1_COLOR | R200_TXC_BIAS_ARG_B | (needux8 ? R200_TXC_SCALE_ARG_B : 0) | R200_TXC_ARG_C_R0_COLOR | R200_TXC_OP_MADD); OUT_RING_REG(R200_PP_TXCBLEND2_1, (1 << R200_TXC_TFACTOR_SEL_SHIFT) | R200_TXC_CLAMP_8_8 | R200_TXC_OUTPUT_REG_R0); OUT_RING_REG(R200_PP_TXABLEND_1, R200_TXA_ARG_A_ZERO | R200_TXA_ARG_B_ZERO | R200_TXA_ARG_C_ZERO | R200_TXA_OP_MADD); OUT_RING_REG(R200_PP_TXABLEND2_1, R200_TXA_OUTPUT_REG_NONE); /* MAD temp0 x 2, (const2 - 0.5) * 2, (temp2 - 0.5), temp0 */ OUT_RING_REG(R200_PP_TXCBLEND_2, R200_TXC_ARG_A_TFACTOR_COLOR | R200_TXC_BIAS_ARG_A | R200_TXC_SCALE_ARG_A | R200_TXC_ARG_B_R2_COLOR | R200_TXC_BIAS_ARG_B | (needvx8 ? R200_TXC_SCALE_ARG_B : 0) | R200_TXC_ARG_C_R0_COLOR | R200_TXC_OP_MADD); OUT_RING_REG(R200_PP_TXCBLEND2_2, (2 << R200_TXC_TFACTOR_SEL_SHIFT) | R200_TXC_SCALE_2X | R200_TXC_CLAMP_0_1 | R200_TXC_OUTPUT_REG_R0); OUT_RING_REG(R200_PP_TXABLEND_2, R200_TXA_ARG_A_ZERO | R200_TXA_ARG_B_ZERO | R200_TXA_ARG_C_ZERO | R200_TXA_COMP_ARG_C | R200_TXA_OP_MADD); OUT_RING_REG(R200_PP_TXABLEND2_2, R200_TXA_CLAMP_0_1 | R200_TXA_OUTPUT_REG_R0); /* shader constants */ OUT_RING_REG(R200_PP_TFACTOR_0, float4touint(yco > 1.0 ? 1.0 : 0.0, /* range special [0, 2] */ yco > 1.0 ? yco - 1.0: yco, yoff < 0 ? -yoff : yoff, /* range special [-1, 1] */ 0.0)); OUT_RING_REG(R200_PP_TFACTOR_1, float4touint(uco[0] * ucscale + 0.5, /* range [-4, 4] */ uco[1] * ucscale + 0.5, /* or [-2, 2] */ uco[2] * ucscale + 0.5, 0.0)); OUT_RING_REG(R200_PP_TFACTOR_2, float4touint(vco[0] * vcscale + 0.5, /* range [-2, 2] */ vco[1] * vcscale + 0.5, /* or [-4, 4] */ vco[2] * vcscale + 0.5, 0.0)); ADVANCE_RING(); } else { pPriv->vtx_count = 4; BEGIN_ACCEL_RELOC(24, 1); OUT_RING_REG(RADEON_PP_CNTL, RADEON_TEX_0_ENABLE | RADEON_TEX_BLEND_0_ENABLE | RADEON_TEX_BLEND_1_ENABLE | RADEON_TEX_BLEND_2_ENABLE); OUT_RING_REG(R200_SE_VTX_FMT_0, R200_VTX_XY); OUT_RING_REG(R200_SE_VTX_FMT_1, (2 << R200_VTX_TEX0_COMP_CNT_SHIFT)); OUT_RING_REG(R200_PP_TXFILTER_0, txfilter); OUT_RING_REG(R200_PP_TXFORMAT_0, txformat); OUT_RING_REG(R200_PP_TXFORMAT_X_0, 0); OUT_RING_REG(R200_PP_TXSIZE_0, (pPriv->w - 1) | ((pPriv->h - 1) << RADEON_TEX_VSIZE_SHIFT)); OUT_RING_REG(R200_PP_TXPITCH_0, pPriv->src_pitch - 32); OUT_TEXTURE_REG(R200_PP_TXOFFSET_0, 0, src_bo); /* MAD temp1 / 2, const0.a * 2, temp0.ggg, -const0.rgb */ OUT_RING_REG(R200_PP_TXCBLEND_0, R200_TXC_ARG_A_TFACTOR_COLOR | R200_TXC_ARG_B_R0_COLOR | R200_TXC_ARG_C_TFACTOR_COLOR | (yoff < 0 ? R200_TXC_NEG_ARG_C : 0) | R200_TXC_OP_DOT2_ADD); OUT_RING_REG(R200_PP_TXCBLEND2_0, (0 << R200_TXC_TFACTOR_SEL_SHIFT) | R200_TXC_SCALE_INV2 | (R200_TXC_REPL_GREEN << R200_TXC_REPL_ARG_B_SHIFT) | R200_TXC_CLAMP_8_8 | R200_TXC_OUTPUT_REG_R1); OUT_RING_REG(R200_PP_TXABLEND_0, R200_TXA_ARG_A_ZERO | R200_TXA_ARG_B_ZERO | R200_TXA_ARG_C_ZERO | R200_TXA_OP_MADD); OUT_RING_REG(R200_PP_TXABLEND2_0, R200_TXA_OUTPUT_REG_NONE); /* MAD temp1, (const1 - 0.5) * 2, (temp0.rrr - 0.5) * 2, temp1 */ OUT_RING_REG(R200_PP_TXCBLEND_1, R200_TXC_ARG_A_TFACTOR_COLOR | R200_TXC_BIAS_ARG_A | R200_TXC_SCALE_ARG_A | R200_TXC_ARG_B_R0_COLOR | R200_TXC_BIAS_ARG_B | (needux8 ? R200_TXC_SCALE_ARG_B : 0) | R200_TXC_ARG_C_R1_COLOR | R200_TXC_OP_MADD); OUT_RING_REG(R200_PP_TXCBLEND2_1, (1 << R200_TXC_TFACTOR_SEL_SHIFT) | (R200_TXC_REPL_BLUE << R200_TXC_REPL_ARG_B_SHIFT) | R200_TXC_CLAMP_8_8 | R200_TXC_OUTPUT_REG_R1); OUT_RING_REG(R200_PP_TXABLEND_1, R200_TXA_ARG_A_ZERO | R200_TXA_ARG_B_ZERO | R200_TXA_ARG_C_ZERO | R200_TXA_OP_MADD); OUT_RING_REG(R200_PP_TXABLEND2_1, R200_TXA_OUTPUT_REG_NONE); /* MAD temp0 x 2, (const2 - 0.5) * 2, (temp0.bbb - 0.5), temp1 */ OUT_RING_REG(R200_PP_TXCBLEND_2, R200_TXC_ARG_A_TFACTOR_COLOR | R200_TXC_BIAS_ARG_A | R200_TXC_SCALE_ARG_A | R200_TXC_ARG_B_R0_COLOR | R200_TXC_BIAS_ARG_B | (needvx8 ? R200_TXC_SCALE_ARG_B : 0) | R200_TXC_ARG_C_R1_COLOR | R200_TXC_OP_MADD); OUT_RING_REG(R200_PP_TXCBLEND2_2, (2 << R200_TXC_TFACTOR_SEL_SHIFT) | R200_TXC_SCALE_2X | (R200_TXC_REPL_RED << R200_TXC_REPL_ARG_B_SHIFT) | R200_TXC_CLAMP_0_1 | R200_TXC_OUTPUT_REG_R0); OUT_RING_REG(R200_PP_TXABLEND_2, R200_TXA_ARG_A_ZERO | R200_TXA_ARG_B_ZERO | R200_TXA_ARG_C_ZERO | R200_TXA_COMP_ARG_C | R200_TXA_OP_MADD); OUT_RING_REG(R200_PP_TXABLEND2_2, R200_TXA_CLAMP_0_1 | R200_TXA_OUTPUT_REG_R0); /* shader constants */ OUT_RING_REG(R200_PP_TFACTOR_0, float4touint(yco > 1.0 ? 1.0 : 0.0, /* range special [0, 2] */ yco > 1.0 ? yco - 1.0: yco, yoff < 0 ? -yoff : yoff, /* range special [-1, 1] */ 0.0)); OUT_RING_REG(R200_PP_TFACTOR_1, float4touint(uco[0] * ucscale + 0.5, /* range [-4, 4] */ uco[1] * ucscale + 0.5, /* or [-2, 2] */ uco[2] * ucscale + 0.5, 0.0)); OUT_RING_REG(R200_PP_TFACTOR_2, float4touint(vco[0] * vcscale + 0.5, /* range [-2, 2] */ vco[1] * vcscale + 0.5, /* or [-4, 4] */ vco[2] * vcscale + 0.5, 0.0)); ADVANCE_RING(); } BEGIN_RING(2*2); OUT_RING_REG(RADEON_RE_TOP_LEFT, 0); OUT_RING_REG(RADEON_RE_WIDTH_HEIGHT, ((scissor_w << RADEON_RE_WIDTH_SHIFT) | (scissor_h << RADEON_RE_HEIGHT_SHIFT))); ADVANCE_RING(); if (pPriv->vsync) { xf86CrtcPtr crtc; if (pPriv->desired_crtc) crtc = pPriv->desired_crtc; else crtc = radeon_pick_best_crtc(pScrn, FALSE, pPriv->drw_x, pPriv->drw_x + pPriv->dst_w, pPriv->drw_y, pPriv->drw_y + pPriv->dst_h); if (crtc) RADEONWaitForVLine(pScrn, pPixmap, crtc, pPriv->drw_y - crtc->y, (pPriv->drw_y - crtc->y) + pPriv->dst_h); } return TRUE; } static void R200DisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) { RADEONInfoPtr info = RADEONPTR(pScrn); PixmapPtr pPixmap = pPriv->pPixmap; int dstxoff, dstyoff; BoxPtr pBox = REGION_RECTS(&pPriv->clip); int nBox = REGION_NUM_RECTS(&pPriv->clip); #ifdef COMPOSITE dstxoff = -pPixmap->screen_x + pPixmap->drawable.x; dstyoff = -pPixmap->screen_y + pPixmap->drawable.y; #else dstxoff = 0; dstyoff = 0; #endif if (!R200PrepareTexturedVideo(pScrn, pPriv)) return; /* * Rendering of the actual polygon is done in two different * ways depending on chip generation: * * < R300: * * These chips can render a rectangle in one pass, so * handling is pretty straight-forward. * * >= R300: * * These chips can accept a quad, but will render it as * two triangles which results in a diagonal tear. Instead * We render a single, large triangle and use the scissor * functionality to restrict it to the desired rectangle. * Due to guardband limits on r3xx/r4xx, we can only use * the single triangle up to 2560/4021 pixels; above that we * render as a quad. */ while (nBox) { int draw_size = 3 * pPriv->vtx_count + 4; int loop_boxes; if (draw_size > radeon_cs_space_remaining(pScrn)) { radeon_cs_flush_indirect(pScrn); if (!R200PrepareTexturedVideo(pScrn, pPriv)) return; } loop_boxes = MIN(radeon_cs_space_remaining(pScrn) / draw_size, nBox); nBox -= loop_boxes; BEGIN_RING(loop_boxes * 3 * pPriv->vtx_count + 4); OUT_RING(CP_PACKET3(R200_CP_PACKET3_3D_DRAW_IMMD_2, loop_boxes * 3 * pPriv->vtx_count)); OUT_RING(RADEON_CP_VC_CNTL_PRIM_TYPE_RECT_LIST | RADEON_CP_VC_CNTL_PRIM_WALK_RING | ((loop_boxes * 3) << RADEON_CP_VC_CNTL_NUM_SHIFT)); while (loop_boxes--) { float srcX, srcY, srcw, srch; int dstX, dstY, dstw, dsth; dstX = pBox->x1 + dstxoff; dstY = pBox->y1 + dstyoff; dstw = pBox->x2 - pBox->x1; dsth = pBox->y2 - pBox->y1; srcX = pPriv->src_x; srcX += ((pBox->x1 - pPriv->drw_x) * pPriv->src_w) / (float)pPriv->dst_w; srcY = pPriv->src_y; srcY += ((pBox->y1 - pPriv->drw_y) * pPriv->src_h) / (float)pPriv->dst_h; srcw = (pPriv->src_w * dstw) / (float)pPriv->dst_w; srch = (pPriv->src_h * dsth) / (float)pPriv->dst_h; if (pPriv->is_planar) { /* * Just render a rect (using three coords). */ VTX_OUT_6((float)dstX, (float)(dstY + dsth), (float)srcX / pPriv->w, (float)(srcY + srch) / pPriv->h, (float)srcX / pPriv->w, (float)(srcY + srch) / pPriv->h); VTX_OUT_6((float)(dstX + dstw), (float)(dstY + dsth), (float)(srcX + srcw) / pPriv->w, (float)(srcY + srch) / pPriv->h, (float)(srcX + srcw) / pPriv->w, (float)(srcY + srch) / pPriv->h); VTX_OUT_6((float)(dstX + dstw), (float)dstY, (float)(srcX + srcw) / pPriv->w, (float)srcY / pPriv->h, (float)(srcX + srcw) / pPriv->w, (float)srcY / pPriv->h); } else { /* * Just render a rect (using three coords). */ VTX_OUT_4((float)dstX, (float)(dstY + dsth), (float)srcX / pPriv->w, (float)(srcY + srch) / pPriv->h); VTX_OUT_4((float)(dstX + dstw), (float)(dstY + dsth), (float)(srcX + srcw) / pPriv->w, (float)(srcY + srch) / pPriv->h); VTX_OUT_4((float)(dstX + dstw), (float)dstY, (float)(srcX + srcw) / pPriv->w, (float)srcY / pPriv->h); } pBox++; } OUT_RING_REG(RADEON_WAIT_UNTIL, RADEON_WAIT_3D_IDLECLEAN); ADVANCE_RING(); } DamageDamageRegion(pPriv->pDraw, &pPriv->clip); } static Bool R300PrepareTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) { RADEONInfoPtr info = RADEONPTR(pScrn); PixmapPtr pPixmap = pPriv->pPixmap; struct radeon_exa_pixmap_priv *driver_priv; struct radeon_bo *src_bo = pPriv->src_bo[pPriv->currentBuffer]; uint32_t txfilter, txformat0, txformat1, txpitch; uint32_t dst_pitch, dst_format; uint32_t txenable, colorpitch; uint32_t output_fmt; int pixel_shift; int ret; radeon_cs_space_reset_bos(info->cs); radeon_cs_space_add_persistent_bo(info->cs, src_bo, RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM, 0); if (pPriv->bicubic_enabled) radeon_cs_space_add_persistent_bo(info->cs, info->bicubic_bo, RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM, 0); driver_priv = exaGetPixmapDriverPrivate(pPixmap); radeon_cs_space_add_persistent_bo(info->cs, driver_priv->bo, 0, RADEON_GEM_DOMAIN_VRAM); ret = radeon_cs_space_check(info->cs); if (ret) { ErrorF("Not enough RAM to hw accel xv operation\n"); return FALSE; } pixel_shift = pPixmap->drawable.bitsPerPixel >> 4; dst_pitch = exaGetPixmapPitch(pPixmap); RADEON_SWITCH_TO_3D(); if (pPriv->bicubic_enabled) pPriv->vtx_count = 6; else pPriv->vtx_count = 4; switch (pPixmap->drawable.bitsPerPixel) { case 16: if (pPixmap->drawable.depth == 15) dst_format = R300_COLORFORMAT_ARGB1555; else dst_format = R300_COLORFORMAT_RGB565; break; case 32: dst_format = R300_COLORFORMAT_ARGB8888; break; default: return FALSE; } output_fmt = (R300_OUT_FMT_C4_8 | R300_OUT_FMT_C0_SEL_BLUE | R300_OUT_FMT_C1_SEL_GREEN | R300_OUT_FMT_C2_SEL_RED | R300_OUT_FMT_C3_SEL_ALPHA); colorpitch = dst_pitch >> pixel_shift; colorpitch |= dst_format; if (RADEONTilingEnabled(pScrn, pPixmap)) colorpitch |= R300_COLORTILE; if (((pPriv->bicubic_state == BICUBIC_OFF)) && (pPriv->id == FOURCC_I420 || pPriv->id == FOURCC_YV12)) pPriv->is_planar = TRUE; else pPriv->is_planar = FALSE; if (pPriv->is_planar) { txformat1 = R300_TX_FORMAT_X8 | R300_TX_FORMAT_CACHE_HALF_REGION_0; txpitch = pPriv->src_pitch; } else { if (pPriv->id == FOURCC_UYVY) txformat1 = R300_TX_FORMAT_YVYU422; else txformat1 = R300_TX_FORMAT_VYUY422; if (pPriv->bicubic_state != BICUBIC_OFF) txformat1 |= R300_TX_FORMAT_YUV_TO_RGB_CLAMP; /* pitch is in pixels */ txpitch = pPriv->src_pitch / 2; } txpitch -= 1; txformat0 = ((((pPriv->w - 1) & 0x7ff) << R300_TXWIDTH_SHIFT) | (((pPriv->h - 1) & 0x7ff) << R300_TXHEIGHT_SHIFT) | R300_TXPITCH_EN); txfilter = (R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_LAST) | R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_LAST) | R300_TX_MAG_FILTER_LINEAR | R300_TX_MIN_FILTER_LINEAR | (0 << R300_TX_ID_SHIFT)); BEGIN_ACCEL_RELOC(6, 1); OUT_RING_REG(R300_TX_FILTER0_0, txfilter); OUT_RING_REG(R300_TX_FILTER1_0, 0); OUT_RING_REG(R300_TX_FORMAT0_0, txformat0); if (pPriv->is_planar) OUT_RING_REG(R300_TX_FORMAT1_0, txformat1 | R300_TX_FORMAT_CACHE_HALF_REGION_0); else OUT_RING_REG(R300_TX_FORMAT1_0, txformat1); OUT_RING_REG(R300_TX_FORMAT2_0, txpitch); OUT_TEXTURE_REG(R300_TX_OFFSET_0, 0, src_bo); ADVANCE_RING(); txenable = R300_TEX_0_ENABLE; if (pPriv->is_planar) { txformat0 = ((((((pPriv->w + 1 ) >> 1) - 1) & 0x7ff) << R300_TXWIDTH_SHIFT) | (((((pPriv->h + 1 ) >> 1 ) - 1) & 0x7ff) << R300_TXHEIGHT_SHIFT) | R300_TXPITCH_EN); txpitch = RADEON_ALIGN(pPriv->src_pitch >> 1, 64); txpitch -= 1; txfilter = (R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_LAST) | R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_LAST) | R300_TX_MIN_FILTER_LINEAR | R300_TX_MAG_FILTER_LINEAR); BEGIN_ACCEL_RELOC(12, 2); OUT_RING_REG(R300_TX_FILTER0_1, txfilter | (1 << R300_TX_ID_SHIFT)); OUT_RING_REG(R300_TX_FILTER1_1, 0); OUT_RING_REG(R300_TX_FORMAT0_1, txformat0); OUT_RING_REG(R300_TX_FORMAT1_1, R300_TX_FORMAT_X8 | R300_TX_FORMAT_CACHE_FOURTH_REGION_2); OUT_RING_REG(R300_TX_FORMAT2_1, txpitch); OUT_TEXTURE_REG(R300_TX_OFFSET_1, pPriv->planeu_offset, src_bo); OUT_RING_REG(R300_TX_FILTER0_2, txfilter | (2 << R300_TX_ID_SHIFT)); OUT_RING_REG(R300_TX_FILTER1_2, 0); OUT_RING_REG(R300_TX_FORMAT0_2, txformat0); OUT_RING_REG(R300_TX_FORMAT1_2, R300_TX_FORMAT_X8 | R300_TX_FORMAT_CACHE_FOURTH_REGION_3); OUT_RING_REG(R300_TX_FORMAT2_2, txpitch); OUT_TEXTURE_REG(R300_TX_OFFSET_2, pPriv->planev_offset, src_bo); ADVANCE_RING(); txenable |= R300_TEX_1_ENABLE | R300_TEX_2_ENABLE; } if (pPriv->bicubic_enabled) { /* Size is 128x1 */ txformat0 = ((0x7f << R300_TXWIDTH_SHIFT) | (0x0 << R300_TXHEIGHT_SHIFT) | R300_TXPITCH_EN); /* Format is 32-bit floats, 4bpp */ txformat1 = R300_EASY_TX_FORMAT(Z, Y, X, W, FL_R16G16B16A16); /* Pitch is 127 (128-1) */ txpitch = 0x7f; /* Tex filter */ txfilter = (R300_TX_CLAMP_S(R300_TX_CLAMP_WRAP) | R300_TX_CLAMP_T(R300_TX_CLAMP_WRAP) | R300_TX_MIN_FILTER_NEAREST | R300_TX_MAG_FILTER_NEAREST | (1 << R300_TX_ID_SHIFT)); BEGIN_ACCEL_RELOC(6, 1); OUT_RING_REG(R300_TX_FILTER0_1, txfilter); OUT_RING_REG(R300_TX_FILTER1_1, 0); OUT_RING_REG(R300_TX_FORMAT0_1, txformat0); OUT_RING_REG(R300_TX_FORMAT1_1, txformat1); OUT_RING_REG(R300_TX_FORMAT2_1, txpitch); OUT_TEXTURE_REG(R300_TX_OFFSET_1, 0, info->bicubic_bo); ADVANCE_RING(); /* Enable tex 1 */ txenable |= R300_TEX_1_ENABLE; } /* setup the VAP */ if (info->accel_state->has_tcl) { if (pPriv->bicubic_enabled) BEGIN_RING(2*7); else BEGIN_RING(2*6); } else { if (pPriv->bicubic_enabled) BEGIN_RING(2*5); else BEGIN_RING(2*4); } /* These registers define the number, type, and location of data submitted * to the PVS unit of GA input (when PVS is disabled) * DST_VEC_LOC is the slot in the PVS input vector memory when PVS/TCL is * enabled. This memory provides the imputs to the vertex shader program * and ordering is not important. When PVS/TCL is disabled, this field maps * directly to the GA input memory and the order is signifigant. In * PVS_BYPASS mode the order is as follows: * Position * Point Size * Color 0-3 * Textures 0-7 * Fog */ if (pPriv->bicubic_enabled) { OUT_RING_REG(R300_VAP_PROG_STREAM_CNTL_0, ((R300_DATA_TYPE_FLOAT_2 << R300_DATA_TYPE_0_SHIFT) | (0 << R300_SKIP_DWORDS_0_SHIFT) | (0 << R300_DST_VEC_LOC_0_SHIFT) | R300_SIGNED_0 | (R300_DATA_TYPE_FLOAT_2 << R300_DATA_TYPE_1_SHIFT) | (0 << R300_SKIP_DWORDS_1_SHIFT) | (6 << R300_DST_VEC_LOC_1_SHIFT) | R300_SIGNED_1)); OUT_RING_REG(R300_VAP_PROG_STREAM_CNTL_1, ((R300_DATA_TYPE_FLOAT_2 << R300_DATA_TYPE_2_SHIFT) | (0 << R300_SKIP_DWORDS_2_SHIFT) | (7 << R300_DST_VEC_LOC_2_SHIFT) | R300_LAST_VEC_2 | R300_SIGNED_2)); } else { OUT_RING_REG(R300_VAP_PROG_STREAM_CNTL_0, ((R300_DATA_TYPE_FLOAT_2 << R300_DATA_TYPE_0_SHIFT) | (0 << R300_SKIP_DWORDS_0_SHIFT) | (0 << R300_DST_VEC_LOC_0_SHIFT) | R300_SIGNED_0 | (R300_DATA_TYPE_FLOAT_2 << R300_DATA_TYPE_1_SHIFT) | (0 << R300_SKIP_DWORDS_1_SHIFT) | (6 << R300_DST_VEC_LOC_1_SHIFT) | R300_LAST_VEC_1 | R300_SIGNED_1)); } /* load the vertex shader * We pre-load vertex programs in RADEONInit3DEngine(): * - exa * - Xv * - Xv bicubic * Here we select the offset of the vertex program we want to use */ if (info->accel_state->has_tcl) { if (pPriv->bicubic_enabled) { OUT_RING_REG(R300_VAP_PVS_CODE_CNTL_0, ((11 << R300_PVS_FIRST_INST_SHIFT) | (13 << R300_PVS_XYZW_VALID_INST_SHIFT) | (13 << R300_PVS_LAST_INST_SHIFT))); OUT_RING_REG(R300_VAP_PVS_CODE_CNTL_1, (13 << R300_PVS_LAST_VTX_SRC_INST_SHIFT)); } else { OUT_RING_REG(R300_VAP_PVS_CODE_CNTL_0, ((9 << R300_PVS_FIRST_INST_SHIFT) | (10 << R300_PVS_XYZW_VALID_INST_SHIFT) | (10 << R300_PVS_LAST_INST_SHIFT))); OUT_RING_REG(R300_VAP_PVS_CODE_CNTL_1, (10 << R300_PVS_LAST_VTX_SRC_INST_SHIFT)); } } /* Position and one set of 2 texture coordinates */ OUT_RING_REG(R300_VAP_OUT_VTX_FMT_0, R300_VTX_POS_PRESENT); if (pPriv->bicubic_enabled) OUT_RING_REG(R300_VAP_OUT_VTX_FMT_1, ((2 << R300_TEX_0_COMP_CNT_SHIFT) | (2 << R300_TEX_1_COMP_CNT_SHIFT))); else OUT_RING_REG(R300_VAP_OUT_VTX_FMT_1, (2 << R300_TEX_0_COMP_CNT_SHIFT)); OUT_RING_REG(R300_US_OUT_FMT_0, output_fmt); ADVANCE_RING(); /* setup pixel shader */ if (pPriv->bicubic_state != BICUBIC_OFF) { if (pPriv->bicubic_enabled) { BEGIN_RING(2*79); /* 4 components: 2 for tex0 and 2 for tex1 */ OUT_RING_REG(R300_RS_COUNT, ((4 << R300_RS_COUNT_IT_COUNT_SHIFT) | R300_RS_COUNT_HIRES_EN)); /* R300_INST_COUNT_RS - highest RS instruction used */ OUT_RING_REG(R300_RS_INST_COUNT, R300_INST_COUNT_RS(1)); /* Pixel stack frame size. */ OUT_RING_REG(R300_US_PIXSIZE, 5); /* Indirection levels */ OUT_RING_REG(R300_US_CONFIG, ((2 << R300_NLEVEL_SHIFT) | R300_FIRST_TEX)); /* Set nodes. */ OUT_RING_REG(R300_US_CODE_OFFSET, (R300_ALU_CODE_OFFSET(0) | R300_ALU_CODE_SIZE(14) | R300_TEX_CODE_OFFSET(0) | R300_TEX_CODE_SIZE(6))); /* Nodes are allocated highest first, but executed lowest first */ OUT_RING_REG(R300_US_CODE_ADDR_0, 0); OUT_RING_REG(R300_US_CODE_ADDR_1, (R300_ALU_START(0) | R300_ALU_SIZE(0) | R300_TEX_START(0) | R300_TEX_SIZE(0))); OUT_RING_REG(R300_US_CODE_ADDR_2, (R300_ALU_START(1) | R300_ALU_SIZE(9) | R300_TEX_START(1) | R300_TEX_SIZE(0))); OUT_RING_REG(R300_US_CODE_ADDR_3, (R300_ALU_START(11) | R300_ALU_SIZE(2) | R300_TEX_START(2) | R300_TEX_SIZE(3) | R300_RGBA_OUT)); /* ** BICUBIC FP ** */ /* texcoord0 => temp0 * texcoord1 => temp1 */ // first node /* TEX temp2, temp1.rrr0, tex1, 1D */ OUT_RING_REG(R300_US_TEX_INST(0), (R300_TEX_INST(R300_TEX_INST_LD) | R300_TEX_ID(1) | R300_TEX_SRC_ADDR(1) | R300_TEX_DST_ADDR(2))); /* MOV temp1.r, temp1.ggg0 */ OUT_RING_REG(R300_US_ALU_RGB_INST(0), (R300_ALU_RGB_OP(R300_ALU_RGB_OP_MAD) | R300_ALU_RGB_SEL_A(R300_ALU_RGB_SRC0_GGG) | R300_ALU_RGB_SEL_B(R300_ALU_RGB_1_0) | R300_ALU_RGB_SEL_C(R300_ALU_RGB_0_0))); OUT_RING_REG(R300_US_ALU_RGB_ADDR(0), (R300_ALU_RGB_ADDR0(1) | R300_ALU_RGB_ADDRD(1) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_R))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(0), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_MAD) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(0), (R300_ALU_ALPHA_ADDRD(1) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); // second node /* TEX temp1, temp1, tex1, 1D */ OUT_RING_REG(R300_US_TEX_INST(1), (R300_TEX_INST(R300_TEX_INST_LD) | R300_TEX_ID(1) | R300_TEX_SRC_ADDR(1) | R300_TEX_DST_ADDR(1))); /* MUL temp3.rg, temp2.ggg0, const0.rgb0 */ OUT_RING_REG(R300_US_ALU_RGB_INST(1), (R300_ALU_RGB_OP(R300_ALU_RGB_OP_MAD) | R300_ALU_RGB_SEL_A(R300_ALU_RGB_SRC0_GGG) | R300_ALU_RGB_SEL_B(R300_ALU_RGB_SRC1_RGB) | R300_ALU_RGB_SEL_C(R300_ALU_RGB_0_0))); OUT_RING_REG(R300_US_ALU_RGB_ADDR(1), (R300_ALU_RGB_ADDR0(2) | R300_ALU_RGB_ADDR1(R300_ALU_RGB_CONST(0)) | R300_ALU_RGB_ADDRD(3) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_R | R300_ALU_RGB_MASK_G))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(1), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_MAD) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(1), (R300_ALU_ALPHA_ADDRD(3) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); /* MUL temp2.rg, temp2.rrr0, const0.rgb */ OUT_RING_REG(R300_US_ALU_RGB_INST(2), (R300_ALU_RGB_OP(R300_ALU_RGB_OP_MAD) | R300_ALU_RGB_SEL_A(R300_ALU_RGB_SRC0_RRR) | R300_ALU_RGB_SEL_B(R300_ALU_RGB_SRC1_RGB) | R300_ALU_RGB_SEL_C(R300_ALU_RGB_0_0))); OUT_RING_REG(R300_US_ALU_RGB_ADDR(2), (R300_ALU_RGB_ADDR0(2) | R300_ALU_RGB_ADDR1(R300_ALU_RGB_CONST(0)) | R300_ALU_RGB_ADDRD(2) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_R | R300_ALU_RGB_MASK_G))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(2), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_MAD) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(2), (R300_ALU_ALPHA_ADDRD(2) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); /* MAD temp4.rg, temp1.ggg0, const1.rgb, temp3.rgb0 */ OUT_RING_REG(R300_US_ALU_RGB_INST(3), (R300_ALU_RGB_OP(R300_ALU_RGB_OP_MAD) | R300_ALU_RGB_SEL_A(R300_ALU_RGB_SRC0_GGG) | R300_ALU_RGB_SEL_B(R300_ALU_RGB_SRC1_RGB) | R300_ALU_RGB_SEL_C(R300_ALU_RGB_SRC2_RGB))); OUT_RING_REG(R300_US_ALU_RGB_ADDR(3), (R300_ALU_RGB_ADDR0(1) | R300_ALU_RGB_ADDR1(R300_ALU_RGB_CONST(1)) | R300_ALU_RGB_ADDR2(3) | R300_ALU_RGB_ADDRD(4) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_R | R300_ALU_RGB_MASK_G))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(3), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_MAD) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(3), (R300_ALU_ALPHA_ADDRD(4) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); /* MAD temp5.rg, temp1.ggg0, const1.rgb, temp2.rgb0 */ OUT_RING_REG(R300_US_ALU_RGB_INST(4), (R300_ALU_RGB_OP(R300_ALU_RGB_OP_MAD) | R300_ALU_RGB_SEL_A(R300_ALU_RGB_SRC0_GGG) | R300_ALU_RGB_SEL_B(R300_ALU_RGB_SRC1_RGB) | R300_ALU_RGB_SEL_C(R300_ALU_RGB_SRC2_RGB))); OUT_RING_REG(R300_US_ALU_RGB_ADDR(4), (R300_ALU_RGB_ADDR0(1) | R300_ALU_RGB_ADDR1(R300_ALU_RGB_CONST(1)) | R300_ALU_RGB_ADDR2(2) | R300_ALU_RGB_ADDRD(5) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_R | R300_ALU_RGB_MASK_G))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(4), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_MAD) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(4), (R300_ALU_ALPHA_ADDRD(5) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); /* MAD temp3.rg, temp1.rrr0, const1.rgb, temp3.rgb0 */ OUT_RING_REG(R300_US_ALU_RGB_INST(5), (R300_ALU_RGB_OP(R300_ALU_RGB_OP_MAD) | R300_ALU_RGB_SEL_A(R300_ALU_RGB_SRC0_RRR) | R300_ALU_RGB_SEL_B(R300_ALU_RGB_SRC1_RGB) | R300_ALU_RGB_SEL_C(R300_ALU_RGB_SRC2_RGB))); OUT_RING_REG(R300_US_ALU_RGB_ADDR(5), (R300_ALU_RGB_ADDR0(1) | R300_ALU_RGB_ADDR1(R300_ALU_RGB_CONST(1)) | R300_ALU_RGB_ADDR2(3) | R300_ALU_RGB_ADDRD(3) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_R | R300_ALU_RGB_MASK_G))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(5), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_MAD) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(5), (R300_ALU_ALPHA_ADDRD(3) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); /* MAD temp1.rg, temp1.rrr0, const1.rgb, temp2.rgb0 */ OUT_RING_REG(R300_US_ALU_RGB_INST(6), (R300_ALU_RGB_OP(R300_ALU_RGB_OP_MAD) | R300_ALU_RGB_SEL_A(R300_ALU_RGB_SRC0_RRR) | R300_ALU_RGB_SEL_B(R300_ALU_RGB_SRC1_RGB) | R300_ALU_RGB_SEL_C(R300_ALU_RGB_SRC2_RGB))); OUT_RING_REG(R300_US_ALU_RGB_ADDR(6), (R300_ALU_RGB_ADDR0(1) | R300_ALU_RGB_ADDR1(R300_ALU_RGB_CONST(1)) | R300_ALU_RGB_ADDR2(2) | R300_ALU_RGB_ADDRD(1) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_R | R300_ALU_RGB_MASK_G))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(6), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_MAD) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(6), (R300_ALU_ALPHA_ADDRD(1) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); /* ADD temp1.rg, temp0.rgb0, temp1.rgb0 */ OUT_RING_REG(R300_US_ALU_RGB_INST(7), (R300_ALU_RGB_OP(R300_ALU_RGB_OP_MAD) | R300_ALU_RGB_SEL_A(R300_ALU_RGB_SRC0_RGB) | R300_ALU_RGB_SEL_B(R300_ALU_RGB_1_0) | R300_ALU_RGB_SEL_C(R300_ALU_RGB_SRC2_RGB))); OUT_RING_REG(R300_US_ALU_RGB_ADDR(7), (R300_ALU_RGB_ADDR0(0) | R300_ALU_RGB_ADDR2(1) | R300_ALU_RGB_ADDRD(1) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_R | R300_ALU_RGB_MASK_G))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(7), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_MAD) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(7), (R300_ALU_ALPHA_ADDRD(1) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); /* ADD temp2.rg, temp0.rgb0, temp3.rgb0 */ OUT_RING_REG(R300_US_ALU_RGB_INST(8), (R300_ALU_RGB_OP(R300_ALU_RGB_OP_MAD) | R300_ALU_RGB_SEL_A(R300_ALU_RGB_SRC0_RGB) | R300_ALU_RGB_SEL_B(R300_ALU_RGB_1_0) | R300_ALU_RGB_SEL_C(R300_ALU_RGB_SRC2_RGB))); OUT_RING_REG(R300_US_ALU_RGB_ADDR(8), (R300_ALU_RGB_ADDR0(0) | R300_ALU_RGB_ADDR2(3) | R300_ALU_RGB_ADDRD(2) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_R | R300_ALU_RGB_MASK_G))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(8), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_MAD) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(8), (R300_ALU_ALPHA_ADDRD(2) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); /* ADD temp3.rg, temp0.rgb0, temp5.rgb0 */ OUT_RING_REG(R300_US_ALU_RGB_INST(9), (R300_ALU_RGB_OP(R300_ALU_RGB_OP_MAD) | R300_ALU_RGB_SEL_A(R300_ALU_RGB_SRC0_RGB) | R300_ALU_RGB_SEL_B(R300_ALU_RGB_1_0) | R300_ALU_RGB_SEL_C(R300_ALU_RGB_SRC2_RGB))); OUT_RING_REG(R300_US_ALU_RGB_ADDR(9), (R300_ALU_RGB_ADDR0(0) | R300_ALU_RGB_ADDR2(5) | R300_ALU_RGB_ADDRD(3) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_R | R300_ALU_RGB_MASK_G))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(9), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_MAD) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(9), (R300_ALU_ALPHA_ADDRD(3) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); /* ADD temp0.rg, temp0.rgb0, temp4.rgb0 */ OUT_RING_REG(R300_US_ALU_RGB_INST(10), (R300_ALU_RGB_OP(R300_ALU_RGB_OP_MAD) | R300_ALU_RGB_SEL_A(R300_ALU_RGB_SRC0_RGB) | R300_ALU_RGB_SEL_B(R300_ALU_RGB_1_0) | R300_ALU_RGB_SEL_C(R300_ALU_RGB_SRC2_RGB))); OUT_RING_REG(R300_US_ALU_RGB_ADDR(10), (R300_ALU_RGB_ADDR0(0) | R300_ALU_RGB_ADDR2(4) | R300_ALU_RGB_ADDRD(0) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_R | R300_ALU_RGB_MASK_G))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(10), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_MAD) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(10), (R300_ALU_ALPHA_ADDRD(0) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); // third node /* TEX temp4, temp1.rg--, tex0, 1D */ OUT_RING_REG(R300_US_TEX_INST(2), (R300_TEX_INST(R300_TEX_INST_LD) | R300_TEX_ID(0) | R300_TEX_SRC_ADDR(1) | R300_TEX_DST_ADDR(4))); /* TEX temp3, temp3.rg--, tex0, 1D */ OUT_RING_REG(R300_US_TEX_INST(3), (R300_TEX_INST(R300_TEX_INST_LD) | R300_TEX_ID(0) | R300_TEX_SRC_ADDR(3) | R300_TEX_DST_ADDR(3))); /* TEX temp5, temp2.rg--, tex0, 1D */ OUT_RING_REG(R300_US_TEX_INST(4), (R300_TEX_INST(R300_TEX_INST_LD) | R300_TEX_ID(0) | R300_TEX_SRC_ADDR(2) | R300_TEX_DST_ADDR(5))); /* TEX temp0, temp0.rg--, tex0, 1D */ OUT_RING_REG(R300_US_TEX_INST(5), (R300_TEX_INST(R300_TEX_INST_LD) | R300_TEX_ID(0) | R300_TEX_SRC_ADDR(0) | R300_TEX_DST_ADDR(0))); /* LRP temp3, temp1.bbbb, temp4, temp3 -> * - PRESUB temps, temp4 - temp3 * - MAD temp3, temp1.bbbb, temps, temp3 */ OUT_RING_REG(R300_US_ALU_RGB_INST(11), (R300_ALU_RGB_OP(R300_ALU_RGB_OP_MAD) | R300_ALU_RGB_SEL_A(R300_ALU_RGB_SRC2_BBB) | R300_ALU_RGB_SEL_B(R300_ALU_RGB_SRCP_RGB) | R300_ALU_RGB_SEL_C(R300_ALU_RGB_SRC0_RGB) | R300_ALU_RGB_SRCP_OP(R300_ALU_RGB_SRCP_OP_RGB1_MINUS_RGB0))); OUT_RING_REG(R300_US_ALU_RGB_ADDR(11), (R300_ALU_RGB_ADDR0(3) | R300_ALU_RGB_ADDR1(4) | R300_ALU_RGB_ADDR2(1) | R300_ALU_RGB_ADDRD(3) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_RGB))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(11), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_MAD) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_SRC2_B) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_SRCP_A) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_SRC0_A))); OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(11), (R300_ALU_ALPHA_ADDR0(3) | R300_ALU_ALPHA_ADDR1(4) | R300_ALU_ALPHA_ADDR2(1) | R300_ALU_ALPHA_ADDRD(3) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_A))); /* LRP temp0, temp1.bbbb, temp5, temp0 -> * - PRESUB temps, temp5 - temp0 * - MAD temp0, temp1.bbbb, temps, temp0 */ OUT_RING_REG(R300_US_ALU_RGB_INST(12), (R300_ALU_RGB_OP(R300_ALU_RGB_OP_MAD) | R300_ALU_RGB_SEL_A(R300_ALU_RGB_SRC2_BBB) | R300_ALU_RGB_SEL_B(R300_ALU_RGB_SRCP_RGB) | R300_ALU_RGB_SEL_C(R300_ALU_RGB_SRC0_RGB) | R300_ALU_RGB_SRCP_OP(R300_ALU_RGB_SRCP_OP_RGB1_MINUS_RGB0) | R300_ALU_RGB_INSERT_NOP)); OUT_RING_REG(R300_US_ALU_RGB_ADDR(12), (R300_ALU_RGB_ADDR0(0) | R300_ALU_RGB_ADDR1(5) | R300_ALU_RGB_ADDR2(1) | R300_ALU_RGB_ADDRD(0) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_RGB))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(12), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_MAD) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_SRC2_B) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_SRCP_A) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_SRC0_A))); OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(12), (R300_ALU_ALPHA_ADDR0(0) | R300_ALU_ALPHA_ADDR1(5) | R300_ALU_ALPHA_ADDR2(1) | R300_ALU_ALPHA_ADDRD(0) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_A))); /* LRP output, temp2.bbbb, temp3, temp0 -> * - PRESUB temps, temp3 - temp0 * - MAD output, temp2.bbbb, temps, temp0 */ OUT_RING_REG(R300_US_ALU_RGB_INST(13), (R300_ALU_RGB_OP(R300_ALU_RGB_OP_MAD) | R300_ALU_RGB_SEL_A(R300_ALU_RGB_SRC2_BBB) | R300_ALU_RGB_SEL_B(R300_ALU_RGB_SRCP_RGB) | R300_ALU_RGB_SEL_C(R300_ALU_RGB_SRC0_RGB) | R300_ALU_RGB_SRCP_OP(R300_ALU_RGB_SRCP_OP_RGB1_MINUS_RGB0))); OUT_RING_REG(R300_US_ALU_RGB_ADDR(13), (R300_ALU_RGB_ADDR0(0) | R300_ALU_RGB_ADDR1(3) | R300_ALU_RGB_ADDR2(2) | R300_ALU_RGB_OMASK(R300_ALU_RGB_MASK_RGB))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(13), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_MAD) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_SRC2_B) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_SRCP_A) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_SRC0_A))); OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(13), (R300_ALU_ALPHA_ADDR0(0) | R300_ALU_ALPHA_ADDR1(3) | R300_ALU_ALPHA_ADDR2(2) | R300_ALU_ALPHA_OMASK(R300_ALU_ALPHA_MASK_A))); /* Shader constants. */ OUT_RING_REG(R300_US_ALU_CONST_R(0), F_TO_24(1.0/(float)pPriv->w)); OUT_RING_REG(R300_US_ALU_CONST_G(0), 0); OUT_RING_REG(R300_US_ALU_CONST_B(0), 0); OUT_RING_REG(R300_US_ALU_CONST_A(0), 0); OUT_RING_REG(R300_US_ALU_CONST_R(1), 0); OUT_RING_REG(R300_US_ALU_CONST_G(1), F_TO_24(1.0/(float)pPriv->h)); OUT_RING_REG(R300_US_ALU_CONST_B(1), 0); OUT_RING_REG(R300_US_ALU_CONST_A(1), 0); ADVANCE_RING(); } else { BEGIN_RING(2*11); /* 2 components: 2 for tex0 */ OUT_RING_REG(R300_RS_COUNT, ((2 << R300_RS_COUNT_IT_COUNT_SHIFT) | R300_RS_COUNT_HIRES_EN)); /* R300_INST_COUNT_RS - highest RS instruction used */ OUT_RING_REG(R300_RS_INST_COUNT, R300_INST_COUNT_RS(0)); OUT_RING_REG(R300_US_PIXSIZE, 0); /* highest temp used */ /* Indirection levels */ OUT_RING_REG(R300_US_CONFIG, ((0 << R300_NLEVEL_SHIFT) | R300_FIRST_TEX)); OUT_RING_REG(R300_US_CODE_OFFSET, (R300_ALU_CODE_OFFSET(0) | R300_ALU_CODE_SIZE(1) | R300_TEX_CODE_OFFSET(0) | R300_TEX_CODE_SIZE(1))); OUT_RING_REG(R300_US_CODE_ADDR_3, (R300_ALU_START(0) | R300_ALU_SIZE(0) | R300_TEX_START(0) | R300_TEX_SIZE(0) | R300_RGBA_OUT)); /* tex inst */ OUT_RING_REG(R300_US_TEX_INST_0, (R300_TEX_SRC_ADDR(0) | R300_TEX_DST_ADDR(0) | R300_TEX_ID(0) | R300_TEX_INST(R300_TEX_INST_LD))); /* ALU inst */ /* RGB */ OUT_RING_REG(R300_US_ALU_RGB_ADDR_0, (R300_ALU_RGB_ADDR0(0) | R300_ALU_RGB_ADDR1(0) | R300_ALU_RGB_ADDR2(0) | R300_ALU_RGB_ADDRD(0) | R300_ALU_RGB_OMASK((R300_ALU_RGB_MASK_R | R300_ALU_RGB_MASK_G | R300_ALU_RGB_MASK_B)) | R300_ALU_RGB_TARGET_A)); OUT_RING_REG(R300_US_ALU_RGB_INST_0, (R300_ALU_RGB_SEL_A(R300_ALU_RGB_SRC0_RGB) | R300_ALU_RGB_MOD_A(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_SEL_B(R300_ALU_RGB_1_0) | R300_ALU_RGB_MOD_B(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_SEL_C(R300_ALU_RGB_0_0) | R300_ALU_RGB_MOD_C(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_OP(R300_ALU_RGB_OP_MAD) | R300_ALU_RGB_OMOD(R300_ALU_RGB_OMOD_NONE) | R300_ALU_RGB_CLAMP)); /* Alpha */ OUT_RING_REG(R300_US_ALU_ALPHA_ADDR_0, (R300_ALU_ALPHA_ADDR0(0) | R300_ALU_ALPHA_ADDR1(0) | R300_ALU_ALPHA_ADDR2(0) | R300_ALU_ALPHA_ADDRD(0) | R300_ALU_ALPHA_OMASK(R300_ALU_ALPHA_MASK_A) | R300_ALU_ALPHA_TARGET_A | R300_ALU_ALPHA_OMASK_W(R300_ALU_ALPHA_MASK_NONE))); OUT_RING_REG(R300_US_ALU_ALPHA_INST_0, (R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_SRC0_A) | R300_ALU_ALPHA_MOD_A(R300_ALU_ALPHA_MOD_NOP) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_1_0) | R300_ALU_ALPHA_MOD_B(R300_ALU_ALPHA_MOD_NOP) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_MOD_C(R300_ALU_ALPHA_MOD_NOP) | R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_MAD) | R300_ALU_ALPHA_OMOD(R300_ALU_ALPHA_OMOD_NONE) | R300_ALU_ALPHA_CLAMP)); ADVANCE_RING(); } } else { /* * y' = y - .0625 * u' = u - .5 * v' = v - .5; * * r = 1.1643 * y' + 0.0 * u' + 1.5958 * v' * g = 1.1643 * y' - 0.39173 * u' - 0.81290 * v' * b = 1.1643 * y' + 2.017 * u' + 0.0 * v' * * DP3 might look like the straightforward solution * but we'd need to move the texture yuv values in * the same reg for this to work. Therefore use MADs. * Brightness just adds to the off constant. * Contrast is multiplication of luminance. * Saturation and hue change the u and v coeffs. * Default values (before adjustments - depend on colorspace): * yco = 1.1643 * uco = 0, -0.39173, 2.017 * vco = 1.5958, -0.8129, 0 * off = -0.0625 * yco + -0.5 * uco[r] + -0.5 * vco[r], * -0.0625 * yco + -0.5 * uco[g] + -0.5 * vco[g], * -0.0625 * yco + -0.5 * uco[b] + -0.5 * vco[b], * * temp = MAD(yco, yuv.yyyy, off) * temp = MAD(uco, yuv.uuuu, temp) * result = MAD(vco, yuv.vvvv, temp) */ /* TODO: don't recalc consts always */ const float Loff = -0.0627; const float Coff = -0.502; float uvcosf, uvsinf; float yco; float uco[3], vco[3], off[3]; float bright, cont, gamma; int ref = pPriv->transform_index; Bool needgamma = FALSE; cont = RTFContrast(pPriv->contrast); bright = RTFBrightness(pPriv->brightness); gamma = (float)pPriv->gamma / 1000.0; uvcosf = RTFSaturation(pPriv->saturation) * cos(RTFHue(pPriv->hue)); uvsinf = RTFSaturation(pPriv->saturation) * sin(RTFHue(pPriv->hue)); /* overlay video also does pre-gamma contrast/sat adjust, should we? */ 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 (gamma != 1.0) { needgamma = TRUE; /* note: gamma correction is out = in ^ gamma; gpu can only do LG2/EX2 therefore we transform into in ^ gamma = 2 ^ (log2(in) * gamma). Lots of scalar ops, unfortunately (better solution?) - without gamma that's 3 inst, with gamma it's 10... could use different gamma factors per channel, if that's of any use. */ } if (pPriv->is_planar) { BEGIN_RING(2 * (needgamma ? (28 + 33) : 33)); /* 2 components: same 2 for tex0/1/2 */ OUT_RING_REG(R300_RS_COUNT, ((2 << R300_RS_COUNT_IT_COUNT_SHIFT) | R300_RS_COUNT_HIRES_EN)); /* R300_INST_COUNT_RS - highest RS instruction used */ OUT_RING_REG(R300_RS_INST_COUNT, R300_INST_COUNT_RS(0)); OUT_RING_REG(R300_US_PIXSIZE, 2); /* highest temp used */ /* Indirection levels */ OUT_RING_REG(R300_US_CONFIG, ((0 << R300_NLEVEL_SHIFT) | R300_FIRST_TEX)); OUT_RING_REG(R300_US_CODE_OFFSET, (R300_ALU_CODE_OFFSET(0) | R300_ALU_CODE_SIZE(needgamma ? 7 + 3 : 3) | R300_TEX_CODE_OFFSET(0) | R300_TEX_CODE_SIZE(3))); OUT_RING_REG(R300_US_CODE_ADDR_3, (R300_ALU_START(0) | R300_ALU_SIZE(needgamma ? 7 + 2 : 2) | R300_TEX_START(0) | R300_TEX_SIZE(2) | R300_RGBA_OUT)); /* tex inst */ OUT_RING_REG(R300_US_TEX_INST_0, (R300_TEX_SRC_ADDR(0) | R300_TEX_DST_ADDR(2) | R300_TEX_ID(0) | R300_TEX_INST(R300_TEX_INST_LD))); OUT_RING_REG(R300_US_TEX_INST_1, (R300_TEX_SRC_ADDR(0) | R300_TEX_DST_ADDR(1) | R300_TEX_ID(1) | R300_TEX_INST(R300_TEX_INST_LD))); OUT_RING_REG(R300_US_TEX_INST_2, (R300_TEX_SRC_ADDR(0) | R300_TEX_DST_ADDR(0) | R300_TEX_ID(2) | R300_TEX_INST(R300_TEX_INST_LD))); /* ALU inst */ /* MAD temp2.rgb, const0.aaa, temp2.rgb, const0.rgb */ OUT_RING_REG(R300_US_ALU_RGB_ADDR(0), (R300_ALU_RGB_ADDR0(R300_ALU_RGB_CONST(0)) | R300_ALU_RGB_ADDR1(2) | R300_ALU_RGB_ADDR2(0) | R300_ALU_RGB_ADDRD(2) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_RGB))); OUT_RING_REG(R300_US_ALU_RGB_INST(0), (R300_ALU_RGB_SEL_A(R300_ALU_RGB_SRC0_AAA) | R300_ALU_RGB_MOD_A(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_SEL_B(R300_ALU_RGB_SRC1_RGB) | R300_ALU_RGB_MOD_B(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_SEL_C(R300_ALU_RGB_SRC0_RGB) | R300_ALU_RGB_MOD_C(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_OP(R300_ALU_RGB_OP_MAD) | R300_ALU_RGB_OMOD(R300_ALU_RGB_OMOD_NONE))); /* alpha nop, but need to set up alpha source for rgb usage */ OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(0), (R300_ALU_ALPHA_ADDR0(R300_ALU_ALPHA_CONST(0)) | R300_ALU_ALPHA_ADDR1(2) | R300_ALU_ALPHA_ADDR2(0) | R300_ALU_ALPHA_ADDRD(2) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(0), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_MAD) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); /* MAD temp2.rgb, const1.rgb, temp1.rgb, temp2.rgb */ OUT_RING_REG(R300_US_ALU_RGB_ADDR(1), (R300_ALU_RGB_ADDR0(R300_ALU_RGB_CONST(1)) | R300_ALU_RGB_ADDR1(1) | R300_ALU_RGB_ADDR2(2) | R300_ALU_RGB_ADDRD(2) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_RGB))); OUT_RING_REG(R300_US_ALU_RGB_INST(1), (R300_ALU_RGB_SEL_A(R300_ALU_RGB_SRC0_RGB) | R300_ALU_RGB_MOD_A(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_SEL_B(R300_ALU_RGB_SRC1_RGB) | R300_ALU_RGB_MOD_B(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_SEL_C(R300_ALU_RGB_SRC2_RGB) | R300_ALU_RGB_MOD_C(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_OP(R300_ALU_RGB_OP_MAD) | R300_ALU_RGB_OMOD(R300_ALU_RGB_OMOD_NONE))); /* alpha nop */ OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(1), (R300_ALU_ALPHA_ADDRD(2) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(1), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_MAD) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); /* MAD result.rgb, const2.rgb, temp0.rgb, temp2.rgb */ OUT_RING_REG(R300_US_ALU_RGB_ADDR(2), (R300_ALU_RGB_ADDR0(R300_ALU_RGB_CONST(2)) | R300_ALU_RGB_ADDR1(0) | R300_ALU_RGB_ADDR2(2) | R300_ALU_RGB_ADDRD(0) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_RGB) | (needgamma ? 0 : R300_ALU_RGB_OMASK(R300_ALU_RGB_MASK_RGB)))); OUT_RING_REG(R300_US_ALU_RGB_INST(2), (R300_ALU_RGB_SEL_A(R300_ALU_RGB_SRC0_RGB) | R300_ALU_RGB_MOD_A(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_SEL_B(R300_ALU_RGB_SRC1_RGB) | R300_ALU_RGB_MOD_B(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_SEL_C(R300_ALU_RGB_SRC2_RGB) | R300_ALU_RGB_MOD_C(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_OP(R300_ALU_RGB_OP_MAD) | R300_ALU_RGB_OMOD(R300_ALU_RGB_OMOD_NONE) | R300_ALU_RGB_CLAMP)); /* write alpha 1 */ OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(2), (R300_ALU_ALPHA_ADDRD(0) | R300_ALU_ALPHA_OMASK(R300_ALU_ALPHA_MASK_A) | R300_ALU_ALPHA_TARGET_A)); OUT_RING_REG(R300_US_ALU_ALPHA_INST(2), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_MAD) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_1_0))); if (needgamma) { /* rgb temp0.r = op_sop, set up src0 reg */ OUT_RING_REG(R300_US_ALU_RGB_ADDR(3), (R300_ALU_RGB_ADDR0(0) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_R))); OUT_RING_REG(R300_US_ALU_RGB_INST(3), R300_ALU_RGB_OP(R300_ALU_RGB_OP_SOP) | R300_ALU_RGB_OMOD(R300_ALU_RGB_OMOD_NONE)); /* alpha lg2 temp0, temp0.r */ OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(3), (R300_ALU_ALPHA_ADDRD(0) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(3), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_LN2) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_SRC0_R) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); /* rgb temp0.g = op_sop, set up src0 reg */ OUT_RING_REG(R300_US_ALU_RGB_ADDR(4), (R300_ALU_RGB_ADDR0(0) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_G))); OUT_RING_REG(R300_US_ALU_RGB_INST(4), R300_ALU_RGB_OP(R300_ALU_RGB_OP_SOP) | R300_ALU_RGB_OMOD(R300_ALU_RGB_OMOD_NONE)); /* alpha lg2 temp0, temp0.g */ OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(4), (R300_ALU_ALPHA_ADDRD(0) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(4), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_LN2) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_SRC0_G) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); /* rgb temp0.b = op_sop, set up src0 reg */ OUT_RING_REG(R300_US_ALU_RGB_ADDR(5), (R300_ALU_RGB_ADDR0(0) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_B))); OUT_RING_REG(R300_US_ALU_RGB_INST(5), R300_ALU_RGB_OP(R300_ALU_RGB_OP_SOP) | R300_ALU_RGB_OMOD(R300_ALU_RGB_OMOD_NONE)); /* alpha lg2 temp0, temp0.b */ OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(5), (R300_ALU_ALPHA_ADDRD(0) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(5), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_LN2) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_SRC0_B) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); /* MUL const1, temp1, temp0 */ OUT_RING_REG(R300_US_ALU_RGB_ADDR(6), (R300_ALU_RGB_ADDR0(0) | R300_ALU_RGB_ADDR1(0) | R300_ALU_RGB_ADDR2(0) | R300_ALU_RGB_ADDRD(0) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_RGB))); OUT_RING_REG(R300_US_ALU_RGB_INST(6), (R300_ALU_RGB_SEL_A(R300_ALU_RGB_SRC0_RGB) | R300_ALU_RGB_MOD_A(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_SEL_B(R300_ALU_RGB_SRC0_AAA) | R300_ALU_RGB_MOD_B(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_SEL_C(R300_ALU_RGB_0_0) | R300_ALU_RGB_MOD_C(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_OP(R300_ALU_RGB_OP_MAD) | R300_ALU_RGB_OMOD(R300_ALU_RGB_OMOD_NONE))); /* alpha nop, but set up const1 */ OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(6), (R300_ALU_ALPHA_ADDRD(0) | R300_ALU_ALPHA_ADDR0(R300_ALU_ALPHA_CONST(1)) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(6), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_MAD) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); /* rgb out0.r = op_sop, set up src0 reg */ OUT_RING_REG(R300_US_ALU_RGB_ADDR(7), (R300_ALU_RGB_ADDR0(0) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_R) | R300_ALU_RGB_OMASK(R300_ALU_RGB_MASK_R))); OUT_RING_REG(R300_US_ALU_RGB_INST(7), R300_ALU_RGB_OP(R300_ALU_RGB_OP_SOP) | R300_ALU_RGB_OMOD(R300_ALU_RGB_OMOD_NONE)); /* alpha ex2 temp0, temp0.r */ OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(7), (R300_ALU_ALPHA_ADDRD(0) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(7), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_EX2) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_SRC0_R) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); /* rgb out0.g = op_sop, set up src0 reg */ OUT_RING_REG(R300_US_ALU_RGB_ADDR(8), (R300_ALU_RGB_ADDR0(0) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_G) | R300_ALU_RGB_OMASK(R300_ALU_RGB_MASK_G))); OUT_RING_REG(R300_US_ALU_RGB_INST(8), R300_ALU_RGB_OP(R300_ALU_RGB_OP_SOP) | R300_ALU_RGB_OMOD(R300_ALU_RGB_OMOD_NONE)); /* alpha ex2 temp0, temp0.g */ OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(8), (R300_ALU_ALPHA_ADDRD(0) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(8), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_EX2) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_SRC0_G) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); /* rgb out0.b = op_sop, set up src0 reg */ OUT_RING_REG(R300_US_ALU_RGB_ADDR(9), (R300_ALU_RGB_ADDR0(0) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_B) | R300_ALU_RGB_OMASK(R300_ALU_RGB_MASK_B))); OUT_RING_REG(R300_US_ALU_RGB_INST(9), R300_ALU_RGB_OP(R300_ALU_RGB_OP_SOP) | R300_ALU_RGB_OMOD(R300_ALU_RGB_OMOD_NONE)); /* alpha ex2 temp0, temp0.b */ OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(9), (R300_ALU_ALPHA_ADDRD(0) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(9), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_EX2) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_SRC0_B) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); } } else { BEGIN_RING(2 * (needgamma ? (28 + 31) : 31)); /* 2 components */ OUT_RING_REG(R300_RS_COUNT, ((2 << R300_RS_COUNT_IT_COUNT_SHIFT) | R300_RS_COUNT_HIRES_EN)); /* R300_INST_COUNT_RS - highest RS instruction used */ OUT_RING_REG(R300_RS_INST_COUNT, R300_INST_COUNT_RS(0)); OUT_RING_REG(R300_US_PIXSIZE, 1); /* highest temp used */ /* Indirection levels */ OUT_RING_REG(R300_US_CONFIG, ((0 << R300_NLEVEL_SHIFT) | R300_FIRST_TEX)); OUT_RING_REG(R300_US_CODE_OFFSET, (R300_ALU_CODE_OFFSET(0) | R300_ALU_CODE_SIZE(needgamma ? 7 + 3 : 3) | R300_TEX_CODE_OFFSET(0) | R300_TEX_CODE_SIZE(1))); OUT_RING_REG(R300_US_CODE_ADDR_3, (R300_ALU_START(0) | R300_ALU_SIZE(needgamma ? 7 + 2 : 2) | R300_TEX_START(0) | R300_TEX_SIZE(0) | R300_RGBA_OUT)); /* tex inst */ OUT_RING_REG(R300_US_TEX_INST_0, (R300_TEX_SRC_ADDR(0) | R300_TEX_DST_ADDR(0) | R300_TEX_ID(0) | R300_TEX_INST(R300_TEX_INST_LD))); /* ALU inst */ /* MAD temp1.rgb, const0.aaa, temp0.ggg, const0.rgb */ OUT_RING_REG(R300_US_ALU_RGB_ADDR(0), (R300_ALU_RGB_ADDR0(R300_ALU_RGB_CONST(0)) | R300_ALU_RGB_ADDR1(0) | R300_ALU_RGB_ADDR2(0) | R300_ALU_RGB_ADDRD(1) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_RGB))); OUT_RING_REG(R300_US_ALU_RGB_INST(0), (R300_ALU_RGB_SEL_A(R300_ALU_RGB_SRC0_AAA) | R300_ALU_RGB_MOD_A(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_SEL_B(R300_ALU_RGB_SRC1_GGG) | R300_ALU_RGB_MOD_B(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_SEL_C(R300_ALU_RGB_SRC0_RGB) | R300_ALU_RGB_MOD_C(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_OP(R300_ALU_RGB_OP_MAD) | R300_ALU_RGB_OMOD(R300_ALU_RGB_OMOD_NONE))); /* alpha nop, but need to set up alpha source for rgb usage */ OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(0), (R300_ALU_ALPHA_ADDR0(R300_ALU_ALPHA_CONST(0)) | R300_ALU_ALPHA_ADDR1(0) | R300_ALU_ALPHA_ADDR2(0) | R300_ALU_ALPHA_ADDRD(0) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(0), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_MAD) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); /* MAD temp1.rgb, const1.rgb, temp0.bbb, temp1.rgb */ OUT_RING_REG(R300_US_ALU_RGB_ADDR(1), (R300_ALU_RGB_ADDR0(R300_ALU_RGB_CONST(1)) | R300_ALU_RGB_ADDR1(0) | R300_ALU_RGB_ADDR2(1) | R300_ALU_RGB_ADDRD(1) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_RGB))); OUT_RING_REG(R300_US_ALU_RGB_INST(1), (R300_ALU_RGB_SEL_A(R300_ALU_RGB_SRC0_RGB) | R300_ALU_RGB_MOD_A(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_SEL_B(R300_ALU_RGB_SRC1_BBB) | R300_ALU_RGB_MOD_B(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_SEL_C(R300_ALU_RGB_SRC2_RGB) | R300_ALU_RGB_MOD_C(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_OP(R300_ALU_RGB_OP_MAD) | R300_ALU_RGB_OMOD(R300_ALU_RGB_OMOD_NONE))); /* alpha nop */ OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(1), (R300_ALU_ALPHA_ADDRD(0) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(1), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_MAD) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); /* MAD result.rgb, const2.rgb, temp0.rrr, temp1.rgb */ OUT_RING_REG(R300_US_ALU_RGB_ADDR(2), (R300_ALU_RGB_ADDR0(R300_ALU_RGB_CONST(2)) | R300_ALU_RGB_ADDR1(0) | R300_ALU_RGB_ADDR2(1) | R300_ALU_RGB_ADDRD(0) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_RGB) | (needgamma ? 0 : R300_ALU_RGB_OMASK(R300_ALU_RGB_MASK_RGB)))); OUT_RING_REG(R300_US_ALU_RGB_INST(2), (R300_ALU_RGB_SEL_A(R300_ALU_RGB_SRC0_RGB) | R300_ALU_RGB_MOD_A(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_SEL_B(R300_ALU_RGB_SRC1_RRR) | R300_ALU_RGB_MOD_B(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_SEL_C(R300_ALU_RGB_SRC2_RGB) | R300_ALU_RGB_MOD_C(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_OP(R300_ALU_RGB_OP_MAD) | R300_ALU_RGB_OMOD(R300_ALU_RGB_OMOD_NONE) | R300_ALU_RGB_CLAMP)); /* write alpha 1 */ OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(2), (R300_ALU_ALPHA_ADDRD(0) | R300_ALU_ALPHA_OMASK(R300_ALU_ALPHA_MASK_A) | R300_ALU_ALPHA_TARGET_A)); OUT_RING_REG(R300_US_ALU_ALPHA_INST(2), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_MAD) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_1_0))); if (needgamma) { /* rgb temp0.r = op_sop, set up src0 reg */ OUT_RING_REG(R300_US_ALU_RGB_ADDR(3), (R300_ALU_RGB_ADDR0(0) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_R))); OUT_RING_REG(R300_US_ALU_RGB_INST(3), R300_ALU_RGB_OP(R300_ALU_RGB_OP_SOP) | R300_ALU_RGB_OMOD(R300_ALU_RGB_OMOD_NONE)); /* alpha lg2 temp0, temp0.r */ OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(3), (R300_ALU_ALPHA_ADDRD(0) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(3), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_LN2) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_SRC0_R) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); /* rgb temp0.g = op_sop, set up src0 reg */ OUT_RING_REG(R300_US_ALU_RGB_ADDR(4), (R300_ALU_RGB_ADDR0(0) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_G))); OUT_RING_REG(R300_US_ALU_RGB_INST(4), R300_ALU_RGB_OP(R300_ALU_RGB_OP_SOP) | R300_ALU_RGB_OMOD(R300_ALU_RGB_OMOD_NONE)); /* alpha lg2 temp0, temp0.g */ OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(4), (R300_ALU_ALPHA_ADDRD(0) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(4), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_LN2) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_SRC0_G) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); /* rgb temp0.b = op_sop, set up src0 reg */ OUT_RING_REG(R300_US_ALU_RGB_ADDR(5), (R300_ALU_RGB_ADDR0(0) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_B))); OUT_RING_REG(R300_US_ALU_RGB_INST(5), R300_ALU_RGB_OP(R300_ALU_RGB_OP_SOP) | R300_ALU_RGB_OMOD(R300_ALU_RGB_OMOD_NONE)); /* alpha lg2 temp0, temp0.b */ OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(5), (R300_ALU_ALPHA_ADDRD(0) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(5), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_LN2) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_SRC0_B) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); /* MUL const1, temp1, temp0 */ OUT_RING_REG(R300_US_ALU_RGB_ADDR(6), (R300_ALU_RGB_ADDR0(0) | R300_ALU_RGB_ADDR1(0) | R300_ALU_RGB_ADDR2(0) | R300_ALU_RGB_ADDRD(0) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_RGB))); OUT_RING_REG(R300_US_ALU_RGB_INST(6), (R300_ALU_RGB_SEL_A(R300_ALU_RGB_SRC0_RGB) | R300_ALU_RGB_MOD_A(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_SEL_B(R300_ALU_RGB_SRC0_AAA) | R300_ALU_RGB_MOD_B(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_SEL_C(R300_ALU_RGB_0_0) | R300_ALU_RGB_MOD_C(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_OP(R300_ALU_RGB_OP_MAD) | R300_ALU_RGB_OMOD(R300_ALU_RGB_OMOD_NONE))); /* alpha nop, but set up const1 */ OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(6), (R300_ALU_ALPHA_ADDRD(0) | R300_ALU_ALPHA_ADDR0(R300_ALU_ALPHA_CONST(1)) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(6), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_MAD) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); /* rgb out0.r = op_sop, set up src0 reg */ OUT_RING_REG(R300_US_ALU_RGB_ADDR(7), (R300_ALU_RGB_ADDR0(0) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_R) | R300_ALU_RGB_OMASK(R300_ALU_RGB_MASK_R))); OUT_RING_REG(R300_US_ALU_RGB_INST(7), R300_ALU_RGB_OP(R300_ALU_RGB_OP_SOP) | R300_ALU_RGB_OMOD(R300_ALU_RGB_OMOD_NONE)); /* alpha ex2 temp0, temp0.r */ OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(7), (R300_ALU_ALPHA_ADDRD(0) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(7), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_EX2) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_SRC0_R) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); /* rgb out0.g = op_sop, set up src0 reg */ OUT_RING_REG(R300_US_ALU_RGB_ADDR(8), (R300_ALU_RGB_ADDR0(0) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_G) | R300_ALU_RGB_OMASK(R300_ALU_RGB_MASK_G))); OUT_RING_REG(R300_US_ALU_RGB_INST(8), R300_ALU_RGB_OP(R300_ALU_RGB_OP_SOP) | R300_ALU_RGB_OMOD(R300_ALU_RGB_OMOD_NONE)); /* alpha ex2 temp0, temp0.g */ OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(8), (R300_ALU_ALPHA_ADDRD(0) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(8), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_EX2) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_SRC0_G) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); /* rgb out0.b = op_sop, set up src0 reg */ OUT_RING_REG(R300_US_ALU_RGB_ADDR(9), (R300_ALU_RGB_ADDR0(0) | R300_ALU_RGB_WMASK(R300_ALU_RGB_MASK_B) | R300_ALU_RGB_OMASK(R300_ALU_RGB_MASK_B))); OUT_RING_REG(R300_US_ALU_RGB_INST(9), R300_ALU_RGB_OP(R300_ALU_RGB_OP_SOP) | R300_ALU_RGB_OMOD(R300_ALU_RGB_OMOD_NONE)); /* alpha ex2 temp0, temp0.b */ OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(9), (R300_ALU_ALPHA_ADDRD(0) | R300_ALU_ALPHA_WMASK(R300_ALU_ALPHA_MASK_NONE))); OUT_RING_REG(R300_US_ALU_ALPHA_INST(9), (R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_EX2) | R300_ALU_ALPHA_SEL_A(R300_ALU_ALPHA_SRC0_B) | R300_ALU_ALPHA_SEL_B(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0))); } } /* Shader constants. */ /* constant 0: off, yco */ OUT_RING_REG(R300_US_ALU_CONST_R(0), F_TO_24(off[0])); OUT_RING_REG(R300_US_ALU_CONST_G(0), F_TO_24(off[1])); OUT_RING_REG(R300_US_ALU_CONST_B(0), F_TO_24(off[2])); OUT_RING_REG(R300_US_ALU_CONST_A(0), F_TO_24(yco)); /* constant 1: uco */ OUT_RING_REG(R300_US_ALU_CONST_R(1), F_TO_24(uco[0])); OUT_RING_REG(R300_US_ALU_CONST_G(1), F_TO_24(uco[1])); OUT_RING_REG(R300_US_ALU_CONST_B(1), F_TO_24(uco[2])); OUT_RING_REG(R300_US_ALU_CONST_A(1), F_TO_24(gamma)); /* constant 2: vco */ OUT_RING_REG(R300_US_ALU_CONST_R(2), F_TO_24(vco[0])); OUT_RING_REG(R300_US_ALU_CONST_G(2), F_TO_24(vco[1])); OUT_RING_REG(R300_US_ALU_CONST_B(2), F_TO_24(vco[2])); OUT_RING_REG(R300_US_ALU_CONST_A(2), F_TO_24(0.0)); ADVANCE_RING(); } BEGIN_ACCEL_RELOC(6, 2); OUT_RING_REG(R300_TX_INVALTAGS, 0); OUT_RING_REG(R300_TX_ENABLE, txenable); EMIT_WRITE_OFFSET(R300_RB3D_COLOROFFSET0, 0, pPixmap); EMIT_COLORPITCH(R300_RB3D_COLORPITCH0, colorpitch, pPixmap); /* no need to enable blending */ OUT_RING_REG(R300_RB3D_BLENDCNTL, RADEON_SRC_BLEND_GL_ONE | RADEON_DST_BLEND_GL_ZERO); OUT_RING_REG(R300_VAP_VTX_SIZE, pPriv->vtx_count); ADVANCE_RING(); if (pPriv->vsync) { xf86CrtcPtr crtc; if (pPriv->desired_crtc) crtc = pPriv->desired_crtc; else crtc = radeon_pick_best_crtc(pScrn, FALSE, pPriv->drw_x, pPriv->drw_x + pPriv->dst_w, pPriv->drw_y, pPriv->drw_y + pPriv->dst_h); if (crtc) RADEONWaitForVLine(pScrn, pPixmap, crtc, pPriv->drw_y - crtc->y, (pPriv->drw_y - crtc->y) + pPriv->dst_h); } return TRUE; } static void R300DisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) { RADEONInfoPtr info = RADEONPTR(pScrn); PixmapPtr pPixmap = pPriv->pPixmap; int dstxoff, dstyoff; BoxPtr pBox = REGION_RECTS(&pPriv->clip); int nBox = REGION_NUM_RECTS(&pPriv->clip); #ifdef COMPOSITE dstxoff = -pPixmap->screen_x + pPixmap->drawable.x; dstyoff = -pPixmap->screen_y + pPixmap->drawable.y; #else dstxoff = 0; dstyoff = 0; #endif if (!R300PrepareTexturedVideo(pScrn, pPriv)) return; /* * Rendering of the actual polygon is done in two different * ways depending on chip generation: * * < R300: * * These chips can render a rectangle in one pass, so * handling is pretty straight-forward. * * >= R300: * * These chips can accept a quad, but will render it as * two triangles which results in a diagonal tear. Instead * We render a single, large triangle and use the scissor * functionality to restrict it to the desired rectangle. * Due to guardband limits on r3xx/r4xx, we can only use * the single triangle up to 2560/4021 pixels; above that we * render as a quad. */ while (nBox--) { float srcX, srcY, srcw, srch; int dstX, dstY, dstw, dsth; Bool use_quad = FALSE; int draw_size = 4 * pPriv->vtx_count + 4 + 2 + 3; if (draw_size > radeon_cs_space_remaining(pScrn)) { radeon_cs_flush_indirect(pScrn); if (!R300PrepareTexturedVideo(pScrn, pPriv)) return; } dstX = pBox->x1 + dstxoff; dstY = pBox->y1 + dstyoff; dstw = pBox->x2 - pBox->x1; dsth = pBox->y2 - pBox->y1; srcX = pPriv->src_x; srcX += ((pBox->x1 - pPriv->drw_x) * pPriv->src_w) / (float)pPriv->dst_w; srcY = pPriv->src_y; srcY += ((pBox->y1 - pPriv->drw_y) * pPriv->src_h) / (float)pPriv->dst_h; srcw = (pPriv->src_w * dstw) / (float)pPriv->dst_w; srch = (pPriv->src_h * dsth) / (float)pPriv->dst_h; if (IS_R400_3D) { if ((dstw+dsth) > 4021) use_quad = TRUE; } else { if ((dstw+dsth) > 2560) use_quad = TRUE; } /* * Set up the scissor area to that of the output size. */ BEGIN_RING(2*2); /* R300 has an offset */ OUT_RING_REG(R300_SC_SCISSOR0, (((dstX + 1440) << R300_SCISSOR_X_SHIFT) | ((dstY + 1440) << R300_SCISSOR_Y_SHIFT))); OUT_RING_REG(R300_SC_SCISSOR1, (((dstX + dstw + 1440 - 1) << R300_SCISSOR_X_SHIFT) | ((dstY + dsth + 1440 - 1) << R300_SCISSOR_Y_SHIFT))); ADVANCE_RING(); if (use_quad) { BEGIN_RING(4 * pPriv->vtx_count + 4); OUT_RING(CP_PACKET3(R200_CP_PACKET3_3D_DRAW_IMMD_2, 4 * pPriv->vtx_count)); OUT_RING(RADEON_CP_VC_CNTL_PRIM_TYPE_QUAD_LIST | RADEON_CP_VC_CNTL_PRIM_WALK_RING | (4 << RADEON_CP_VC_CNTL_NUM_SHIFT)); } else { BEGIN_RING(3 * pPriv->vtx_count + 4); OUT_RING(CP_PACKET3(R200_CP_PACKET3_3D_DRAW_IMMD_2, 3 * pPriv->vtx_count)); OUT_RING(RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_LIST | RADEON_CP_VC_CNTL_PRIM_WALK_RING | (3 << RADEON_CP_VC_CNTL_NUM_SHIFT)); } if (pPriv->bicubic_enabled) { /* * This code is only executed on >= R300, so we don't * have to deal with the legacy handling. */ if (use_quad) { VTX_OUT_6((float)dstX, (float)dstY, (float)srcX / pPriv->w, (float)srcY / pPriv->h, (float)srcX + 0.5, (float)srcY + 0.5); VTX_OUT_6((float)dstX, (float)(dstY + dsth), (float)srcX / pPriv->w, (float)(srcY + srch) / pPriv->h, (float)srcX + 0.5, (float)(srcY + srch) + 0.5); VTX_OUT_6((float)(dstX + dstw), (float)(dstY + dsth), (float)(srcX + srcw) / pPriv->w, (float)(srcY + srch) / pPriv->h, (float)(srcX + srcw) + 0.5, (float)(srcY + srch) + 0.5); VTX_OUT_6((float)(dstX + dstw), (float)dstY, (float)(srcX + srcw) / pPriv->w, (float)srcY / pPriv->h, (float)(srcX + srcw) + 0.5, (float)srcY + 0.5); } else { VTX_OUT_6((float)dstX, (float)dstY, (float)srcX / pPriv->w, (float)srcY / pPriv->h, (float)srcX + 0.5, (float)srcY + 0.5); VTX_OUT_6((float)dstX, (float)(dstY + dstw + dsth), (float)srcX / pPriv->w, ((float)srcY + (float)srch * (((float)dstw / (float)dsth) + 1.0)) / pPriv->h, (float)srcX + 0.5, (float)srcY + (float)srch * (((float)dstw / (float)dsth) + 1.0) + 0.5); VTX_OUT_6((float)(dstX + dstw + dsth), (float)dstY, ((float)srcX + (float)srcw * (((float)dsth / (float)dstw) + 1.0)) / pPriv->w, (float)srcY / pPriv->h, (float)srcX + (float)srcw * (((float)dsth / (float)dstw) + 1.0) + 0.5, (float)srcY + 0.5); } } else { if (use_quad) { VTX_OUT_4((float)dstX, (float)dstY, (float)srcX / pPriv->w, (float)srcY / pPriv->h); VTX_OUT_4((float)dstX, (float)(dstY + dsth), (float)srcX / pPriv->w, (float)(srcY + srch) / pPriv->h); VTX_OUT_4((float)(dstX + dstw), (float)(dstY + dsth), (float)(srcX + srcw) / pPriv->w, (float)(srcY + srch) / pPriv->h); VTX_OUT_4((float)(dstX + dstw), (float)dstY, (float)(srcX + srcw) / pPriv->w, (float)srcY / pPriv->h); } else { /* * Render a big, scissored triangle. This means * increasing the triangle size and adjusting * texture coordinates. */ VTX_OUT_4((float)dstX, (float)dstY, (float)srcX / pPriv->w, (float)srcY / pPriv->h); VTX_OUT_4((float)dstX, (float)(dstY + dsth + dstw), (float)srcX / pPriv->w, ((float)srcY + (float)srch * (((float)dstw / (float)dsth) + 1.0)) / pPriv->h); VTX_OUT_4((float)(dstX + dstw + dsth), (float)dstY, ((float)srcX + (float)srcw * (((float)dsth / (float)dstw) + 1.0)) / pPriv->w, (float)srcY / pPriv->h); } } /* flushing is pipelined, free/finish is not */ OUT_RING_REG(R300_RB3D_DSTCACHE_CTLSTAT, R300_DC_FLUSH_3D); ADVANCE_RING(); pBox++; } BEGIN_RING(2*3); OUT_RING_REG(R300_SC_CLIP_RULE, 0xAAAA); OUT_RING_REG(R300_RB3D_DSTCACHE_CTLSTAT, R300_RB3D_DC_FLUSH_ALL); OUT_RING_REG(RADEON_WAIT_UNTIL, RADEON_WAIT_3D_IDLECLEAN); ADVANCE_RING(); DamageDamageRegion(pPriv->pDraw, &pPriv->clip); } static Bool R500PrepareTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) { RADEONInfoPtr info = RADEONPTR(pScrn); PixmapPtr pPixmap = pPriv->pPixmap; struct radeon_exa_pixmap_priv *driver_priv; struct radeon_bo *src_bo = pPriv->src_bo[pPriv->currentBuffer]; uint32_t txfilter, txformat0, txformat1, txpitch, us_format = 0; uint32_t dst_pitch, dst_format; uint32_t txenable, colorpitch; uint32_t output_fmt; int pixel_shift, out_size = 6; int ret; radeon_cs_space_reset_bos(info->cs); radeon_cs_space_add_persistent_bo(info->cs, src_bo, RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM, 0); if (pPriv->bicubic_enabled) radeon_cs_space_add_persistent_bo(info->cs, info->bicubic_bo, RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM, 0); driver_priv = exaGetPixmapDriverPrivate(pPixmap); radeon_cs_space_add_persistent_bo(info->cs, driver_priv->bo, 0, RADEON_GEM_DOMAIN_VRAM); ret = radeon_cs_space_check(info->cs); if (ret) { ErrorF("Not enough RAM to hw accel xv operation\n"); return FALSE; } pixel_shift = pPixmap->drawable.bitsPerPixel >> 4; dst_pitch = exaGetPixmapPitch(pPixmap); RADEON_SWITCH_TO_3D(); if (pPriv->bicubic_enabled) pPriv->vtx_count = 6; else pPriv->vtx_count = 4; switch (pPixmap->drawable.bitsPerPixel) { case 16: if (pPixmap->drawable.depth == 15) dst_format = R300_COLORFORMAT_ARGB1555; else dst_format = R300_COLORFORMAT_RGB565; break; case 32: dst_format = R300_COLORFORMAT_ARGB8888; break; default: return FALSE; } output_fmt = (R300_OUT_FMT_C4_8 | R300_OUT_FMT_C0_SEL_BLUE | R300_OUT_FMT_C1_SEL_GREEN | R300_OUT_FMT_C2_SEL_RED | R300_OUT_FMT_C3_SEL_ALPHA); colorpitch = dst_pitch >> pixel_shift; colorpitch |= dst_format; if (RADEONTilingEnabled(pScrn, pPixmap)) colorpitch |= R300_COLORTILE; if (((pPriv->bicubic_state == BICUBIC_OFF)) && (pPriv->id == FOURCC_I420 || pPriv->id == FOURCC_YV12)) pPriv->is_planar = TRUE; else pPriv->is_planar = FALSE; if (pPriv->is_planar) { txformat1 = R300_TX_FORMAT_X8; txpitch = pPriv->src_pitch; } else { if (pPriv->id == FOURCC_UYVY) txformat1 = R300_TX_FORMAT_YVYU422; else txformat1 = R300_TX_FORMAT_VYUY422; if (pPriv->bicubic_state != BICUBIC_OFF) txformat1 |= R300_TX_FORMAT_YUV_TO_RGB_CLAMP; /* pitch is in pixels */ txpitch = pPriv->src_pitch / 2; } txpitch -= 1; txformat0 = ((((pPriv->w - 1) & 0x7ff) << R300_TXWIDTH_SHIFT) | (((pPriv->h - 1) & 0x7ff) << R300_TXHEIGHT_SHIFT) | R300_TXPITCH_EN); txfilter = (R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_LAST) | R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_LAST) | R300_TX_MAG_FILTER_LINEAR | R300_TX_MIN_FILTER_LINEAR | (0 << R300_TX_ID_SHIFT)); if ((pPriv->w - 1) & 0x800) txpitch |= R500_TXWIDTH_11; if ((pPriv->h - 1) & 0x800) txpitch |= R500_TXHEIGHT_11; if (info->ChipFamily == CHIP_FAMILY_R520) { unsigned us_width = (pPriv->w - 1) & 0x7ff; unsigned us_height = (pPriv->h - 1) & 0x7ff; unsigned us_depth = 0; if (pPriv->w > 2048) { us_width = (0x7ff + us_width) >> 1; us_depth |= 0x0d; } if (pPriv->h > 2048) { us_height = (0x7ff + us_height) >> 1; us_depth |= 0x0e; } us_format = (us_width << R300_TXWIDTH_SHIFT) | (us_height << R300_TXHEIGHT_SHIFT) | (us_depth << R300_TXDEPTH_SHIFT); out_size++; } BEGIN_ACCEL_RELOC(out_size, 1); OUT_RING_REG(R300_TX_FILTER0_0, txfilter); OUT_RING_REG(R300_TX_FILTER1_0, 0); OUT_RING_REG(R300_TX_FORMAT0_0, txformat0); OUT_RING_REG(R300_TX_FORMAT1_0, txformat1); OUT_RING_REG(R300_TX_FORMAT2_0, txpitch); OUT_TEXTURE_REG(R300_TX_OFFSET_0, 0, src_bo); if (info->ChipFamily == CHIP_FAMILY_R520) OUT_RING_REG(R500_US_FORMAT0_0, us_format); ADVANCE_RING(); txenable = R300_TEX_0_ENABLE; if (pPriv->is_planar) { txformat0 = ((((((pPriv->w + 1 ) >> 1) - 1) & 0x7ff) << R300_TXWIDTH_SHIFT) | (((((pPriv->h + 1 ) >> 1 ) - 1) & 0x7ff) << R300_TXHEIGHT_SHIFT) | R300_TXPITCH_EN); txpitch = RADEON_ALIGN(pPriv->src_pitch >> 1, 64); txpitch -= 1; txfilter = (R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_LAST) | R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_LAST) | R300_TX_MIN_FILTER_LINEAR | R300_TX_MAG_FILTER_LINEAR); BEGIN_ACCEL_RELOC(12, 2); OUT_RING_REG(R300_TX_FILTER0_1, txfilter | (1 << R300_TX_ID_SHIFT)); OUT_RING_REG(R300_TX_FILTER1_1, 0); OUT_RING_REG(R300_TX_FORMAT0_1, txformat0); OUT_RING_REG(R300_TX_FORMAT1_1, R300_TX_FORMAT_X8); OUT_RING_REG(R300_TX_FORMAT2_1, txpitch); OUT_TEXTURE_REG(R300_TX_OFFSET_1, pPriv->planeu_offset, src_bo); OUT_RING_REG(R300_TX_FILTER0_2, txfilter | (2 << R300_TX_ID_SHIFT)); OUT_RING_REG(R300_TX_FILTER1_2, 0); OUT_RING_REG(R300_TX_FORMAT0_2, txformat0); OUT_RING_REG(R300_TX_FORMAT1_2, R300_TX_FORMAT_X8); OUT_RING_REG(R300_TX_FORMAT2_2, txpitch); OUT_TEXTURE_REG(R300_TX_OFFSET_2, pPriv->planev_offset, src_bo); ADVANCE_RING(); txenable |= R300_TEX_1_ENABLE | R300_TEX_2_ENABLE; } if (pPriv->bicubic_enabled) { /* Size is 128x1 */ txformat0 = ((0x7f << R300_TXWIDTH_SHIFT) | (0x0 << R300_TXHEIGHT_SHIFT) | R300_TXPITCH_EN); /* Format is 32-bit floats, 4bpp */ txformat1 = R300_EASY_TX_FORMAT(Z, Y, X, W, FL_R16G16B16A16); /* Pitch is 127 (128-1) */ txpitch = 0x7f; /* Tex filter */ txfilter = (R300_TX_CLAMP_S(R300_TX_CLAMP_WRAP) | R300_TX_CLAMP_T(R300_TX_CLAMP_WRAP) | R300_TX_MIN_FILTER_NEAREST | R300_TX_MAG_FILTER_NEAREST | (1 << R300_TX_ID_SHIFT)); BEGIN_ACCEL_RELOC(6, 1); OUT_RING_REG(R300_TX_FILTER0_1, txfilter); OUT_RING_REG(R300_TX_FILTER1_1, 0); OUT_RING_REG(R300_TX_FORMAT0_1, txformat0); OUT_RING_REG(R300_TX_FORMAT1_1, txformat1); OUT_RING_REG(R300_TX_FORMAT2_1, txpitch); OUT_TEXTURE_REG(R300_TX_OFFSET_1, 0, info->bicubic_bo); ADVANCE_RING(); /* Enable tex 1 */ txenable |= R300_TEX_1_ENABLE; } /* setup the VAP */ if (info->accel_state->has_tcl) { if (pPriv->bicubic_enabled) BEGIN_RING(2*7); else BEGIN_RING(2*6); } else { if (pPriv->bicubic_enabled) BEGIN_RING(2*5); else BEGIN_RING(2*4); } /* These registers define the number, type, and location of data submitted * to the PVS unit of GA input (when PVS is disabled) * DST_VEC_LOC is the slot in the PVS input vector memory when PVS/TCL is * enabled. This memory provides the imputs to the vertex shader program * and ordering is not important. When PVS/TCL is disabled, this field maps * directly to the GA input memory and the order is signifigant. In * PVS_BYPASS mode the order is as follows: * Position * Point Size * Color 0-3 * Textures 0-7 * Fog */ if (pPriv->bicubic_enabled) { OUT_RING_REG(R300_VAP_PROG_STREAM_CNTL_0, ((R300_DATA_TYPE_FLOAT_2 << R300_DATA_TYPE_0_SHIFT) | (0 << R300_SKIP_DWORDS_0_SHIFT) | (0 << R300_DST_VEC_LOC_0_SHIFT) | R300_SIGNED_0 | (R300_DATA_TYPE_FLOAT_2 << R300_DATA_TYPE_1_SHIFT) | (0 << R300_SKIP_DWORDS_1_SHIFT) | (6 << R300_DST_VEC_LOC_1_SHIFT) | R300_SIGNED_1)); OUT_RING_REG(R300_VAP_PROG_STREAM_CNTL_1, ((R300_DATA_TYPE_FLOAT_2 << R300_DATA_TYPE_2_SHIFT) | (0 << R300_SKIP_DWORDS_2_SHIFT) | (7 << R300_DST_VEC_LOC_2_SHIFT) | R300_LAST_VEC_2 | R300_SIGNED_2)); } else { OUT_RING_REG(R300_VAP_PROG_STREAM_CNTL_0, ((R300_DATA_TYPE_FLOAT_2 << R300_DATA_TYPE_0_SHIFT) | (0 << R300_SKIP_DWORDS_0_SHIFT) | (0 << R300_DST_VEC_LOC_0_SHIFT) | R300_SIGNED_0 | (R300_DATA_TYPE_FLOAT_2 << R300_DATA_TYPE_1_SHIFT) | (0 << R300_SKIP_DWORDS_1_SHIFT) | (6 << R300_DST_VEC_LOC_1_SHIFT) | R300_LAST_VEC_1 | R300_SIGNED_1)); } /* load the vertex shader * We pre-load vertex programs in RADEONInit3DEngine(): * - exa * - Xv * - Xv bicubic * Here we select the offset of the vertex program we want to use */ if (info->accel_state->has_tcl) { if (pPriv->bicubic_enabled) { OUT_RING_REG(R300_VAP_PVS_CODE_CNTL_0, ((11 << R300_PVS_FIRST_INST_SHIFT) | (13 << R300_PVS_XYZW_VALID_INST_SHIFT) | (13 << R300_PVS_LAST_INST_SHIFT))); OUT_RING_REG(R300_VAP_PVS_CODE_CNTL_1, (13 << R300_PVS_LAST_VTX_SRC_INST_SHIFT)); } else { OUT_RING_REG(R300_VAP_PVS_CODE_CNTL_0, ((9 << R300_PVS_FIRST_INST_SHIFT) | (10 << R300_PVS_XYZW_VALID_INST_SHIFT) | (10 << R300_PVS_LAST_INST_SHIFT))); OUT_RING_REG(R300_VAP_PVS_CODE_CNTL_1, (10 << R300_PVS_LAST_VTX_SRC_INST_SHIFT)); } } /* Position and one set of 2 texture coordinates */ OUT_RING_REG(R300_VAP_OUT_VTX_FMT_0, R300_VTX_POS_PRESENT); if (pPriv->bicubic_enabled) OUT_RING_REG(R300_VAP_OUT_VTX_FMT_1, ((2 << R300_TEX_0_COMP_CNT_SHIFT) | (2 << R300_TEX_1_COMP_CNT_SHIFT))); else OUT_RING_REG(R300_VAP_OUT_VTX_FMT_1, (2 << R300_TEX_0_COMP_CNT_SHIFT)); OUT_RING_REG(R300_US_OUT_FMT_0, output_fmt); ADVANCE_RING(); /* setup pixel shader */ if (pPriv->bicubic_state != BICUBIC_OFF) { if (pPriv->bicubic_enabled) { BEGIN_RING(2*7); /* 4 components: 2 for tex0 and 2 for tex1 */ OUT_RING_REG(R300_RS_COUNT, ((4 << R300_RS_COUNT_IT_COUNT_SHIFT) | R300_RS_COUNT_HIRES_EN)); /* R300_INST_COUNT_RS - highest RS instruction used */ OUT_RING_REG(R300_RS_INST_COUNT, R300_INST_COUNT_RS(1)); /* Pixel stack frame size. */ OUT_RING_REG(R300_US_PIXSIZE, 5); /* FP length. */ OUT_RING_REG(R500_US_CODE_ADDR, (R500_US_CODE_START_ADDR(0) | R500_US_CODE_END_ADDR(13))); OUT_RING_REG(R500_US_CODE_RANGE, (R500_US_CODE_RANGE_ADDR(0) | R500_US_CODE_RANGE_SIZE(13))); /* Prepare for FP emission. */ OUT_RING_REG(R500_US_CODE_OFFSET, 0); OUT_RING_REG(R500_GA_US_VECTOR_INDEX, R500_US_VECTOR_INST_INDEX(0)); ADVANCE_RING(); BEGIN_RING(2*89); /* Pixel shader. * I've gone ahead and annotated each instruction, since this * thing is MASSIVE. :3 * Note: In order to avoid buggies with temps and multiple * inputs, all temps are offset by 2. temp0 -> register2. */ /* TEX temp2, input1.xxxx, tex1, 1D */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_TEX | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_ID(1) | R500_TEX_INST_LD | R500_TEX_IGNORE_UNCOVERED)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_SRC_ADDR(1) | R500_TEX_SRC_S_SWIZ_R | R500_TEX_SRC_T_SWIZ_R | R500_TEX_SRC_R_SWIZ_R | R500_TEX_SRC_Q_SWIZ_R | R500_TEX_DST_ADDR(2) | R500_TEX_DST_R_SWIZ_R | R500_TEX_DST_G_SWIZ_G | R500_TEX_DST_B_SWIZ_B | R500_TEX_DST_A_SWIZ_A)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); /* TEX temp5, input1.yyyy, tex1, 1D */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_TEX | R500_INST_TEX_SEM_WAIT | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_ID(1) | R500_TEX_INST_LD | R500_TEX_SEM_ACQUIRE | R500_TEX_IGNORE_UNCOVERED)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_SRC_ADDR(1) | R500_TEX_SRC_S_SWIZ_G | R500_TEX_SRC_T_SWIZ_G | R500_TEX_SRC_R_SWIZ_G | R500_TEX_SRC_Q_SWIZ_G | R500_TEX_DST_ADDR(5) | R500_TEX_DST_R_SWIZ_R | R500_TEX_DST_G_SWIZ_G | R500_TEX_DST_B_SWIZ_B | R500_TEX_DST_A_SWIZ_A)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); /* MUL temp4, const0.x0x0, temp2.yyxx */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_ALU | R500_INST_TEX_SEM_WAIT | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B | R500_INST_ALPHA_WMASK)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_RGB_ADDR0(0) | R500_RGB_ADDR0_CONST | R500_RGB_ADDR1(2))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_ADDR0(0) | R500_ALPHA_ADDR0_CONST | R500_ALPHA_ADDR1(2))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGB_SEL_A_SRC0 | R500_ALU_RGB_R_SWIZ_A_R | R500_ALU_RGB_G_SWIZ_A_0 | R500_ALU_RGB_B_SWIZ_A_R | R500_ALU_RGB_SEL_B_SRC1 | R500_ALU_RGB_R_SWIZ_B_G | R500_ALU_RGB_G_SWIZ_B_G | R500_ALU_RGB_B_SWIZ_B_R)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_ADDRD(4) | R500_ALPHA_OP_MAD | R500_ALPHA_SEL_A_SRC0 | R500_ALPHA_SWIZ_A_0 | R500_ALPHA_SEL_B_SRC1 | R500_ALPHA_SWIZ_B_R)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGBA_ADDRD(4) | R500_ALU_RGBA_OP_MAD | R500_ALU_RGBA_R_SWIZ_0 | R500_ALU_RGBA_G_SWIZ_0 | R500_ALU_RGBA_B_SWIZ_0 | R500_ALU_RGBA_A_SWIZ_0)); /* MAD temp3, const0.0y0y, temp5.xxxx, temp4 */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_ALU | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B | R500_INST_ALPHA_WMASK)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_RGB_ADDR0(0) | R500_RGB_ADDR0_CONST | R500_RGB_ADDR1(5) | R500_RGB_ADDR2(4))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_ADDR0(0) | R500_ALPHA_ADDR0_CONST | R500_ALPHA_ADDR1(5) | R500_ALPHA_ADDR2(4))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGB_SEL_A_SRC0 | R500_ALU_RGB_R_SWIZ_A_0 | R500_ALU_RGB_G_SWIZ_A_G | R500_ALU_RGB_B_SWIZ_A_0 | R500_ALU_RGB_SEL_B_SRC1 | R500_ALU_RGB_R_SWIZ_B_R | R500_ALU_RGB_G_SWIZ_B_R | R500_ALU_RGB_B_SWIZ_B_R)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_ADDRD(3) | R500_ALPHA_OP_MAD | R500_ALPHA_SEL_A_SRC0 | R500_ALPHA_SWIZ_A_G | R500_ALPHA_SEL_B_SRC1 | R500_ALPHA_SWIZ_B_R)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGBA_ADDRD(3) | R500_ALU_RGBA_OP_MAD | R500_ALU_RGBA_SEL_C_SRC2 | R500_ALU_RGBA_R_SWIZ_R | R500_ALU_RGBA_G_SWIZ_G | R500_ALU_RGBA_B_SWIZ_B | R500_ALU_RGBA_A_SWIZ_A)); /* ADD temp3, temp3, input0.xyxy */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_ALU | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B | R500_INST_ALPHA_WMASK)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_RGB_ADDR1(3) | R500_RGB_ADDR2(0))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_ADDR1(3) | R500_ALPHA_ADDR2(0))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGB_R_SWIZ_A_1 | R500_ALU_RGB_G_SWIZ_A_1 | R500_ALU_RGB_B_SWIZ_A_1 | R500_ALU_RGB_SEL_B_SRC1 | R500_ALU_RGB_R_SWIZ_B_R | R500_ALU_RGB_G_SWIZ_B_G | R500_ALU_RGB_B_SWIZ_B_B)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_ADDRD(3) | R500_ALPHA_OP_MAD | R500_ALPHA_SWIZ_A_1 | R500_ALPHA_SEL_B_SRC1 | R500_ALPHA_SWIZ_B_A)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGBA_ADDRD(3) | R500_ALU_RGBA_OP_MAD | R500_ALU_RGBA_SEL_C_SRC2 | R500_ALU_RGBA_R_SWIZ_R | R500_ALU_RGBA_G_SWIZ_G | R500_ALU_RGBA_B_SWIZ_R | R500_ALU_RGBA_A_SWIZ_G)); /* TEX temp1, temp3.zwxy, tex0, 2D */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_TEX | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B | R500_INST_ALPHA_WMASK)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_ID(0) | R500_TEX_INST_LD | R500_TEX_IGNORE_UNCOVERED)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_SRC_ADDR(3) | R500_TEX_SRC_S_SWIZ_B | R500_TEX_SRC_T_SWIZ_A | R500_TEX_SRC_R_SWIZ_R | R500_TEX_SRC_Q_SWIZ_G | R500_TEX_DST_ADDR(1) | R500_TEX_DST_R_SWIZ_R | R500_TEX_DST_G_SWIZ_G | R500_TEX_DST_B_SWIZ_B | R500_TEX_DST_A_SWIZ_A)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); /* TEX temp3, temp3.xyzw, tex0, 2D */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_TEX | R500_INST_TEX_SEM_WAIT | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B | R500_INST_ALPHA_WMASK)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_ID(0) | R500_TEX_INST_LD | R500_TEX_SEM_ACQUIRE | R500_TEX_IGNORE_UNCOVERED)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_SRC_ADDR(3) | R500_TEX_SRC_S_SWIZ_R | R500_TEX_SRC_T_SWIZ_G | R500_TEX_SRC_R_SWIZ_B | R500_TEX_SRC_Q_SWIZ_A | R500_TEX_DST_ADDR(3) | R500_TEX_DST_R_SWIZ_R | R500_TEX_DST_G_SWIZ_G | R500_TEX_DST_B_SWIZ_B | R500_TEX_DST_A_SWIZ_A)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); /* MAD temp4, const0.0y0y, temp5.yyyy, temp4 */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_ALU | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B | R500_INST_ALPHA_WMASK)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_RGB_ADDR0(0) | R500_RGB_ADDR0_CONST | R500_RGB_ADDR1(5) | R500_RGB_ADDR2(4))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_ADDR0(0) | R500_ALPHA_ADDR0_CONST | R500_ALPHA_ADDR1(5) | R500_ALPHA_ADDR2(4))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGB_SEL_A_SRC0 | R500_ALU_RGB_R_SWIZ_A_0 | R500_ALU_RGB_G_SWIZ_A_G | R500_ALU_RGB_B_SWIZ_A_0 | R500_ALU_RGB_SEL_B_SRC1 | R500_ALU_RGB_R_SWIZ_B_G | R500_ALU_RGB_G_SWIZ_B_G | R500_ALU_RGB_B_SWIZ_B_G)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_ADDRD(4) | R500_ALPHA_OP_MAD | R500_ALPHA_SEL_A_SRC0 | R500_ALPHA_SWIZ_A_G | R500_ALPHA_SEL_B_SRC1 | R500_ALPHA_SWIZ_B_G)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGBA_ADDRD(4) | R500_ALU_RGBA_OP_MAD | R500_ALU_RGBA_SEL_C_SRC2 | R500_ALU_RGBA_R_SWIZ_R | R500_ALU_RGBA_G_SWIZ_G | R500_ALU_RGBA_B_SWIZ_B | R500_ALU_RGBA_A_SWIZ_A)); /* ADD temp0, temp4, input0.xyxy */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_ALU | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B | R500_INST_ALPHA_WMASK)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_RGB_ADDR1(4) | R500_RGB_ADDR2(0))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_ADDR1(4) | R500_ALPHA_ADDR2(0))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGB_R_SWIZ_A_1 | R500_ALU_RGB_G_SWIZ_A_1 | R500_ALU_RGB_B_SWIZ_A_1 | R500_ALU_RGB_SEL_B_SRC1 | R500_ALU_RGB_R_SWIZ_B_R | R500_ALU_RGB_G_SWIZ_B_G | R500_ALU_RGB_B_SWIZ_B_B)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_ADDRD(0) | R500_ALPHA_OP_MAD | R500_ALPHA_SWIZ_A_1 | R500_ALPHA_SEL_B_SRC1 | R500_ALPHA_SWIZ_B_A)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGBA_ADDRD(0) | R500_ALU_RGBA_OP_MAD | R500_ALU_RGBA_SEL_C_SRC2 | R500_ALU_RGBA_R_SWIZ_R | R500_ALU_RGBA_G_SWIZ_G | R500_ALU_RGBA_B_SWIZ_R | R500_ALU_RGBA_A_SWIZ_G)); /* TEX temp4, temp0.zwzw, tex0, 2D */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_TEX | R500_INST_TEX_SEM_WAIT | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B | R500_INST_ALPHA_WMASK)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_ID(0) | R500_TEX_INST_LD | R500_TEX_IGNORE_UNCOVERED)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_SRC_ADDR(0) | R500_TEX_SRC_S_SWIZ_B | R500_TEX_SRC_T_SWIZ_A | R500_TEX_SRC_R_SWIZ_B | R500_TEX_SRC_Q_SWIZ_A | R500_TEX_DST_ADDR(4) | R500_TEX_DST_R_SWIZ_R | R500_TEX_DST_G_SWIZ_G | R500_TEX_DST_B_SWIZ_B | R500_TEX_DST_A_SWIZ_A)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); /* TEX temp0, temp0.xyzw, tex0, 2D */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_TEX | R500_INST_TEX_SEM_WAIT | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B | R500_INST_ALPHA_WMASK)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_ID(0) | R500_TEX_INST_LD | R500_TEX_SEM_ACQUIRE | R500_TEX_IGNORE_UNCOVERED)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_SRC_ADDR(0) | R500_TEX_SRC_S_SWIZ_R | R500_TEX_SRC_T_SWIZ_G | R500_TEX_SRC_R_SWIZ_B | R500_TEX_SRC_Q_SWIZ_A | R500_TEX_DST_ADDR(0) | R500_TEX_DST_R_SWIZ_R | R500_TEX_DST_G_SWIZ_G | R500_TEX_DST_B_SWIZ_B | R500_TEX_DST_A_SWIZ_A)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); /* LRP temp3, temp2.zzzz, temp1, temp3 -> * - PRESUB temps, temp1 - temp3 * - MAD temp2.zzzz, temps, temp3 */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_ALU | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B | R500_INST_ALPHA_WMASK)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_RGB_ADDR0(3) | R500_RGB_SRCP_OP_RGB1_MINUS_RGB0 | R500_RGB_ADDR1(1) | R500_RGB_ADDR2(2))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_ADDR0(3) | R500_ALPHA_SRCP_OP_A1_MINUS_A0 | R500_ALPHA_ADDR1(1) | R500_ALPHA_ADDR2(2))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGB_SEL_A_SRC2 | R500_ALU_RGB_R_SWIZ_A_B | R500_ALU_RGB_G_SWIZ_A_B | R500_ALU_RGB_B_SWIZ_A_B | R500_ALU_RGB_SEL_B_SRCP | R500_ALU_RGB_R_SWIZ_B_R | R500_ALU_RGB_G_SWIZ_B_G | R500_ALU_RGB_B_SWIZ_B_B)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_ADDRD(3) | R500_ALPHA_OP_MAD | R500_ALPHA_SEL_A_SRC2 | R500_ALPHA_SWIZ_A_B | R500_ALPHA_SEL_B_SRCP | R500_ALPHA_SWIZ_B_A)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGBA_ADDRD(3) | R500_ALU_RGBA_OP_MAD | R500_ALU_RGBA_SEL_C_SRC0 | R500_ALU_RGBA_R_SWIZ_R | R500_ALU_RGBA_G_SWIZ_G | R500_ALU_RGBA_B_SWIZ_B | R500_ALU_RGBA_A_SWIZ_A)); /* LRP temp0, temp2.zzzz, temp4, temp0 -> * - PRESUB temps, temp4 - temp1 * - MAD temp2.zzzz, temps, temp0 */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_ALU | R500_INST_TEX_SEM_WAIT | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B | R500_INST_ALPHA_WMASK)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_RGB_ADDR0(0) | R500_RGB_SRCP_OP_RGB1_MINUS_RGB0 | R500_RGB_ADDR1(4) | R500_RGB_ADDR2(2))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_ADDR0(0) | R500_ALPHA_SRCP_OP_A1_MINUS_A0 | R500_ALPHA_ADDR1(4) | R500_ALPHA_ADDR2(2))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGB_SEL_A_SRC2 | R500_ALU_RGB_R_SWIZ_A_B | R500_ALU_RGB_G_SWIZ_A_B | R500_ALU_RGB_B_SWIZ_A_B | R500_ALU_RGB_SEL_B_SRCP | R500_ALU_RGB_R_SWIZ_B_R | R500_ALU_RGB_G_SWIZ_B_G | R500_ALU_RGB_B_SWIZ_B_B)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_ADDRD(0) | R500_ALPHA_OP_MAD | R500_ALPHA_SEL_A_SRC2 | R500_ALPHA_SWIZ_A_B | R500_ALPHA_SEL_B_SRCP | R500_ALPHA_SWIZ_B_A)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGBA_ADDRD(0) | R500_ALU_RGBA_OP_MAD | R500_ALU_RGBA_SEL_C_SRC0 | R500_ALU_RGBA_R_SWIZ_R | R500_ALU_RGBA_G_SWIZ_G | R500_ALU_RGBA_B_SWIZ_B | R500_ALU_RGBA_A_SWIZ_A)); /* LRP output, temp5.zzzz, temp3, temp0 -> * - PRESUB temps, temp3 - temp0 * - MAD temp5.zzzz, temps, temp0 */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_OUT | R500_INST_LAST | R500_INST_TEX_SEM_WAIT | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B | R500_INST_ALPHA_WMASK | R500_INST_RGB_OMASK_R | R500_INST_RGB_OMASK_G | R500_INST_RGB_OMASK_B | R500_INST_ALPHA_OMASK)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_RGB_ADDR0(0) | R500_RGB_SRCP_OP_RGB1_MINUS_RGB0 | R500_RGB_ADDR1(3) | R500_RGB_ADDR2(5))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_ADDR0(0) | R500_ALPHA_SRCP_OP_A1_MINUS_A0 | R500_ALPHA_ADDR1(3) | R500_ALPHA_ADDR2(5))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGB_SEL_A_SRC2 | R500_ALU_RGB_R_SWIZ_A_B | R500_ALU_RGB_G_SWIZ_A_B | R500_ALU_RGB_B_SWIZ_A_B | R500_ALU_RGB_SEL_B_SRCP | R500_ALU_RGB_R_SWIZ_B_R | R500_ALU_RGB_G_SWIZ_B_G | R500_ALU_RGB_B_SWIZ_B_B)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_ADDRD(0) | R500_ALPHA_OP_MAD | R500_ALPHA_SEL_A_SRC2 | R500_ALPHA_SWIZ_A_B | R500_ALPHA_SEL_B_SRCP | R500_ALPHA_SWIZ_B_A)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGBA_ADDRD(0) | R500_ALU_RGBA_OP_MAD | R500_ALU_RGBA_SEL_C_SRC0 | R500_ALU_RGBA_R_SWIZ_R | R500_ALU_RGBA_G_SWIZ_G | R500_ALU_RGBA_B_SWIZ_B | R500_ALU_RGBA_A_SWIZ_A)); /* Shader constants. */ OUT_RING_REG(R500_GA_US_VECTOR_INDEX, R500_US_VECTOR_CONST_INDEX(0)); /* const0 = {1 / texture[0].width, 1 / texture[0].height, 0, 0} */ OUT_ACCEL_REG_F(R500_GA_US_VECTOR_DATA, (1.0/(float)pPriv->w)); OUT_ACCEL_REG_F(R500_GA_US_VECTOR_DATA, (1.0/(float)pPriv->h)); OUT_ACCEL_REG_F(R500_GA_US_VECTOR_DATA, 0x0); OUT_ACCEL_REG_F(R500_GA_US_VECTOR_DATA, 0x0); ADVANCE_RING(); } else { BEGIN_RING(2*19); /* 2 components: 2 for tex0 */ OUT_RING_REG(R300_RS_COUNT, ((2 << R300_RS_COUNT_IT_COUNT_SHIFT) | R300_RS_COUNT_HIRES_EN)); /* R300_INST_COUNT_RS - highest RS instruction used */ OUT_RING_REG(R300_RS_INST_COUNT, R300_INST_COUNT_RS(0)); /* Pixel stack frame size. */ OUT_RING_REG(R300_US_PIXSIZE, 0); /* highest temp used */ /* FP length. */ OUT_RING_REG(R500_US_CODE_ADDR, (R500_US_CODE_START_ADDR(0) | R500_US_CODE_END_ADDR(1))); OUT_RING_REG(R500_US_CODE_RANGE, (R500_US_CODE_RANGE_ADDR(0) | R500_US_CODE_RANGE_SIZE(1))); /* Prepare for FP emission. */ OUT_RING_REG(R500_US_CODE_OFFSET, 0); OUT_RING_REG(R500_GA_US_VECTOR_INDEX, R500_US_VECTOR_INST_INDEX(0)); /* tex inst */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_TEX | R500_INST_TEX_SEM_WAIT | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B | R500_INST_ALPHA_WMASK | R500_INST_RGB_CLAMP | R500_INST_ALPHA_CLAMP)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_ID(0) | R500_TEX_INST_LD | R500_TEX_SEM_ACQUIRE | R500_TEX_IGNORE_UNCOVERED)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_SRC_ADDR(0) | R500_TEX_SRC_S_SWIZ_R | R500_TEX_SRC_T_SWIZ_G | R500_TEX_DST_ADDR(0) | R500_TEX_DST_R_SWIZ_R | R500_TEX_DST_G_SWIZ_G | R500_TEX_DST_B_SWIZ_B | R500_TEX_DST_A_SWIZ_A)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_DX_ADDR(0) | R500_DX_S_SWIZ_R | R500_DX_T_SWIZ_R | R500_DX_R_SWIZ_R | R500_DX_Q_SWIZ_R | R500_DY_ADDR(0) | R500_DY_S_SWIZ_R | R500_DY_T_SWIZ_R | R500_DY_R_SWIZ_R | R500_DY_Q_SWIZ_R)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); /* ALU inst */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_OUT | R500_INST_TEX_SEM_WAIT | R500_INST_LAST | R500_INST_RGB_OMASK_R | R500_INST_RGB_OMASK_G | R500_INST_RGB_OMASK_B | R500_INST_ALPHA_OMASK | R500_INST_RGB_CLAMP | R500_INST_ALPHA_CLAMP)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_RGB_ADDR0(0) | R500_RGB_ADDR1(0) | R500_RGB_ADDR1_CONST | R500_RGB_ADDR2(0) | R500_RGB_ADDR2_CONST)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_ADDR0(0) | R500_ALPHA_ADDR1(0) | R500_ALPHA_ADDR1_CONST | R500_ALPHA_ADDR2(0) | R500_ALPHA_ADDR2_CONST)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGB_SEL_A_SRC0 | R500_ALU_RGB_R_SWIZ_A_R | R500_ALU_RGB_G_SWIZ_A_G | R500_ALU_RGB_B_SWIZ_A_B | R500_ALU_RGB_SEL_B_SRC0 | R500_ALU_RGB_R_SWIZ_B_1 | R500_ALU_RGB_B_SWIZ_B_1 | R500_ALU_RGB_G_SWIZ_B_1)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_OP_MAD | R500_ALPHA_SWIZ_A_A | R500_ALPHA_SWIZ_B_1)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGBA_OP_MAD | R500_ALU_RGBA_R_SWIZ_0 | R500_ALU_RGBA_G_SWIZ_0 | R500_ALU_RGBA_B_SWIZ_0 | R500_ALU_RGBA_A_SWIZ_0)); ADVANCE_RING(); } } else { /* * y' = y - .0625 * u' = u - .5 * v' = v - .5; * * r = 1.1643 * y' + 0.0 * u' + 1.5958 * v' * g = 1.1643 * y' - 0.39173 * u' - 0.81290 * v' * b = 1.1643 * y' + 2.017 * u' + 0.0 * v' * * DP3 might look like the straightforward solution * but we'd need to move the texture yuv values in * the same reg for this to work. Therefore use MADs. * Brightness just adds to the off constant. * Contrast is multiplication of luminance. * Saturation and hue change the u and v coeffs. * Default values (before adjustments - depend on colorspace): * yco = 1.1643 * uco = 0, -0.39173, 2.017 * vco = 1.5958, -0.8129, 0 * off = -0.0625 * yco + -0.5 * uco[r] + -0.5 * vco[r], * -0.0625 * yco + -0.5 * uco[g] + -0.5 * vco[g], * -0.0625 * yco + -0.5 * uco[b] + -0.5 * vco[b], * * temp = MAD(yco, yuv.yyyy, off) * temp = MAD(uco, yuv.uuuu, temp) * result = MAD(vco, yuv.vvvv, temp) */ /* TODO: don't recalc consts always */ const float Loff = -0.0627; const float Coff = -0.502; float uvcosf, uvsinf; float yco; float uco[3], vco[3], off[3]; float bright, cont, gamma; int ref = pPriv->transform_index; cont = RTFContrast(pPriv->contrast); bright = RTFBrightness(pPriv->brightness); gamma = (float)pPriv->gamma / 1000.0; uvcosf = RTFSaturation(pPriv->saturation) * cos(RTFHue(pPriv->hue)); uvsinf = RTFSaturation(pPriv->saturation) * sin(RTFHue(pPriv->hue)); /* overlay video also does pre-gamma contrast/sat adjust, should we? */ 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; //XXX gamma if (pPriv->is_planar) { BEGIN_RING(2*56); /* 2 components: 2 for tex0 */ OUT_RING_REG(R300_RS_COUNT, ((2 << R300_RS_COUNT_IT_COUNT_SHIFT) | R300_RS_COUNT_HIRES_EN)); /* R300_INST_COUNT_RS - highest RS instruction used */ OUT_RING_REG(R300_RS_INST_COUNT, R300_INST_COUNT_RS(0)); /* Pixel stack frame size. */ OUT_RING_REG(R300_US_PIXSIZE, 2); /* highest temp used */ /* FP length. */ OUT_RING_REG(R500_US_CODE_ADDR, (R500_US_CODE_START_ADDR(0) | R500_US_CODE_END_ADDR(5))); OUT_RING_REG(R500_US_CODE_RANGE, (R500_US_CODE_RANGE_ADDR(0) | R500_US_CODE_RANGE_SIZE(5))); /* Prepare for FP emission. */ OUT_RING_REG(R500_US_CODE_OFFSET, 0); OUT_RING_REG(R500_GA_US_VECTOR_INDEX, R500_US_VECTOR_INST_INDEX(0)); /* tex inst */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_TEX | R500_INST_TEX_SEM_WAIT | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B | R500_INST_ALPHA_WMASK | R500_INST_RGB_CLAMP | R500_INST_ALPHA_CLAMP)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_ID(0) | R500_TEX_INST_LD | R500_TEX_IGNORE_UNCOVERED)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_SRC_ADDR(0) | R500_TEX_SRC_S_SWIZ_R | R500_TEX_SRC_T_SWIZ_G | R500_TEX_DST_ADDR(2) | R500_TEX_DST_R_SWIZ_R | R500_TEX_DST_G_SWIZ_G | R500_TEX_DST_B_SWIZ_B | R500_TEX_DST_A_SWIZ_A)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_DX_ADDR(0) | R500_DX_S_SWIZ_R | R500_DX_T_SWIZ_R | R500_DX_R_SWIZ_R | R500_DX_Q_SWIZ_R | R500_DY_ADDR(0) | R500_DY_S_SWIZ_R | R500_DY_T_SWIZ_R | R500_DY_R_SWIZ_R | R500_DY_Q_SWIZ_R)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); /* tex inst */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_TEX | R500_INST_TEX_SEM_WAIT | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B | R500_INST_ALPHA_WMASK | R500_INST_RGB_CLAMP | R500_INST_ALPHA_CLAMP)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_ID(1) | R500_TEX_INST_LD | R500_TEX_IGNORE_UNCOVERED)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_SRC_ADDR(0) | R500_TEX_SRC_S_SWIZ_R | R500_TEX_SRC_T_SWIZ_G | R500_TEX_DST_ADDR(1) | R500_TEX_DST_R_SWIZ_R | R500_TEX_DST_G_SWIZ_G | R500_TEX_DST_B_SWIZ_B | R500_TEX_DST_A_SWIZ_A)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_DX_ADDR(0) | R500_DX_S_SWIZ_R | R500_DX_T_SWIZ_R | R500_DX_R_SWIZ_R | R500_DX_Q_SWIZ_R | R500_DY_ADDR(0) | R500_DY_S_SWIZ_R | R500_DY_T_SWIZ_R | R500_DY_R_SWIZ_R | R500_DY_Q_SWIZ_R)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); /* tex inst */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_TEX | R500_INST_TEX_SEM_WAIT | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B | R500_INST_ALPHA_WMASK | R500_INST_RGB_CLAMP | R500_INST_ALPHA_CLAMP)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_ID(2) | R500_TEX_INST_LD | R500_TEX_SEM_ACQUIRE | R500_TEX_IGNORE_UNCOVERED)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_SRC_ADDR(0) | R500_TEX_SRC_S_SWIZ_R | R500_TEX_SRC_T_SWIZ_G | R500_TEX_DST_ADDR(0) | R500_TEX_DST_R_SWIZ_R | R500_TEX_DST_G_SWIZ_G | R500_TEX_DST_B_SWIZ_B | R500_TEX_DST_A_SWIZ_A)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_DX_ADDR(0) | R500_DX_S_SWIZ_R | R500_DX_T_SWIZ_R | R500_DX_R_SWIZ_R | R500_DX_Q_SWIZ_R | R500_DY_ADDR(0) | R500_DY_S_SWIZ_R | R500_DY_T_SWIZ_R | R500_DY_R_SWIZ_R | R500_DY_Q_SWIZ_R)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); /* ALU inst */ /* MAD temp2.rgb, const0.aaa, temp2.rgb, const0.rgb */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_ALU | R500_INST_TEX_SEM_WAIT | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B | R500_INST_ALPHA_WMASK)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_RGB_ADDR0(0) | R500_RGB_ADDR0_CONST | R500_RGB_ADDR1(2) | R500_RGB_ADDR2(0) | R500_RGB_ADDR2_CONST)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_ADDR0(0) | R500_ALPHA_ADDR0_CONST | R500_ALPHA_ADDR1(2) | R500_ALPHA_ADDR2(0) | R500_ALPHA_ADDR2_CONST)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGB_SEL_A_SRC0 | R500_ALU_RGB_R_SWIZ_A_A | R500_ALU_RGB_G_SWIZ_A_A | R500_ALU_RGB_B_SWIZ_A_A | R500_ALU_RGB_SEL_B_SRC1 | R500_ALU_RGB_R_SWIZ_B_R | R500_ALU_RGB_B_SWIZ_B_G | R500_ALU_RGB_G_SWIZ_B_B)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_OP_MAD | R500_ALPHA_ADDRD(2) | R500_ALPHA_SWIZ_A_0 | R500_ALPHA_SWIZ_B_0)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGBA_OP_MAD | R500_ALU_RGBA_ADDRD(2) | R500_ALU_RGBA_SEL_C_SRC0 | R500_ALU_RGBA_R_SWIZ_R | R500_ALU_RGBA_G_SWIZ_G | R500_ALU_RGBA_B_SWIZ_B | R500_ALU_RGBA_ALPHA_SEL_C_SRC0 | R500_ALU_RGBA_A_SWIZ_0)); /* MAD temp2.rgb, const1.rgb, temp1.rgb, temp2.rgb */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_ALU | R500_INST_TEX_SEM_WAIT | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B | R500_INST_ALPHA_WMASK)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_RGB_ADDR0(1) | R500_RGB_ADDR0_CONST | R500_RGB_ADDR1(1) | R500_RGB_ADDR2(2))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_ADDR0(1) | R500_ALPHA_ADDR0_CONST | R500_ALPHA_ADDR1(1) | R500_ALPHA_ADDR2(2))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGB_SEL_A_SRC0 | R500_ALU_RGB_R_SWIZ_A_R | R500_ALU_RGB_G_SWIZ_A_G | R500_ALU_RGB_B_SWIZ_A_B | R500_ALU_RGB_SEL_B_SRC1 | R500_ALU_RGB_R_SWIZ_B_R | R500_ALU_RGB_B_SWIZ_B_G | R500_ALU_RGB_G_SWIZ_B_B)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_OP_MAD | R500_ALPHA_ADDRD(2) | R500_ALPHA_SWIZ_A_0 | R500_ALPHA_SWIZ_B_0)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGBA_OP_MAD | R500_ALU_RGBA_ADDRD(2) | R500_ALU_RGBA_SEL_C_SRC2 | R500_ALU_RGBA_R_SWIZ_R | R500_ALU_RGBA_G_SWIZ_G | R500_ALU_RGBA_B_SWIZ_B | R500_ALU_RGBA_ALPHA_SEL_C_SRC0 | R500_ALU_RGBA_A_SWIZ_0)); /* MAD result.rgb, const2.rgb, temp0.rgb, temp2.rgb */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_OUT | R500_INST_TEX_SEM_WAIT | R500_INST_LAST | R500_INST_RGB_OMASK_R | R500_INST_RGB_OMASK_G | R500_INST_RGB_OMASK_B | R500_INST_ALPHA_OMASK | R500_INST_RGB_CLAMP | R500_INST_ALPHA_CLAMP)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_RGB_ADDR0(2) | R500_RGB_ADDR0_CONST | R500_RGB_ADDR1(0) | R500_RGB_ADDR2(2))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_ADDR0(2) | R500_ALPHA_ADDR0_CONST | R500_ALPHA_ADDR1(0) | R500_ALPHA_ADDR2(2))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGB_SEL_A_SRC0 | R500_ALU_RGB_R_SWIZ_A_R | R500_ALU_RGB_G_SWIZ_A_G | R500_ALU_RGB_B_SWIZ_A_B | R500_ALU_RGB_SEL_B_SRC1 | R500_ALU_RGB_R_SWIZ_B_R | R500_ALU_RGB_B_SWIZ_B_G | R500_ALU_RGB_G_SWIZ_B_B)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_OP_MAD | R500_ALPHA_ADDRD(0) | R500_ALPHA_SWIZ_A_0 | R500_ALPHA_SWIZ_B_0)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGBA_OP_MAD | R500_ALU_RGBA_ADDRD(0) | R500_ALU_RGBA_SEL_C_SRC2 | R500_ALU_RGBA_R_SWIZ_R | R500_ALU_RGBA_G_SWIZ_G | R500_ALU_RGBA_B_SWIZ_B | R500_ALU_RGBA_ALPHA_SEL_C_SRC0 | R500_ALU_RGBA_A_SWIZ_1)); } else { BEGIN_RING(2*44); /* 2 components: 2 for tex0/1/2 */ OUT_RING_REG(R300_RS_COUNT, ((2 << R300_RS_COUNT_IT_COUNT_SHIFT) | R300_RS_COUNT_HIRES_EN)); /* R300_INST_COUNT_RS - highest RS instruction used */ OUT_RING_REG(R300_RS_INST_COUNT, R300_INST_COUNT_RS(0)); /* Pixel stack frame size. */ OUT_RING_REG(R300_US_PIXSIZE, 1); /* highest temp used */ /* FP length. */ OUT_RING_REG(R500_US_CODE_ADDR, (R500_US_CODE_START_ADDR(0) | R500_US_CODE_END_ADDR(3))); OUT_RING_REG(R500_US_CODE_RANGE, (R500_US_CODE_RANGE_ADDR(0) | R500_US_CODE_RANGE_SIZE(3))); /* Prepare for FP emission. */ OUT_RING_REG(R500_US_CODE_OFFSET, 0); OUT_RING_REG(R500_GA_US_VECTOR_INDEX, R500_US_VECTOR_INST_INDEX(0)); /* tex inst */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_TEX | R500_INST_TEX_SEM_WAIT | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B | R500_INST_ALPHA_WMASK | R500_INST_RGB_CLAMP | R500_INST_ALPHA_CLAMP)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_ID(0) | R500_TEX_INST_LD | R500_TEX_SEM_ACQUIRE | R500_TEX_IGNORE_UNCOVERED)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_SRC_ADDR(0) | R500_TEX_SRC_S_SWIZ_R | R500_TEX_SRC_T_SWIZ_G | R500_TEX_DST_ADDR(0) | R500_TEX_DST_R_SWIZ_R | R500_TEX_DST_G_SWIZ_G | R500_TEX_DST_B_SWIZ_B | R500_TEX_DST_A_SWIZ_A)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_DX_ADDR(0) | R500_DX_S_SWIZ_R | R500_DX_T_SWIZ_R | R500_DX_R_SWIZ_R | R500_DX_Q_SWIZ_R | R500_DY_ADDR(0) | R500_DY_S_SWIZ_R | R500_DY_T_SWIZ_R | R500_DY_R_SWIZ_R | R500_DY_Q_SWIZ_R)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); /* ALU inst */ /* MAD temp1.rgb, const0.aaa, temp0.ggg, const0.rgb */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_ALU | R500_INST_TEX_SEM_WAIT | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B | R500_INST_ALPHA_WMASK)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_RGB_ADDR0(0) | R500_RGB_ADDR0_CONST | R500_RGB_ADDR1(0) | R500_RGB_ADDR2(0) | R500_RGB_ADDR2_CONST)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_ADDR0(0) | R500_ALPHA_ADDR0_CONST | R500_ALPHA_ADDR1(0) | R500_ALPHA_ADDR2(0) | R500_ALPHA_ADDR2_CONST)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGB_SEL_A_SRC0 | R500_ALU_RGB_R_SWIZ_A_A | R500_ALU_RGB_G_SWIZ_A_A | R500_ALU_RGB_B_SWIZ_A_A | R500_ALU_RGB_SEL_B_SRC1 | R500_ALU_RGB_R_SWIZ_B_G | R500_ALU_RGB_B_SWIZ_B_G | R500_ALU_RGB_G_SWIZ_B_G)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_OP_MAD | R500_ALPHA_ADDRD(1) | R500_ALPHA_SWIZ_A_0 | R500_ALPHA_SWIZ_B_0)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGBA_OP_MAD | R500_ALU_RGBA_ADDRD(1) | R500_ALU_RGBA_SEL_C_SRC0 | R500_ALU_RGBA_R_SWIZ_R | R500_ALU_RGBA_G_SWIZ_G | R500_ALU_RGBA_B_SWIZ_B | R500_ALU_RGBA_ALPHA_SEL_C_SRC0 | R500_ALU_RGBA_A_SWIZ_0)); /* MAD temp1.rgb, const1.rgb, temp0.bbb, temp1.rgb */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_ALU | R500_INST_TEX_SEM_WAIT | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B | R500_INST_ALPHA_WMASK)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_RGB_ADDR0(1) | R500_RGB_ADDR0_CONST | R500_RGB_ADDR1(0) | R500_RGB_ADDR2(1))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_ADDR0(1) | R500_ALPHA_ADDR0_CONST | R500_ALPHA_ADDR1(0) | R500_ALPHA_ADDR2(1))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGB_SEL_A_SRC0 | R500_ALU_RGB_R_SWIZ_A_R | R500_ALU_RGB_G_SWIZ_A_G | R500_ALU_RGB_B_SWIZ_A_B | R500_ALU_RGB_SEL_B_SRC1 | R500_ALU_RGB_R_SWIZ_B_B | R500_ALU_RGB_B_SWIZ_B_B | R500_ALU_RGB_G_SWIZ_B_B)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_OP_MAD | R500_ALPHA_ADDRD(1) | R500_ALPHA_SWIZ_A_0 | R500_ALPHA_SWIZ_B_0)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGBA_OP_MAD | R500_ALU_RGBA_ADDRD(1) | R500_ALU_RGBA_SEL_C_SRC2 | R500_ALU_RGBA_R_SWIZ_R | R500_ALU_RGBA_G_SWIZ_G | R500_ALU_RGBA_B_SWIZ_B | R500_ALU_RGBA_ALPHA_SEL_C_SRC0 | R500_ALU_RGBA_A_SWIZ_0)); /* MAD result.rgb, const2.rgb, temp0.rrr, temp1.rgb */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_OUT | R500_INST_TEX_SEM_WAIT | R500_INST_LAST | R500_INST_RGB_OMASK_R | R500_INST_RGB_OMASK_G | R500_INST_RGB_OMASK_B | R500_INST_ALPHA_OMASK | R500_INST_RGB_CLAMP | R500_INST_ALPHA_CLAMP)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_RGB_ADDR0(2) | R500_RGB_ADDR0_CONST | R500_RGB_ADDR1(0) | R500_RGB_ADDR2(1))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_ADDR0(1) | R500_ALPHA_ADDR0_CONST | R500_ALPHA_ADDR1(0) | R500_ALPHA_ADDR2(1))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGB_SEL_A_SRC0 | R500_ALU_RGB_R_SWIZ_A_R | R500_ALU_RGB_G_SWIZ_A_G | R500_ALU_RGB_B_SWIZ_A_B | R500_ALU_RGB_SEL_B_SRC1 | R500_ALU_RGB_R_SWIZ_B_R | R500_ALU_RGB_B_SWIZ_B_R | R500_ALU_RGB_G_SWIZ_B_R)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_OP_MAD | R500_ALPHA_ADDRD(1) | R500_ALPHA_SWIZ_A_0 | R500_ALPHA_SWIZ_B_0)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGBA_OP_MAD | R500_ALU_RGBA_ADDRD(1) | R500_ALU_RGBA_SEL_C_SRC2 | R500_ALU_RGBA_R_SWIZ_R | R500_ALU_RGBA_G_SWIZ_G | R500_ALU_RGBA_B_SWIZ_B | R500_ALU_RGBA_ALPHA_SEL_C_SRC0 | R500_ALU_RGBA_A_SWIZ_1)); } /* Shader constants. */ OUT_RING_REG(R500_GA_US_VECTOR_INDEX, R500_US_VECTOR_CONST_INDEX(0)); /* constant 0: off, yco */ OUT_ACCEL_REG_F(R500_GA_US_VECTOR_DATA, off[0]); OUT_ACCEL_REG_F(R500_GA_US_VECTOR_DATA, off[1]); OUT_ACCEL_REG_F(R500_GA_US_VECTOR_DATA, off[2]); OUT_ACCEL_REG_F(R500_GA_US_VECTOR_DATA, yco); /* constant 1: uco */ OUT_ACCEL_REG_F(R500_GA_US_VECTOR_DATA, uco[0]); OUT_ACCEL_REG_F(R500_GA_US_VECTOR_DATA, uco[1]); OUT_ACCEL_REG_F(R500_GA_US_VECTOR_DATA, uco[2]); OUT_ACCEL_REG_F(R500_GA_US_VECTOR_DATA, gamma); /* constant 2: vco */ OUT_ACCEL_REG_F(R500_GA_US_VECTOR_DATA, vco[0]); OUT_ACCEL_REG_F(R500_GA_US_VECTOR_DATA, vco[1]); OUT_ACCEL_REG_F(R500_GA_US_VECTOR_DATA, vco[2]); OUT_ACCEL_REG_F(R500_GA_US_VECTOR_DATA, 0.0); ADVANCE_RING(); } BEGIN_ACCEL_RELOC(6, 2); OUT_RING_REG(R300_TX_INVALTAGS, 0); OUT_RING_REG(R300_TX_ENABLE, txenable); EMIT_WRITE_OFFSET(R300_RB3D_COLOROFFSET0, 0, pPixmap); EMIT_COLORPITCH(R300_RB3D_COLORPITCH0, colorpitch, pPixmap); /* no need to enable blending */ OUT_RING_REG(R300_RB3D_BLENDCNTL, RADEON_SRC_BLEND_GL_ONE | RADEON_DST_BLEND_GL_ZERO); OUT_RING_REG(R300_VAP_VTX_SIZE, pPriv->vtx_count); ADVANCE_RING(); if (pPriv->vsync) { xf86CrtcPtr crtc; if (pPriv->desired_crtc) crtc = pPriv->desired_crtc; else crtc = radeon_pick_best_crtc(pScrn, FALSE, pPriv->drw_x, pPriv->drw_x + pPriv->dst_w, pPriv->drw_y, pPriv->drw_y + pPriv->dst_h); if (crtc) RADEONWaitForVLine(pScrn, pPixmap, crtc, pPriv->drw_y - crtc->y, (pPriv->drw_y - crtc->y) + pPriv->dst_h); } return TRUE; } static void R500DisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv) { RADEONInfoPtr info = RADEONPTR(pScrn); PixmapPtr pPixmap = pPriv->pPixmap; int dstxoff, dstyoff; BoxPtr pBox = REGION_RECTS(&pPriv->clip); int nBox = REGION_NUM_RECTS(&pPriv->clip); #ifdef COMPOSITE dstxoff = -pPixmap->screen_x + pPixmap->drawable.x; dstyoff = -pPixmap->screen_y + pPixmap->drawable.y; #else dstxoff = 0; dstyoff = 0; #endif if (!R500PrepareTexturedVideo(pScrn, pPriv)) return; /* * Rendering of the actual polygon is done in two different * ways depending on chip generation: * * < R300: * * These chips can render a rectangle in one pass, so * handling is pretty straight-forward. * * >= R300: * * These chips can accept a quad, but will render it as * two triangles which results in a diagonal tear. Instead * We render a single, large triangle and use the scissor * functionality to restrict it to the desired rectangle. * Due to guardband limits on r3xx/r4xx, we can only use * the single triangle up to 2880 pixels; above that we * render as a quad. */ while (nBox--) { float srcX, srcY, srcw, srch; int dstX, dstY, dstw, dsth; int draw_size = 3 * pPriv->vtx_count + 4 + 2 + 3; if (draw_size > radeon_cs_space_remaining(pScrn)) { radeon_cs_flush_indirect(pScrn); if (!R500PrepareTexturedVideo(pScrn, pPriv)) return; } dstX = pBox->x1 + dstxoff; dstY = pBox->y1 + dstyoff; dstw = pBox->x2 - pBox->x1; dsth = pBox->y2 - pBox->y1; srcX = pPriv->src_x; srcX += ((pBox->x1 - pPriv->drw_x) * pPriv->src_w) / (float)pPriv->dst_w; srcY = pPriv->src_y; srcY += ((pBox->y1 - pPriv->drw_y) * pPriv->src_h) / (float)pPriv->dst_h; srcw = (pPriv->src_w * dstw) / (float)pPriv->dst_w; srch = (pPriv->src_h * dsth) / (float)pPriv->dst_h; BEGIN_RING(2*2); OUT_RING_REG(R300_SC_SCISSOR0, (((dstX) << R300_SCISSOR_X_SHIFT) | ((dstY) << R300_SCISSOR_Y_SHIFT))); OUT_RING_REG(R300_SC_SCISSOR1, (((dstX + dstw - 1) << R300_SCISSOR_X_SHIFT) | ((dstY + dsth - 1) << R300_SCISSOR_Y_SHIFT))); ADVANCE_RING(); BEGIN_RING(3 * pPriv->vtx_count + 4); OUT_RING(CP_PACKET3(R200_CP_PACKET3_3D_DRAW_IMMD_2, 3 * pPriv->vtx_count)); OUT_RING(RADEON_CP_VC_CNTL_PRIM_TYPE_TRI_LIST | RADEON_CP_VC_CNTL_PRIM_WALK_RING | (3 << RADEON_CP_VC_CNTL_NUM_SHIFT)); if (pPriv->bicubic_enabled) { VTX_OUT_6((float)dstX, (float)dstY, (float)srcX / pPriv->w, (float)srcY / pPriv->h, (float)srcX + 0.5, (float)srcY + 0.5); VTX_OUT_6((float)dstX, (float)(dstY + dstw + dsth), (float)srcX / pPriv->w, ((float)srcY + (float)srch * (((float)dstw / (float)dsth) + 1.0)) / pPriv->h, (float)srcX + 0.5, (float)srcY + (float)srch * (((float)dstw / (float)dsth) + 1.0) + 0.5); VTX_OUT_6((float)(dstX + dstw + dsth), (float)dstY, ((float)srcX + (float)srcw * (((float)dsth / (float)dstw) + 1.0)) / pPriv->w, (float)srcY / pPriv->h, (float)srcX + (float)srcw * (((float)dsth / (float)dstw) + 1.0) + 0.5, (float)srcY + 0.5); } else { /* * Render a big, scissored triangle. This means * increasing the triangle size and adjusting * texture coordinates. */ VTX_OUT_4((float)dstX, (float)dstY, (float)srcX / pPriv->w, (float)srcY / pPriv->h); VTX_OUT_4((float)dstX, (float)(dstY + dsth + dstw), (float)srcX / pPriv->w, ((float)srcY + (float)srch * (((float)dstw / (float)dsth) + 1.0)) / pPriv->h); VTX_OUT_4((float)(dstX + dstw + dsth), (float)dstY, ((float)srcX + (float)srcw * (((float)dsth / (float)dstw) + 1.0)) / pPriv->w, (float)srcY / pPriv->h); } /* flushing is pipelined, free/finish is not */ OUT_RING_REG(R300_RB3D_DSTCACHE_CTLSTAT, R300_DC_FLUSH_3D); ADVANCE_RING(); pBox++; } BEGIN_RING(2*3); OUT_RING_REG(R300_SC_CLIP_RULE, 0xAAAA); OUT_RING_REG(R300_RB3D_DSTCACHE_CTLSTAT, R300_RB3D_DC_FLUSH_ALL); OUT_RING_REG(RADEON_WAIT_UNTIL, RADEON_WAIT_3D_IDLECLEAN); ADVANCE_RING(); DamageDamageRegion(pPriv->pDraw, &pPriv->clip); } #undef VTX_OUT_4 #undef VTX_OUT_6 xf86-video-ati-7.3.0/src/radeon_exa_funcs.c0000664000175000017500000005145412262541371015370 00000000000000/* * Copyright 2005 Eric Anholt * Copyright 2005 Benjamin Herrenschmidt * Copyright 2006 Tungsten Graphics, 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. * * Authors: * Eric Anholt * Zack Rusin * Benjamin Herrenschmidt * Michel Dänzer * */ #include #include #include "radeon.h" #include "exa.h" static int RADEONMarkSync(ScreenPtr pScreen) { RINFO_FROM_SCREEN(pScreen); TRACE; return ++info->accel_state->exaSyncMarker; } static void RADEONSync(ScreenPtr pScreen, int marker) { } static void Emit2DState(ScrnInfoPtr pScrn, int op) { RADEONInfoPtr info = RADEONPTR(pScrn); int has_src; /* don't emit if no operation in progress */ if (info->state_2d.op == 0 && op == 0) return; has_src = info->state_2d.src_pitch_offset || info->state_2d.src_bo; if (has_src) { BEGIN_ACCEL_RELOC(10, 2); } else { BEGIN_ACCEL_RELOC(9, 1); } OUT_RING_REG(RADEON_DEFAULT_SC_BOTTOM_RIGHT, info->state_2d.default_sc_bottom_right); OUT_RING_REG(RADEON_DP_GUI_MASTER_CNTL, info->state_2d.dp_gui_master_cntl); OUT_RING_REG(RADEON_DP_BRUSH_FRGD_CLR, info->state_2d.dp_brush_frgd_clr); OUT_RING_REG(RADEON_DP_BRUSH_BKGD_CLR, info->state_2d.dp_brush_bkgd_clr); OUT_RING_REG(RADEON_DP_SRC_FRGD_CLR, info->state_2d.dp_src_frgd_clr); OUT_RING_REG(RADEON_DP_SRC_BKGD_CLR, info->state_2d.dp_src_bkgd_clr); OUT_RING_REG(RADEON_DP_WRITE_MASK, info->state_2d.dp_write_mask); OUT_RING_REG(RADEON_DP_CNTL, info->state_2d.dp_cntl); OUT_RING_REG(RADEON_DST_PITCH_OFFSET, info->state_2d.dst_pitch_offset); OUT_RING_RELOC(info->state_2d.dst_bo, 0, info->state_2d.dst_domain); if (has_src) { OUT_RING_REG(RADEON_SRC_PITCH_OFFSET, info->state_2d.src_pitch_offset); OUT_RING_RELOC(info->state_2d.src_bo, RADEON_GEM_DOMAIN_GTT|RADEON_GEM_DOMAIN_VRAM, 0); } ADVANCE_RING(); if (op) info->state_2d.op = op; info->reemit_current2d = Emit2DState; } static void RADEONFlush2D(PixmapPtr pPix) { RINFO_FROM_SCREEN(pPix->drawable.pScreen); TRACE; BEGIN_RING(2*2); OUT_RING_REG(RADEON_DSTCACHE_CTLSTAT, RADEON_RB2D_DC_FLUSH_ALL); OUT_RING_REG(RADEON_WAIT_UNTIL, RADEON_WAIT_2D_IDLECLEAN | RADEON_WAIT_DMA_GUI_IDLE); ADVANCE_RING(); } static void RADEONDone2D(PixmapPtr pPix) { RINFO_FROM_SCREEN(pPix->drawable.pScreen); info->state_2d.op = 0; RADEONFlush2D(pPix); } static Bool RADEONPrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg) { RINFO_FROM_SCREEN(pPix->drawable.pScreen); uint32_t datatype, dst_pitch_offset; struct radeon_exa_pixmap_priv *driver_priv; int ret; TRACE; if (pPix->drawable.bitsPerPixel == 24) RADEON_FALLBACK(("24bpp unsupported\n")); if (!RADEONGetDatatypeBpp(pPix->drawable.bitsPerPixel, &datatype)) RADEON_FALLBACK(("RADEONGetDatatypeBpp failed\n")); if (!RADEONGetPixmapOffsetPitch(pPix, &dst_pitch_offset)) RADEON_FALLBACK(("RADEONGetPixmapOffsetPitch failed\n")); RADEON_SWITCH_TO_2D(); radeon_cs_space_reset_bos(info->cs); driver_priv = exaGetPixmapDriverPrivate(pPix); radeon_cs_space_add_persistent_bo(info->cs, driver_priv->bo, 0, RADEON_GEM_DOMAIN_VRAM); ret = radeon_cs_space_check(info->cs); if (ret) RADEON_FALLBACK(("Not enough RAM to hw accel solid operation\n")); driver_priv = exaGetPixmapDriverPrivate(pPix); if (driver_priv) { info->state_2d.dst_bo = driver_priv->bo; info->state_2d.dst_domain = driver_priv->shared ? RADEON_GEM_DOMAIN_GTT : RADEON_GEM_DOMAIN_VRAM; } info->state_2d.default_sc_bottom_right = (RADEON_DEFAULT_SC_RIGHT_MAX | RADEON_DEFAULT_SC_BOTTOM_MAX); info->state_2d.dp_brush_bkgd_clr = 0x00000000; info->state_2d.dp_src_frgd_clr = 0xffffffff; info->state_2d.dp_src_bkgd_clr = 0x00000000; info->state_2d.dp_gui_master_cntl = (RADEON_GMC_DST_PITCH_OFFSET_CNTL | RADEON_GMC_BRUSH_SOLID_COLOR | (datatype << 8) | RADEON_GMC_SRC_DATATYPE_COLOR | RADEON_ROP[alu].pattern | RADEON_GMC_CLR_CMP_CNTL_DIS); info->state_2d.dp_brush_frgd_clr = fg; info->state_2d.dp_cntl = (RADEON_DST_X_LEFT_TO_RIGHT | RADEON_DST_Y_TOP_TO_BOTTOM); info->state_2d.dp_write_mask = pm; info->state_2d.dst_pitch_offset = dst_pitch_offset; info->state_2d.src_pitch_offset = 0; info->state_2d.src_bo = NULL; info->accel_state->dst_pix = pPix; Emit2DState(pScrn, RADEON_2D_EXA_SOLID); return TRUE; } static void RADEONSolid(PixmapPtr pPix, int x1, int y1, int x2, int y2) { RINFO_FROM_SCREEN(pPix->drawable.pScreen); TRACE; if (CS_FULL(info->cs)) { RADEONFlush2D(info->accel_state->dst_pix); radeon_cs_flush_indirect(pScrn); } if (info->accel_state->vsync) RADEONWaitForVLine(pScrn, pPix, radeon_pick_best_crtc(pScrn, FALSE, x1, x2, y1, y2), y1, y2); BEGIN_RING(2*2); OUT_RING_REG(RADEON_DST_Y_X, (y1 << 16) | x1); OUT_RING_REG(RADEON_DST_HEIGHT_WIDTH, ((y2 - y1) << 16) | (x2 - x1)); ADVANCE_RING(); } static void RADEONDoPrepareCopy(ScrnInfoPtr pScrn, uint32_t src_pitch_offset, uint32_t dst_pitch_offset, uint32_t datatype, int rop, Pixel planemask) { RADEONInfoPtr info = RADEONPTR(pScrn); /* setup 2D state */ info->state_2d.dp_gui_master_cntl = (RADEON_GMC_DST_PITCH_OFFSET_CNTL | RADEON_GMC_SRC_PITCH_OFFSET_CNTL | RADEON_GMC_BRUSH_NONE | (datatype << 8) | RADEON_GMC_SRC_DATATYPE_COLOR | RADEON_ROP[rop].rop | RADEON_DP_SRC_SOURCE_MEMORY | RADEON_GMC_CLR_CMP_CNTL_DIS); info->state_2d.dp_cntl = ((info->accel_state->xdir >= 0 ? RADEON_DST_X_LEFT_TO_RIGHT : 0) | (info->accel_state->ydir >= 0 ? RADEON_DST_Y_TOP_TO_BOTTOM : 0)); info->state_2d.dp_brush_frgd_clr = 0xffffffff; info->state_2d.dp_brush_bkgd_clr = 0x00000000; info->state_2d.dp_src_frgd_clr = 0xffffffff; info->state_2d.dp_src_bkgd_clr = 0x00000000; info->state_2d.dp_write_mask = planemask; info->state_2d.dst_pitch_offset = dst_pitch_offset; info->state_2d.src_pitch_offset = src_pitch_offset; info->state_2d.default_sc_bottom_right = (RADEON_DEFAULT_SC_RIGHT_MAX | RADEON_DEFAULT_SC_BOTTOM_MAX); Emit2DState(pScrn, RADEON_2D_EXA_COPY); } static Bool RADEONPrepareCopy(PixmapPtr pSrc, PixmapPtr pDst, int xdir, int ydir, int rop, Pixel planemask) { RINFO_FROM_SCREEN(pDst->drawable.pScreen); uint32_t datatype, src_pitch_offset, dst_pitch_offset; struct radeon_exa_pixmap_priv *driver_priv; int ret; TRACE; if (pDst->drawable.bitsPerPixel == 24) RADEON_FALLBACK(("24bpp unsupported")); if (!RADEONGetDatatypeBpp(pDst->drawable.bitsPerPixel, &datatype)) RADEON_FALLBACK(("RADEONGetDatatypeBpp failed\n")); if (!RADEONGetPixmapOffsetPitch(pSrc, &src_pitch_offset)) RADEON_FALLBACK(("RADEONGetPixmapOffsetPitch source failed\n")); if (!RADEONGetPixmapOffsetPitch(pDst, &dst_pitch_offset)) RADEON_FALLBACK(("RADEONGetPixmapOffsetPitch dest failed\n")); RADEON_SWITCH_TO_2D(); radeon_cs_space_reset_bos(info->cs); driver_priv = exaGetPixmapDriverPrivate(pSrc); radeon_cs_space_add_persistent_bo(info->cs, driver_priv->bo, RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM, 0); info->state_2d.src_bo = driver_priv->bo; driver_priv = exaGetPixmapDriverPrivate(pDst); info->state_2d.dst_bo = driver_priv->bo; info->state_2d.dst_domain = driver_priv->shared ? RADEON_GEM_DOMAIN_GTT : RADEON_GEM_DOMAIN_VRAM; radeon_cs_space_add_persistent_bo(info->cs, driver_priv->bo, 0, info->state_2d.dst_domain); ret = radeon_cs_space_check(info->cs); if (ret) RADEON_FALLBACK(("Not enough RAM to hw accel copy operation\n")); info->accel_state->xdir = xdir; info->accel_state->ydir = ydir; info->accel_state->dst_pix = pDst; RADEONDoPrepareCopy(pScrn, src_pitch_offset, dst_pitch_offset, datatype, rop, planemask); return TRUE; } static void RADEONCopy(PixmapPtr pDst, int srcX, int srcY, int dstX, int dstY, int w, int h) { RINFO_FROM_SCREEN(pDst->drawable.pScreen); TRACE; if (CS_FULL(info->cs)) { RADEONFlush2D(info->accel_state->dst_pix); radeon_cs_flush_indirect(pScrn); } if (info->accel_state->xdir < 0) { srcX += w - 1; dstX += w - 1; } if (info->accel_state->ydir < 0) { srcY += h - 1; dstY += h - 1; } if (info->accel_state->vsync) RADEONWaitForVLine(pScrn, pDst, radeon_pick_best_crtc(pScrn, FALSE, dstX, dstX + w, dstY, dstY + h), dstY, dstY + h); BEGIN_RING(2*3); OUT_RING_REG(RADEON_SRC_Y_X, (srcY << 16) | srcX); OUT_RING_REG(RADEON_DST_Y_X, (dstY << 16) | dstX); OUT_RING_REG(RADEON_DST_HEIGHT_WIDTH, (h << 16) | w); ADVANCE_RING(); } /* Emit blit with arbitrary source and destination offsets and pitches */ static void RADEONBlitChunk(ScrnInfoPtr pScrn, struct radeon_bo *src_bo, struct radeon_bo *dst_bo, uint32_t datatype, uint32_t src_pitch_offset, uint32_t dst_pitch_offset, int srcX, int srcY, int dstX, int dstY, int w, int h, uint32_t src_domain, uint32_t dst_domain) { RADEONInfoPtr info = RADEONPTR(pScrn); if (src_bo && dst_bo) { BEGIN_ACCEL_RELOC(6, 2); } else if (src_bo && dst_bo == NULL) { BEGIN_ACCEL_RELOC(6, 1); } else { BEGIN_RING(2*6); } OUT_RING_REG(RADEON_DP_GUI_MASTER_CNTL, RADEON_GMC_DST_PITCH_OFFSET_CNTL | RADEON_GMC_SRC_PITCH_OFFSET_CNTL | RADEON_GMC_BRUSH_NONE | (datatype << 8) | RADEON_GMC_SRC_DATATYPE_COLOR | RADEON_ROP3_S | RADEON_DP_SRC_SOURCE_MEMORY | RADEON_GMC_CLR_CMP_CNTL_DIS | RADEON_GMC_WR_MSK_DIS); OUT_RING_REG(RADEON_SRC_PITCH_OFFSET, src_pitch_offset); if (src_bo) { OUT_RING_RELOC(src_bo, src_domain, 0); } OUT_RING_REG(RADEON_DST_PITCH_OFFSET, dst_pitch_offset); if (dst_bo) { OUT_RING_RELOC(dst_bo, 0, dst_domain); } OUT_RING_REG(RADEON_SRC_Y_X, (srcY << 16) | srcX); OUT_RING_REG(RADEON_DST_Y_X, (dstY << 16) | dstX); OUT_RING_REG(RADEON_DST_HEIGHT_WIDTH, (h << 16) | w); ADVANCE_RING(); BEGIN_RING(2*2); OUT_RING_REG(RADEON_DSTCACHE_CTLSTAT, RADEON_RB2D_DC_FLUSH_ALL); OUT_RING_REG(RADEON_WAIT_UNTIL, RADEON_WAIT_2D_IDLECLEAN | RADEON_WAIT_DMA_GUI_IDLE); ADVANCE_RING(); } static Bool RADEONUploadToScreenCS(PixmapPtr pDst, int x, int y, int w, int h, char *src, int src_pitch) { ScreenPtr pScreen = pDst->drawable.pScreen; RINFO_FROM_SCREEN(pScreen); struct radeon_exa_pixmap_priv *driver_priv; struct radeon_bo *scratch = NULL; struct radeon_bo *copy_dst; unsigned char *dst; unsigned size; uint32_t datatype = 0; uint32_t dst_domain; uint32_t dst_pitch_offset; unsigned bpp = pDst->drawable.bitsPerPixel; uint32_t scratch_pitch = RADEON_ALIGN(w * bpp / 8, 64); uint32_t copy_pitch; uint32_t swap = RADEON_HOST_DATA_SWAP_NONE; int ret; Bool flush = TRUE; Bool r; int i; if (bpp < 8) return FALSE; driver_priv = exaGetPixmapDriverPrivate(pDst); if (!driver_priv || !driver_priv->bo) return FALSE; #if X_BYTE_ORDER == X_BIG_ENDIAN switch (bpp) { case 32: swap = RADEON_HOST_DATA_SWAP_32BIT; break; case 16: swap = RADEON_HOST_DATA_SWAP_16BIT; break; } #endif /* If we know the BO won't be busy / in VRAM, don't bother with a scratch */ copy_dst = driver_priv->bo; copy_pitch = pDst->devKind; if (!(driver_priv->tiling_flags & (RADEON_TILING_MACRO | RADEON_TILING_MICRO))) { if (!radeon_bo_is_referenced_by_cs(driver_priv->bo, info->cs)) { flush = FALSE; if (!radeon_bo_is_busy(driver_priv->bo, &dst_domain) && !(dst_domain & RADEON_GEM_DOMAIN_VRAM)) goto copy; } /* use cpu copy for fast fb access */ if (info->is_fast_fb) goto copy; } size = scratch_pitch * h; scratch = radeon_bo_open(info->bufmgr, 0, size, 0, RADEON_GEM_DOMAIN_GTT, 0); if (scratch == NULL) { goto copy; } radeon_cs_space_reset_bos(info->cs); radeon_add_pixmap(info->cs, pDst, 0, RADEON_GEM_DOMAIN_VRAM); radeon_cs_space_add_persistent_bo(info->cs, scratch, RADEON_GEM_DOMAIN_GTT, 0); ret = radeon_cs_space_check(info->cs); if (ret) { goto copy; } copy_dst = scratch; copy_pitch = scratch_pitch; flush = FALSE; copy: if (flush) radeon_cs_flush_indirect(pScrn); ret = radeon_bo_map(copy_dst, 0); if (ret) { r = FALSE; goto out; } r = TRUE; size = w * bpp / 8; dst = copy_dst->ptr; if (copy_dst == driver_priv->bo) dst += y * copy_pitch + x * bpp / 8; for (i = 0; i < h; i++) { RADEONCopySwap(dst + i * copy_pitch, (uint8_t*)src, size, swap); src += src_pitch; } radeon_bo_unmap(copy_dst); if (copy_dst == scratch) { RADEONGetDatatypeBpp(pDst->drawable.bitsPerPixel, &datatype); RADEONGetPixmapOffsetPitch(pDst, &dst_pitch_offset); RADEON_SWITCH_TO_2D(); RADEONBlitChunk(pScrn, scratch, driver_priv->bo, datatype, scratch_pitch << 16, dst_pitch_offset, 0, 0, x, y, w, h, RADEON_GEM_DOMAIN_GTT, RADEON_GEM_DOMAIN_VRAM); } out: if (scratch) radeon_bo_unref(scratch); return r; } static Bool RADEONDownloadFromScreenCS(PixmapPtr pSrc, int x, int y, int w, int h, char *dst, int dst_pitch) { RINFO_FROM_SCREEN(pSrc->drawable.pScreen); struct radeon_exa_pixmap_priv *driver_priv; struct radeon_bo *scratch = NULL; struct radeon_bo *copy_src; unsigned size; uint32_t datatype = 0; uint32_t src_domain = 0; uint32_t src_pitch_offset; unsigned bpp = pSrc->drawable.bitsPerPixel; uint32_t scratch_pitch = RADEON_ALIGN(w * bpp / 8, 64); uint32_t copy_pitch; uint32_t swap = RADEON_HOST_DATA_SWAP_NONE; int ret; Bool flush = FALSE; Bool r; if (bpp < 8) return FALSE; driver_priv = exaGetPixmapDriverPrivate(pSrc); if (!driver_priv || !driver_priv->bo) return FALSE; #if X_BYTE_ORDER == X_BIG_ENDIAN switch (bpp) { case 32: swap = RADEON_HOST_DATA_SWAP_32BIT; break; case 16: swap = RADEON_HOST_DATA_SWAP_16BIT; break; } #endif /* If we know the BO won't end up in VRAM anyway, don't bother with a scratch */ copy_src = driver_priv->bo; copy_pitch = pSrc->devKind; if (!(driver_priv->tiling_flags & (RADEON_TILING_MACRO | RADEON_TILING_MICRO))) { if (radeon_bo_is_referenced_by_cs(driver_priv->bo, info->cs)) { src_domain = radeon_bo_get_src_domain(driver_priv->bo); if ((src_domain & (RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM)) == (RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM)) src_domain = 0; else /* A write may be scheduled */ flush = TRUE; } if (!src_domain) radeon_bo_is_busy(driver_priv->bo, &src_domain); if (src_domain & ~(uint32_t)RADEON_GEM_DOMAIN_VRAM) goto copy; } size = scratch_pitch * h; scratch = radeon_bo_open(info->bufmgr, 0, size, 0, RADEON_GEM_DOMAIN_GTT, 0); if (scratch == NULL) { goto copy; } radeon_cs_space_reset_bos(info->cs); radeon_add_pixmap(info->cs, pSrc, RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM, 0); radeon_cs_space_add_persistent_bo(info->cs, scratch, 0, RADEON_GEM_DOMAIN_GTT); ret = radeon_cs_space_check(info->cs); if (ret) { goto copy; } RADEONGetDatatypeBpp(pSrc->drawable.bitsPerPixel, &datatype); RADEONGetPixmapOffsetPitch(pSrc, &src_pitch_offset); RADEON_SWITCH_TO_2D(); RADEONBlitChunk(pScrn, driver_priv->bo, scratch, datatype, src_pitch_offset, scratch_pitch << 16, x, y, 0, 0, w, h, RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT, RADEON_GEM_DOMAIN_GTT); copy_src = scratch; copy_pitch = scratch_pitch; flush = TRUE; copy: if (flush) FLUSH_RING(); ret = radeon_bo_map(copy_src, 0); if (ret) { ErrorF("failed to map pixmap: %d\n", ret); r = FALSE; goto out; } r = TRUE; w *= bpp / 8; if (copy_src == driver_priv->bo) size = y * copy_pitch + x * bpp / 8; else size = 0; while (h--) { RADEONCopySwap((uint8_t*)dst, copy_src->ptr + size, w, swap); size += copy_pitch; dst += dst_pitch; } radeon_bo_unmap(copy_src); out: if (scratch) radeon_bo_unref(scratch); return r; } Bool RADEONDrawInit(ScreenPtr pScreen) { RINFO_FROM_SCREEN(pScreen); if (info->accel_state->exa == NULL) { xf86DrvMsg(pScreen->myNum, X_ERROR, "Memory map not set up\n"); return FALSE; } info->accel_state->exa->exa_major = EXA_VERSION_MAJOR; info->accel_state->exa->exa_minor = EXA_VERSION_MINOR; info->accel_state->exa->PrepareSolid = RADEONPrepareSolid; info->accel_state->exa->Solid = RADEONSolid; info->accel_state->exa->DoneSolid = RADEONDone2D; info->accel_state->exa->PrepareCopy = RADEONPrepareCopy; info->accel_state->exa->Copy = RADEONCopy; info->accel_state->exa->DoneCopy = RADEONDone2D; info->accel_state->exa->MarkSync = RADEONMarkSync; info->accel_state->exa->WaitMarker = RADEONSync; info->accel_state->exa->UploadToScreen = &RADEONUploadToScreenCS; info->accel_state->exa->DownloadFromScreen = &RADEONDownloadFromScreenCS; info->accel_state->exa->flags = EXA_OFFSCREEN_PIXMAPS | EXA_SUPPORTS_PREPARE_AUX | EXA_SUPPORTS_OFFSCREEN_OVERLAPS | EXA_HANDLES_PIXMAPS | EXA_MIXED_PIXMAPS; info->accel_state->exa->pixmapOffsetAlign = RADEON_GPU_PAGE_SIZE; info->accel_state->exa->pixmapPitchAlign = 64; #ifdef RENDER if (info->RenderAccel) { if (IS_R300_3D || IS_R500_3D) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Render acceleration " "enabled for R300/R400/R500 type cards.\n"); info->accel_state->exa->CheckComposite = R300CheckComposite; info->accel_state->exa->PrepareComposite = R300PrepareComposite; info->accel_state->exa->Composite = RadeonComposite; info->accel_state->exa->DoneComposite = RadeonDoneComposite; } else if (IS_R200_3D) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Render acceleration " "enabled for R200 type cards.\n"); info->accel_state->exa->CheckComposite = R200CheckComposite; info->accel_state->exa->PrepareComposite = R200PrepareComposite; info->accel_state->exa->Composite = RadeonComposite; info->accel_state->exa->DoneComposite = RadeonDoneComposite; } else { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Render acceleration " "enabled for R100 type cards.\n"); info->accel_state->exa->CheckComposite = R100CheckComposite; info->accel_state->exa->PrepareComposite = R100PrepareComposite; info->accel_state->exa->Composite = RadeonComposite; info->accel_state->exa->DoneComposite = RadeonDoneComposite; } } #endif info->accel_state->exa->CreatePixmap = RADEONEXACreatePixmap; info->accel_state->exa->DestroyPixmap = RADEONEXADestroyPixmap; info->accel_state->exa->PixmapIsOffscreen = RADEONEXAPixmapIsOffscreen; info->accel_state->exa->PrepareAccess = RADEONPrepareAccess_CS; info->accel_state->exa->FinishAccess = RADEONFinishAccess_CS; info->accel_state->exa->CreatePixmap2 = RADEONEXACreatePixmap2; #if (EXA_VERSION_MAJOR == 2 && EXA_VERSION_MINOR >= 6) info->accel_state->exa->SharePixmapBacking = RADEONEXASharePixmapBacking; info->accel_state->exa->SetSharedPixmapBacking = RADEONEXASetSharedPixmapBacking; #endif info->accel_state->exa->maxPitchBytes = 16320; info->accel_state->exa->maxX = 8191; info->accel_state->exa->maxY = 8191; if (xf86ReturnOptValBool(info->Options, OPTION_EXA_VSYNC, FALSE)) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "EXA VSync enabled\n"); info->accel_state->vsync = TRUE; } else info->accel_state->vsync = FALSE; RADEONEngineInit(pScrn); if (!exaDriverInit(pScreen, info->accel_state->exa)) { free(info->accel_state->exa); return FALSE; } exaMarkSync(pScreen); return TRUE; } xf86-video-ati-7.3.0/src/r600_exa.c0000664000175000017500000016665512262541234013421 00000000000000/* * Copyright 2008 Advanced Micro Devices, 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: Alex Deucher * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "xf86.h" #include "exa.h" #include "radeon.h" #include "radeon_reg.h" #include "r600_shader.h" #include "r600_reg.h" #include "r600_state.h" #include "radeon_exa_shared.h" #include "radeon_vbo.h" /* #define SHOW_VERTEXES */ Bool R600SetAccelState(ScrnInfoPtr pScrn, struct r600_accel_object *src0, struct r600_accel_object *src1, struct r600_accel_object *dst, uint32_t vs_offset, uint32_t ps_offset, int rop, Pixel planemask) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; uint32_t pitch_align = 0x7; int ret; if (src0) { memcpy(&accel_state->src_obj[0], src0, sizeof(struct r600_accel_object)); accel_state->src_size[0] = src0->pitch * src0->height * (src0->bpp/8); if (src0->surface) accel_state->src_size[0] = src0->surface->bo_size; /* bad pitch */ if (accel_state->src_obj[0].pitch & pitch_align) RADEON_FALLBACK(("Bad src pitch 0x%08x\n", accel_state->src_obj[0].pitch)); } else { memset(&accel_state->src_obj[0], 0, sizeof(struct r600_accel_object)); accel_state->src_size[0] = 0; } if (src1) { memcpy(&accel_state->src_obj[1], src1, sizeof(struct r600_accel_object)); accel_state->src_size[1] = src1->pitch * src1->height * (src1->bpp/8); if (src1->surface) { accel_state->src_size[1] = src1->surface->bo_size; } /* bad pitch */ if (accel_state->src_obj[1].pitch & pitch_align) RADEON_FALLBACK(("Bad src pitch 0x%08x\n", accel_state->src_obj[1].pitch)); } else { memset(&accel_state->src_obj[1], 0, sizeof(struct r600_accel_object)); accel_state->src_size[1] = 0; } if (dst) { memcpy(&accel_state->dst_obj, dst, sizeof(struct r600_accel_object)); accel_state->dst_size = dst->pitch * dst->height * (dst->bpp/8); if (dst->surface) { accel_state->dst_size = dst->surface->bo_size; } else { accel_state->dst_obj.tiling_flags = 0; } if (accel_state->dst_obj.pitch & pitch_align) RADEON_FALLBACK(("Bad dst pitch 0x%08x\n", accel_state->dst_obj.pitch)); } else { memset(&accel_state->dst_obj, 0, sizeof(struct r600_accel_object)); accel_state->dst_size = 0; } if (CS_FULL(info->cs)) radeon_cs_flush_indirect(pScrn); accel_state->rop = rop; accel_state->planemask = planemask; accel_state->vs_size = 512; accel_state->ps_size = 512; accel_state->vs_mc_addr = vs_offset; accel_state->ps_mc_addr = ps_offset; radeon_cs_space_reset_bos(info->cs); radeon_cs_space_add_persistent_bo(info->cs, accel_state->shaders_bo, RADEON_GEM_DOMAIN_VRAM, 0); if (accel_state->src_obj[0].bo) radeon_cs_space_add_persistent_bo(info->cs, accel_state->src_obj[0].bo, accel_state->src_obj[0].domain, 0); if (accel_state->src_obj[1].bo) radeon_cs_space_add_persistent_bo(info->cs, accel_state->src_obj[1].bo, accel_state->src_obj[1].domain, 0); if (accel_state->dst_obj.bo) radeon_cs_space_add_persistent_bo(info->cs, accel_state->dst_obj.bo, 0, accel_state->dst_obj.domain); ret = radeon_cs_space_check(info->cs); if (ret) RADEON_FALLBACK(("Not enough RAM to hw accel operation\n")); return TRUE; } static Bool R600PrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; cb_config_t cb_conf; shader_config_t vs_conf, ps_conf; uint32_t a, r, g, b; float ps_alu_consts[4]; struct r600_accel_object dst; if (!RADEONCheckBPP(pPix->drawable.bitsPerPixel)) RADEON_FALLBACK(("R600CheckDatatype failed\n")); if (!RADEONValidPM(pm, pPix->drawable.bitsPerPixel)) RADEON_FALLBACK(("invalid planemask\n")); dst.bo = radeon_get_pixmap_bo(pPix); dst.tiling_flags = radeon_get_pixmap_tiling(pPix); dst.surface = radeon_get_pixmap_surface(pPix); dst.pitch = exaGetPixmapPitch(pPix) / (pPix->drawable.bitsPerPixel / 8); dst.width = pPix->drawable.width; dst.height = pPix->drawable.height; dst.bpp = pPix->drawable.bitsPerPixel; dst.domain = RADEON_GEM_DOMAIN_VRAM; if (!R600SetAccelState(pScrn, NULL, NULL, &dst, accel_state->solid_vs_offset, accel_state->solid_ps_offset, alu, pm)) return FALSE; CLEAR (cb_conf); CLEAR (vs_conf); CLEAR (ps_conf); radeon_vbo_check(pScrn, &accel_state->vbo, 16); radeon_cp_start(pScrn); r600_set_default_state(pScrn); r600_set_generic_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); r600_set_screen_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); r600_set_window_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); /* Shader */ vs_conf.shader_addr = accel_state->vs_mc_addr; vs_conf.shader_size = accel_state->vs_size; vs_conf.num_gprs = 2; vs_conf.stack_size = 0; vs_conf.bo = accel_state->shaders_bo; r600_vs_setup(pScrn, &vs_conf, RADEON_GEM_DOMAIN_VRAM); ps_conf.shader_addr = accel_state->ps_mc_addr; ps_conf.shader_size = accel_state->ps_size; ps_conf.num_gprs = 1; ps_conf.stack_size = 0; ps_conf.uncached_first_inst = 1; ps_conf.clamp_consts = 0; ps_conf.export_mode = 2; ps_conf.bo = accel_state->shaders_bo; r600_ps_setup(pScrn, &ps_conf, RADEON_GEM_DOMAIN_VRAM); cb_conf.id = 0; cb_conf.w = accel_state->dst_obj.pitch; cb_conf.h = accel_state->dst_obj.height; cb_conf.base = 0; cb_conf.bo = accel_state->dst_obj.bo; cb_conf.surface = accel_state->dst_obj.surface; if (accel_state->dst_obj.bpp == 8) { cb_conf.format = COLOR_8; cb_conf.comp_swap = 3; /* A */ } else if (accel_state->dst_obj.bpp == 16) { cb_conf.format = COLOR_5_6_5; cb_conf.comp_swap = 2; /* RGB */ #if X_BYTE_ORDER == X_BIG_ENDIAN cb_conf.endian = ENDIAN_8IN16; #endif } else { cb_conf.format = COLOR_8_8_8_8; cb_conf.comp_swap = 1; /* ARGB */ #if X_BYTE_ORDER == X_BIG_ENDIAN cb_conf.endian = ENDIAN_8IN32; #endif } cb_conf.source_format = 1; cb_conf.blend_clamp = 1; /* Render setup */ if (accel_state->planemask & 0x000000ff) cb_conf.pmask |= 4; /* B */ if (accel_state->planemask & 0x0000ff00) cb_conf.pmask |= 2; /* G */ if (accel_state->planemask & 0x00ff0000) cb_conf.pmask |= 1; /* R */ if (accel_state->planemask & 0xff000000) cb_conf.pmask |= 8; /* A */ cb_conf.rop = accel_state->rop; if (accel_state->dst_obj.tiling_flags == 0) cb_conf.array_mode = 0; r600_set_render_target(pScrn, &cb_conf, accel_state->dst_obj.domain); r600_set_spi(pScrn, 0, 0); /* PS alu constants */ if (accel_state->dst_obj.bpp == 16) { r = (fg >> 11) & 0x1f; g = (fg >> 5) & 0x3f; b = (fg >> 0) & 0x1f; ps_alu_consts[0] = (float)r / 31; /* R */ ps_alu_consts[1] = (float)g / 63; /* G */ ps_alu_consts[2] = (float)b / 31; /* B */ ps_alu_consts[3] = 1.0; /* A */ } else if (accel_state->dst_obj.bpp == 8) { a = (fg >> 0) & 0xff; ps_alu_consts[0] = 0.0; /* R */ ps_alu_consts[1] = 0.0; /* G */ ps_alu_consts[2] = 0.0; /* B */ ps_alu_consts[3] = (float)a / 255; /* A */ } else { a = (fg >> 24) & 0xff; r = (fg >> 16) & 0xff; g = (fg >> 8) & 0xff; b = (fg >> 0) & 0xff; ps_alu_consts[0] = (float)r / 255; /* R */ ps_alu_consts[1] = (float)g / 255; /* G */ ps_alu_consts[2] = (float)b / 255; /* B */ ps_alu_consts[3] = (float)a / 255; /* A */ } r600_set_alu_consts(pScrn, SQ_ALU_CONSTANT_ps, sizeof(ps_alu_consts) / SQ_ALU_CONSTANT_offset, ps_alu_consts); if (accel_state->vsync) RADEONVlineHelperClear(pScrn); accel_state->dst_pix = pPix; accel_state->fg = fg; return TRUE; } static void R600DoneSolid(PixmapPtr pPix) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; if (accel_state->vsync) r600_cp_wait_vline_sync(pScrn, pPix, accel_state->vline_crtc, accel_state->vline_y1, accel_state->vline_y2); r600_finish_op(pScrn, 8); } static void R600Solid(PixmapPtr pPix, int x1, int y1, int x2, int y2) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; float *vb; if (CS_FULL(info->cs)) { R600DoneSolid(info->accel_state->dst_pix); radeon_cs_flush_indirect(pScrn); R600PrepareSolid(accel_state->dst_pix, accel_state->rop, accel_state->planemask, accel_state->fg); } if (accel_state->vsync) RADEONVlineHelperSet(pScrn, x1, y1, x2, y2); vb = radeon_vbo_space(pScrn, &accel_state->vbo, 8); vb[0] = (float)x1; vb[1] = (float)y1; vb[2] = (float)x1; vb[3] = (float)y2; vb[4] = (float)x2; vb[5] = (float)y2; radeon_vbo_commit(pScrn, &accel_state->vbo); } static void R600DoPrepareCopy(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; cb_config_t cb_conf; tex_resource_t tex_res; tex_sampler_t tex_samp; shader_config_t vs_conf, ps_conf; CLEAR (cb_conf); CLEAR (tex_res); CLEAR (tex_samp); CLEAR (vs_conf); CLEAR (ps_conf); radeon_vbo_check(pScrn, &accel_state->vbo, 16); radeon_cp_start(pScrn); r600_set_default_state(pScrn); r600_set_generic_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); r600_set_screen_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); r600_set_window_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); /* Shader */ vs_conf.shader_addr = accel_state->vs_mc_addr; vs_conf.shader_size = accel_state->vs_size; vs_conf.num_gprs = 2; vs_conf.stack_size = 0; vs_conf.bo = accel_state->shaders_bo; r600_vs_setup(pScrn, &vs_conf, RADEON_GEM_DOMAIN_VRAM); ps_conf.shader_addr = accel_state->ps_mc_addr; ps_conf.shader_size = accel_state->ps_size; ps_conf.num_gprs = 1; ps_conf.stack_size = 0; ps_conf.uncached_first_inst = 1; ps_conf.clamp_consts = 0; ps_conf.export_mode = 2; ps_conf.bo = accel_state->shaders_bo; r600_ps_setup(pScrn, &ps_conf, RADEON_GEM_DOMAIN_VRAM); /* Texture */ tex_res.id = 0; tex_res.w = accel_state->src_obj[0].width; tex_res.h = accel_state->src_obj[0].height; tex_res.pitch = accel_state->src_obj[0].pitch; tex_res.depth = 0; tex_res.dim = SQ_TEX_DIM_2D; tex_res.base = 0; tex_res.mip_base = 0; tex_res.size = accel_state->src_size[0]; tex_res.bo = accel_state->src_obj[0].bo; tex_res.mip_bo = accel_state->src_obj[0].bo; tex_res.surface = accel_state->src_obj[0].surface; if (accel_state->src_obj[0].bpp == 8) { tex_res.format = FMT_8; tex_res.dst_sel_x = SQ_SEL_1; /* R */ tex_res.dst_sel_y = SQ_SEL_1; /* G */ tex_res.dst_sel_z = SQ_SEL_1; /* B */ tex_res.dst_sel_w = SQ_SEL_X; /* A */ } else if (accel_state->src_obj[0].bpp == 16) { tex_res.format = FMT_5_6_5; tex_res.dst_sel_x = SQ_SEL_Z; /* R */ tex_res.dst_sel_y = SQ_SEL_Y; /* G */ tex_res.dst_sel_z = SQ_SEL_X; /* B */ tex_res.dst_sel_w = SQ_SEL_1; /* A */ } else { tex_res.format = FMT_8_8_8_8; tex_res.dst_sel_x = SQ_SEL_Z; /* R */ tex_res.dst_sel_y = SQ_SEL_Y; /* G */ tex_res.dst_sel_z = SQ_SEL_X; /* B */ tex_res.dst_sel_w = SQ_SEL_W; /* A */ } tex_res.request_size = 1; tex_res.base_level = 0; tex_res.last_level = 0; tex_res.perf_modulation = 0; if (accel_state->src_obj[0].tiling_flags == 0) tex_res.tile_mode = 1; r600_set_tex_resource(pScrn, &tex_res, accel_state->src_obj[0].domain); tex_samp.id = 0; tex_samp.clamp_x = SQ_TEX_CLAMP_LAST_TEXEL; tex_samp.clamp_y = SQ_TEX_CLAMP_LAST_TEXEL; tex_samp.clamp_z = SQ_TEX_WRAP; tex_samp.xy_mag_filter = SQ_TEX_XY_FILTER_POINT; tex_samp.xy_min_filter = SQ_TEX_XY_FILTER_POINT; tex_samp.mc_coord_truncate = 1; tex_samp.z_filter = SQ_TEX_Z_FILTER_NONE; tex_samp.mip_filter = 0; /* no mipmap */ r600_set_tex_sampler(pScrn, &tex_samp); cb_conf.id = 0; cb_conf.w = accel_state->dst_obj.pitch; cb_conf.h = accel_state->dst_obj.height; cb_conf.base = 0; cb_conf.bo = accel_state->dst_obj.bo; cb_conf.surface = accel_state->dst_obj.surface; if (accel_state->dst_obj.bpp == 8) { cb_conf.format = COLOR_8; cb_conf.comp_swap = 3; /* A */ } else if (accel_state->dst_obj.bpp == 16) { cb_conf.format = COLOR_5_6_5; cb_conf.comp_swap = 2; /* RGB */ } else { cb_conf.format = COLOR_8_8_8_8; cb_conf.comp_swap = 1; /* ARGB */ } cb_conf.source_format = 1; cb_conf.blend_clamp = 1; /* Render setup */ if (accel_state->planemask & 0x000000ff) cb_conf.pmask |= 4; /* B */ if (accel_state->planemask & 0x0000ff00) cb_conf.pmask |= 2; /* G */ if (accel_state->planemask & 0x00ff0000) cb_conf.pmask |= 1; /* R */ if (accel_state->planemask & 0xff000000) cb_conf.pmask |= 8; /* A */ cb_conf.rop = accel_state->rop; if (accel_state->dst_obj.tiling_flags == 0) cb_conf.array_mode = 0; r600_set_render_target(pScrn, &cb_conf, accel_state->dst_obj.domain); r600_set_spi(pScrn, (1 - 1), 1); } static void R600DoCopy(ScrnInfoPtr pScrn) { r600_finish_op(pScrn, 16); } static void R600DoCopyVline(PixmapPtr pPix) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; if (accel_state->vsync) r600_cp_wait_vline_sync(pScrn, pPix, accel_state->vline_crtc, accel_state->vline_y1, accel_state->vline_y2); r600_finish_op(pScrn, 16); } static void R600AppendCopyVertex(ScrnInfoPtr pScrn, int srcX, int srcY, int dstX, int dstY, int w, int h) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; float *vb; vb = radeon_vbo_space(pScrn, &accel_state->vbo, 16); vb[0] = (float)dstX; vb[1] = (float)dstY; vb[2] = (float)srcX; vb[3] = (float)srcY; vb[4] = (float)dstX; vb[5] = (float)(dstY + h); vb[6] = (float)srcX; vb[7] = (float)(srcY + h); vb[8] = (float)(dstX + w); vb[9] = (float)(dstY + h); vb[10] = (float)(srcX + w); vb[11] = (float)(srcY + h); radeon_vbo_commit(pScrn, &accel_state->vbo); } static Bool R600PrepareCopy(PixmapPtr pSrc, PixmapPtr pDst, int xdir, int ydir, int rop, Pixel planemask) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; struct r600_accel_object src_obj, dst_obj; if (!RADEONCheckBPP(pSrc->drawable.bitsPerPixel)) RADEON_FALLBACK(("R600CheckDatatype src failed\n")); if (!RADEONCheckBPP(pDst->drawable.bitsPerPixel)) RADEON_FALLBACK(("R600CheckDatatype dst failed\n")); if (!RADEONValidPM(planemask, pDst->drawable.bitsPerPixel)) RADEON_FALLBACK(("Invalid planemask\n")); dst_obj.pitch = exaGetPixmapPitch(pDst) / (pDst->drawable.bitsPerPixel / 8); src_obj.pitch = exaGetPixmapPitch(pSrc) / (pSrc->drawable.bitsPerPixel / 8); accel_state->same_surface = FALSE; src_obj.bo = radeon_get_pixmap_bo(pSrc); dst_obj.bo = radeon_get_pixmap_bo(pDst); dst_obj.tiling_flags = radeon_get_pixmap_tiling(pDst); src_obj.tiling_flags = radeon_get_pixmap_tiling(pSrc); src_obj.surface = radeon_get_pixmap_surface(pSrc); dst_obj.surface = radeon_get_pixmap_surface(pDst); if (radeon_get_pixmap_bo(pSrc) == radeon_get_pixmap_bo(pDst)) accel_state->same_surface = TRUE; src_obj.width = pSrc->drawable.width; src_obj.height = pSrc->drawable.height; src_obj.bpp = pSrc->drawable.bitsPerPixel; src_obj.domain = RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT; dst_obj.width = pDst->drawable.width; dst_obj.height = pDst->drawable.height; dst_obj.bpp = pDst->drawable.bitsPerPixel; if (radeon_get_pixmap_shared(pDst) == TRUE) { dst_obj.domain = RADEON_GEM_DOMAIN_GTT; } else dst_obj.domain = RADEON_GEM_DOMAIN_VRAM; if (!R600SetAccelState(pScrn, &src_obj, NULL, &dst_obj, accel_state->copy_vs_offset, accel_state->copy_ps_offset, rop, planemask)) return FALSE; if (accel_state->same_surface == TRUE) { unsigned long size = accel_state->dst_obj.surface->bo_size; unsigned long align = accel_state->dst_obj.surface->bo_alignment; if (accel_state->copy_area_bo) { radeon_bo_unref(accel_state->copy_area_bo); accel_state->copy_area_bo = NULL; } accel_state->copy_area_bo = radeon_bo_open(info->bufmgr, 0, size, align, RADEON_GEM_DOMAIN_VRAM, 0); if (accel_state->copy_area_bo == NULL) RADEON_FALLBACK(("temp copy surface alloc failed\n")); radeon_cs_space_add_persistent_bo(info->cs, accel_state->copy_area_bo, 0, RADEON_GEM_DOMAIN_VRAM); if (radeon_cs_space_check(info->cs)) { radeon_bo_unref(accel_state->copy_area_bo); accel_state->copy_area_bo = NULL; return FALSE; } accel_state->copy_area = (void*)accel_state->copy_area_bo; } else R600DoPrepareCopy(pScrn); if (accel_state->vsync) RADEONVlineHelperClear(pScrn); accel_state->dst_pix = pDst; accel_state->src_pix = pSrc; accel_state->xdir = xdir; accel_state->ydir = ydir; return TRUE; } static void R600DoneCopy(PixmapPtr pDst) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; if (!accel_state->same_surface) R600DoCopyVline(pDst); if (accel_state->copy_area) { accel_state->copy_area = NULL; } } static void R600Copy(PixmapPtr pDst, int srcX, int srcY, int dstX, int dstY, int w, int h) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; if (accel_state->same_surface && (srcX == dstX) && (srcY == dstY)) return; if (CS_FULL(info->cs)) { R600DoneCopy(info->accel_state->dst_pix); radeon_cs_flush_indirect(pScrn); R600PrepareCopy(accel_state->src_pix, accel_state->dst_pix, accel_state->xdir, accel_state->ydir, accel_state->rop, accel_state->planemask); } if (accel_state->vsync) RADEONVlineHelperSet(pScrn, dstX, dstY, dstX + w, dstY + h); if (accel_state->same_surface && (srcX + w <= dstX || dstX + w <= srcX || srcY + h <= dstY || dstY + h <= srcY)) { R600DoPrepareCopy(pScrn); R600AppendCopyVertex(pScrn, srcX, srcY, dstX, dstY, w, h); R600DoCopyVline(pDst); } else if (accel_state->same_surface && accel_state->copy_area) { uint32_t orig_dst_domain = accel_state->dst_obj.domain; uint32_t orig_src_domain = accel_state->src_obj[0].domain; uint32_t orig_src_tiling_flags = accel_state->src_obj[0].tiling_flags; uint32_t orig_dst_tiling_flags = accel_state->dst_obj.tiling_flags; struct radeon_bo *orig_bo = accel_state->dst_obj.bo; int orig_rop = accel_state->rop; /* src to tmp */ accel_state->dst_obj.domain = RADEON_GEM_DOMAIN_VRAM; accel_state->dst_obj.bo = accel_state->copy_area_bo; accel_state->dst_obj.tiling_flags = 0; accel_state->rop = 3; R600DoPrepareCopy(pScrn); R600AppendCopyVertex(pScrn, srcX, srcY, dstX, dstY, w, h); R600DoCopy(pScrn); /* tmp to dst */ accel_state->src_obj[0].domain = RADEON_GEM_DOMAIN_VRAM; accel_state->src_obj[0].bo = accel_state->copy_area_bo; accel_state->src_obj[0].tiling_flags = 0; accel_state->dst_obj.domain = orig_dst_domain; accel_state->dst_obj.bo = orig_bo; accel_state->dst_obj.tiling_flags = orig_dst_tiling_flags; accel_state->rop = orig_rop; R600DoPrepareCopy(pScrn); R600AppendCopyVertex(pScrn, dstX, dstY, dstX, dstY, w, h); R600DoCopyVline(pDst); /* restore state */ accel_state->src_obj[0].domain = orig_src_domain; accel_state->src_obj[0].bo = orig_bo; accel_state->src_obj[0].tiling_flags = orig_src_tiling_flags; } else R600AppendCopyVertex(pScrn, srcX, srcY, dstX, dstY, w, h); } struct blendinfo { Bool dst_alpha; Bool src_alpha; uint32_t blend_cntl; }; static struct blendinfo R600BlendOp[] = { /* Clear */ {0, 0, (BLEND_ZERO << COLOR_SRCBLEND_shift) | (BLEND_ZERO << COLOR_DESTBLEND_shift)}, /* Src */ {0, 0, (BLEND_ONE << COLOR_SRCBLEND_shift) | (BLEND_ZERO << COLOR_DESTBLEND_shift)}, /* Dst */ {0, 0, (BLEND_ZERO << COLOR_SRCBLEND_shift) | (BLEND_ONE << COLOR_DESTBLEND_shift)}, /* Over */ {0, 1, (BLEND_ONE << COLOR_SRCBLEND_shift) | (BLEND_ONE_MINUS_SRC_ALPHA << COLOR_DESTBLEND_shift)}, /* OverReverse */ {1, 0, (BLEND_ONE_MINUS_DST_ALPHA << COLOR_SRCBLEND_shift) | (BLEND_ONE << COLOR_DESTBLEND_shift)}, /* In */ {1, 0, (BLEND_DST_ALPHA << COLOR_SRCBLEND_shift) | (BLEND_ZERO << COLOR_DESTBLEND_shift)}, /* InReverse */ {0, 1, (BLEND_ZERO << COLOR_SRCBLEND_shift) | (BLEND_SRC_ALPHA << COLOR_DESTBLEND_shift)}, /* Out */ {1, 0, (BLEND_ONE_MINUS_DST_ALPHA << COLOR_SRCBLEND_shift) | (BLEND_ZERO << COLOR_DESTBLEND_shift)}, /* OutReverse */ {0, 1, (BLEND_ZERO << COLOR_SRCBLEND_shift) | (BLEND_ONE_MINUS_SRC_ALPHA << COLOR_DESTBLEND_shift)}, /* Atop */ {1, 1, (BLEND_DST_ALPHA << COLOR_SRCBLEND_shift) | (BLEND_ONE_MINUS_SRC_ALPHA << COLOR_DESTBLEND_shift)}, /* AtopReverse */ {1, 1, (BLEND_ONE_MINUS_DST_ALPHA << COLOR_SRCBLEND_shift) | (BLEND_SRC_ALPHA << COLOR_DESTBLEND_shift)}, /* Xor */ {1, 1, (BLEND_ONE_MINUS_DST_ALPHA << COLOR_SRCBLEND_shift) | (BLEND_ONE_MINUS_SRC_ALPHA << COLOR_DESTBLEND_shift)}, /* Add */ {0, 0, (BLEND_ONE << COLOR_SRCBLEND_shift) | (BLEND_ONE << COLOR_DESTBLEND_shift)}, }; struct formatinfo { unsigned int fmt; uint32_t card_fmt; }; static struct formatinfo R600TexFormats[] = { {PICT_a8r8g8b8, FMT_8_8_8_8}, {PICT_x8r8g8b8, FMT_8_8_8_8}, {PICT_a8b8g8r8, FMT_8_8_8_8}, {PICT_x8b8g8r8, FMT_8_8_8_8}, {PICT_b8g8r8a8, FMT_8_8_8_8}, {PICT_b8g8r8x8, FMT_8_8_8_8}, {PICT_r5g6b5, FMT_5_6_5}, {PICT_a1r5g5b5, FMT_1_5_5_5}, {PICT_x1r5g5b5, FMT_1_5_5_5}, {PICT_a8, FMT_8}, }; static uint32_t R600GetBlendCntl(int op, PicturePtr pMask, uint32_t dst_format) { uint32_t sblend, dblend; sblend = R600BlendOp[op].blend_cntl & COLOR_SRCBLEND_mask; dblend = R600BlendOp[op].blend_cntl & COLOR_DESTBLEND_mask; /* If there's no dst alpha channel, adjust the blend op so that we'll treat * it as always 1. */ if (PICT_FORMAT_A(dst_format) == 0 && R600BlendOp[op].dst_alpha) { if (sblend == (BLEND_DST_ALPHA << COLOR_SRCBLEND_shift)) sblend = (BLEND_ONE << COLOR_SRCBLEND_shift); else if (sblend == (BLEND_ONE_MINUS_DST_ALPHA << COLOR_SRCBLEND_shift)) sblend = (BLEND_ZERO << COLOR_SRCBLEND_shift); } /* If the source alpha is being used, then we should only be in a case where * the source blend factor is 0, and the source blend value is the mask * channels multiplied by the source picture's alpha. */ if (pMask && pMask->componentAlpha && R600BlendOp[op].src_alpha) { if (dblend == (BLEND_SRC_ALPHA << COLOR_DESTBLEND_shift)) { dblend = (BLEND_SRC_COLOR << COLOR_DESTBLEND_shift); } else if (dblend == (BLEND_ONE_MINUS_SRC_ALPHA << COLOR_DESTBLEND_shift)) { dblend = (BLEND_ONE_MINUS_SRC_COLOR << COLOR_DESTBLEND_shift); } } return sblend | dblend; } static Bool R600GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) { switch (pDstPicture->format) { case PICT_a8r8g8b8: case PICT_x8r8g8b8: case PICT_a8b8g8r8: case PICT_x8b8g8r8: case PICT_b8g8r8a8: case PICT_b8g8r8x8: *dst_format = COLOR_8_8_8_8; break; case PICT_r5g6b5: *dst_format = COLOR_5_6_5; break; case PICT_a1r5g5b5: case PICT_x1r5g5b5: *dst_format = COLOR_1_5_5_5; break; case PICT_a8: *dst_format = COLOR_8; break; default: RADEON_FALLBACK(("Unsupported dest format 0x%x\n", (int)pDstPicture->format)); } return TRUE; } static Bool R600CheckCompositeTexture(PicturePtr pPict, PicturePtr pDstPict, int op, int unit) { unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; unsigned int i; for (i = 0; i < sizeof(R600TexFormats) / sizeof(R600TexFormats[0]); i++) { if (R600TexFormats[i].fmt == pPict->format) break; } if (i == sizeof(R600TexFormats) / sizeof(R600TexFormats[0])) RADEON_FALLBACK(("Unsupported picture format 0x%x\n", (int)pPict->format)); if (pPict->filter != PictFilterNearest && pPict->filter != PictFilterBilinear) RADEON_FALLBACK(("Unsupported filter 0x%x\n", pPict->filter)); /* for REPEAT_NONE, Render semantics are that sampling outside the source * picture results in alpha=0 pixels. We can implement this with a border color * *if* our source texture has an alpha channel, otherwise we need to fall * back. If we're not transformed then we hope that upper layers have clipped * rendering to the bounds of the source drawable, in which case it doesn't * matter. I have not, however, verified that the X server always does such * clipping. */ /* FIXME R6xx */ if (pPict->transform != 0 && repeatType == RepeatNone && PICT_FORMAT_A(pPict->format) == 0) { if (!(((op == PictOpSrc) || (op == PictOpClear)) && (PICT_FORMAT_A(pDstPict->format) == 0))) RADEON_FALLBACK(("REPEAT_NONE unsupported for transformed xRGB source\n")); } if (!radeon_transform_is_affine_or_scaled(pPict->transform)) RADEON_FALLBACK(("non-affine transforms not supported\n")); return TRUE; } static Bool R600TextureSetup(PicturePtr pPict, PixmapPtr pPix, int unit) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pPix->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; unsigned int repeatType; unsigned int i; tex_resource_t tex_res; tex_sampler_t tex_samp; int pix_r, pix_g, pix_b, pix_a; float vs_alu_consts[8]; CLEAR (tex_res); CLEAR (tex_samp); for (i = 0; i < sizeof(R600TexFormats) / sizeof(R600TexFormats[0]); i++) { if (R600TexFormats[i].fmt == pPict->format) break; } /* Texture */ if (pPict->pDrawable) { tex_res.w = pPict->pDrawable->width; tex_res.h = pPict->pDrawable->height; repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; } else { tex_res.w = 1; tex_res.h = 1; repeatType = RepeatNormal; } tex_res.id = unit; tex_res.pitch = accel_state->src_obj[unit].pitch; tex_res.depth = 0; tex_res.dim = SQ_TEX_DIM_2D; tex_res.base = 0; tex_res.mip_base = 0; tex_res.size = accel_state->src_size[unit]; tex_res.format = R600TexFormats[i].card_fmt; tex_res.bo = accel_state->src_obj[unit].bo; tex_res.mip_bo = accel_state->src_obj[unit].bo; tex_res.surface = accel_state->src_obj[unit].surface; tex_res.request_size = 1; #if X_BYTE_ORDER == X_BIG_ENDIAN switch (accel_state->src_obj[unit].bpp) { case 16: tex_res.endian = SQ_ENDIAN_8IN16; break; case 32: tex_res.endian = SQ_ENDIAN_8IN32; break; default : break; } #endif /* component swizzles */ switch (pPict->format) { case PICT_a1r5g5b5: case PICT_a8r8g8b8: pix_r = SQ_SEL_Z; /* R */ pix_g = SQ_SEL_Y; /* G */ pix_b = SQ_SEL_X; /* B */ pix_a = SQ_SEL_W; /* A */ break; case PICT_a8b8g8r8: pix_r = SQ_SEL_X; /* R */ pix_g = SQ_SEL_Y; /* G */ pix_b = SQ_SEL_Z; /* B */ pix_a = SQ_SEL_W; /* A */ break; case PICT_x8b8g8r8: pix_r = SQ_SEL_X; /* R */ pix_g = SQ_SEL_Y; /* G */ pix_b = SQ_SEL_Z; /* B */ pix_a = SQ_SEL_1; /* A */ break; case PICT_b8g8r8a8: pix_r = SQ_SEL_Y; /* R */ pix_g = SQ_SEL_Z; /* G */ pix_b = SQ_SEL_W; /* B */ pix_a = SQ_SEL_X; /* A */ break; case PICT_b8g8r8x8: pix_r = SQ_SEL_Y; /* R */ pix_g = SQ_SEL_Z; /* G */ pix_b = SQ_SEL_W; /* B */ pix_a = SQ_SEL_1; /* A */ break; case PICT_x1r5g5b5: case PICT_x8r8g8b8: case PICT_r5g6b5: pix_r = SQ_SEL_Z; /* R */ pix_g = SQ_SEL_Y; /* G */ pix_b = SQ_SEL_X; /* B */ pix_a = SQ_SEL_1; /* A */ break; case PICT_a8: pix_r = SQ_SEL_0; /* R */ pix_g = SQ_SEL_0; /* G */ pix_b = SQ_SEL_0; /* B */ pix_a = SQ_SEL_X; /* A */ break; default: RADEON_FALLBACK(("Bad format 0x%x\n", pPict->format)); } if (unit == 0) { if (!accel_state->msk_pic) { if (PICT_FORMAT_RGB(pPict->format) == 0) { pix_r = SQ_SEL_0; pix_g = SQ_SEL_0; pix_b = SQ_SEL_0; } if (PICT_FORMAT_A(pPict->format) == 0) pix_a = SQ_SEL_1; } else { if (accel_state->component_alpha) { if (accel_state->src_alpha) { if (PICT_FORMAT_A(pPict->format) == 0) { pix_r = SQ_SEL_1; pix_g = SQ_SEL_1; pix_b = SQ_SEL_1; pix_a = SQ_SEL_1; } else { pix_r = pix_a; pix_g = pix_a; pix_b = pix_a; } } else { if (PICT_FORMAT_A(pPict->format) == 0) pix_a = SQ_SEL_1; } } else { if (PICT_FORMAT_RGB(pPict->format) == 0) { pix_r = SQ_SEL_0; pix_g = SQ_SEL_0; pix_b = SQ_SEL_0; } if (PICT_FORMAT_A(pPict->format) == 0) pix_a = SQ_SEL_1; } } } else { if (accel_state->component_alpha) { if (PICT_FORMAT_A(pPict->format) == 0) pix_a = SQ_SEL_1; } else { if (PICT_FORMAT_A(pPict->format) == 0) { pix_r = SQ_SEL_1; pix_g = SQ_SEL_1; pix_b = SQ_SEL_1; pix_a = SQ_SEL_1; } else { pix_r = pix_a; pix_g = pix_a; pix_b = pix_a; } } } tex_res.dst_sel_x = pix_r; /* R */ tex_res.dst_sel_y = pix_g; /* G */ tex_res.dst_sel_z = pix_b; /* B */ tex_res.dst_sel_w = pix_a; /* A */ tex_res.base_level = 0; tex_res.last_level = 0; tex_res.perf_modulation = 0; if (accel_state->src_obj[unit].tiling_flags == 0) tex_res.tile_mode = 1; r600_set_tex_resource(pScrn, &tex_res, accel_state->src_obj[unit].domain); tex_samp.id = unit; tex_samp.border_color = SQ_TEX_BORDER_COLOR_TRANS_BLACK; switch (repeatType) { case RepeatNormal: tex_samp.clamp_x = SQ_TEX_WRAP; tex_samp.clamp_y = SQ_TEX_WRAP; break; case RepeatPad: tex_samp.clamp_x = SQ_TEX_CLAMP_LAST_TEXEL; tex_samp.clamp_y = SQ_TEX_CLAMP_LAST_TEXEL; break; case RepeatReflect: tex_samp.clamp_x = SQ_TEX_MIRROR; tex_samp.clamp_y = SQ_TEX_MIRROR; break; case RepeatNone: tex_samp.clamp_x = SQ_TEX_CLAMP_BORDER; tex_samp.clamp_y = SQ_TEX_CLAMP_BORDER; break; default: RADEON_FALLBACK(("Bad repeat 0x%x\n", repeatType)); } switch (pPict->filter) { case PictFilterNearest: tex_samp.xy_mag_filter = SQ_TEX_XY_FILTER_POINT; tex_samp.xy_min_filter = SQ_TEX_XY_FILTER_POINT; tex_samp.mc_coord_truncate = 1; break; case PictFilterBilinear: tex_samp.xy_mag_filter = SQ_TEX_XY_FILTER_BILINEAR; tex_samp.xy_min_filter = SQ_TEX_XY_FILTER_BILINEAR; break; default: RADEON_FALLBACK(("Bad filter 0x%x\n", pPict->filter)); } tex_samp.clamp_z = SQ_TEX_WRAP; tex_samp.z_filter = SQ_TEX_Z_FILTER_NONE; tex_samp.mip_filter = 0; /* no mipmap */ r600_set_tex_sampler(pScrn, &tex_samp); if (pPict->transform != 0) { accel_state->is_transform[unit] = TRUE; accel_state->transform[unit] = pPict->transform; vs_alu_consts[0] = xFixedToFloat(pPict->transform->matrix[0][0]); vs_alu_consts[1] = xFixedToFloat(pPict->transform->matrix[0][1]); vs_alu_consts[2] = xFixedToFloat(pPict->transform->matrix[0][2]); vs_alu_consts[3] = 1.0 / tex_res.w; vs_alu_consts[4] = xFixedToFloat(pPict->transform->matrix[1][0]); vs_alu_consts[5] = xFixedToFloat(pPict->transform->matrix[1][1]); vs_alu_consts[6] = xFixedToFloat(pPict->transform->matrix[1][2]); vs_alu_consts[7] = 1.0 / tex_res.h; } else { accel_state->is_transform[unit] = FALSE; vs_alu_consts[0] = 1.0; vs_alu_consts[1] = 0.0; vs_alu_consts[2] = 0.0; vs_alu_consts[3] = 1.0 / tex_res.w; vs_alu_consts[4] = 0.0; vs_alu_consts[5] = 1.0; vs_alu_consts[6] = 0.0; vs_alu_consts[7] = 1.0 / tex_res.h; } /* VS alu constants */ r600_set_alu_consts(pScrn, SQ_ALU_CONSTANT_vs + (unit * 2), sizeof(vs_alu_consts) / SQ_ALU_CONSTANT_offset, vs_alu_consts); return TRUE; } static Bool R600CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, PicturePtr pDstPicture) { uint32_t tmp1; PixmapPtr pSrcPixmap, pDstPixmap; /* Check for unsupported compositing operations. */ if (op >= (int) (sizeof(R600BlendOp) / sizeof(R600BlendOp[0]))) RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op)); if (pSrcPicture->pDrawable) { pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); if (pSrcPixmap->drawable.width >= 8192 || pSrcPixmap->drawable.height >= 8192) { RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", pSrcPixmap->drawable.width, pSrcPixmap->drawable.height)); } if (!R600CheckCompositeTexture(pSrcPicture, pDstPicture, op, 0)) return FALSE; } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill) RADEON_FALLBACK(("Gradient pictures not supported yet\n")); pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable); if (pDstPixmap->drawable.width >= 8192 || pDstPixmap->drawable.height >= 8192) { RADEON_FALLBACK(("Dest w/h too large (%d,%d).\n", pDstPixmap->drawable.width, pDstPixmap->drawable.height)); } if (pMaskPicture) { PixmapPtr pMaskPixmap; if (pMaskPicture->pDrawable) { pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); if (pMaskPixmap->drawable.width >= 8192 || pMaskPixmap->drawable.height >= 8192) { RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", pMaskPixmap->drawable.width, pMaskPixmap->drawable.height)); } if (pMaskPicture->componentAlpha) { /* Check if it's component alpha that relies on a source alpha and * on the source value. We can only get one of those into the * single source value that we get to blend with. */ if (R600BlendOp[op].src_alpha && (R600BlendOp[op].blend_cntl & COLOR_SRCBLEND_mask) != (BLEND_ZERO << COLOR_SRCBLEND_shift)) { RADEON_FALLBACK(("Component alpha not supported with source " "alpha and source value blending.\n")); } } if (!R600CheckCompositeTexture(pMaskPicture, pDstPicture, op, 1)) return FALSE; } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill) RADEON_FALLBACK(("Gradient pictures not supported yet\n")); } if (!R600GetDestFormat(pDstPicture, &tmp1)) return FALSE; return TRUE; } static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, PicturePtr pDstPicture, PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst) { ScreenPtr pScreen = pDst->drawable.pScreen; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; uint32_t dst_format; cb_config_t cb_conf; shader_config_t vs_conf, ps_conf; struct r600_accel_object src_obj, mask_obj, dst_obj; if (pDst->drawable.bitsPerPixel < 8 || (pSrc && pSrc->drawable.bitsPerPixel < 8)) return FALSE; if (!pSrc) { pSrc = RADEONSolidPixmap(pScreen, pSrcPicture->pSourcePict->solidFill.color); if (!pSrc) RADEON_FALLBACK(("Failed to create solid scratch pixmap\n")); } dst_obj.bo = radeon_get_pixmap_bo(pDst); src_obj.bo = radeon_get_pixmap_bo(pSrc); dst_obj.tiling_flags = radeon_get_pixmap_tiling(pDst); src_obj.tiling_flags = radeon_get_pixmap_tiling(pSrc); dst_obj.surface = radeon_get_pixmap_surface(pDst); src_obj.surface = radeon_get_pixmap_surface(pSrc); src_obj.pitch = exaGetPixmapPitch(pSrc) / (pSrc->drawable.bitsPerPixel / 8); dst_obj.pitch = exaGetPixmapPitch(pDst) / (pDst->drawable.bitsPerPixel / 8); src_obj.width = pSrc->drawable.width; src_obj.height = pSrc->drawable.height; src_obj.bpp = pSrc->drawable.bitsPerPixel; src_obj.domain = RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT; dst_obj.width = pDst->drawable.width; dst_obj.height = pDst->drawable.height; dst_obj.bpp = pDst->drawable.bitsPerPixel; if (radeon_get_pixmap_shared(pDst) == TRUE) dst_obj.domain = RADEON_GEM_DOMAIN_GTT; else dst_obj.domain = RADEON_GEM_DOMAIN_VRAM; if (pMaskPicture) { if (!pMask) { pMask = RADEONSolidPixmap(pScreen, pMaskPicture->pSourcePict->solidFill.color); if (!pMask) { if (!pSrcPicture->pDrawable) pScreen->DestroyPixmap(pSrc); RADEON_FALLBACK(("Failed to create solid scratch pixmap\n")); } } mask_obj.bo = radeon_get_pixmap_bo(pMask); mask_obj.tiling_flags = radeon_get_pixmap_tiling(pMask); mask_obj.surface = radeon_get_pixmap_surface(pMask); mask_obj.pitch = exaGetPixmapPitch(pMask) / (pMask->drawable.bitsPerPixel / 8); mask_obj.width = pMask->drawable.width; mask_obj.height = pMask->drawable.height; mask_obj.bpp = pMask->drawable.bitsPerPixel; mask_obj.domain = RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT; if (!R600SetAccelState(pScrn, &src_obj, &mask_obj, &dst_obj, accel_state->comp_vs_offset, accel_state->comp_ps_offset, 3, 0xffffffff)) return FALSE; accel_state->msk_pic = pMaskPicture; if (pMaskPicture->componentAlpha) { accel_state->component_alpha = TRUE; if (R600BlendOp[op].src_alpha) accel_state->src_alpha = TRUE; else accel_state->src_alpha = FALSE; } else { accel_state->component_alpha = FALSE; accel_state->src_alpha = FALSE; } } else { if (!R600SetAccelState(pScrn, &src_obj, NULL, &dst_obj, accel_state->comp_vs_offset, accel_state->comp_ps_offset, 3, 0xffffffff)) return FALSE; accel_state->msk_pic = NULL; accel_state->component_alpha = FALSE; accel_state->src_alpha = FALSE; } if (!R600GetDestFormat(pDstPicture, &dst_format)) return FALSE; CLEAR (cb_conf); CLEAR (vs_conf); CLEAR (ps_conf); if (pMask) radeon_vbo_check(pScrn, &accel_state->vbo, 24); else radeon_vbo_check(pScrn, &accel_state->vbo, 16); radeon_cp_start(pScrn); r600_set_default_state(pScrn); r600_set_generic_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); r600_set_screen_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); r600_set_window_scissor(pScrn, 0, 0, accel_state->dst_obj.width, accel_state->dst_obj.height); if (!R600TextureSetup(pSrcPicture, pSrc, 0)) { R600IBDiscard(pScrn); return FALSE; } if (pMask) { if (!R600TextureSetup(pMaskPicture, pMask, 1)) { R600IBDiscard(pScrn); return FALSE; } } else accel_state->is_transform[1] = FALSE; if (pMask) { r600_set_bool_consts(pScrn, SQ_BOOL_CONST_vs, (1 << 0)); r600_set_bool_consts(pScrn, SQ_BOOL_CONST_ps, (1 << 0)); } else { r600_set_bool_consts(pScrn, SQ_BOOL_CONST_vs, (0 << 0)); r600_set_bool_consts(pScrn, SQ_BOOL_CONST_ps, (0 << 0)); } /* Shader */ vs_conf.shader_addr = accel_state->vs_mc_addr; vs_conf.shader_size = accel_state->vs_size; vs_conf.num_gprs = 5; vs_conf.stack_size = 1; vs_conf.bo = accel_state->shaders_bo; r600_vs_setup(pScrn, &vs_conf, RADEON_GEM_DOMAIN_VRAM); ps_conf.shader_addr = accel_state->ps_mc_addr; ps_conf.shader_size = accel_state->ps_size; ps_conf.num_gprs = 3; ps_conf.stack_size = 1; ps_conf.uncached_first_inst = 1; ps_conf.clamp_consts = 0; ps_conf.export_mode = 2; ps_conf.bo = accel_state->shaders_bo; r600_ps_setup(pScrn, &ps_conf, RADEON_GEM_DOMAIN_VRAM); cb_conf.id = 0; cb_conf.w = accel_state->dst_obj.pitch; cb_conf.h = accel_state->dst_obj.height; cb_conf.base = 0; cb_conf.format = dst_format; cb_conf.bo = accel_state->dst_obj.bo; cb_conf.surface = accel_state->dst_obj.surface; switch (pDstPicture->format) { case PICT_a8r8g8b8: case PICT_x8r8g8b8: case PICT_a1r5g5b5: case PICT_x1r5g5b5: default: cb_conf.comp_swap = 1; /* ARGB */ break; case PICT_a8b8g8r8: case PICT_x8b8g8r8: cb_conf.comp_swap = 0; /* ABGR */ break; case PICT_b8g8r8a8: case PICT_b8g8r8x8: cb_conf.comp_swap = 3; /* BGRA */ break; case PICT_r5g6b5: cb_conf.comp_swap = 2; /* RGB */ break; case PICT_a8: cb_conf.comp_swap = 3; /* A */ break; } cb_conf.source_format = 1; cb_conf.blend_clamp = 1; cb_conf.blendcntl = R600GetBlendCntl(op, pMaskPicture, pDstPicture->format); cb_conf.blend_enable = 1; cb_conf.pmask = 0xf; cb_conf.rop = 3; if (accel_state->dst_obj.tiling_flags == 0) cb_conf.array_mode = 0; #if X_BYTE_ORDER == X_BIG_ENDIAN switch (dst_obj.bpp) { case 16: cb_conf.endian = ENDIAN_8IN16; break; case 32: cb_conf.endian = ENDIAN_8IN32; break; default: break; } #endif r600_set_render_target(pScrn, &cb_conf, accel_state->dst_obj.domain); if (pMask) r600_set_spi(pScrn, (2 - 1), 2); else r600_set_spi(pScrn, (1 - 1), 1); if (accel_state->vsync) RADEONVlineHelperClear(pScrn); accel_state->composite_op = op; accel_state->dst_pic = pDstPicture; accel_state->src_pic = pSrcPicture; accel_state->dst_pix = pDst; accel_state->msk_pix = pMask; accel_state->src_pix = pSrc; return TRUE; } static void R600FinishComposite(ScrnInfoPtr pScrn, PixmapPtr pDst, struct radeon_accel_state *accel_state) { int vtx_size; if (accel_state->vsync) r600_cp_wait_vline_sync(pScrn, pDst, accel_state->vline_crtc, accel_state->vline_y1, accel_state->vline_y2); vtx_size = accel_state->msk_pic ? 24 : 16; r600_finish_op(pScrn, vtx_size); } static void R600DoneComposite(PixmapPtr pDst) { ScreenPtr pScreen = pDst->drawable.pScreen; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; R600FinishComposite(pScrn, pDst, accel_state); if (!accel_state->src_pic->pDrawable) pScreen->DestroyPixmap(accel_state->src_pix); if (accel_state->msk_pic && !accel_state->msk_pic->pDrawable) pScreen->DestroyPixmap(accel_state->msk_pix); } static void R600Composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, int w, int h) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; float *vb; /* ErrorF("R600Composite (%d,%d) (%d,%d) (%d,%d) (%d,%d)\n", srcX, srcY, maskX, maskY,dstX, dstY, w, h); */ if (CS_FULL(info->cs)) { R600FinishComposite(pScrn, pDst, info->accel_state); radeon_cs_flush_indirect(pScrn); R600PrepareComposite(info->accel_state->composite_op, info->accel_state->src_pic, info->accel_state->msk_pic, info->accel_state->dst_pic, info->accel_state->src_pix, info->accel_state->msk_pix, info->accel_state->dst_pix); } if (accel_state->vsync) RADEONVlineHelperSet(pScrn, dstX, dstY, dstX + w, dstY + h); if (accel_state->msk_pic) { vb = radeon_vbo_space(pScrn, &accel_state->vbo, 24); vb[0] = (float)dstX; vb[1] = (float)dstY; vb[2] = (float)srcX; vb[3] = (float)srcY; vb[4] = (float)maskX; vb[5] = (float)maskY; vb[6] = (float)dstX; vb[7] = (float)(dstY + h); vb[8] = (float)srcX; vb[9] = (float)(srcY + h); vb[10] = (float)maskX; vb[11] = (float)(maskY + h); vb[12] = (float)(dstX + w); vb[13] = (float)(dstY + h); vb[14] = (float)(srcX + w); vb[15] = (float)(srcY + h); vb[16] = (float)(maskX + w); vb[17] = (float)(maskY + h); radeon_vbo_commit(pScrn, &accel_state->vbo); } else { vb = radeon_vbo_space(pScrn, &accel_state->vbo, 16); vb[0] = (float)dstX; vb[1] = (float)dstY; vb[2] = (float)srcX; vb[3] = (float)srcY; vb[4] = (float)dstX; vb[5] = (float)(dstY + h); vb[6] = (float)srcX; vb[7] = (float)(srcY + h); vb[8] = (float)(dstX + w); vb[9] = (float)(dstY + h); vb[10] = (float)(srcX + w); vb[11] = (float)(srcY + h); radeon_vbo_commit(pScrn, &accel_state->vbo); } } static Bool R600UploadToScreenCS(PixmapPtr pDst, int x, int y, int w, int h, char *src, int src_pitch) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pDst->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; struct radeon_exa_pixmap_priv *driver_priv; struct radeon_bo *scratch = NULL; struct radeon_bo *copy_dst; unsigned char *dst; unsigned size; uint32_t dst_domain; int bpp = pDst->drawable.bitsPerPixel; uint32_t scratch_pitch; uint32_t copy_pitch; uint32_t dst_pitch_hw = exaGetPixmapPitch(pDst) / (bpp / 8); int ret; Bool flush = TRUE; Bool r; int i; struct r600_accel_object src_obj, dst_obj; uint32_t height, base_align; if (bpp < 8) return FALSE; driver_priv = exaGetPixmapDriverPrivate(pDst); if (!driver_priv || !driver_priv->bo) return FALSE; /* If we know the BO won't be busy / in VRAM, don't bother with a scratch */ copy_dst = driver_priv->bo; copy_pitch = pDst->devKind; if (!(driver_priv->tiling_flags & (RADEON_TILING_MACRO | RADEON_TILING_MICRO))) { if (!radeon_bo_is_referenced_by_cs(driver_priv->bo, info->cs)) { flush = FALSE; if (!radeon_bo_is_busy(driver_priv->bo, &dst_domain) && !(dst_domain & RADEON_GEM_DOMAIN_VRAM)) goto copy; } /* use cpu copy for fast fb access */ if (info->is_fast_fb) goto copy; } scratch_pitch = RADEON_ALIGN(w, drmmode_get_pitch_align(pScrn, (bpp / 8), 0)); height = RADEON_ALIGN(h, drmmode_get_height_align(pScrn, 0)); base_align = drmmode_get_base_align(pScrn, (bpp / 8), 0); size = scratch_pitch * height * (bpp / 8); scratch = radeon_bo_open(info->bufmgr, 0, size, base_align, RADEON_GEM_DOMAIN_GTT, 0); if (scratch == NULL) { goto copy; } src_obj.pitch = scratch_pitch; src_obj.width = w; src_obj.height = h; src_obj.bpp = bpp; src_obj.domain = RADEON_GEM_DOMAIN_GTT; src_obj.bo = scratch; src_obj.tiling_flags = 0; src_obj.surface = NULL; dst_obj.pitch = dst_pitch_hw; dst_obj.width = pDst->drawable.width; dst_obj.height = pDst->drawable.height; dst_obj.bpp = bpp; dst_obj.domain = RADEON_GEM_DOMAIN_VRAM; dst_obj.bo = radeon_get_pixmap_bo(pDst); dst_obj.tiling_flags = radeon_get_pixmap_tiling(pDst); dst_obj.surface = radeon_get_pixmap_surface(pDst); if (!R600SetAccelState(pScrn, &src_obj, NULL, &dst_obj, accel_state->copy_vs_offset, accel_state->copy_ps_offset, 3, 0xffffffff)) { goto copy; } copy_dst = scratch; copy_pitch = scratch_pitch * (bpp / 8); flush = FALSE; copy: if (flush) radeon_cs_flush_indirect(pScrn); ret = radeon_bo_map(copy_dst, 0); if (ret) { r = FALSE; goto out; } r = TRUE; size = w * bpp / 8; dst = copy_dst->ptr; if (copy_dst == driver_priv->bo) dst += y * copy_pitch + x * bpp / 8; for (i = 0; i < h; i++) { memcpy(dst + i * copy_pitch, src, size); src += src_pitch; } radeon_bo_unmap(copy_dst); if (copy_dst == scratch) { if (info->accel_state->vsync) RADEONVlineHelperSet(pScrn, x, y, x + w, y + h); /* blit from gart to vram */ R600DoPrepareCopy(pScrn); R600AppendCopyVertex(pScrn, 0, 0, x, y, w, h); R600DoCopyVline(pDst); } out: if (scratch) radeon_bo_unref(scratch); return r; } static Bool R600DownloadFromScreenCS(PixmapPtr pSrc, int x, int y, int w, int h, char *dst, int dst_pitch) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pSrc->drawable.pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; struct radeon_exa_pixmap_priv *driver_priv; struct radeon_bo *scratch = NULL; struct radeon_bo *copy_src; unsigned size; uint32_t src_domain = 0; int bpp = pSrc->drawable.bitsPerPixel; uint32_t scratch_pitch; uint32_t copy_pitch; uint32_t src_pitch_hw = exaGetPixmapPitch(pSrc) / (bpp / 8); int ret; Bool flush = FALSE; Bool r; struct r600_accel_object src_obj, dst_obj; uint32_t height, base_align; if (bpp < 8) return FALSE; driver_priv = exaGetPixmapDriverPrivate(pSrc); if (!driver_priv || !driver_priv->bo) return FALSE; /* If we know the BO won't end up in VRAM anyway, don't bother with a scratch */ copy_src = driver_priv->bo; copy_pitch = pSrc->devKind; if (!(driver_priv->tiling_flags & (RADEON_TILING_MACRO | RADEON_TILING_MICRO))) { if (radeon_bo_is_referenced_by_cs(driver_priv->bo, info->cs)) { src_domain = radeon_bo_get_src_domain(driver_priv->bo); if ((src_domain & (RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM)) == (RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM)) src_domain = 0; else /* A write may be scheduled */ flush = TRUE; } if (!src_domain) radeon_bo_is_busy(driver_priv->bo, &src_domain); if (src_domain & ~(uint32_t)RADEON_GEM_DOMAIN_VRAM) goto copy; } scratch_pitch = RADEON_ALIGN(w, drmmode_get_pitch_align(pScrn, (bpp / 8), 0)); height = RADEON_ALIGN(h, drmmode_get_height_align(pScrn, 0)); base_align = drmmode_get_base_align(pScrn, (bpp / 8), 0); size = scratch_pitch * height * (bpp / 8); scratch = radeon_bo_open(info->bufmgr, 0, size, base_align, RADEON_GEM_DOMAIN_GTT, 0); if (scratch == NULL) { goto copy; } radeon_cs_space_reset_bos(info->cs); radeon_cs_space_add_persistent_bo(info->cs, info->accel_state->shaders_bo, RADEON_GEM_DOMAIN_VRAM, 0); accel_state->src_obj[0].domain = RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM; radeon_add_pixmap(info->cs, pSrc, info->accel_state->src_obj[0].domain, 0); accel_state->dst_obj.domain = RADEON_GEM_DOMAIN_GTT; radeon_cs_space_add_persistent_bo(info->cs, scratch, 0, accel_state->dst_obj.domain); ret = radeon_cs_space_check(info->cs); if (ret) { goto copy; } src_obj.pitch = src_pitch_hw; src_obj.width = pSrc->drawable.width; src_obj.height = pSrc->drawable.height; src_obj.bpp = bpp; src_obj.domain = RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT; src_obj.bo = radeon_get_pixmap_bo(pSrc); src_obj.tiling_flags = radeon_get_pixmap_tiling(pSrc); src_obj.surface = radeon_get_pixmap_surface(pSrc); dst_obj.pitch = scratch_pitch; dst_obj.width = w; dst_obj.height = h; dst_obj.bo = scratch; dst_obj.bpp = bpp; dst_obj.domain = RADEON_GEM_DOMAIN_GTT; dst_obj.tiling_flags = 0; dst_obj.surface = NULL; if (!R600SetAccelState(pScrn, &src_obj, NULL, &dst_obj, accel_state->copy_vs_offset, accel_state->copy_ps_offset, 3, 0xffffffff)) { goto copy; } /* blit from vram to gart */ R600DoPrepareCopy(pScrn); R600AppendCopyVertex(pScrn, x, y, 0, 0, w, h); R600DoCopy(pScrn); copy_src = scratch; copy_pitch = scratch_pitch * (bpp / 8); flush = TRUE; copy: if (flush) radeon_cs_flush_indirect(pScrn); ret = radeon_bo_map(copy_src, 0); if (ret) { ErrorF("failed to map pixmap: %d\n", ret); r = FALSE; goto out; } r = TRUE; w *= bpp / 8; if (copy_src == driver_priv->bo) size = y * copy_pitch + x * bpp / 8; else size = 0; while (h--) { memcpy(dst, copy_src->ptr + size, w); size += copy_pitch; dst += dst_pitch; } radeon_bo_unmap(copy_src); out: if (scratch) radeon_bo_unref(scratch); return r; } static int R600MarkSync(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; return ++accel_state->exaSyncMarker; } static void R600Sync(ScreenPtr pScreen, int marker) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; if (accel_state->exaMarkerSynced != marker) { accel_state->exaMarkerSynced = marker; } } static Bool R600AllocShaders(ScrnInfoPtr pScrn, ScreenPtr pScreen) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; /* 512 bytes per shader for now */ int size = 512 * 9; accel_state->shaders_bo = radeon_bo_open(info->bufmgr, 0, size, 0, RADEON_GEM_DOMAIN_VRAM, 0); if (accel_state->shaders_bo == NULL) { ErrorF("Allocating shader failed\n"); return FALSE; } return TRUE; } Bool R600LoadShaders(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; RADEONChipFamily ChipSet = info->ChipFamily; uint32_t *shader; int ret; ret = radeon_bo_map(accel_state->shaders_bo, 1); if (ret) { FatalError("failed to map shader %d\n", ret); return FALSE; } shader = accel_state->shaders_bo->ptr; /* solid vs --------------------------------------- */ accel_state->solid_vs_offset = 0; R600_solid_vs(ChipSet, shader + accel_state->solid_vs_offset / 4); /* solid ps --------------------------------------- */ accel_state->solid_ps_offset = 512; R600_solid_ps(ChipSet, shader + accel_state->solid_ps_offset / 4); /* copy vs --------------------------------------- */ accel_state->copy_vs_offset = 1024; R600_copy_vs(ChipSet, shader + accel_state->copy_vs_offset / 4); /* copy ps --------------------------------------- */ accel_state->copy_ps_offset = 1536; R600_copy_ps(ChipSet, shader + accel_state->copy_ps_offset / 4); /* comp vs --------------------------------------- */ accel_state->comp_vs_offset = 2048; R600_comp_vs(ChipSet, shader + accel_state->comp_vs_offset / 4); /* comp ps --------------------------------------- */ accel_state->comp_ps_offset = 2560; R600_comp_ps(ChipSet, shader + accel_state->comp_ps_offset / 4); /* xv vs --------------------------------------- */ accel_state->xv_vs_offset = 3072; R600_xv_vs(ChipSet, shader + accel_state->xv_vs_offset / 4); /* xv ps --------------------------------------- */ accel_state->xv_ps_offset = 3584; R600_xv_ps(ChipSet, shader + accel_state->xv_ps_offset / 4); radeon_bo_unmap(accel_state->shaders_bo); return TRUE; } Bool R600DrawInit(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); if (info->accel_state->exa == NULL) { xf86DrvMsg(pScreen->myNum, X_ERROR, "Memory map not set up\n"); return FALSE; } info->accel_state->exa->exa_major = EXA_VERSION_MAJOR; info->accel_state->exa->exa_minor = EXA_VERSION_MINOR; info->accel_state->exa->PrepareSolid = R600PrepareSolid; info->accel_state->exa->Solid = R600Solid; info->accel_state->exa->DoneSolid = R600DoneSolid; info->accel_state->exa->PrepareCopy = R600PrepareCopy; info->accel_state->exa->Copy = R600Copy; info->accel_state->exa->DoneCopy = R600DoneCopy; info->accel_state->exa->MarkSync = R600MarkSync; info->accel_state->exa->WaitMarker = R600Sync; info->accel_state->exa->CreatePixmap = RADEONEXACreatePixmap; info->accel_state->exa->DestroyPixmap = RADEONEXADestroyPixmap; info->accel_state->exa->PixmapIsOffscreen = RADEONEXAPixmapIsOffscreen; info->accel_state->exa->PrepareAccess = RADEONPrepareAccess_CS; info->accel_state->exa->FinishAccess = RADEONFinishAccess_CS; info->accel_state->exa->UploadToScreen = R600UploadToScreenCS; info->accel_state->exa->DownloadFromScreen = R600DownloadFromScreenCS; info->accel_state->exa->CreatePixmap2 = RADEONEXACreatePixmap2; #if (EXA_VERSION_MAJOR == 2 && EXA_VERSION_MINOR >= 6) info->accel_state->exa->SharePixmapBacking = RADEONEXASharePixmapBacking; info->accel_state->exa->SetSharedPixmapBacking = RADEONEXASetSharedPixmapBacking; #endif info->accel_state->exa->flags = EXA_OFFSCREEN_PIXMAPS | EXA_SUPPORTS_PREPARE_AUX | EXA_HANDLES_PIXMAPS | EXA_MIXED_PIXMAPS; info->accel_state->exa->pixmapOffsetAlign = 256; info->accel_state->exa->pixmapPitchAlign = 256; info->accel_state->exa->CheckComposite = R600CheckComposite; info->accel_state->exa->PrepareComposite = R600PrepareComposite; info->accel_state->exa->Composite = R600Composite; info->accel_state->exa->DoneComposite = R600DoneComposite; info->accel_state->exa->maxPitchBytes = 32768; info->accel_state->exa->maxX = 8192; info->accel_state->exa->maxY = 8192; /* not supported yet */ if (xf86ReturnOptValBool(info->Options, OPTION_EXA_VSYNC, FALSE)) { xf86DrvMsg(pScrn->scrnIndex, X_INFO, "EXA VSync enabled\n"); info->accel_state->vsync = TRUE; } else info->accel_state->vsync = FALSE; if (!exaDriverInit(pScreen, info->accel_state->exa)) { free(info->accel_state->exa); return FALSE; } info->accel_state->XInited3D = FALSE; info->accel_state->src_obj[0].bo = NULL; info->accel_state->src_obj[1].bo = NULL; info->accel_state->dst_obj.bo = NULL; info->accel_state->copy_area_bo = NULL; info->accel_state->vbo.vb_start_op = -1; info->accel_state->finish_op = r600_finish_op; info->accel_state->vbo.verts_per_op = 3; RADEONVlineHelperClear(pScrn); radeon_vbo_init_lists(pScrn); if (!R600AllocShaders(pScrn, pScreen)) return FALSE; if (!R600LoadShaders(pScrn)) return FALSE; exaMarkSync(pScreen); return TRUE; } xf86-video-ati-7.3.0/src/radeon_dri2.h0000664000175000017500000000543112177731114014255 00000000000000/* * Copyright 2008 Jerome Glisse * * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation on the rights to use, copy, modify, merge, * publish, distribute, 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 * NON-INFRINGEMENT. IN NO EVENT SHALL ATI, VA LINUX SYSTEMS AND/OR * THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ #ifndef RADEON_DRI2_H #define RADEON_DRI2_H #include struct radeon_dri2 { drmVersionPtr pKernelDRMVersion; int drm_fd; Bool available; Bool enabled; char *device_name; }; #ifdef DRI2 #include "dri2.h" Bool radeon_dri2_screen_init(ScreenPtr pScreen); void radeon_dri2_close_screen(ScreenPtr pScreen); int drmmode_get_crtc_id(xf86CrtcPtr crtc); void radeon_dri2_frame_event_handler(unsigned int frame, unsigned int tv_sec, unsigned int tv_usec, void *event_data); void radeon_dri2_flip_event_handler(unsigned int frame, unsigned int tv_sec, unsigned int tv_usec, void *event_data); #else static inline Bool radeon_dri2_screen_init(ScreenPtr pScreen) { return FALSE; } static inline void radeon_dri2_close_screen(ScreenPtr pScreen) {} static inline void radeon_dri2_dummy_event_handler(unsigned int frame, unsigned int tv_sec, unsigned int tv_usec, void *event_data, const char *name) { static Bool warned; if (!warned) { ErrorF("%s called but DRI2 disabled at build time\n", name); warned = TRUE; } free(event_data); } static inline void radeon_dri2_frame_event_handler(unsigned int frame, unsigned int tv_sec, unsigned int tv_usec, void *event_data) { radeon_dri2_dummy_event_handler(frame, tv_sec, tv_usec, event_data, __func__); } static inline void radeon_dri2_flip_event_handler(unsigned int frame, unsigned int tv_sec, unsigned int tv_usec, void *event_data) { radeon_dri2_dummy_event_handler(frame, tv_sec, tv_usec, event_data, __func__); } #endif #endif /* RADEON_DRI2_H */ xf86-video-ati-7.3.0/src/r600_reg_r7xx.h0000664000175000017500000001767112177731114014412 00000000000000/* * RadeonHD R6xx, R7xx Register documentation * * Copyright (C) 2008-2009 Advanced Micro Devices, Inc. * Copyright (C) 2008-2009 Matthias Hopf * * 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) 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 _R600_REG_R7xx_H_ #define _R600_REG_R7xx_H_ /* * Register update for R7xx chips */ enum { R7XX_MC_VM_FB_LOCATION = 0x00002024, // GRBM_STATUS = 0x00008010, R7XX_TA_BUSY_bit = 1 << 14, R7xx_SQ_DYN_GPR_CNTL_PS_FLUSH_REQ = 0x00008d8c, RING0_OFFSET_mask = 0xff << 0, RING0_OFFSET_shift = 0, ISOLATE_ES_ENABLE_bit = 1 << 12, ISOLATE_GS_ENABLE_bit = 1 << 13, VS_PC_LIMIT_ENABLE_bit = 1 << 14, // SQ_ALU_WORD0 = 0x00008dfc, // SRC0_SEL_mask = 0x1ff << 0, // SRC1_SEL_mask = 0x1ff << 13, R7xx_SQ_ALU_SRC_1_DBL_L = 0xf4, R7xx_SQ_ALU_SRC_1_DBL_M = 0xf5, R7xx_SQ_ALU_SRC_0_5_DBL_L = 0xf6, R7xx_SQ_ALU_SRC_0_5_DBL_M = 0xf7, // INDEX_MODE_mask = 0x07 << 26, R7xx_SQ_INDEX_GLOBAL = 0x05, R7xx_SQ_INDEX_GLOBAL_AR_X = 0x06, R6xx_SQ_ALU_WORD1_OP2 = 0x00008dfc, R7xx_SQ_ALU_WORD1_OP2_V2 = 0x00008dfc, R6xx_FOG_MERGE_bit = 1 << 5, R6xx_OMOD_mask = 0x03 << 6, R7xx_OMOD_mask = 0x03 << 5, R6xx_OMOD_shift = 6, R7xx_OMOD_shift = 5, R6xx_SQ_ALU_WORD1_OP2__ALU_INST_mask = 0x3ff << 8, R7xx_SQ_ALU_WORD1_OP2_V2__ALU_INST_mask = 0x7ff << 7, R6xx_SQ_ALU_WORD1_OP2__ALU_INST_shift = 8, R7xx_SQ_ALU_WORD1_OP2_V2__ALU_INST_shift = 7, R7xx_SQ_OP2_INST_FREXP_64 = 0x07, R7xx_SQ_OP2_INST_ADD_64 = 0x17, R7xx_SQ_OP2_INST_MUL_64 = 0x1b, R7xx_SQ_OP2_INST_FLT64_TO_FLT32 = 0x1c, R7xx_SQ_OP2_INST_FLT32_TO_FLT64 = 0x1d, R7xx_SQ_OP2_INST_LDEXP_64 = 0x7a, R7xx_SQ_OP2_INST_FRACT_64 = 0x7b, R7xx_SQ_OP2_INST_PRED_SETGT_64 = 0x7c, R7xx_SQ_OP2_INST_PRED_SETE_64 = 0x7d, R7xx_SQ_OP2_INST_PRED_SETGE_64 = 0x7e, // SQ_ALU_WORD1_OP3 = 0x00008dfc, // SRC2_SEL_mask = 0x1ff << 0, // R7xx_SQ_ALU_SRC_1_DBL_L = 0xf4, // R7xx_SQ_ALU_SRC_1_DBL_M = 0xf5, // R7xx_SQ_ALU_SRC_0_5_DBL_L = 0xf6, // R7xx_SQ_ALU_SRC_0_5_DBL_M = 0xf7, // SQ_ALU_WORD1_OP3__ALU_INST_mask = 0x1f << 13, R7xx_SQ_OP3_INST_MULADD_64 = 0x08, R7xx_SQ_OP3_INST_MULADD_64_M2 = 0x09, R7xx_SQ_OP3_INST_MULADD_64_M4 = 0x0a, R7xx_SQ_OP3_INST_MULADD_64_D2 = 0x0b, // SQ_CF_ALU_WORD1 = 0x00008dfc, R6xx_USES_WATERFALL_bit = 1 << 25, R7xx_SQ_CF_ALU_WORD1__ALT_CONST_bit = 1 << 25, // SQ_CF_ALLOC_EXPORT_WORD0 = 0x00008dfc, // ARRAY_BASE_mask = 0x1fff << 0, // TYPE_mask = 0x03 << 13, // SQ_EXPORT_PARAM = 0x02, // X_UNUSED_FOR_SX_EXPORTS = 0x03, // ELEM_SIZE_mask = 0x03 << 30, // SQ_CF_ALLOC_EXPORT_WORD1 = 0x00008dfc, // SQ_CF_ALLOC_EXPORT_WORD1__CF_INST_mask = 0x7f << 23, R7xx_SQ_CF_INST_MEM_EXPORT = 0x3a, // SQ_CF_WORD1 = 0x00008dfc, // SQ_CF_WORD1__COUNT_mask = 0x07 << 10, R7xx_COUNT_3_bit = 1 << 19, // SQ_CF_WORD1__CF_INST_mask = 0x7f << 23, R7xx_SQ_CF_INST_END_PROGRAM = 0x19, R7xx_SQ_CF_INST_WAIT_ACK = 0x1a, R7xx_SQ_CF_INST_TEX_ACK = 0x1b, R7xx_SQ_CF_INST_VTX_ACK = 0x1c, R7xx_SQ_CF_INST_VTX_TC_ACK = 0x1d, // SQ_VTX_WORD0 = 0x00008dfc, // VTX_INST_mask = 0x1f << 0, R7xx_SQ_VTX_INST_MEM = 0x02, // SQ_VTX_WORD2 = 0x00008dfc, R7xx_SQ_VTX_WORD2__ALT_CONST_bit = 1 << 20, // SQ_TEX_WORD0 = 0x00008dfc, // TEX_INST_mask = 0x1f << 0, R7xx_X_MEMORY_READ = 0x02, R7xx_SQ_TEX_INST_KEEP_GRADIENTS = 0x0a, R7xx_X_FETCH4_LOAD4_INSTRUCTION_FOR_DX10_1 = 0x0f, R7xx_SQ_TEX_WORD0__ALT_CONST_bit = 1 << 24, R7xx_PA_SC_EDGERULE = 0x00028230, R7xx_SPI_THREAD_GROUPING = 0x000286c8, PS_GROUPING_mask = 0x1f << 0, PS_GROUPING_shift = 0, VS_GROUPING_mask = 0x1f << 8, VS_GROUPING_shift = 8, GS_GROUPING_mask = 0x1f << 16, GS_GROUPING_shift = 16, ES_GROUPING_mask = 0x1f << 24, ES_GROUPING_shift = 24, R7xx_CB_SHADER_CONTROL = 0x000287a0, RT0_ENABLE_bit = 1 << 0, RT1_ENABLE_bit = 1 << 1, RT2_ENABLE_bit = 1 << 2, RT3_ENABLE_bit = 1 << 3, RT4_ENABLE_bit = 1 << 4, RT5_ENABLE_bit = 1 << 5, RT6_ENABLE_bit = 1 << 6, RT7_ENABLE_bit = 1 << 7, // DB_ALPHA_TO_MASK = 0x00028d44, R7xx_OFFSET_ROUND_bit = 1 << 16, // SQ_TEX_SAMPLER_MISC_0 = 0x0003d03c, R7xx_TRUNCATE_COORD_bit = 1 << 9, R7xx_DISABLE_CUBE_WRAP_bit = 1 << 10, } ; #endif /* _R600_REG_R7xx_H_ */ xf86-video-ati-7.3.0/src/r600_shader.c0000664000175000017500000031636712177731114014112 00000000000000/* * Copyright 2008 Advanced Micro Devices, 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: Alex Deucher * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "xf86.h" #include "radeon.h" #include "r600_shader.h" #include "r600_reg.h" /* solid vs --------------------------------------- */ int R600_solid_vs(RADEONChipFamily ChipSet, uint32_t* shader) { int i = 0; /* 0 */ shader[i++] = CF_DWORD0(ADDR(4)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(1), CALL_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_VTX), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 1 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_POS0), TYPE(SQ_EXPORT_POS), RW_GPR(1), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), R6xx_ELEM_LOOP(0), BURST_COUNT(1), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 2 - always export a param whether it's used or not */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(0), TYPE(SQ_EXPORT_PARAM), RW_GPR(0), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), R6xx_ELEM_LOOP(0), BURST_COUNT(0), END_OF_PROGRAM(1), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), WHOLE_QUAD_MODE(0), BARRIER(0)); /* 3 - padding */ shader[i++] = 0x00000000; shader[i++] = 0x00000000; /* 4/5 */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), MEGA_FETCH_COUNT(8)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(1), DST_REL(0), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_0), DST_SEL_W(SQ_SEL_1), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(0), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(SQ_ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), MEGA_FETCH(1)); shader[i++] = VTX_DWORD_PAD; return i; } /* solid ps --------------------------------------- */ int R600_solid_ps(RADEONChipFamily ChipSet, uint32_t* shader) { int i = 0; /* 0 */ shader[i++] = CF_ALU_DWORD0(ADDR(2), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_NOP)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(4), USES_WATERFALL(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 1 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_PIXEL_MRT0), TYPE(SQ_EXPORT_PIXEL), RW_GPR(0), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(1)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), R6xx_ELEM_LOOP(0), BURST_COUNT(1), END_OF_PROGRAM(1), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 2 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_CFILE_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(1)); /* 3 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_CFILE_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(1)); /* 4 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_CFILE_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(1)); /* 5 */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_CFILE_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MOV), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(1)); return i; } /* copy vs --------------------------------------- */ int R600_copy_vs(RADEONChipFamily ChipSet, uint32_t* shader) { int i = 0; /* 0 */ shader[i++] = CF_DWORD0(ADDR(4)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(2), CALL_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_VTX), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 1 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_POS0), TYPE(SQ_EXPORT_POS), RW_GPR(1), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), R6xx_ELEM_LOOP(0), BURST_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 2 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(0), TYPE(SQ_EXPORT_PARAM), RW_GPR(0), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), R6xx_ELEM_LOOP(0), BURST_COUNT(0), END_OF_PROGRAM(1), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), WHOLE_QUAD_MODE(0), BARRIER(0)); /* 3 */ shader[i++] = 0x00000000; shader[i++] = 0x00000000; /* 4/5 */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), MEGA_FETCH_COUNT(16)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(1), DST_REL(0), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_0), DST_SEL_W(SQ_SEL_1), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(0), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(SQ_ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), MEGA_FETCH(1)); shader[i++] = VTX_DWORD_PAD; /* 6/7 */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), MEGA_FETCH_COUNT(8)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(0), DST_REL(0), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_0), DST_SEL_W(SQ_SEL_1), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(8), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(SQ_ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), MEGA_FETCH(0)); shader[i++] = VTX_DWORD_PAD; return i; } /* copy ps --------------------------------------- */ int R600_copy_ps(RADEONChipFamily ChipSet, uint32_t* shader) { int i=0; /* CF INST 0 */ shader[i++] = CF_DWORD0(ADDR(2)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(1), CALL_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_TEX), WHOLE_QUAD_MODE(0), BARRIER(1)); /* CF INST 1 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_PIXEL_MRT0), TYPE(SQ_EXPORT_PIXEL), RW_GPR(0), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(1)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), R6xx_ELEM_LOOP(0), BURST_COUNT(1), END_OF_PROGRAM(1), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), WHOLE_QUAD_MODE(0), BARRIER(1)); /* TEX INST 0 */ shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE), BC_FRAC_MODE(0), FETCH_WHOLE_QUAD(0), RESOURCE_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), R7xx_ALT_CONST(0)); shader[i++] = TEX_DWORD1(DST_GPR(0), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_X), /* R */ DST_SEL_Y(SQ_SEL_Y), /* G */ DST_SEL_Z(SQ_SEL_Z), /* B */ DST_SEL_W(SQ_SEL_W), /* A */ LOD_BIAS(0), COORD_TYPE_X(TEX_UNNORMALIZED), COORD_TYPE_Y(TEX_UNNORMALIZED), COORD_TYPE_Z(TEX_UNNORMALIZED), COORD_TYPE_W(TEX_UNNORMALIZED)); shader[i++] = TEX_DWORD2(OFFSET_X(0), OFFSET_Y(0), OFFSET_Z(0), SAMPLER_ID(0), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1)); shader[i++] = TEX_DWORD_PAD; return i; } /* * ; xv vertex shader * 00 VTX: ADDR(4) CNT(2) * 0 VFETCH R1.xy01, R0.x, fc0 MEGA(16) FORMAT(32_32_FLOAT) * FORMAT_COMP(SIGNED) * 1 VFETCH R0.xy01, R0.x, fc0 MINI(8) OFFSET(8) FORMAT(32_32_FLOAT) * FORMAT_COMP(SIGNED) * 01 EXP_DONE: POS0, R1 * 02 EXP_DONE: PARAM0, R0 NO_BARRIER * END_OF_PROGRAM */ int R600_xv_vs(RADEONChipFamily ChipSet, uint32_t* shader) { int i = 0; /* 0 */ shader[i++] = CF_DWORD0(ADDR(6)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(2), CALL_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_VTX), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 1 - ALU */ shader[i++] = CF_ALU_DWORD0(ADDR(4), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_NOP)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(2), USES_WATERFALL(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 2 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_POS0), TYPE(SQ_EXPORT_POS), RW_GPR(1), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(3)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), R6xx_ELEM_LOOP(0), BURST_COUNT(1), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 3 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(0), TYPE(SQ_EXPORT_PARAM), RW_GPR(0), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(3)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), R6xx_ELEM_LOOP(0), BURST_COUNT(1), END_OF_PROGRAM(1), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), WHOLE_QUAD_MODE(0), BARRIER(0)); /* 4 texX / w */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 5 texY / h */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 6/7 */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), MEGA_FETCH_COUNT(16)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(1), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_0), DST_SEL_W(SQ_SEL_1), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(0), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(SQ_ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), MEGA_FETCH(1)); shader[i++] = VTX_DWORD_PAD; /* 8/9 */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), MEGA_FETCH_COUNT(8)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(0), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_0), DST_SEL_W(SQ_SEL_1), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(8), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(SQ_ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), MEGA_FETCH(0)); shader[i++] = VTX_DWORD_PAD; return i; } int R600_xv_ps(RADEONChipFamily ChipSet, uint32_t* shader) { int i = 0; /* 0 */ shader[i++] = CF_DWORD0(ADDR(16)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_BOOL), I_COUNT(0), CALL_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_CALL), WHOLE_QUAD_MODE(0), BARRIER(0)); /* 1 */ shader[i++] = CF_DWORD0(ADDR(24)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_NOT_BOOL), I_COUNT(0), CALL_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_CALL), WHOLE_QUAD_MODE(0), BARRIER(0)); /* 2 */ shader[i++] = CF_ALU_DWORD0(ADDR(4), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_NOP)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(12), USES_WATERFALL(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 3 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_PIXEL_MRT0), TYPE(SQ_EXPORT_PIXEL), RW_GPR(2), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(3)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), R6xx_ELEM_LOOP(0), BURST_COUNT(1), END_OF_PROGRAM(1), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 4,5,6,7 */ /* r2.x = MAD(c0.w, r1.x, c0.x) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_CFILE_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(ALU_SRC_CFILE_BASE + 0), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_X), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* r2.y = MAD(c0.w, r1.x, c0.y) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_CFILE_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(ALU_SRC_CFILE_BASE + 0), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_Y), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* r2.z = MAD(c0.w, r1.x, c0.z) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_CFILE_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(ALU_SRC_CFILE_BASE + 0), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_Z), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* r2.w = MAD(0, 0, 1) */ shader[i++] = ALU_DWORD0(SRC0_SEL(SQ_ALU_SRC_0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(SQ_ALU_SRC_0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_1), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_X), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 8,9,10,11 */ /* r2.x = MAD(c1.x, r1.y, pv.x) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_CFILE_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_PV), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_X), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* r2.y = MAD(c1.y, r1.y, pv.y) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_CFILE_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_PV), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_Y), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* r2.z = MAD(c1.z, r1.y, pv.z) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_CFILE_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_PV), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_Z), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* r2.w = MAD(0, 0, 1) */ shader[i++] = ALU_DWORD0(SRC0_SEL(SQ_ALU_SRC_0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(SQ_ALU_SRC_0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_1), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_W), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 12,13,14,15 */ /* r2.x = MAD(c2.x, r1.z, pv.x) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_CFILE_BASE + 2), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_PV), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_X), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(1)); /* r2.y = MAD(c2.y, r1.z, pv.y) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_CFILE_BASE + 2), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_PV), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_Y), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(1)); /* r2.z = MAD(c2.z, r1.z, pv.z) */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_CFILE_BASE + 2), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_PV), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_Z), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(1)); /* r2.w = MAD(0, 0, 1) */ shader[i++] = ALU_DWORD0(SRC0_SEL(SQ_ALU_SRC_0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(SQ_ALU_SRC_0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP3(SRC2_SEL(SQ_ALU_SRC_1), SRC2_REL(ABSOLUTE), SRC2_ELEM(ELEM_X), SRC2_NEG(0), ALU_INST(SQ_OP3_INST_MULADD), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(1)); /* 16 */ shader[i++] = CF_DWORD0(ADDR(18)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(3), CALL_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_TEX), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 17 */ shader[i++] = CF_DWORD0(ADDR(0)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), CALL_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_RETURN), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 18/19 */ shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE), BC_FRAC_MODE(0), FETCH_WHOLE_QUAD(0), RESOURCE_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), R7xx_ALT_CONST(0)); shader[i++] = TEX_DWORD1(DST_GPR(1), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_MASK), DST_SEL_Z(SQ_SEL_MASK), DST_SEL_W(SQ_SEL_1), LOD_BIAS(0), COORD_TYPE_X(TEX_NORMALIZED), COORD_TYPE_Y(TEX_NORMALIZED), COORD_TYPE_Z(TEX_NORMALIZED), COORD_TYPE_W(TEX_NORMALIZED)); shader[i++] = TEX_DWORD2(OFFSET_X(0), OFFSET_Y(0), OFFSET_Z(0), SAMPLER_ID(0), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1)); shader[i++] = TEX_DWORD_PAD; /* 20/21 */ shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE), BC_FRAC_MODE(0), FETCH_WHOLE_QUAD(0), RESOURCE_ID(1), SRC_GPR(0), SRC_REL(ABSOLUTE), R7xx_ALT_CONST(0)); shader[i++] = TEX_DWORD1(DST_GPR(1), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_MASK), DST_SEL_Y(SQ_SEL_MASK), DST_SEL_Z(SQ_SEL_X), DST_SEL_W(SQ_SEL_MASK), LOD_BIAS(0), COORD_TYPE_X(TEX_NORMALIZED), COORD_TYPE_Y(TEX_NORMALIZED), COORD_TYPE_Z(TEX_NORMALIZED), COORD_TYPE_W(TEX_NORMALIZED)); shader[i++] = TEX_DWORD2(OFFSET_X(0), OFFSET_Y(0), OFFSET_Z(0), SAMPLER_ID(1), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1)); shader[i++] = TEX_DWORD_PAD; /* 22/23 */ shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE), BC_FRAC_MODE(0), FETCH_WHOLE_QUAD(0), RESOURCE_ID(2), SRC_GPR(0), SRC_REL(ABSOLUTE), R7xx_ALT_CONST(0)); shader[i++] = TEX_DWORD1(DST_GPR(1), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_MASK), DST_SEL_Y(SQ_SEL_X), DST_SEL_Z(SQ_SEL_MASK), DST_SEL_W(SQ_SEL_MASK), LOD_BIAS(0), COORD_TYPE_X(TEX_NORMALIZED), COORD_TYPE_Y(TEX_NORMALIZED), COORD_TYPE_Z(TEX_NORMALIZED), COORD_TYPE_W(TEX_NORMALIZED)); shader[i++] = TEX_DWORD2(OFFSET_X(0), OFFSET_Y(0), OFFSET_Z(0), SAMPLER_ID(2), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1)); shader[i++] = TEX_DWORD_PAD; /* 24 */ shader[i++] = CF_DWORD0(ADDR(26)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(1), CALL_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_TEX), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 25 */ shader[i++] = CF_DWORD0(ADDR(0)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), CALL_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_RETURN), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 26/27 */ shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE), BC_FRAC_MODE(0), FETCH_WHOLE_QUAD(0), RESOURCE_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), R7xx_ALT_CONST(0)); shader[i++] = TEX_DWORD1(DST_GPR(1), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_Z), DST_SEL_W(SQ_SEL_1), LOD_BIAS(0), COORD_TYPE_X(TEX_NORMALIZED), COORD_TYPE_Y(TEX_NORMALIZED), COORD_TYPE_Z(TEX_NORMALIZED), COORD_TYPE_W(TEX_NORMALIZED)); shader[i++] = TEX_DWORD2(OFFSET_X(0), OFFSET_Y(0), OFFSET_Z(0), SAMPLER_ID(0), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1)); shader[i++] = TEX_DWORD_PAD; return i; } /* comp vs --------------------------------------- */ int R600_comp_vs(RADEONChipFamily ChipSet, uint32_t* shader) { int i = 0; /* 0 */ shader[i++] = CF_DWORD0(ADDR(3)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_BOOL), I_COUNT(0), CALL_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_CALL), WHOLE_QUAD_MODE(0), BARRIER(0)); /* 1 */ shader[i++] = CF_DWORD0(ADDR(9)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_NOT_BOOL), I_COUNT(0), CALL_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_CALL), WHOLE_QUAD_MODE(0), BARRIER(0)); /* 2 */ shader[i++] = CF_DWORD0(ADDR(0)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), CALL_COUNT(0), END_OF_PROGRAM(1), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_NOP), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 3 - mask sub */ shader[i++] = CF_DWORD0(ADDR(44)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(3), CALL_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_VTX), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 4 - ALU */ shader[i++] = CF_ALU_DWORD0(ADDR(14), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_NOP)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(20), USES_WATERFALL(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 5 - dst */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_POS0), TYPE(SQ_EXPORT_POS), RW_GPR(2), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1), R6xx_ELEM_LOOP(0), BURST_COUNT(1), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 6 - src */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(0), TYPE(SQ_EXPORT_PARAM), RW_GPR(1), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1), R6xx_ELEM_LOOP(0), BURST_COUNT(1), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT), WHOLE_QUAD_MODE(0), BARRIER(0)); /* 7 - mask */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(1), TYPE(SQ_EXPORT_PARAM), RW_GPR(0), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1), R6xx_ELEM_LOOP(0), BURST_COUNT(1), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), WHOLE_QUAD_MODE(0), BARRIER(0)); /* 8 */ shader[i++] = CF_DWORD0(ADDR(0)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), CALL_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_RETURN), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 9 - non-mask sub */ shader[i++] = CF_DWORD0(ADDR(50)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(2), CALL_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_VTX), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 10 - ALU */ shader[i++] = CF_ALU_DWORD0(ADDR(34), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_NOP)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(10), USES_WATERFALL(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 11 - dst */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_POS0), TYPE(SQ_EXPORT_POS), RW_GPR(1), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1), R6xx_ELEM_LOOP(0), BURST_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 12 - src */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(0), TYPE(SQ_EXPORT_PARAM), RW_GPR(0), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(0)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1), R6xx_ELEM_LOOP(0), BURST_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), WHOLE_QUAD_MODE(0), BARRIER(0)); /* 13 */ shader[i++] = CF_DWORD0(ADDR(0)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), CALL_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_RETURN), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 14 srcX.x DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(3), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 15 srcX.y DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(3), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 16 srcX.z DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(3), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 17 srcX.w DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(3), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 18 srcY.x DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(3), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 19 srcY.y DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(3), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 20 srcY.z DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(3), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 21 srcY.w DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(3), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 22 maskX.x DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 2), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(4), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 23 maskX.y DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 2), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(4), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 24 maskX.z DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 2), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(4), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 25 maskX.w DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 2), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(4), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 26 maskY.x DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 3), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(4), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 27 maskY.y DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 3), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(4), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 28 maskY.z DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 3), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(4), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 29 maskY.w DOT4 - mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 3), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(4), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 30 srcX / w */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 3), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(1), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 31 srcY / h */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 3), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(1), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 32 maskX / w */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 4), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 2), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 33 maskY / h */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 4), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 3), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 34 srcX.x DOT4 - non-mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 35 srcX.y DOT4 - non-mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 36 srcX.z DOT4 - non-mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 37 srcX.w DOT4 - non-mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 38 srcY.x DOT4 - non-mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 39 srcY.y DOT4 - non-mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 40 srcY.z DOT4 - non-mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(0)); /* 41 srcY.w DOT4 - non-mask */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 0), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(0), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_DOT4), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(0)); /* 42 srcX / w */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 2), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(0)); /* 43 srcY / h */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 2), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_CFILE_BASE + 1), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_AR_X), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(0), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(0)); /* 44/45 - dst - mask */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), MEGA_FETCH_COUNT(24)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(2), DST_REL(0), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_0), DST_SEL_W(SQ_SEL_1), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(0), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(SQ_ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), MEGA_FETCH(1)); shader[i++] = VTX_DWORD_PAD; /* 46/47 - src */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), MEGA_FETCH_COUNT(8)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(1), DST_REL(0), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_1), DST_SEL_W(SQ_SEL_0), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(8), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(SQ_ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), MEGA_FETCH(0)); shader[i++] = VTX_DWORD_PAD; /* 48/49 - mask */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), MEGA_FETCH_COUNT(8)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(0), DST_REL(0), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_1), DST_SEL_W(SQ_SEL_0), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(16), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(SQ_ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), MEGA_FETCH(0)); shader[i++] = VTX_DWORD_PAD; /* 50/51 - dst - non-mask */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), MEGA_FETCH_COUNT(16)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(1), DST_REL(0), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_0), DST_SEL_W(SQ_SEL_1), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(0), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(SQ_ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), MEGA_FETCH(1)); shader[i++] = VTX_DWORD_PAD; /* 52/53 - src */ shader[i++] = VTX_DWORD0(VTX_INST(SQ_VTX_INST_FETCH), FETCH_TYPE(SQ_VTX_FETCH_VERTEX_DATA), FETCH_WHOLE_QUAD(0), BUFFER_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), SRC_SEL_X(SQ_SEL_X), MEGA_FETCH_COUNT(8)); shader[i++] = VTX_DWORD1_GPR(DST_GPR(0), DST_REL(0), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_1), DST_SEL_W(SQ_SEL_0), USE_CONST_FIELDS(0), DATA_FORMAT(FMT_32_32_FLOAT), NUM_FORMAT_ALL(SQ_NUM_FORMAT_SCALED), FORMAT_COMP_ALL(SQ_FORMAT_COMP_SIGNED), SRF_MODE_ALL(SRF_MODE_ZERO_CLAMP_MINUS_ONE)); shader[i++] = VTX_DWORD2(OFFSET(8), #if X_BYTE_ORDER == X_BIG_ENDIAN ENDIAN_SWAP(SQ_ENDIAN_8IN32), #else ENDIAN_SWAP(SQ_ENDIAN_NONE), #endif CONST_BUF_NO_STRIDE(0), MEGA_FETCH(0)); shader[i++] = VTX_DWORD_PAD; return i; } /* comp ps --------------------------------------- */ int R600_comp_ps(RADEONChipFamily ChipSet, uint32_t* shader) { int i = 0; /* 0 */ shader[i++] = CF_DWORD0(ADDR(3)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_BOOL), I_COUNT(0), CALL_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_CALL), WHOLE_QUAD_MODE(0), BARRIER(0)); /* 1 */ shader[i++] = CF_DWORD0(ADDR(7)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_NOT_BOOL), I_COUNT(0), CALL_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_CALL), WHOLE_QUAD_MODE(0), BARRIER(0)); /* 2 */ shader[i++] = CF_DWORD0(ADDR(0)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), CALL_COUNT(0), END_OF_PROGRAM(1), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_NOP), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 3 - mask sub */ shader[i++] = CF_DWORD0(ADDR(14)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(2), CALL_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_TEX), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 4 */ shader[i++] = CF_ALU_DWORD0(ADDR(10), KCACHE_BANK0(0), KCACHE_BANK1(0), KCACHE_MODE0(SQ_CF_KCACHE_NOP)); shader[i++] = CF_ALU_DWORD1(KCACHE_MODE1(SQ_CF_KCACHE_NOP), KCACHE_ADDR0(0), KCACHE_ADDR1(0), I_COUNT(4), USES_WATERFALL(0), CF_INST(SQ_CF_INST_ALU), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 5 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_PIXEL_MRT0), TYPE(SQ_EXPORT_PIXEL), RW_GPR(2), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(1)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), R6xx_ELEM_LOOP(0), BURST_COUNT(1), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 6 */ shader[i++] = CF_DWORD0(ADDR(0)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), CALL_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_RETURN), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 7 non-mask sub */ shader[i++] = CF_DWORD0(ADDR(18)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(1), CALL_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_TEX), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 8 */ shader[i++] = CF_ALLOC_IMP_EXP_DWORD0(ARRAY_BASE(CF_PIXEL_MRT0), TYPE(SQ_EXPORT_PIXEL), RW_GPR(0), RW_REL(ABSOLUTE), INDEX_GPR(0), ELEM_SIZE(1)); shader[i++] = CF_ALLOC_IMP_EXP_DWORD1_SWIZ(SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_Z), SRC_SEL_W(SQ_SEL_W), R6xx_ELEM_LOOP(0), BURST_COUNT(1), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_EXPORT_DONE), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 9 */ shader[i++] = CF_DWORD0(ADDR(0)); shader[i++] = CF_DWORD1(POP_COUNT(0), CF_CONST(0), COND(SQ_CF_COND_ACTIVE), I_COUNT(0), CALL_COUNT(0), END_OF_PROGRAM(0), VALID_PIXEL_MODE(0), CF_INST(SQ_CF_INST_RETURN), WHOLE_QUAD_MODE(0), BARRIER(1)); /* 10 - alu 0 */ /* MUL gpr[2].x gpr[1].x gpr[0].x */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_X), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_X), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_X), CLAMP(1)); /* 11 - alu 1 */ /* MUL gpr[2].y gpr[1].y gpr[0].y */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Y), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Y), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Y), CLAMP(1)); /* 12 - alu 2 */ /* MUL gpr[2].z gpr[1].z gpr[0].z */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_Z), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_Z), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(0)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_Z), CLAMP(1)); /* 13 - alu 3 */ /* MUL gpr[2].w gpr[1].w gpr[0].w */ shader[i++] = ALU_DWORD0(SRC0_SEL(ALU_SRC_GPR_BASE + 1), SRC0_REL(ABSOLUTE), SRC0_ELEM(ELEM_W), SRC0_NEG(0), SRC1_SEL(ALU_SRC_GPR_BASE + 0), SRC1_REL(ABSOLUTE), SRC1_ELEM(ELEM_W), SRC1_NEG(0), INDEX_MODE(SQ_INDEX_LOOP), PRED_SEL(SQ_PRED_SEL_OFF), LAST(1)); shader[i++] = ALU_DWORD1_OP2(ChipSet, SRC0_ABS(0), SRC1_ABS(0), UPDATE_EXECUTE_MASK(0), UPDATE_PRED(0), WRITE_MASK(1), FOG_MERGE(0), OMOD(SQ_ALU_OMOD_OFF), ALU_INST(SQ_OP2_INST_MUL), BANK_SWIZZLE(SQ_ALU_VEC_012), DST_GPR(2), DST_REL(ABSOLUTE), DST_ELEM(ELEM_W), CLAMP(1)); /* 14/15 - src - mask */ shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE), BC_FRAC_MODE(0), FETCH_WHOLE_QUAD(0), RESOURCE_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), R7xx_ALT_CONST(0)); shader[i++] = TEX_DWORD1(DST_GPR(0), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_Z), DST_SEL_W(SQ_SEL_W), LOD_BIAS(0), COORD_TYPE_X(TEX_NORMALIZED), COORD_TYPE_Y(TEX_NORMALIZED), COORD_TYPE_Z(TEX_NORMALIZED), COORD_TYPE_W(TEX_NORMALIZED)); shader[i++] = TEX_DWORD2(OFFSET_X(0), OFFSET_Y(0), OFFSET_Z(0), SAMPLER_ID(0), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1)); shader[i++] = TEX_DWORD_PAD; /* 16/17 - mask */ shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE), BC_FRAC_MODE(0), FETCH_WHOLE_QUAD(0), RESOURCE_ID(1), SRC_GPR(1), SRC_REL(ABSOLUTE), R7xx_ALT_CONST(0)); shader[i++] = TEX_DWORD1(DST_GPR(1), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_Z), DST_SEL_W(SQ_SEL_W), LOD_BIAS(0), COORD_TYPE_X(TEX_NORMALIZED), COORD_TYPE_Y(TEX_NORMALIZED), COORD_TYPE_Z(TEX_NORMALIZED), COORD_TYPE_W(TEX_NORMALIZED)); shader[i++] = TEX_DWORD2(OFFSET_X(0), OFFSET_Y(0), OFFSET_Z(0), SAMPLER_ID(1), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1)); shader[i++] = TEX_DWORD_PAD; /* 18/19 - src - non-mask */ shader[i++] = TEX_DWORD0(TEX_INST(SQ_TEX_INST_SAMPLE), BC_FRAC_MODE(0), FETCH_WHOLE_QUAD(0), RESOURCE_ID(0), SRC_GPR(0), SRC_REL(ABSOLUTE), R7xx_ALT_CONST(0)); shader[i++] = TEX_DWORD1(DST_GPR(0), DST_REL(ABSOLUTE), DST_SEL_X(SQ_SEL_X), DST_SEL_Y(SQ_SEL_Y), DST_SEL_Z(SQ_SEL_Z), DST_SEL_W(SQ_SEL_W), LOD_BIAS(0), COORD_TYPE_X(TEX_NORMALIZED), COORD_TYPE_Y(TEX_NORMALIZED), COORD_TYPE_Z(TEX_NORMALIZED), COORD_TYPE_W(TEX_NORMALIZED)); shader[i++] = TEX_DWORD2(OFFSET_X(0), OFFSET_Y(0), OFFSET_Z(0), SAMPLER_ID(0), SRC_SEL_X(SQ_SEL_X), SRC_SEL_Y(SQ_SEL_Y), SRC_SEL_Z(SQ_SEL_0), SRC_SEL_W(SQ_SEL_1)); shader[i++] = TEX_DWORD_PAD; return i; } xf86-video-ati-7.3.0/src/radeon_video.h0000664000175000017500000000471012177731114014522 00000000000000#ifndef __RADEON_VIDEO_H__ #define __RADEON_VIDEO_H__ #include "xf86i2c.h" #include "i2c_def.h" #include "xf86Crtc.h" #include "bicubic_table.h" #include #define ClipValue(v,min,max) ((v) < (min) ? (min) : (v) > (max) ? (max) : (v)) /* Xvideo port struct */ typedef struct { uint32_t transform_index; uint32_t gamma; /* gamma value x 1000 */ int brightness; int saturation; int hue; int contrast; unsigned char currentBuffer; RegionRec clip; Time offTime; Time freeTime; xf86CrtcPtr desired_crtc; int size; struct radeon_bo *video_memory; int planeu_offset; int planev_offset; /* bicubic filtering */ Bool bicubic_enabled; int bicubic_state; #define BICUBIC_OFF 0 #define BICUBIC_ON 1 #define BICUBIC_AUTO 2 /* textured video */ Bool textured; DrawablePtr pDraw; PixmapPtr pPixmap; uint32_t src_pitch; uint8_t *src_addr; int id; int src_w, src_h, dst_w, dst_h; int w, h; int drw_x, drw_y; int src_x, src_y; int vsync; Bool is_planar; int vtx_count; int hw_align; struct radeon_bo *src_bo[2]; } RADEONPortPrivRec, *RADEONPortPrivPtr; /* Reference color space transform data */ typedef struct tagREF_TRANSFORM { float RefLuma; float RefRCb; float RefRCr; float RefGCb; float RefGCr; float RefBCb; float RefBCr; } REF_TRANSFORM; #define RTFSaturation(a) (1.0 + ((a)*1.0)/1000.0) #define RTFBrightness(a) (((a)*1.0)/2000.0) #define RTFIntensity(a) (((a)*1.0)/2000.0) #define RTFContrast(a) (1.0 + ((a)*1.0)/1000.0) #define RTFHue(a) (((a)*3.1416)/1000.0) XF86VideoAdaptorPtr RADEONSetupImageTexturedVideo(ScreenPtr pScreen); XF86MCAdaptorPtr RADEONCreateAdaptorXvMC(ScreenPtr pScreen, char *xv_adaptor_name); void RADEONCopyData(ScrnInfoPtr pScrn, unsigned char *src, unsigned char *dst, unsigned int srcPitch, unsigned int dstPitch, unsigned int h, unsigned int w, unsigned int bpp); void RADEONCopyMungedData(ScrnInfoPtr pScrn, unsigned char *src1, unsigned char *src2, unsigned char *src3, unsigned char *dst1, unsigned int srcPitch, unsigned int srcPitch2, unsigned int dstPitch, unsigned int h, unsigned int w); Bool radeon_crtc_is_enabled(xf86CrtcPtr crtc); uint32_t radeon_get_interpolated_vblanks(xf86CrtcPtr crtc); #endif xf86-video-ati-7.3.0/src/radeon_probe.h0000664000175000017500000001144212240725243014520 00000000000000/* * Copyright 2000 ATI Technologies Inc., Markham, Ontario, and * VA Linux Systems Inc., Fremont, California. * * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation on the rights to use, copy, modify, merge, * publish, distribute, 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 * NON-INFRINGEMENT. IN NO EVENT SHALL ATI, VA LINUX SYSTEMS AND/OR * THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ /* * Authors: * Kevin E. Martin * * Modified by Marc Aurele La France for ATI driver merge. */ #ifndef _RADEON_PROBE_H_ #define _RADEON_PROBE_H_ 1 #include #include "xf86str.h" #include "xf86DDC.h" #include "randrstr.h" #include "xf86Crtc.h" #include "compat-api.h" #include "exa.h" extern DriverRec RADEON; typedef enum { CHIP_FAMILY_UNKNOW, CHIP_FAMILY_LEGACY, CHIP_FAMILY_RADEON, CHIP_FAMILY_RV100, CHIP_FAMILY_RS100, /* U1 (IGP320M) or A3 (IGP320)*/ CHIP_FAMILY_RV200, CHIP_FAMILY_RS200, /* U2 (IGP330M/340M/350M) or A4 (IGP330/340/345/350), RS250 (IGP 7000) */ CHIP_FAMILY_R200, CHIP_FAMILY_RV250, CHIP_FAMILY_RS300, /* RS300/RS350 */ CHIP_FAMILY_RV280, CHIP_FAMILY_R300, CHIP_FAMILY_R350, CHIP_FAMILY_RV350, CHIP_FAMILY_RV380, /* RV370/RV380/M22/M24 */ CHIP_FAMILY_R420, /* R420/R423/M18 */ CHIP_FAMILY_RV410, /* RV410, M26 */ CHIP_FAMILY_RS400, /* xpress 200, 200m (RS400) Intel */ CHIP_FAMILY_RS480, /* xpress 200, 200m (RS410/480/482/485) AMD */ CHIP_FAMILY_RV515, /* rv515 */ CHIP_FAMILY_R520, /* r520 */ CHIP_FAMILY_RV530, /* rv530 */ CHIP_FAMILY_R580, /* r580 */ CHIP_FAMILY_RV560, /* rv560 */ CHIP_FAMILY_RV570, /* rv570 */ CHIP_FAMILY_RS600, CHIP_FAMILY_RS690, CHIP_FAMILY_RS740, CHIP_FAMILY_R600, /* r600 */ CHIP_FAMILY_RV610, CHIP_FAMILY_RV630, CHIP_FAMILY_RV670, CHIP_FAMILY_RV620, CHIP_FAMILY_RV635, CHIP_FAMILY_RS780, CHIP_FAMILY_RS880, CHIP_FAMILY_RV770, /* r700 */ CHIP_FAMILY_RV730, CHIP_FAMILY_RV710, CHIP_FAMILY_RV740, CHIP_FAMILY_CEDAR, /* evergreen */ CHIP_FAMILY_REDWOOD, CHIP_FAMILY_JUNIPER, CHIP_FAMILY_CYPRESS, CHIP_FAMILY_HEMLOCK, CHIP_FAMILY_PALM, CHIP_FAMILY_SUMO, CHIP_FAMILY_SUMO2, CHIP_FAMILY_BARTS, CHIP_FAMILY_TURKS, CHIP_FAMILY_CAICOS, CHIP_FAMILY_CAYMAN, CHIP_FAMILY_ARUBA, CHIP_FAMILY_TAHITI, CHIP_FAMILY_PITCAIRN, CHIP_FAMILY_VERDE, CHIP_FAMILY_OLAND, CHIP_FAMILY_HAINAN, CHIP_FAMILY_BONAIRE, CHIP_FAMILY_KAVERI, CHIP_FAMILY_KABINI, CHIP_FAMILY_HAWAII, CHIP_FAMILY_LAST } RADEONChipFamily; typedef struct { uint32_t pci_device_id; RADEONChipFamily chip_family; int mobility; int igp; int nocrtc2; int nointtvout; int singledac; } RADEONCardInfo; typedef struct { Bool HasSecondary; Bool HasCRTC2; /* All cards except original Radeon */ ScrnInfoPtr pSecondaryScrn; ScrnInfoPtr pPrimaryScrn; int fd; /* for sharing across zaphod heads */ int fd_ref; unsigned long fd_wakeup_registered; /* server generation for which fd has been registered for wakeup handling */ int fd_wakeup_ref; } RADEONEntRec, *RADEONEntPtr; extern const OptionInfoRec *RADEONOptionsWeak(void); extern Bool RADEONPreInit_KMS(ScrnInfoPtr, int); extern Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL); extern Bool RADEONSwitchMode_KMS(SWITCH_MODE_ARGS_DECL); extern void RADEONAdjustFrame_KMS(ADJUST_FRAME_ARGS_DECL); extern Bool RADEONEnterVT_KMS(VT_FUNC_ARGS_DECL); extern void RADEONLeaveVT_KMS(VT_FUNC_ARGS_DECL); extern void RADEONFreeScreen_KMS(FREE_SCREEN_ARGS_DECL); extern ModeStatus RADEONValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flag); #endif /* _RADEON_PROBE_H_ */ xf86-video-ati-7.3.0/src/compat-api.h0000664000175000017500000000647612177731114014131 00000000000000/* * 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 #ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR #define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum] #define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p #endif #ifndef XF86_HAS_SCRN_CONV #define xf86ScreenToScrn(s) xf86Screens[(s)->myNum] #define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex] #endif #ifndef XF86_SCRN_INTERFACE #define SCRN_ARG_TYPE int #define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)] #define SCREEN_ARG_TYPE int #define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)] #define SCREEN_INIT_ARGS_DECL int i, ScreenPtr pScreen, int argc, char **argv #define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask #define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask #define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen #define CLOSE_SCREEN_ARGS scrnIndex, pScreen #define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags #define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr mode, int flags #define FREE_SCREEN_ARGS_DECL int arg, int flags #define VT_FUNC_ARGS_DECL int arg, int flags #define VT_FUNC_ARGS(flags) pScrn->scrnIndex, (flags) #define XF86_ENABLEDISABLEFB_ARG(x) ((x)->scrnIndex) #else #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 #define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask #define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask #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 VT_FUNC_ARGS_DECL ScrnInfoPtr arg #define VT_FUNC_ARGS(flags) pScrn #define XF86_ENABLEDISABLEFB_ARG(x) (x) #endif #endif xf86-video-ati-7.3.0/src/bicubic_table.h0000664000175000017500000005134712177731114014643 00000000000000static const uint16_t bicubic_tex_512[] = { 0xb266, 0x3c00, 0x3aaa, 0x3155, 0xb287, 0x3bf0, 0x3aa2, 0x3175, 0xb2a9, 0x3be0, 0x3a9a, 0x3196, 0xb2cc, 0x3bd0, 0x3a92, 0x31b7, 0xb2ee, 0x3bc0, 0x3a89, 0x31d9, 0xb312, 0x3bb0, 0x3a81, 0x31fb, 0xb335, 0x3ba0, 0x3a78, 0x321e, 0xb359, 0x3b90, 0x3a6f, 0x3241, 0xb37d, 0x3b80, 0x3a66, 0x3264, 0xb3a2, 0x3b70, 0x3a5d, 0x3288, 0xb3c7, 0x3b60, 0x3a54, 0x32ad, 0xb3ed, 0x3b51, 0x3a4b, 0x32d1, 0xb409, 0x3b41, 0x3a42, 0x32f7, 0xb41c, 0x3b31, 0x3a38, 0x331c, 0xb42f, 0x3b21, 0x3a2f, 0x3342, 0xb443, 0x3b12, 0x3a25, 0x3369, 0xb456, 0x3b02, 0x3a1c, 0x3390, 0xb46a, 0x3af3, 0x3a12, 0x33b7, 0xb47e, 0x3ae3, 0x3a08, 0x33de, 0xb492, 0x3ad4, 0x39fe, 0x3403, 0xb4a6, 0x3ac5, 0x39f4, 0x3417, 0xb4bb, 0x3ab5, 0x39ea, 0x342b, 0xb4cf, 0x3aa6, 0x39df, 0x3440, 0xb4e4, 0x3a97, 0x39d5, 0x3454, 0xb4f9, 0x3a88, 0x39cb, 0x3469, 0xb50e, 0x3a79, 0x39c0, 0x347e, 0xb523, 0x3a6a, 0x39b6, 0x3493, 0xb539, 0x3a5a, 0x39ab, 0x34a8, 0xb54e, 0x3a4c, 0x39a0, 0x34be, 0xb564, 0x3a3d, 0x3996, 0x34d3, 0xb57a, 0x3a2e, 0x398b, 0x34e9, 0xb590, 0x3a1f, 0x3980, 0x34ff, 0xb5a6, 0x3a10, 0x3975, 0x3515, 0xb5bc, 0x3a02, 0x396a, 0x352b, 0xb5d2, 0x39f3, 0x395f, 0x3541, 0xb5e9, 0x39e4, 0x3954, 0x3557, 0xb5ff, 0x39d6, 0x3948, 0x356e, 0xb616, 0x39c7, 0x393d, 0x3584, 0xb62d, 0x39b9, 0x3932, 0x359b, 0xb644, 0x39ab, 0x3926, 0x35b2, 0xb65b, 0x399c, 0x391b, 0x35c9, 0xb672, 0x398e, 0x3910, 0x35df, 0xb68a, 0x3980, 0x3904, 0x35f6, 0xb6a1, 0x3972, 0x38f8, 0x360e, 0xb6b9, 0x3964, 0x38ed, 0x3625, 0xb6d1, 0x3956, 0x38e1, 0x363c, 0xb6e8, 0x3948, 0x38d6, 0x3653, 0xb700, 0x393a, 0x38ca, 0x366b, 0xb719, 0x392c, 0x38be, 0x3682, 0xb731, 0x391e, 0x38b2, 0x369a, 0xb749, 0x3910, 0x38a7, 0x36b1, 0xb762, 0x3902, 0x389b, 0x36c9, 0xb77a, 0x38f5, 0x388f, 0x36e1, 0xb793, 0x38e7, 0x3883, 0x36f8, 0xb7ac, 0x38da, 0x3877, 0x3710, 0xb7c5, 0x38cc, 0x386b, 0x3728, 0xb7de, 0x38bf, 0x385f, 0x3740, 0xb7f7, 0x38b1, 0x3853, 0x3758, 0xb808, 0x38a4, 0x3847, 0x3770, 0xb815, 0x3897, 0x383b, 0x3788, 0xb821, 0x3889, 0x382f, 0x37a0, 0xb82e, 0x387c, 0x3823, 0x37b8, 0xb83b, 0x386f, 0x3817, 0x37d0, 0xb848, 0x3862, 0x380b, 0x37e8, 0xb855, 0x3855, 0x3800, 0x3800, 0xb862, 0x3848, 0x37e8, 0x380b, 0xb86f, 0x383b, 0x37d0, 0x3817, 0xb87c, 0x382e, 0x37b8, 0x3823, 0xb889, 0x3821, 0x37a0, 0x382f, 0xb897, 0x3815, 0x3788, 0x383b, 0xb8a4, 0x3808, 0x3770, 0x3847, 0xb8b1, 0x37f7, 0x3758, 0x3853, 0xb8bf, 0x37de, 0x3740, 0x385f, 0xb8cc, 0x37c5, 0x3728, 0x386b, 0xb8da, 0x37ac, 0x3710, 0x3877, 0xb8e7, 0x3793, 0x36f8, 0x3883, 0xb8f5, 0x377a, 0x36e1, 0x388f, 0xb902, 0x3762, 0x36c9, 0x389b, 0xb910, 0x3749, 0x36b1, 0x38a7, 0xb91e, 0x3731, 0x369a, 0x38b2, 0xb92c, 0x3719, 0x3682, 0x38be, 0xb93a, 0x3700, 0x366b, 0x38ca, 0xb948, 0x36e8, 0x3653, 0x38d6, 0xb956, 0x36d1, 0x363c, 0x38e1, 0xb964, 0x36b9, 0x3625, 0x38ed, 0xb972, 0x36a1, 0x360e, 0x38f8, 0xb980, 0x368a, 0x35f6, 0x3904, 0xb98e, 0x3672, 0x35df, 0x3910, 0xb99c, 0x365b, 0x35c9, 0x391b, 0xb9ab, 0x3644, 0x35b2, 0x3926, 0xb9b9, 0x362d, 0x359b, 0x3932, 0xb9c7, 0x3616, 0x3584, 0x393d, 0xb9d6, 0x35ff, 0x356e, 0x3948, 0xb9e4, 0x35e9, 0x3557, 0x3954, 0xb9f3, 0x35d2, 0x3541, 0x395f, 0xba02, 0x35bc, 0x352b, 0x396a, 0xba10, 0x35a6, 0x3515, 0x3975, 0xba1f, 0x3590, 0x34ff, 0x3980, 0xba2e, 0x357a, 0x34e9, 0x398b, 0xba3d, 0x3564, 0x34d3, 0x3996, 0xba4c, 0x354e, 0x34be, 0x39a0, 0xba5a, 0x3539, 0x34a8, 0x39ab, 0xba6a, 0x3523, 0x3493, 0x39b6, 0xba79, 0x350e, 0x347e, 0x39c0, 0xba88, 0x34f9, 0x3469, 0x39cb, 0xba97, 0x34e4, 0x3454, 0x39d5, 0xbaa6, 0x34cf, 0x3440, 0x39df, 0xbab5, 0x34bb, 0x342b, 0x39ea, 0xbac5, 0x34a6, 0x3417, 0x39f4, 0xbad4, 0x3492, 0x3403, 0x39fe, 0xbae3, 0x347e, 0x33de, 0x3a08, 0xbaf3, 0x346a, 0x33b7, 0x3a12, 0xbb02, 0x3456, 0x3390, 0x3a1c, 0xbb12, 0x3443, 0x3369, 0x3a25, 0xbb21, 0x342f, 0x3342, 0x3a2f, 0xbb31, 0x341c, 0x331c, 0x3a38, 0xbb41, 0x3409, 0x32f7, 0x3a42, 0xbb51, 0x33ed, 0x32d1, 0x3a4b, 0xbb60, 0x33c7, 0x32ad, 0x3a54, 0xbb70, 0x33a2, 0x3288, 0x3a5d, 0xbb80, 0x337d, 0x3264, 0x3a66, 0xbb90, 0x3359, 0x3241, 0x3a6f, 0xbba0, 0x3335, 0x321e, 0x3a78, 0xbbb0, 0x3312, 0x31fb, 0x3a81, 0xbbc0, 0x32ee, 0x31d9, 0x3a89, 0xbbd0, 0x32cc, 0x31b7, 0x3a92, 0xbbe0, 0x32a9, 0x3196, 0x3a9a, 0xbbf0, 0x3287, 0x3175, 0x3aa2, 0 }; static const uint16_t bicubic_tex_2048[] = { 0xb266, 0x3c00, 0x3aaa, 0x3155, 0xb26e, 0x3bfc, 0x3aa8, 0x315d, 0xb277, 0x3bf8, 0x3aa6, 0x3165, 0xb27f, 0x3bf4, 0x3aa4, 0x316d, 0xb287, 0x3bf0, 0x3aa2, 0x3175, 0xb290, 0x3bec, 0x3aa0, 0x317d, 0xb298, 0x3be8, 0x3a9e, 0x3185, 0xb2a1, 0x3be4, 0x3a9c, 0x318e, 0xb2a9, 0x3be0, 0x3a9a, 0x3196, 0xb2b2, 0x3bdc, 0x3a98, 0x319e, 0xb2ba, 0x3bd8, 0x3a96, 0x31a6, 0xb2c3, 0x3bd4, 0x3a94, 0x31af, 0xb2cc, 0x3bd0, 0x3a92, 0x31b7, 0xb2d4, 0x3bcc, 0x3a90, 0x31bf, 0xb2dd, 0x3bc8, 0x3a8d, 0x31c8, 0xb2e6, 0x3bc4, 0x3a8b, 0x31d0, 0xb2ee, 0x3bc0, 0x3a89, 0x31d9, 0xb2f7, 0x3bbc, 0x3a87, 0x31e1, 0xb300, 0x3bb8, 0x3a85, 0x31ea, 0xb309, 0x3bb4, 0x3a83, 0x31f2, 0xb312, 0x3bb0, 0x3a81, 0x31fb, 0xb31a, 0x3bac, 0x3a7e, 0x3204, 0xb323, 0x3ba8, 0x3a7c, 0x320c, 0xb32c, 0x3ba4, 0x3a7a, 0x3215, 0xb335, 0x3ba0, 0x3a78, 0x321e, 0xb33e, 0x3b9c, 0x3a76, 0x3226, 0xb347, 0x3b98, 0x3a74, 0x322f, 0xb350, 0x3b94, 0x3a71, 0x3238, 0xb359, 0x3b90, 0x3a6f, 0x3241, 0xb362, 0x3b8c, 0x3a6d, 0x3249, 0xb36b, 0x3b88, 0x3a6b, 0x3252, 0xb374, 0x3b84, 0x3a69, 0x325b, 0xb37d, 0x3b80, 0x3a66, 0x3264, 0xb387, 0x3b7c, 0x3a64, 0x326d, 0xb390, 0x3b78, 0x3a62, 0x3276, 0xb399, 0x3b74, 0x3a60, 0x327f, 0xb3a2, 0x3b70, 0x3a5d, 0x3288, 0xb3ab, 0x3b6c, 0x3a5b, 0x3291, 0xb3b5, 0x3b68, 0x3a59, 0x329a, 0xb3be, 0x3b64, 0x3a57, 0x32a3, 0xb3c7, 0x3b60, 0x3a54, 0x32ad, 0xb3d0, 0x3b5c, 0x3a52, 0x32b6, 0xb3da, 0x3b58, 0x3a50, 0x32bf, 0xb3e3, 0x3b54, 0x3a4d, 0x32c8, 0xb3ed, 0x3b51, 0x3a4b, 0x32d1, 0xb3f6, 0x3b4d, 0x3a49, 0x32db, 0xb3ff, 0x3b49, 0x3a46, 0x32e4, 0xb404, 0x3b45, 0x3a44, 0x32ed, 0xb409, 0x3b41, 0x3a42, 0x32f7, 0xb40e, 0x3b3d, 0x3a3f, 0x3300, 0xb412, 0x3b39, 0x3a3d, 0x3309, 0xb417, 0x3b35, 0x3a3b, 0x3313, 0xb41c, 0x3b31, 0x3a38, 0x331c, 0xb421, 0x3b2d, 0x3a36, 0x3326, 0xb426, 0x3b29, 0x3a34, 0x332f, 0xb42a, 0x3b25, 0x3a31, 0x3339, 0xb42f, 0x3b21, 0x3a2f, 0x3342, 0xb434, 0x3b1e, 0x3a2c, 0x334c, 0xb439, 0x3b1a, 0x3a2a, 0x3355, 0xb43e, 0x3b16, 0x3a28, 0x335f, 0xb443, 0x3b12, 0x3a25, 0x3369, 0xb448, 0x3b0e, 0x3a23, 0x3372, 0xb44d, 0x3b0a, 0x3a20, 0x337c, 0xb451, 0x3b06, 0x3a1e, 0x3386, 0xb456, 0x3b02, 0x3a1c, 0x3390, 0xb45b, 0x3afe, 0x3a19, 0x3399, 0xb460, 0x3afb, 0x3a17, 0x33a3, 0xb465, 0x3af7, 0x3a14, 0x33ad, 0xb46a, 0x3af3, 0x3a12, 0x33b7, 0xb46f, 0x3aef, 0x3a0f, 0x33c1, 0xb474, 0x3aeb, 0x3a0d, 0x33ca, 0xb479, 0x3ae7, 0x3a0a, 0x33d4, 0xb47e, 0x3ae3, 0x3a08, 0x33de, 0xb483, 0x3ae0, 0x3a05, 0x33e8, 0xb488, 0x3adc, 0x3a03, 0x33f2, 0xb48d, 0x3ad8, 0x3a00, 0x33fc, 0xb492, 0x3ad4, 0x39fe, 0x3403, 0xb497, 0x3ad0, 0x39fb, 0x3408, 0xb49c, 0x3acc, 0x39f9, 0x340d, 0xb4a1, 0x3ac8, 0x39f6, 0x3412, 0xb4a6, 0x3ac5, 0x39f4, 0x3417, 0xb4ac, 0x3ac1, 0x39f1, 0x341c, 0xb4b1, 0x3abd, 0x39ef, 0x3421, 0xb4b6, 0x3ab9, 0x39ec, 0x3426, 0xb4bb, 0x3ab5, 0x39ea, 0x342b, 0xb4c0, 0x3ab1, 0x39e7, 0x3430, 0xb4c5, 0x3aae, 0x39e5, 0x3435, 0xb4ca, 0x3aaa, 0x39e2, 0x343b, 0xb4cf, 0x3aa6, 0x39df, 0x3440, 0xb4d5, 0x3aa2, 0x39dd, 0x3445, 0xb4da, 0x3a9e, 0x39da, 0x344a, 0xb4df, 0x3a9b, 0x39d8, 0x344f, 0xb4e4, 0x3a97, 0x39d5, 0x3454, 0xb4e9, 0x3a93, 0x39d2, 0x345a, 0xb4ef, 0x3a8f, 0x39d0, 0x345f, 0xb4f4, 0x3a8b, 0x39cd, 0x3464, 0xb4f9, 0x3a88, 0x39cb, 0x3469, 0xb4fe, 0x3a84, 0x39c8, 0x346e, 0xb504, 0x3a80, 0x39c5, 0x3474, 0xb509, 0x3a7c, 0x39c3, 0x3479, 0xb50e, 0x3a79, 0x39c0, 0x347e, 0xb513, 0x3a75, 0x39be, 0x3483, 0xb519, 0x3a71, 0x39bb, 0x3489, 0xb51e, 0x3a6d, 0x39b8, 0x348e, 0xb523, 0x3a6a, 0x39b6, 0x3493, 0xb529, 0x3a66, 0x39b3, 0x3499, 0xb52e, 0x3a62, 0x39b0, 0x349e, 0xb533, 0x3a5e, 0x39ae, 0x34a3, 0xb539, 0x3a5a, 0x39ab, 0x34a8, 0xb53e, 0x3a57, 0x39a8, 0x34ae, 0xb543, 0x3a53, 0x39a6, 0x34b3, 0xb549, 0x3a4f, 0x39a3, 0x34b9, 0xb54e, 0x3a4c, 0x39a0, 0x34be, 0xb554, 0x3a48, 0x399e, 0x34c3, 0xb559, 0x3a44, 0x399b, 0x34c9, 0xb55e, 0x3a40, 0x3998, 0x34ce, 0xb564, 0x3a3d, 0x3996, 0x34d3, 0xb569, 0x3a39, 0x3993, 0x34d9, 0xb56f, 0x3a35, 0x3990, 0x34de, 0xb574, 0x3a32, 0x398d, 0x34e4, 0xb57a, 0x3a2e, 0x398b, 0x34e9, 0xb57f, 0x3a2a, 0x3988, 0x34ef, 0xb585, 0x3a26, 0x3985, 0x34f4, 0xb58a, 0x3a23, 0x3983, 0x34f9, 0xb590, 0x3a1f, 0x3980, 0x34ff, 0xb595, 0x3a1b, 0x397d, 0x3504, 0xb59b, 0x3a18, 0x397a, 0x350a, 0xb5a0, 0x3a14, 0x3978, 0x350f, 0xb5a6, 0x3a10, 0x3975, 0x3515, 0xb5ab, 0x3a0d, 0x3972, 0x351a, 0xb5b1, 0x3a09, 0x396f, 0x3520, 0xb5b6, 0x3a05, 0x396d, 0x3525, 0xb5bc, 0x3a02, 0x396a, 0x352b, 0xb5c1, 0x39fe, 0x3967, 0x3530, 0xb5c7, 0x39fa, 0x3964, 0x3536, 0xb5cd, 0x39f7, 0x3961, 0x353c, 0xb5d2, 0x39f3, 0x395f, 0x3541, 0xb5d8, 0x39ef, 0x395c, 0x3547, 0xb5dd, 0x39ec, 0x3959, 0x354c, 0xb5e3, 0x39e8, 0x3956, 0x3552, 0xb5e9, 0x39e4, 0x3954, 0x3557, 0xb5ee, 0x39e1, 0x3951, 0x355d, 0xb5f4, 0x39dd, 0x394e, 0x3563, 0xb5fa, 0x39d9, 0x394b, 0x3568, 0xb5ff, 0x39d6, 0x3948, 0x356e, 0xb605, 0x39d2, 0x3946, 0x3573, 0xb60b, 0x39cf, 0x3943, 0x3579, 0xb610, 0x39cb, 0x3940, 0x357f, 0xb616, 0x39c7, 0x393d, 0x3584, 0xb61c, 0x39c4, 0x393a, 0x358a, 0xb621, 0x39c0, 0x3937, 0x3590, 0xb627, 0x39bd, 0x3935, 0x3595, 0xb62d, 0x39b9, 0x3932, 0x359b, 0xb633, 0x39b5, 0x392f, 0x35a1, 0xb638, 0x39b2, 0x392c, 0x35a6, 0xb63e, 0x39ae, 0x3929, 0x35ac, 0xb644, 0x39ab, 0x3926, 0x35b2, 0xb64a, 0x39a7, 0x3924, 0x35b7, 0xb64f, 0x39a3, 0x3921, 0x35bd, 0xb655, 0x39a0, 0x391e, 0x35c3, 0xb65b, 0x399c, 0x391b, 0x35c9, 0xb661, 0x3999, 0x3918, 0x35ce, 0xb667, 0x3995, 0x3915, 0x35d4, 0xb66c, 0x3992, 0x3912, 0x35da, 0xb672, 0x398e, 0x3910, 0x35df, 0xb678, 0x398a, 0x390d, 0x35e5, 0xb67e, 0x3987, 0x390a, 0x35eb, 0xb684, 0x3983, 0x3907, 0x35f1, 0xb68a, 0x3980, 0x3904, 0x35f6, 0xb68f, 0x397c, 0x3901, 0x35fc, 0xb695, 0x3979, 0x38fe, 0x3602, 0xb69b, 0x3975, 0x38fb, 0x3608, 0xb6a1, 0x3972, 0x38f8, 0x360e, 0xb6a7, 0x396e, 0x38f6, 0x3613, 0xb6ad, 0x396b, 0x38f3, 0x3619, 0xb6b3, 0x3967, 0x38f0, 0x361f, 0xb6b9, 0x3964, 0x38ed, 0x3625, 0xb6bf, 0x3960, 0x38ea, 0x362b, 0xb6c5, 0x395d, 0x38e7, 0x3630, 0xb6cb, 0x3959, 0x38e4, 0x3636, 0xb6d1, 0x3956, 0x38e1, 0x363c, 0xb6d6, 0x3952, 0x38de, 0x3642, 0xb6dc, 0x394f, 0x38db, 0x3648, 0xb6e2, 0x394b, 0x38d9, 0x364d, 0xb6e8, 0x3948, 0x38d6, 0x3653, 0xb6ee, 0x3944, 0x38d3, 0x3659, 0xb6f4, 0x3941, 0x38d0, 0x365f, 0xb6fa, 0x393d, 0x38cd, 0x3665, 0xb700, 0x393a, 0x38ca, 0x366b, 0xb706, 0x3936, 0x38c7, 0x3671, 0xb70c, 0x3933, 0x38c4, 0x3676, 0xb712, 0x392f, 0x38c1, 0x367c, 0xb719, 0x392c, 0x38be, 0x3682, 0xb71f, 0x3928, 0x38bb, 0x3688, 0xb725, 0x3925, 0x38b8, 0x368e, 0xb72b, 0x3921, 0x38b5, 0x3694, 0xb731, 0x391e, 0x38b2, 0x369a, 0xb737, 0x391a, 0x38af, 0x36a0, 0xb73d, 0x3917, 0x38ad, 0x36a5, 0xb743, 0x3914, 0x38aa, 0x36ab, 0xb749, 0x3910, 0x38a7, 0x36b1, 0xb74f, 0x390d, 0x38a4, 0x36b7, 0xb755, 0x3909, 0x38a1, 0x36bd, 0xb75b, 0x3906, 0x389e, 0x36c3, 0xb762, 0x3902, 0x389b, 0x36c9, 0xb768, 0x38ff, 0x3898, 0x36cf, 0xb76e, 0x38fc, 0x3895, 0x36d5, 0xb774, 0x38f8, 0x3892, 0x36db, 0xb77a, 0x38f5, 0x388f, 0x36e1, 0xb780, 0x38f1, 0x388c, 0x36e7, 0xb787, 0x38ee, 0x3889, 0x36ec, 0xb78d, 0x38eb, 0x3886, 0x36f2, 0xb793, 0x38e7, 0x3883, 0x36f8, 0xb799, 0x38e4, 0x3880, 0x36fe, 0xb79f, 0x38e0, 0x387d, 0x3704, 0xb7a5, 0x38dd, 0x387a, 0x370a, 0xb7ac, 0x38da, 0x3877, 0x3710, 0xb7b2, 0x38d6, 0x3874, 0x3716, 0xb7b8, 0x38d3, 0x3871, 0x371c, 0xb7be, 0x38cf, 0x386e, 0x3722, 0xb7c5, 0x38cc, 0x386b, 0x3728, 0xb7cb, 0x38c9, 0x3868, 0x372e, 0xb7d1, 0x38c5, 0x3865, 0x3734, 0xb7d7, 0x38c2, 0x3862, 0x373a, 0xb7de, 0x38bf, 0x385f, 0x3740, 0xb7e4, 0x38bb, 0x385c, 0x3746, 0xb7ea, 0x38b8, 0x3859, 0x374c, 0xb7f1, 0x38b5, 0x3856, 0x3752, 0xb7f7, 0x38b1, 0x3853, 0x3758, 0xb7fd, 0x38ae, 0x3850, 0x375e, 0xb801, 0x38aa, 0x384d, 0x3764, 0xb805, 0x38a7, 0x384a, 0x376a, 0xb808, 0x38a4, 0x3847, 0x3770, 0xb80b, 0x38a0, 0x3844, 0x3776, 0xb80e, 0x389d, 0x3841, 0x377c, 0xb811, 0x389a, 0x383e, 0x3782, 0xb815, 0x3897, 0x383b, 0x3788, 0xb818, 0x3893, 0x3838, 0x378e, 0xb81b, 0x3890, 0x3835, 0x3794, 0xb81e, 0x388d, 0x3832, 0x379a, 0xb821, 0x3889, 0x382f, 0x37a0, 0xb824, 0x3886, 0x382c, 0x37a6, 0xb828, 0x3883, 0x3829, 0x37ac, 0xb82b, 0x387f, 0x3826, 0x37b2, 0xb82e, 0x387c, 0x3823, 0x37b8, 0xb831, 0x3879, 0x3820, 0x37be, 0xb835, 0x3876, 0x381d, 0x37c4, 0xb838, 0x3872, 0x381a, 0x37ca, 0xb83b, 0x386f, 0x3817, 0x37d0, 0xb83e, 0x386c, 0x3814, 0x37d6, 0xb841, 0x3868, 0x3811, 0x37dc, 0xb845, 0x3865, 0x380e, 0x37e2, 0xb848, 0x3862, 0x380b, 0x37e8, 0xb84b, 0x385f, 0x3808, 0x37ee, 0xb84e, 0x385b, 0x3806, 0x37f4, 0xb852, 0x3858, 0x3803, 0x37fa, 0xb855, 0x3855, 0x3800, 0x3800, 0xb858, 0x3852, 0x37fa, 0x3803, 0xb85b, 0x384e, 0x37f4, 0x3806, 0xb85f, 0x384b, 0x37ee, 0x3808, 0xb862, 0x3848, 0x37e8, 0x380b, 0xb865, 0x3845, 0x37e2, 0x380e, 0xb868, 0x3841, 0x37dc, 0x3811, 0xb86c, 0x383e, 0x37d6, 0x3814, 0xb86f, 0x383b, 0x37d0, 0x3817, 0xb872, 0x3838, 0x37ca, 0x381a, 0xb876, 0x3835, 0x37c4, 0x381d, 0xb879, 0x3831, 0x37be, 0x3820, 0xb87c, 0x382e, 0x37b8, 0x3823, 0xb87f, 0x382b, 0x37b2, 0x3826, 0xb883, 0x3828, 0x37ac, 0x3829, 0xb886, 0x3824, 0x37a6, 0x382c, 0xb889, 0x3821, 0x37a0, 0x382f, 0xb88d, 0x381e, 0x379a, 0x3832, 0xb890, 0x381b, 0x3794, 0x3835, 0xb893, 0x3818, 0x378e, 0x3838, 0xb897, 0x3815, 0x3788, 0x383b, 0xb89a, 0x3811, 0x3782, 0x383e, 0xb89d, 0x380e, 0x377c, 0x3841, 0xb8a0, 0x380b, 0x3776, 0x3844, 0xb8a4, 0x3808, 0x3770, 0x3847, 0xb8a7, 0x3805, 0x376a, 0x384a, 0xb8aa, 0x3801, 0x3764, 0x384d, 0xb8ae, 0x37fd, 0x375e, 0x3850, 0xb8b1, 0x37f7, 0x3758, 0x3853, 0xb8b5, 0x37f1, 0x3752, 0x3856, 0xb8b8, 0x37ea, 0x374c, 0x3859, 0xb8bb, 0x37e4, 0x3746, 0x385c, 0xb8bf, 0x37de, 0x3740, 0x385f, 0xb8c2, 0x37d7, 0x373a, 0x3862, 0xb8c5, 0x37d1, 0x3734, 0x3865, 0xb8c9, 0x37cb, 0x372e, 0x3868, 0xb8cc, 0x37c5, 0x3728, 0x386b, 0xb8cf, 0x37be, 0x3722, 0x386e, 0xb8d3, 0x37b8, 0x371c, 0x3871, 0xb8d6, 0x37b2, 0x3716, 0x3874, 0xb8da, 0x37ac, 0x3710, 0x3877, 0xb8dd, 0x37a5, 0x370a, 0x387a, 0xb8e0, 0x379f, 0x3704, 0x387d, 0xb8e4, 0x3799, 0x36fe, 0x3880, 0xb8e7, 0x3793, 0x36f8, 0x3883, 0xb8eb, 0x378d, 0x36f2, 0x3886, 0xb8ee, 0x3787, 0x36ec, 0x3889, 0xb8f1, 0x3780, 0x36e7, 0x388c, 0xb8f5, 0x377a, 0x36e1, 0x388f, 0xb8f8, 0x3774, 0x36db, 0x3892, 0xb8fc, 0x376e, 0x36d5, 0x3895, 0xb8ff, 0x3768, 0x36cf, 0x3898, 0xb902, 0x3762, 0x36c9, 0x389b, 0xb906, 0x375b, 0x36c3, 0x389e, 0xb909, 0x3755, 0x36bd, 0x38a1, 0xb90d, 0x374f, 0x36b7, 0x38a4, 0xb910, 0x3749, 0x36b1, 0x38a7, 0xb914, 0x3743, 0x36ab, 0x38aa, 0xb917, 0x373d, 0x36a5, 0x38ad, 0xb91a, 0x3737, 0x36a0, 0x38af, 0xb91e, 0x3731, 0x369a, 0x38b2, 0xb921, 0x372b, 0x3694, 0x38b5, 0xb925, 0x3725, 0x368e, 0x38b8, 0xb928, 0x371f, 0x3688, 0x38bb, 0xb92c, 0x3719, 0x3682, 0x38be, 0xb92f, 0x3712, 0x367c, 0x38c1, 0xb933, 0x370c, 0x3676, 0x38c4, 0xb936, 0x3706, 0x3671, 0x38c7, 0xb93a, 0x3700, 0x366b, 0x38ca, 0xb93d, 0x36fa, 0x3665, 0x38cd, 0xb941, 0x36f4, 0x365f, 0x38d0, 0xb944, 0x36ee, 0x3659, 0x38d3, 0xb948, 0x36e8, 0x3653, 0x38d6, 0xb94b, 0x36e2, 0x364d, 0x38d9, 0xb94f, 0x36dc, 0x3648, 0x38db, 0xb952, 0x36d6, 0x3642, 0x38de, 0xb956, 0x36d1, 0x363c, 0x38e1, 0xb959, 0x36cb, 0x3636, 0x38e4, 0xb95d, 0x36c5, 0x3630, 0x38e7, 0xb960, 0x36bf, 0x362b, 0x38ea, 0xb964, 0x36b9, 0x3625, 0x38ed, 0xb967, 0x36b3, 0x361f, 0x38f0, 0xb96b, 0x36ad, 0x3619, 0x38f3, 0xb96e, 0x36a7, 0x3613, 0x38f6, 0xb972, 0x36a1, 0x360e, 0x38f8, 0xb975, 0x369b, 0x3608, 0x38fb, 0xb979, 0x3695, 0x3602, 0x38fe, 0xb97c, 0x368f, 0x35fc, 0x3901, 0xb980, 0x368a, 0x35f6, 0x3904, 0xb983, 0x3684, 0x35f1, 0x3907, 0xb987, 0x367e, 0x35eb, 0x390a, 0xb98a, 0x3678, 0x35e5, 0x390d, 0xb98e, 0x3672, 0x35df, 0x3910, 0xb992, 0x366c, 0x35da, 0x3912, 0xb995, 0x3667, 0x35d4, 0x3915, 0xb999, 0x3661, 0x35ce, 0x3918, 0xb99c, 0x365b, 0x35c9, 0x391b, 0xb9a0, 0x3655, 0x35c3, 0x391e, 0xb9a3, 0x364f, 0x35bd, 0x3921, 0xb9a7, 0x364a, 0x35b7, 0x3924, 0xb9ab, 0x3644, 0x35b2, 0x3926, 0xb9ae, 0x363e, 0x35ac, 0x3929, 0xb9b2, 0x3638, 0x35a6, 0x392c, 0xb9b5, 0x3633, 0x35a1, 0x392f, 0xb9b9, 0x362d, 0x359b, 0x3932, 0xb9bd, 0x3627, 0x3595, 0x3935, 0xb9c0, 0x3621, 0x3590, 0x3937, 0xb9c4, 0x361c, 0x358a, 0x393a, 0xb9c7, 0x3616, 0x3584, 0x393d, 0xb9cb, 0x3610, 0x357f, 0x3940, 0xb9cf, 0x360b, 0x3579, 0x3943, 0xb9d2, 0x3605, 0x3573, 0x3946, 0xb9d6, 0x35ff, 0x356e, 0x3948, 0xb9d9, 0x35fa, 0x3568, 0x394b, 0xb9dd, 0x35f4, 0x3563, 0x394e, 0xb9e1, 0x35ee, 0x355d, 0x3951, 0xb9e4, 0x35e9, 0x3557, 0x3954, 0xb9e8, 0x35e3, 0x3552, 0x3956, 0xb9ec, 0x35dd, 0x354c, 0x3959, 0xb9ef, 0x35d8, 0x3547, 0x395c, 0xb9f3, 0x35d2, 0x3541, 0x395f, 0xb9f7, 0x35cd, 0x353c, 0x3961, 0xb9fa, 0x35c7, 0x3536, 0x3964, 0xb9fe, 0x35c1, 0x3530, 0x3967, 0xba02, 0x35bc, 0x352b, 0x396a, 0xba05, 0x35b6, 0x3525, 0x396d, 0xba09, 0x35b1, 0x3520, 0x396f, 0xba0d, 0x35ab, 0x351a, 0x3972, 0xba10, 0x35a6, 0x3515, 0x3975, 0xba14, 0x35a0, 0x350f, 0x3978, 0xba18, 0x359b, 0x350a, 0x397a, 0xba1b, 0x3595, 0x3504, 0x397d, 0xba1f, 0x3590, 0x34ff, 0x3980, 0xba23, 0x358a, 0x34f9, 0x3983, 0xba26, 0x3585, 0x34f4, 0x3985, 0xba2a, 0x357f, 0x34ef, 0x3988, 0xba2e, 0x357a, 0x34e9, 0x398b, 0xba32, 0x3574, 0x34e4, 0x398d, 0xba35, 0x356f, 0x34de, 0x3990, 0xba39, 0x3569, 0x34d9, 0x3993, 0xba3d, 0x3564, 0x34d3, 0x3996, 0xba40, 0x355e, 0x34ce, 0x3998, 0xba44, 0x3559, 0x34c9, 0x399b, 0xba48, 0x3554, 0x34c3, 0x399e, 0xba4c, 0x354e, 0x34be, 0x39a0, 0xba4f, 0x3549, 0x34b9, 0x39a3, 0xba53, 0x3543, 0x34b3, 0x39a6, 0xba57, 0x353e, 0x34ae, 0x39a8, 0xba5a, 0x3539, 0x34a8, 0x39ab, 0xba5e, 0x3533, 0x34a3, 0x39ae, 0xba62, 0x352e, 0x349e, 0x39b0, 0xba66, 0x3529, 0x3499, 0x39b3, 0xba6a, 0x3523, 0x3493, 0x39b6, 0xba6d, 0x351e, 0x348e, 0x39b8, 0xba71, 0x3519, 0x3489, 0x39bb, 0xba75, 0x3513, 0x3483, 0x39be, 0xba79, 0x350e, 0x347e, 0x39c0, 0xba7c, 0x3509, 0x3479, 0x39c3, 0xba80, 0x3504, 0x3474, 0x39c5, 0xba84, 0x34fe, 0x346e, 0x39c8, 0xba88, 0x34f9, 0x3469, 0x39cb, 0xba8b, 0x34f4, 0x3464, 0x39cd, 0xba8f, 0x34ef, 0x345f, 0x39d0, 0xba93, 0x34e9, 0x345a, 0x39d2, 0xba97, 0x34e4, 0x3454, 0x39d5, 0xba9b, 0x34df, 0x344f, 0x39d8, 0xba9e, 0x34da, 0x344a, 0x39da, 0xbaa2, 0x34d5, 0x3445, 0x39dd, 0xbaa6, 0x34cf, 0x3440, 0x39df, 0xbaaa, 0x34ca, 0x343b, 0x39e2, 0xbaae, 0x34c5, 0x3435, 0x39e5, 0xbab1, 0x34c0, 0x3430, 0x39e7, 0xbab5, 0x34bb, 0x342b, 0x39ea, 0xbab9, 0x34b6, 0x3426, 0x39ec, 0xbabd, 0x34b1, 0x3421, 0x39ef, 0xbac1, 0x34ac, 0x341c, 0x39f1, 0xbac5, 0x34a6, 0x3417, 0x39f4, 0xbac8, 0x34a1, 0x3412, 0x39f6, 0xbacc, 0x349c, 0x340d, 0x39f9, 0xbad0, 0x3497, 0x3408, 0x39fb, 0xbad4, 0x3492, 0x3403, 0x39fe, 0xbad8, 0x348d, 0x33fc, 0x3a00, 0xbadc, 0x3488, 0x33f2, 0x3a03, 0xbae0, 0x3483, 0x33e8, 0x3a05, 0xbae3, 0x347e, 0x33de, 0x3a08, 0xbae7, 0x3479, 0x33d4, 0x3a0a, 0xbaeb, 0x3474, 0x33ca, 0x3a0d, 0xbaef, 0x346f, 0x33c1, 0x3a0f, 0xbaf3, 0x346a, 0x33b7, 0x3a12, 0xbaf7, 0x3465, 0x33ad, 0x3a14, 0xbafb, 0x3460, 0x33a3, 0x3a17, 0xbafe, 0x345b, 0x3399, 0x3a19, 0xbb02, 0x3456, 0x3390, 0x3a1c, 0xbb06, 0x3451, 0x3386, 0x3a1e, 0xbb0a, 0x344d, 0x337c, 0x3a20, 0xbb0e, 0x3448, 0x3372, 0x3a23, 0xbb12, 0x3443, 0x3369, 0x3a25, 0xbb16, 0x343e, 0x335f, 0x3a28, 0xbb1a, 0x3439, 0x3355, 0x3a2a, 0xbb1e, 0x3434, 0x334c, 0x3a2c, 0xbb21, 0x342f, 0x3342, 0x3a2f, 0xbb25, 0x342a, 0x3339, 0x3a31, 0xbb29, 0x3426, 0x332f, 0x3a34, 0xbb2d, 0x3421, 0x3326, 0x3a36, 0xbb31, 0x341c, 0x331c, 0x3a38, 0xbb35, 0x3417, 0x3313, 0x3a3b, 0xbb39, 0x3412, 0x3309, 0x3a3d, 0xbb3d, 0x340e, 0x3300, 0x3a3f, 0xbb41, 0x3409, 0x32f7, 0x3a42, 0xbb45, 0x3404, 0x32ed, 0x3a44, 0xbb49, 0x33ff, 0x32e4, 0x3a46, 0xbb4d, 0x33f6, 0x32db, 0x3a49, 0xbb51, 0x33ed, 0x32d1, 0x3a4b, 0xbb54, 0x33e3, 0x32c8, 0x3a4d, 0xbb58, 0x33da, 0x32bf, 0x3a50, 0xbb5c, 0x33d0, 0x32b6, 0x3a52, 0xbb60, 0x33c7, 0x32ad, 0x3a54, 0xbb64, 0x33be, 0x32a3, 0x3a57, 0xbb68, 0x33b5, 0x329a, 0x3a59, 0xbb6c, 0x33ab, 0x3291, 0x3a5b, 0xbb70, 0x33a2, 0x3288, 0x3a5d, 0xbb74, 0x3399, 0x327f, 0x3a60, 0xbb78, 0x3390, 0x3276, 0x3a62, 0xbb7c, 0x3387, 0x326d, 0x3a64, 0xbb80, 0x337d, 0x3264, 0x3a66, 0xbb84, 0x3374, 0x325b, 0x3a69, 0xbb88, 0x336b, 0x3252, 0x3a6b, 0xbb8c, 0x3362, 0x3249, 0x3a6d, 0xbb90, 0x3359, 0x3241, 0x3a6f, 0xbb94, 0x3350, 0x3238, 0x3a71, 0xbb98, 0x3347, 0x322f, 0x3a74, 0xbb9c, 0x333e, 0x3226, 0x3a76, 0xbba0, 0x3335, 0x321e, 0x3a78, 0xbba4, 0x332c, 0x3215, 0x3a7a, 0xbba8, 0x3323, 0x320c, 0x3a7c, 0xbbac, 0x331a, 0x3204, 0x3a7e, 0xbbb0, 0x3312, 0x31fb, 0x3a81, 0xbbb4, 0x3309, 0x31f2, 0x3a83, 0xbbb8, 0x3300, 0x31ea, 0x3a85, 0xbbbc, 0x32f7, 0x31e1, 0x3a87, 0xbbc0, 0x32ee, 0x31d9, 0x3a89, 0xbbc4, 0x32e6, 0x31d0, 0x3a8b, 0xbbc8, 0x32dd, 0x31c8, 0x3a8d, 0xbbcc, 0x32d4, 0x31bf, 0x3a90, 0xbbd0, 0x32cc, 0x31b7, 0x3a92, 0xbbd4, 0x32c3, 0x31af, 0x3a94, 0xbbd8, 0x32ba, 0x31a6, 0x3a96, 0xbbdc, 0x32b2, 0x319e, 0x3a98, 0xbbe0, 0x32a9, 0x3196, 0x3a9a, 0xbbe4, 0x32a1, 0x318e, 0x3a9c, 0xbbe8, 0x3298, 0x3185, 0x3a9e, 0xbbec, 0x3290, 0x317d, 0x3aa0, 0xbbf0, 0x3287, 0x3175, 0x3aa2, 0xbbf4, 0x327f, 0x316d, 0x3aa4, 0xbbf8, 0x3277, 0x3165, 0x3aa6, 0xbbfc, 0x326e, 0x315d, 0x3aa8, 0 }; xf86-video-ati-7.3.0/src/radeon_chipset_gen.h0000644000175000017500000010033412256365422015704 00000000000000/* This file is autogenerated please do not edit */ SymTabRec RADEONChipsets[] = { { PCI_CHIP_RV380_3150, "ATI Radeon Mobility X600 (M24) 3150 (PCIE)" }, { PCI_CHIP_RV380_3151, "ATI FireMV 2400 (PCI)" }, { PCI_CHIP_RV380_3152, "ATI Radeon Mobility X300 (M24) 3152 (PCIE)" }, { PCI_CHIP_RV380_3154, "ATI FireGL M24 GL 3154 (PCIE)" }, { PCI_CHIP_RV380_3155, "ATI FireMV 2400 3155 (PCI)" }, { PCI_CHIP_RV380_3E50, "ATI Radeon X600 (RV380) 3E50 (PCIE)" }, { PCI_CHIP_RV380_3E54, "ATI FireGL V3200 (RV380) 3E54 (PCIE)" }, { PCI_CHIP_RS100_4136, "ATI Radeon IGP320 (A3) 4136" }, { PCI_CHIP_RS200_4137, "ATI Radeon IGP330/340/350 (A4) 4137" }, { PCI_CHIP_R300_AD, "ATI Radeon 9500 AD (AGP)" }, { PCI_CHIP_R300_AE, "ATI Radeon 9500 AE (AGP)" }, { PCI_CHIP_R300_AF, "ATI Radeon 9600TX AF (AGP)" }, { PCI_CHIP_R300_AG, "ATI FireGL Z1 AG (AGP)" }, { PCI_CHIP_R350_AH, "ATI Radeon 9800SE AH (AGP)" }, { PCI_CHIP_R350_AI, "ATI Radeon 9800 AI (AGP)" }, { PCI_CHIP_R350_AJ, "ATI Radeon 9800 AJ (AGP)" }, { PCI_CHIP_R350_AK, "ATI FireGL X2 AK (AGP)" }, { PCI_CHIP_RV350_AP, "ATI Radeon 9600 AP (AGP)" }, { PCI_CHIP_RV350_AQ, "ATI Radeon 9600SE AQ (AGP)" }, { PCI_CHIP_RV360_AR, "ATI Radeon 9600XT AR (AGP)" }, { PCI_CHIP_RV350_AS, "ATI Radeon 9600 AS (AGP)" }, { PCI_CHIP_RV350_AT, "ATI FireGL T2 AT (AGP)" }, { PCI_CHIP_RV350_4155, "ATI Radeon 9650" }, { PCI_CHIP_RV350_AV, "ATI FireGL RV360 AV (AGP)" }, { PCI_CHIP_RS250_4237, "ATI Radeon 7000 IGP (A4+) 4237" }, { PCI_CHIP_R200_BB, "ATI Radeon 8500 AIW BB (AGP)" }, { PCI_CHIP_RS100_4336, "ATI Radeon IGP320M (U1) 4336" }, { PCI_CHIP_RS200_4337, "ATI Radeon IGP330M/340M/350M (U2) 4337" }, { PCI_CHIP_RS250_4437, "ATI Radeon Mobility 7000 IGP 4437" }, { PCI_CHIP_RV250_If, "ATI Radeon 9000/PRO If (AGP/PCI)" }, { PCI_CHIP_RV250_Ig, "ATI Radeon 9000 Ig (AGP/PCI)" }, { PCI_CHIP_R420_JH, "ATI Radeon X800 (R420) JH (AGP)" }, { PCI_CHIP_R420_JI, "ATI Radeon X800PRO (R420) JI (AGP)" }, { PCI_CHIP_R420_JJ, "ATI Radeon X800SE (R420) JJ (AGP)" }, { PCI_CHIP_R420_JK, "ATI Radeon X800 (R420) JK (AGP)" }, { PCI_CHIP_R420_JL, "ATI Radeon X800 (R420) JL (AGP)" }, { PCI_CHIP_R420_JM, "ATI FireGL X3 (R420) JM (AGP)" }, { PCI_CHIP_R420_JN, "ATI Radeon Mobility 9800 (M18) JN (AGP)" }, { PCI_CHIP_R420_4A4F, "ATI Radeon X800 SE (R420) (AGP)" }, { PCI_CHIP_R420_JP, "ATI Radeon X800XT (R420) JP (AGP)" }, { PCI_CHIP_R420_JT, "ATI Radeon X800 VE (R420) JT (AGP)" }, { PCI_CHIP_R481_4B48, "ATI Radeon X850 (R480) (AGP)" }, { PCI_CHIP_R481_4B49, "ATI Radeon X850 XT (R480) (AGP)" }, { PCI_CHIP_R481_4B4A, "ATI Radeon X850 SE (R480) (AGP)" }, { PCI_CHIP_R481_4B4B, "ATI Radeon X850 PRO (R480) (AGP)" }, { PCI_CHIP_R481_4B4C, "ATI Radeon X850 XT PE (R480) (AGP)" }, { PCI_CHIP_RADEON_LW, "ATI Radeon Mobility M7 LW (AGP)" }, { PCI_CHIP_RADEON_LX, "ATI Mobility FireGL 7800 M7 LX (AGP)" }, { PCI_CHIP_RADEON_LY, "ATI Radeon Mobility M6 LY (AGP)" }, { PCI_CHIP_RADEON_LZ, "ATI Radeon Mobility M6 LZ (AGP)" }, { PCI_CHIP_RV250_Ld, "ATI FireGL Mobility 9000 (M9) Ld (AGP)" }, { PCI_CHIP_RV250_Lf, "ATI Radeon Mobility 9000 (M9) Lf (AGP)" }, { PCI_CHIP_RV250_Lg, "ATI Radeon Mobility 9000 (M9) Lg (AGP)" }, { PCI_CHIP_RV280_4C6E, "ATI FireMV 2400 PCI" }, { PCI_CHIP_R300_ND, "ATI Radeon 9700 Pro ND (AGP)" }, { PCI_CHIP_R300_NE, "ATI Radeon 9700/9500Pro NE (AGP)" }, { PCI_CHIP_R300_NF, "ATI Radeon 9600TX NF (AGP)" }, { PCI_CHIP_R300_NG, "ATI FireGL X1 NG (AGP)" }, { PCI_CHIP_R350_NH, "ATI Radeon 9800PRO NH (AGP)" }, { PCI_CHIP_R350_NI, "ATI Radeon 9800 NI (AGP)" }, { PCI_CHIP_R360_NJ, "ATI FireGL X2 NK (AGP)" }, { PCI_CHIP_R350_NK, "ATI Radeon 9800XT NJ (AGP)" }, { PCI_CHIP_RV350_NP, "ATI Radeon Mobility 9600/9700 (M10/M11) NP (AGP)" }, { PCI_CHIP_RV350_NQ, "ATI Radeon Mobility 9600 (M10) NQ (AGP)" }, { PCI_CHIP_RV350_NR, "ATI Radeon Mobility 9600 (M11) NR (AGP)" }, { PCI_CHIP_RV350_NS, "ATI Radeon Mobility 9600 (M10) NS (AGP)" }, { PCI_CHIP_RV350_NT, "ATI FireGL Mobility T2 (M10) NT (AGP)" }, { PCI_CHIP_RV350_NV, "ATI FireGL Mobility T2e (M11) NV (AGP)" }, { PCI_CHIP_RADEON_QD, "ATI Radeon QD (AGP)" }, { PCI_CHIP_RADEON_QE, "ATI Radeon QE (AGP)" }, { PCI_CHIP_RADEON_QF, "ATI Radeon QF (AGP)" }, { PCI_CHIP_RADEON_QG, "ATI Radeon QG (AGP)" }, { PCI_CHIP_R200_QH, "ATI FireGL 8700/8800 QH (AGP)" }, { PCI_CHIP_R200_QL, "ATI Radeon 8500 QL (AGP)" }, { PCI_CHIP_R200_QM, "ATI Radeon 9100 QM (AGP)" }, { PCI_CHIP_RV200_QW, "ATI Radeon 7500 QW (AGP/PCI)" }, { PCI_CHIP_RV200_QX, "ATI Radeon 7500 QX (AGP/PCI)" }, { PCI_CHIP_RV100_QY, "ATI Radeon VE/7000 QY (AGP/PCI)" }, { PCI_CHIP_RV100_QZ, "ATI Radeon VE/7000 QZ (AGP/PCI)" }, { PCI_CHIP_RN50_515E, "ATI ES1000 515E (PCI)" }, { PCI_CHIP_RV370_5460, "ATI Radeon Mobility X300 (M22) 5460 (PCIE)" }, { PCI_CHIP_RV370_5462, "ATI Radeon Mobility X600 SE (M24C) 5462 (PCIE)" }, { PCI_CHIP_RV370_5464, "ATI FireGL M22 GL 5464 (PCIE)" }, { PCI_CHIP_R423_UH, "ATI Radeon X800 (R423) UH (PCIE)" }, { PCI_CHIP_R423_UI, "ATI Radeon X800PRO (R423) UI (PCIE)" }, { PCI_CHIP_R423_UJ, "ATI Radeon X800LE (R423) UJ (PCIE)" }, { PCI_CHIP_R423_UK, "ATI Radeon X800SE (R423) UK (PCIE)" }, { PCI_CHIP_R430_554C, "ATI Radeon X800 XTP (R430) (PCIE)" }, { PCI_CHIP_R430_554D, "ATI Radeon X800 XL (R430) (PCIE)" }, { PCI_CHIP_R430_554E, "ATI Radeon X800 SE (R430) (PCIE)" }, { PCI_CHIP_R430_554F, "ATI Radeon X800 (R430) (PCIE)" }, { PCI_CHIP_R423_5550, "ATI FireGL V7100 (R423) (PCIE)" }, { PCI_CHIP_R423_UQ, "ATI FireGL V5100 (R423) UQ (PCIE)" }, { PCI_CHIP_R423_UR, "ATI FireGL unknown (R423) UR (PCIE)" }, { PCI_CHIP_R423_UT, "ATI FireGL unknown (R423) UT (PCIE)" }, { PCI_CHIP_RV410_564A, "ATI Mobility FireGL V5000 (M26) (PCIE)" }, { PCI_CHIP_RV410_564B, "ATI Mobility FireGL V5000 (M26) (PCIE)" }, { PCI_CHIP_RV410_564F, "ATI Mobility Radeon X700 XL (M26) (PCIE)" }, { PCI_CHIP_RV410_5652, "ATI Mobility Radeon X700 (M26) (PCIE)" }, { PCI_CHIP_RV410_5653, "ATI Mobility Radeon X700 (M26) (PCIE)" }, { PCI_CHIP_RV410_5657, "ATI Radeon X550XTX 5657 (PCIE)" }, { PCI_CHIP_RS300_5834, "ATI Radeon 9100 IGP (A5) 5834" }, { PCI_CHIP_RS300_5835, "ATI Radeon Mobility 9100 IGP (U3) 5835" }, { PCI_CHIP_RS480_5954, "ATI Radeon XPRESS 200 5954 (PCIE)" }, { PCI_CHIP_RS480_5955, "ATI Radeon XPRESS 200M 5955 (PCIE)" }, { PCI_CHIP_RV280_5960, "ATI Radeon 9250 5960 (AGP)" }, { PCI_CHIP_RV280_5961, "ATI Radeon 9200 5961 (AGP)" }, { PCI_CHIP_RV280_5962, "ATI Radeon 9200 5962 (AGP)" }, { PCI_CHIP_RV280_5964, "ATI Radeon 9200SE 5964 (AGP)" }, { PCI_CHIP_RV280_5965, "ATI FireMV 2200 (PCI)" }, { PCI_CHIP_RN50_5969, "ATI ES1000 5969 (PCI)" }, { PCI_CHIP_RS482_5974, "ATI Radeon XPRESS 200 5974 (PCIE)" }, { PCI_CHIP_RS485_5975, "ATI Radeon XPRESS 200M 5975 (PCIE)" }, { PCI_CHIP_RS400_5A41, "ATI Radeon XPRESS 200 5A41 (PCIE)" }, { PCI_CHIP_RS400_5A42, "ATI Radeon XPRESS 200M 5A42 (PCIE)" }, { PCI_CHIP_RC410_5A61, "ATI Radeon XPRESS 200 5A61 (PCIE)" }, { PCI_CHIP_RC410_5A62, "ATI Radeon XPRESS 200M 5A62 (PCIE)" }, { PCI_CHIP_RV370_5B60, "ATI Radeon X300 (RV370) 5B60 (PCIE)" }, { PCI_CHIP_RV370_5B62, "ATI Radeon X600 (RV370) 5B62 (PCIE)" }, { PCI_CHIP_RV370_5B63, "ATI Radeon X550 (RV370) 5B63 (PCIE)" }, { PCI_CHIP_RV370_5B64, "ATI FireGL V3100 (RV370) 5B64 (PCIE)" }, { PCI_CHIP_RV370_5B65, "ATI FireMV 2200 PCIE (RV370) 5B65 (PCIE)" }, { PCI_CHIP_RV280_5C61, "ATI Radeon Mobility 9200 (M9+) 5C61 (AGP)" }, { PCI_CHIP_RV280_5C63, "ATI Radeon Mobility 9200 (M9+) 5C63 (AGP)" }, { PCI_CHIP_R430_5D48, "ATI Mobility Radeon X800 XT (M28) (PCIE)" }, { PCI_CHIP_R430_5D49, "ATI Mobility FireGL V5100 (M28) (PCIE)" }, { PCI_CHIP_R430_5D4A, "ATI Mobility Radeon X800 (M28) (PCIE)" }, { PCI_CHIP_R480_5D4C, "ATI Radeon X850 5D4C (PCIE)" }, { PCI_CHIP_R480_5D4D, "ATI Radeon X850 XT PE (R480) (PCIE)" }, { PCI_CHIP_R480_5D4E, "ATI Radeon X850 SE (R480) (PCIE)" }, { PCI_CHIP_R480_5D4F, "ATI Radeon X850 PRO (R480) (PCIE)" }, { PCI_CHIP_R480_5D50, "ATI unknown Radeon / FireGL (R480) 5D50 (PCIE)" }, { PCI_CHIP_R480_5D52, "ATI Radeon X850 XT (R480) (PCIE)" }, { PCI_CHIP_R423_5D57, "ATI Radeon X800XT (R423) 5D57 (PCIE)" }, { PCI_CHIP_RV410_5E48, "ATI FireGL V5000 (RV410) (PCIE)" }, { PCI_CHIP_RV410_5E4A, "ATI Radeon X700 XT (RV410) (PCIE)" }, { PCI_CHIP_RV410_5E4B, "ATI Radeon X700 PRO (RV410) (PCIE)" }, { PCI_CHIP_RV410_5E4C, "ATI Radeon X700 SE (RV410) (PCIE)" }, { PCI_CHIP_RV410_5E4D, "ATI Radeon X700 (RV410) (PCIE)" }, { PCI_CHIP_RV410_5E4F, "ATI Radeon X700 SE (RV410) (PCIE)" }, { PCI_CHIP_R520_7100, "ATI Radeon X1800" }, { PCI_CHIP_R520_7101, "ATI Mobility Radeon X1800 XT" }, { PCI_CHIP_R520_7102, "ATI Mobility Radeon X1800" }, { PCI_CHIP_R520_7103, "ATI Mobility FireGL V7200" }, { PCI_CHIP_R520_7104, "ATI FireGL V7200" }, { PCI_CHIP_R520_7105, "ATI FireGL V5300" }, { PCI_CHIP_R520_7106, "ATI Mobility FireGL V7100" }, { PCI_CHIP_R520_7108, "ATI Radeon X1800" }, { PCI_CHIP_R520_7109, "ATI Radeon X1800" }, { PCI_CHIP_R520_710A, "ATI Radeon X1800" }, { PCI_CHIP_R520_710B, "ATI Radeon X1800" }, { PCI_CHIP_R520_710C, "ATI Radeon X1800" }, { PCI_CHIP_R520_710E, "ATI FireGL V7300" }, { PCI_CHIP_R520_710F, "ATI FireGL V7350" }, { PCI_CHIP_RV515_7140, "ATI Radeon X1600" }, { PCI_CHIP_RV515_7141, "ATI RV505" }, { PCI_CHIP_RV515_7142, "ATI Radeon X1300/X1550" }, { PCI_CHIP_RV515_7143, "ATI Radeon X1550" }, { PCI_CHIP_RV515_7144, "ATI M54-GL" }, { PCI_CHIP_RV515_7145, "ATI Mobility Radeon X1400" }, { PCI_CHIP_RV515_7146, "ATI Radeon X1300/X1550" }, { PCI_CHIP_RV515_7147, "ATI Radeon X1550 64-bit" }, { PCI_CHIP_RV515_7149, "ATI Mobility Radeon X1300" }, { PCI_CHIP_RV515_714A, "ATI Mobility Radeon X1300" }, { PCI_CHIP_RV515_714B, "ATI Mobility Radeon X1300" }, { PCI_CHIP_RV515_714C, "ATI Mobility Radeon X1300" }, { PCI_CHIP_RV515_714D, "ATI Radeon X1300" }, { PCI_CHIP_RV515_714E, "ATI Radeon X1300" }, { PCI_CHIP_RV515_714F, "ATI RV505" }, { PCI_CHIP_RV515_7151, "ATI RV505" }, { PCI_CHIP_RV515_7152, "ATI FireGL V3300" }, { PCI_CHIP_RV515_7153, "ATI FireGL V3350" }, { PCI_CHIP_RV515_715E, "ATI Radeon X1300" }, { PCI_CHIP_RV515_715F, "ATI Radeon X1550 64-bit" }, { PCI_CHIP_RV515_7180, "ATI Radeon X1300/X1550" }, { PCI_CHIP_RV515_7181, "ATI Radeon X1600" }, { PCI_CHIP_RV515_7183, "ATI Radeon X1300/X1550" }, { PCI_CHIP_RV515_7186, "ATI Mobility Radeon X1450" }, { PCI_CHIP_RV515_7187, "ATI Radeon X1300/X1550" }, { PCI_CHIP_RV515_7188, "ATI Mobility Radeon X2300" }, { PCI_CHIP_RV515_718A, "ATI Mobility Radeon X2300" }, { PCI_CHIP_RV515_718B, "ATI Mobility Radeon X1350" }, { PCI_CHIP_RV515_718C, "ATI Mobility Radeon X1350" }, { PCI_CHIP_RV515_718D, "ATI Mobility Radeon X1450" }, { PCI_CHIP_RV515_718F, "ATI Radeon X1300" }, { PCI_CHIP_RV515_7193, "ATI Radeon X1550" }, { PCI_CHIP_RV515_7196, "ATI Mobility Radeon X1350" }, { PCI_CHIP_RV515_719B, "ATI FireMV 2250" }, { PCI_CHIP_RV515_719F, "ATI Radeon X1550 64-bit" }, { PCI_CHIP_RV530_71C0, "ATI Radeon X1600" }, { PCI_CHIP_RV530_71C1, "ATI Radeon X1650" }, { PCI_CHIP_RV530_71C2, "ATI Radeon X1600" }, { PCI_CHIP_RV530_71C3, "ATI Radeon X1600" }, { PCI_CHIP_RV530_71C4, "ATI Mobility FireGL V5200" }, { PCI_CHIP_RV530_71C5, "ATI Mobility Radeon X1600" }, { PCI_CHIP_RV530_71C6, "ATI Radeon X1650" }, { PCI_CHIP_RV530_71C7, "ATI Radeon X1650" }, { PCI_CHIP_RV530_71CD, "ATI Radeon X1600" }, { PCI_CHIP_RV530_71CE, "ATI Radeon X1300 XT/X1600 Pro" }, { PCI_CHIP_RV530_71D2, "ATI FireGL V3400" }, { PCI_CHIP_RV530_71D4, "ATI Mobility FireGL V5250" }, { PCI_CHIP_RV530_71D5, "ATI Mobility Radeon X1700" }, { PCI_CHIP_RV530_71D6, "ATI Mobility Radeon X1700 XT" }, { PCI_CHIP_RV530_71DA, "ATI FireGL V5200" }, { PCI_CHIP_RV530_71DE, "ATI Mobility Radeon X1700" }, { PCI_CHIP_RV515_7200, "ATI Radeon X2300HD" }, { PCI_CHIP_RV515_7210, "ATI Mobility Radeon HD 2300" }, { PCI_CHIP_RV515_7211, "ATI Mobility Radeon HD 2300" }, { PCI_CHIP_R580_7240, "ATI Radeon X1950" }, { PCI_CHIP_R580_7243, "ATI Radeon X1900" }, { PCI_CHIP_R580_7244, "ATI Radeon X1950" }, { PCI_CHIP_R580_7245, "ATI Radeon X1900" }, { PCI_CHIP_R580_7246, "ATI Radeon X1900" }, { PCI_CHIP_R580_7247, "ATI Radeon X1900" }, { PCI_CHIP_R580_7248, "ATI Radeon X1900" }, { PCI_CHIP_R580_7249, "ATI Radeon X1900" }, { PCI_CHIP_R580_724A, "ATI Radeon X1900" }, { PCI_CHIP_R580_724B, "ATI Radeon X1900" }, { PCI_CHIP_R580_724C, "ATI Radeon X1900" }, { PCI_CHIP_R580_724D, "ATI Radeon X1900" }, { PCI_CHIP_R580_724E, "ATI AMD Stream Processor" }, { PCI_CHIP_R580_724F, "ATI Radeon X1900" }, { PCI_CHIP_RV570_7280, "ATI Radeon X1950" }, { PCI_CHIP_RV560_7281, "ATI RV560" }, { PCI_CHIP_RV560_7283, "ATI RV560" }, { PCI_CHIP_R580_7284, "ATI Mobility Radeon X1900" }, { PCI_CHIP_RV560_7287, "ATI RV560" }, { PCI_CHIP_RV570_7288, "ATI Radeon X1950 GT" }, { PCI_CHIP_RV570_7289, "ATI RV570" }, { PCI_CHIP_RV570_728B, "ATI RV570" }, { PCI_CHIP_RV570_728C, "ATI FireGL V7400" }, { PCI_CHIP_RV560_7290, "ATI RV560" }, { PCI_CHIP_RV560_7291, "ATI Radeon X1650" }, { PCI_CHIP_RV560_7293, "ATI Radeon X1650" }, { PCI_CHIP_RV560_7297, "ATI RV560" }, { PCI_CHIP_RS350_7834, "ATI Radeon 9100 PRO IGP 7834" }, { PCI_CHIP_RS350_7835, "ATI Radeon Mobility 9200 IGP 7835" }, { PCI_CHIP_RS690_791E, "ATI Radeon X1200" }, { PCI_CHIP_RS690_791F, "ATI Radeon X1200" }, { PCI_CHIP_RS600_793F, "ATI Radeon X1200" }, { PCI_CHIP_RS600_7941, "ATI Radeon X1200" }, { PCI_CHIP_RS600_7942, "ATI Radeon X1200" }, { PCI_CHIP_RS740_796C, "ATI RS740" }, { PCI_CHIP_RS740_796D, "ATI RS740M" }, { PCI_CHIP_RS740_796E, "ATI RS740" }, { PCI_CHIP_RS740_796F, "ATI RS740M" }, { PCI_CHIP_R600_9400, "ATI Radeon HD 2900 XT" }, { PCI_CHIP_R600_9401, "ATI Radeon HD 2900 XT" }, { PCI_CHIP_R600_9402, "ATI Radeon HD 2900 XT" }, { PCI_CHIP_R600_9403, "ATI Radeon HD 2900 Pro" }, { PCI_CHIP_R600_9405, "ATI Radeon HD 2900 GT" }, { PCI_CHIP_R600_940A, "ATI FireGL V8650" }, { PCI_CHIP_R600_940B, "ATI FireGL V8600" }, { PCI_CHIP_R600_940F, "ATI FireGL V7600" }, { PCI_CHIP_RV770_9440, "ATI Radeon 4800 Series" }, { PCI_CHIP_RV770_9441, "ATI Radeon HD 4870 x2" }, { PCI_CHIP_RV770_9442, "ATI Radeon 4800 Series" }, { PCI_CHIP_RV770_9443, "ATI Radeon HD 4850 x2" }, { PCI_CHIP_RV770_9444, "ATI FirePro V8750 (FireGL)" }, { PCI_CHIP_RV770_9446, "ATI FirePro V7760 (FireGL)" }, { PCI_CHIP_RV770_944A, "ATI Mobility RADEON HD 4850" }, { PCI_CHIP_RV770_944B, "ATI Mobility RADEON HD 4850 X2" }, { PCI_CHIP_RV770_944C, "ATI Radeon 4800 Series" }, { PCI_CHIP_RV770_944E, "ATI FirePro RV770" }, { PCI_CHIP_RV770_9450, "AMD FireStream 9270" }, { PCI_CHIP_RV770_9452, "AMD FireStream 9250" }, { PCI_CHIP_RV770_9456, "ATI FirePro V8700 (FireGL)" }, { PCI_CHIP_RV770_945A, "ATI Mobility RADEON HD 4870" }, { PCI_CHIP_RV770_945B, "ATI Mobility RADEON M98" }, { PCI_CHIP_RV770_945E, "ATI Mobility RADEON HD 4870" }, { PCI_CHIP_RV790_9460, "ATI Radeon 4800 Series" }, { PCI_CHIP_RV790_9462, "ATI Radeon 4800 Series" }, { PCI_CHIP_RV770_946A, "ATI FirePro M7750" }, { PCI_CHIP_RV770_946B, "ATI M98" }, { PCI_CHIP_RV770_947A, "ATI M98" }, { PCI_CHIP_RV770_947B, "ATI M98" }, { PCI_CHIP_RV730_9480, "ATI Mobility Radeon HD 4650" }, { PCI_CHIP_RV730_9487, "ATI Radeon RV730 (AGP)" }, { PCI_CHIP_RV730_9488, "ATI Mobility Radeon HD 4670" }, { PCI_CHIP_RV730_9489, "ATI FirePro M5750" }, { PCI_CHIP_RV730_948A, "ATI Mobility Radeon HD 4670" }, { PCI_CHIP_RV730_948F, "ATI Radeon RV730 (AGP)" }, { PCI_CHIP_RV730_9490, "ATI RV730XT [Radeon HD 4670]" }, { PCI_CHIP_RV730_9491, "ATI RADEON E4600" }, { PCI_CHIP_RV730_9495, "ATI Radeon HD 4600 Series" }, { PCI_CHIP_RV730_9498, "ATI RV730 PRO [Radeon HD 4650]" }, { PCI_CHIP_RV730_949C, "ATI FirePro V7750 (FireGL)" }, { PCI_CHIP_RV730_949E, "ATI FirePro V5700 (FireGL)" }, { PCI_CHIP_RV730_949F, "ATI FirePro V3750 (FireGL)" }, { PCI_CHIP_RV740_94A0, "ATI Mobility Radeon HD 4830" }, { PCI_CHIP_RV740_94A1, "ATI Mobility Radeon HD 4850" }, { PCI_CHIP_RV740_94A3, "ATI FirePro M7740" }, { PCI_CHIP_RV740_94B1, "ATI RV740" }, { PCI_CHIP_RV740_94B3, "ATI Radeon HD 4770" }, { PCI_CHIP_RV740_94B4, "ATI Radeon HD 4700 Series" }, { PCI_CHIP_RV740_94B5, "ATI Radeon HD 4770" }, { PCI_CHIP_RV740_94B9, "ATI FirePro M5750" }, { PCI_CHIP_RV610_94C0, "ATI RV610" }, { PCI_CHIP_RV610_94C1, "ATI Radeon HD 2400 XT" }, { PCI_CHIP_RV610_94C3, "ATI Radeon HD 2400 Pro" }, { PCI_CHIP_RV610_94C4, "ATI Radeon HD 2400 PRO AGP" }, { PCI_CHIP_RV610_94C5, "ATI FireGL V4000" }, { PCI_CHIP_RV610_94C6, "ATI RV610" }, { PCI_CHIP_RV610_94C7, "ATI Radeon HD 2350" }, { PCI_CHIP_RV610_94C8, "ATI Mobility Radeon HD 2400 XT" }, { PCI_CHIP_RV610_94C9, "ATI Mobility Radeon HD 2400" }, { PCI_CHIP_RV610_94CB, "ATI RADEON E2400" }, { PCI_CHIP_RV610_94CC, "ATI RV610" }, { PCI_CHIP_RV610_94CD, "ATI FireMV 2260" }, { PCI_CHIP_RV670_9500, "ATI RV670" }, { PCI_CHIP_RV670_9501, "ATI Radeon HD3870" }, { PCI_CHIP_RV670_9504, "ATI Mobility Radeon HD 3850" }, { PCI_CHIP_RV670_9505, "ATI Radeon HD3850" }, { PCI_CHIP_RV670_9506, "ATI Mobility Radeon HD 3850 X2" }, { PCI_CHIP_RV670_9507, "ATI RV670" }, { PCI_CHIP_RV670_9508, "ATI Mobility Radeon HD 3870" }, { PCI_CHIP_RV670_9509, "ATI Mobility Radeon HD 3870 X2" }, { PCI_CHIP_RV670_950F, "ATI Radeon HD3870 X2" }, { PCI_CHIP_RV670_9511, "ATI FireGL V7700" }, { PCI_CHIP_RV670_9515, "ATI Radeon HD3850" }, { PCI_CHIP_RV670_9517, "ATI Radeon HD3690" }, { PCI_CHIP_RV670_9519, "AMD Firestream 9170" }, { PCI_CHIP_RV710_9540, "ATI Radeon HD 4550" }, { PCI_CHIP_RV710_9541, "ATI Radeon RV710" }, { PCI_CHIP_RV710_9542, "ATI Radeon RV710" }, { PCI_CHIP_RV710_954E, "ATI Radeon RV710" }, { PCI_CHIP_RV710_954F, "ATI Radeon HD 4350" }, { PCI_CHIP_RV710_9552, "ATI Mobility Radeon 4300 Series" }, { PCI_CHIP_RV710_9553, "ATI Mobility Radeon 4500 Series" }, { PCI_CHIP_RV710_9555, "ATI Mobility Radeon 4500 Series" }, { PCI_CHIP_RV710_9557, "ATI FirePro RG220" }, { PCI_CHIP_RV710_955F, "ATI Mobility Radeon 4330" }, { PCI_CHIP_RV630_9580, "ATI RV630" }, { PCI_CHIP_RV630_9581, "ATI Mobility Radeon HD 2600" }, { PCI_CHIP_RV630_9583, "ATI Mobility Radeon HD 2600 XT" }, { PCI_CHIP_RV630_9586, "ATI Radeon HD 2600 XT AGP" }, { PCI_CHIP_RV630_9587, "ATI Radeon HD 2600 Pro AGP" }, { PCI_CHIP_RV630_9588, "ATI Radeon HD 2600 XT" }, { PCI_CHIP_RV630_9589, "ATI Radeon HD 2600 Pro" }, { PCI_CHIP_RV630_958A, "ATI Gemini RV630" }, { PCI_CHIP_RV630_958B, "ATI Gemini Mobility Radeon HD 2600 XT" }, { PCI_CHIP_RV630_958C, "ATI FireGL V5600" }, { PCI_CHIP_RV630_958D, "ATI FireGL V3600" }, { PCI_CHIP_RV630_958E, "ATI Radeon HD 2600 LE" }, { PCI_CHIP_RV630_958F, "ATI Mobility FireGL Graphics Processor" }, { PCI_CHIP_RV620_95C0, "ATI Radeon HD 3470" }, { PCI_CHIP_RV620_95C2, "ATI Mobility Radeon HD 3430" }, { PCI_CHIP_RV620_95C4, "ATI Mobility Radeon HD 3400 Series" }, { PCI_CHIP_RV620_95C5, "ATI Radeon HD 3450" }, { PCI_CHIP_RV620_95C6, "ATI Radeon HD 3450" }, { PCI_CHIP_RV620_95C7, "ATI Radeon HD 3430" }, { PCI_CHIP_RV620_95C9, "ATI Radeon HD 3450" }, { PCI_CHIP_RV620_95CC, "ATI FirePro V3700" }, { PCI_CHIP_RV620_95CD, "ATI FireMV 2450" }, { PCI_CHIP_RV620_95CE, "ATI FireMV 2260" }, { PCI_CHIP_RV620_95CF, "ATI FireMV 2260" }, { PCI_CHIP_RV635_9590, "ATI Radeon HD 3600 Series" }, { PCI_CHIP_RV635_9596, "ATI Radeon HD 3650 AGP" }, { PCI_CHIP_RV635_9597, "ATI Radeon HD 3600 PRO" }, { PCI_CHIP_RV635_9598, "ATI Radeon HD 3600 XT" }, { PCI_CHIP_RV635_9599, "ATI Radeon HD 3600 PRO" }, { PCI_CHIP_RV635_9591, "ATI Mobility Radeon HD 3650" }, { PCI_CHIP_RV635_9593, "ATI Mobility Radeon HD 3670" }, { PCI_CHIP_RV635_9595, "ATI Mobility FireGL V5700" }, { PCI_CHIP_RV635_959B, "ATI Mobility FireGL V5725" }, { PCI_CHIP_RS780_9610, "ATI Radeon HD 3200 Graphics" }, { PCI_CHIP_RS780_9611, "ATI Radeon 3100 Graphics" }, { PCI_CHIP_RS780_9612, "ATI Radeon HD 3200 Graphics" }, { PCI_CHIP_RS780_9613, "ATI Radeon 3100 Graphics" }, { PCI_CHIP_RS780_9614, "ATI Radeon HD 3300 Graphics" }, { PCI_CHIP_RS780_9615, "ATI Radeon HD 3200 Graphics" }, { PCI_CHIP_RS780_9616, "ATI Radeon 3000 Graphics" }, { PCI_CHIP_SUMO_9640, "SUMO" }, { PCI_CHIP_SUMO_9641, "SUMO" }, { PCI_CHIP_SUMO2_9642, "SUMO2" }, { PCI_CHIP_SUMO2_9643, "SUMO2" }, { PCI_CHIP_SUMO2_9644, "SUMO2" }, { PCI_CHIP_SUMO2_9645, "SUMO2" }, { PCI_CHIP_SUMO_9647, "SUMO" }, { PCI_CHIP_SUMO_9648, "SUMO" }, { PCI_CHIP_SUMO2_9649, "SUMO2" }, { PCI_CHIP_SUMO_964A, "SUMO" }, { PCI_CHIP_SUMO_964B, "SUMO" }, { PCI_CHIP_SUMO_964C, "SUMO" }, { PCI_CHIP_SUMO_964E, "SUMO" }, { PCI_CHIP_SUMO_964F, "SUMO" }, { PCI_CHIP_RS880_9710, "ATI Radeon HD 4200" }, { PCI_CHIP_RS880_9711, "ATI Radeon 4100" }, { PCI_CHIP_RS880_9712, "ATI Mobility Radeon HD 4200" }, { PCI_CHIP_RS880_9713, "ATI Mobility Radeon 4100" }, { PCI_CHIP_RS880_9714, "ATI Radeon HD 4290" }, { PCI_CHIP_RS880_9715, "ATI Radeon HD 4250" }, { PCI_CHIP_PALM_9802, "AMD Radeon HD 6310 Graphics" }, { PCI_CHIP_PALM_9803, "AMD Radeon HD 6310 Graphics" }, { PCI_CHIP_PALM_9804, "AMD Radeon HD 6250 Graphics" }, { PCI_CHIP_PALM_9805, "AMD Radeon HD 6250 Graphics" }, { PCI_CHIP_PALM_9806, "AMD Radeon HD 6300 Series Graphics" }, { PCI_CHIP_PALM_9807, "AMD Radeon HD 6200 Series Graphics" }, { PCI_CHIP_PALM_9808, "PALM" }, { PCI_CHIP_PALM_9809, "PALM" }, { PCI_CHIP_PALM_980A, "PALM" }, { PCI_CHIP_CYPRESS_6880, "CYPRESS" }, { PCI_CHIP_CYPRESS_6888, "ATI FirePro (FireGL) Graphics Adapter" }, { PCI_CHIP_CYPRESS_6889, "ATI FirePro (FireGL) Graphics Adapter" }, { PCI_CHIP_CYPRESS_688A, "ATI FirePro (FireGL) Graphics Adapter" }, { PCI_CHIP_CYPRESS_688C, "AMD Firestream 9370" }, { PCI_CHIP_CYPRESS_688D, "AMD Firestream 9350" }, { PCI_CHIP_CYPRESS_6898, "ATI Radeon HD 5800 Series" }, { PCI_CHIP_CYPRESS_6899, "ATI Radeon HD 5800 Series" }, { PCI_CHIP_CYPRESS_689B, "ATI Radeon HD 5800 Series" }, { PCI_CHIP_CYPRESS_689E, "ATI Radeon HD 5800 Series" }, { PCI_CHIP_HEMLOCK_689C, "ATI Radeon HD 5900 Series" }, { PCI_CHIP_HEMLOCK_689D, "ATI Radeon HD 5900 Series" }, { PCI_CHIP_JUNIPER_68A0, "ATI Mobility Radeon HD 5800 Series" }, { PCI_CHIP_JUNIPER_68A1, "ATI Mobility Radeon HD 5800 Series" }, { PCI_CHIP_JUNIPER_68A8, "ATI FirePro (FireGL) Graphics Adapter" }, { PCI_CHIP_JUNIPER_68A9, "ATI FirePro (FireGL) Graphics Adapter" }, { PCI_CHIP_JUNIPER_68B0, "ATI Mobility Radeon HD 5800 Series" }, { PCI_CHIP_JUNIPER_68B8, "ATI Radeon HD 5700 Series" }, { PCI_CHIP_JUNIPER_68B9, "ATI Radeon HD 5700 Series" }, { PCI_CHIP_JUNIPER_68BA, "ATI Radeon HD 6700 Series" }, { PCI_CHIP_JUNIPER_68BE, "ATI Radeon HD 5700 Series" }, { PCI_CHIP_JUNIPER_68BF, "ATI Radeon HD 6700 Series" }, { PCI_CHIP_REDWOOD_68C0, "ATI Mobility Radeon HD 5000 Series" }, { PCI_CHIP_REDWOOD_68C1, "ATI Mobility Radeon HD 5000 Series" }, { PCI_CHIP_REDWOOD_68C7, "ATI Mobility Radeon HD 5570" }, { PCI_CHIP_REDWOOD_68C8, "ATI FirePro (FireGL) Graphics Adapter" }, { PCI_CHIP_REDWOOD_68C9, "ATI FirePro (FireGL) Graphics Adapter" }, { PCI_CHIP_REDWOOD_68D8, "ATI Radeon HD 5670" }, { PCI_CHIP_REDWOOD_68D9, "ATI Radeon HD 5570" }, { PCI_CHIP_REDWOOD_68DA, "ATI Radeon HD 5500 Series" }, { PCI_CHIP_REDWOOD_68DE, "REDWOOD" }, { PCI_CHIP_CEDAR_68E0, "ATI Mobility Radeon HD 5000 Series" }, { PCI_CHIP_CEDAR_68E1, "ATI Mobility Radeon HD 5000 Series" }, { PCI_CHIP_CEDAR_68E4, "ATI Mobility Radeon Graphics" }, { PCI_CHIP_CEDAR_68E5, "ATI Mobility Radeon Graphics" }, { PCI_CHIP_CEDAR_68E8, "CEDAR" }, { PCI_CHIP_CEDAR_68E9, "ATI FirePro (FireGL) Graphics Adapter" }, { PCI_CHIP_CEDAR_68F1, "ATI FirePro (FireGL) Graphics Adapter" }, { PCI_CHIP_CEDAR_68F2, "ATI FirePro 2270" }, { PCI_CHIP_CEDAR_68F8, "CEDAR" }, { PCI_CHIP_CEDAR_68F9, "ATI Radeon HD 5450" }, { PCI_CHIP_CEDAR_68FA, "CEDAR" }, { PCI_CHIP_CEDAR_68FE, "CEDAR" }, { PCI_CHIP_CAYMAN_6700, "CAYMAN" }, { PCI_CHIP_CAYMAN_6701, "CAYMAN" }, { PCI_CHIP_CAYMAN_6702, "CAYMAN" }, { PCI_CHIP_CAYMAN_6703, "CAYMAN" }, { PCI_CHIP_CAYMAN_6704, "CAYMAN" }, { PCI_CHIP_CAYMAN_6705, "CAYMAN" }, { PCI_CHIP_CAYMAN_6706, "CAYMAN" }, { PCI_CHIP_CAYMAN_6707, "CAYMAN" }, { PCI_CHIP_CAYMAN_6708, "CAYMAN" }, { PCI_CHIP_CAYMAN_6709, "CAYMAN" }, { PCI_CHIP_CAYMAN_6718, "AMD Radeon HD 6900 Series" }, { PCI_CHIP_CAYMAN_6719, "AMD Radeon HD 6900 Series" }, { PCI_CHIP_CAYMAN_671C, "CAYMAN" }, { PCI_CHIP_CAYMAN_671D, "CAYMAN" }, { PCI_CHIP_CAYMAN_671F, "CAYMAN" }, { PCI_CHIP_BARTS_6720, "AMD Radeon HD 6900M Series" }, { PCI_CHIP_BARTS_6721, "Mobility Radeon HD 6000 Series" }, { PCI_CHIP_BARTS_6722, "BARTS" }, { PCI_CHIP_BARTS_6723, "BARTS" }, { PCI_CHIP_BARTS_6724, "Mobility Radeon HD 6000 Series" }, { PCI_CHIP_BARTS_6725, "Mobility Radeon HD 6000 Series" }, { PCI_CHIP_BARTS_6726, "BARTS" }, { PCI_CHIP_BARTS_6727, "BARTS" }, { PCI_CHIP_BARTS_6728, "BARTS" }, { PCI_CHIP_BARTS_6729, "BARTS" }, { PCI_CHIP_BARTS_6738, "AMD Radeon HD 6800 Series" }, { PCI_CHIP_BARTS_6739, "AMD Radeon HD 6800 Series" }, { PCI_CHIP_BARTS_673E, "AMD Radeon HD 6700 Series" }, { PCI_CHIP_TURKS_6740, "TURKS" }, { PCI_CHIP_TURKS_6741, "TURKS" }, { PCI_CHIP_TURKS_6742, "TURKS" }, { PCI_CHIP_TURKS_6743, "TURKS" }, { PCI_CHIP_TURKS_6744, "TURKS" }, { PCI_CHIP_TURKS_6745, "TURKS" }, { PCI_CHIP_TURKS_6746, "TURKS" }, { PCI_CHIP_TURKS_6747, "TURKS" }, { PCI_CHIP_TURKS_6748, "TURKS" }, { PCI_CHIP_TURKS_6749, "TURKS" }, { PCI_CHIP_TURKS_674A, "TURKS" }, { PCI_CHIP_TURKS_6750, "TURKS" }, { PCI_CHIP_TURKS_6751, "TURKS" }, { PCI_CHIP_TURKS_6758, "TURKS" }, { PCI_CHIP_TURKS_6759, "TURKS" }, { PCI_CHIP_TURKS_675B, "TURKS" }, { PCI_CHIP_TURKS_675D, "TURKS" }, { PCI_CHIP_TURKS_675F, "TURKS" }, { PCI_CHIP_TURKS_6840, "TURKS" }, { PCI_CHIP_TURKS_6841, "TURKS" }, { PCI_CHIP_TURKS_6842, "TURKS" }, { PCI_CHIP_TURKS_6843, "TURKS" }, { PCI_CHIP_TURKS_6849, "TURKS" }, { PCI_CHIP_TURKS_6850, "TURKS" }, { PCI_CHIP_TURKS_6858, "TURKS" }, { PCI_CHIP_TURKS_6859, "TURKS" }, { PCI_CHIP_CAICOS_6760, "CAICOS" }, { PCI_CHIP_CAICOS_6761, "CAICOS" }, { PCI_CHIP_CAICOS_6762, "CAICOS" }, { PCI_CHIP_CAICOS_6763, "CAICOS" }, { PCI_CHIP_CAICOS_6764, "CAICOS" }, { PCI_CHIP_CAICOS_6765, "CAICOS" }, { PCI_CHIP_CAICOS_6766, "CAICOS" }, { PCI_CHIP_CAICOS_6767, "CAICOS" }, { PCI_CHIP_CAICOS_6768, "CAICOS" }, { PCI_CHIP_CAICOS_6770, "CAICOS" }, { PCI_CHIP_CAICOS_6771, "CAICOS" }, { PCI_CHIP_CAICOS_6772, "CAICOS" }, { PCI_CHIP_CAICOS_6778, "CAICOS" }, { PCI_CHIP_CAICOS_6779, "CAICOS" }, { PCI_CHIP_CAICOS_677B, "CAICOS" }, { PCI_CHIP_ARUBA_9900, "ARUBA" }, { PCI_CHIP_ARUBA_9901, "ARUBA" }, { PCI_CHIP_ARUBA_9903, "ARUBA" }, { PCI_CHIP_ARUBA_9904, "ARUBA" }, { PCI_CHIP_ARUBA_9905, "ARUBA" }, { PCI_CHIP_ARUBA_9906, "ARUBA" }, { PCI_CHIP_ARUBA_9907, "ARUBA" }, { PCI_CHIP_ARUBA_9908, "ARUBA" }, { PCI_CHIP_ARUBA_9909, "ARUBA" }, { PCI_CHIP_ARUBA_990A, "ARUBA" }, { PCI_CHIP_ARUBA_990B, "ARUBA" }, { PCI_CHIP_ARUBA_990C, "ARUBA" }, { PCI_CHIP_ARUBA_990D, "ARUBA" }, { PCI_CHIP_ARUBA_990E, "ARUBA" }, { PCI_CHIP_ARUBA_990F, "ARUBA" }, { PCI_CHIP_ARUBA_9910, "ARUBA" }, { PCI_CHIP_ARUBA_9913, "ARUBA" }, { PCI_CHIP_ARUBA_9917, "ARUBA" }, { PCI_CHIP_ARUBA_9918, "ARUBA" }, { PCI_CHIP_ARUBA_9919, "ARUBA" }, { PCI_CHIP_ARUBA_9990, "ARUBA" }, { PCI_CHIP_ARUBA_9991, "ARUBA" }, { PCI_CHIP_ARUBA_9992, "ARUBA" }, { PCI_CHIP_ARUBA_9993, "ARUBA" }, { PCI_CHIP_ARUBA_9994, "ARUBA" }, { PCI_CHIP_ARUBA_9995, "ARUBA" }, { PCI_CHIP_ARUBA_9996, "ARUBA" }, { PCI_CHIP_ARUBA_9997, "ARUBA" }, { PCI_CHIP_ARUBA_9998, "ARUBA" }, { PCI_CHIP_ARUBA_9999, "ARUBA" }, { PCI_CHIP_ARUBA_999A, "ARUBA" }, { PCI_CHIP_ARUBA_999B, "ARUBA" }, { PCI_CHIP_ARUBA_999C, "ARUBA" }, { PCI_CHIP_ARUBA_999D, "ARUBA" }, { PCI_CHIP_ARUBA_99A0, "ARUBA" }, { PCI_CHIP_ARUBA_99A2, "ARUBA" }, { PCI_CHIP_ARUBA_99A4, "ARUBA" }, { PCI_CHIP_TAHITI_6780, "TAHITI" }, { PCI_CHIP_TAHITI_6784, "TAHITI" }, { PCI_CHIP_TAHITI_6788, "TAHITI" }, { PCI_CHIP_TAHITI_678A, "TAHITI" }, { PCI_CHIP_TAHITI_6790, "TAHITI" }, { PCI_CHIP_TAHITI_6791, "TAHITI" }, { PCI_CHIP_TAHITI_6792, "TAHITI" }, { PCI_CHIP_TAHITI_6798, "TAHITI" }, { PCI_CHIP_TAHITI_6799, "TAHITI" }, { PCI_CHIP_TAHITI_679A, "TAHITI" }, { PCI_CHIP_TAHITI_679B, "TAHITI" }, { PCI_CHIP_TAHITI_679E, "TAHITI" }, { PCI_CHIP_TAHITI_679F, "TAHITI" }, { PCI_CHIP_PITCAIRN_6800, "PITCAIRN" }, { PCI_CHIP_PITCAIRN_6801, "PITCAIRN" }, { PCI_CHIP_PITCAIRN_6802, "PITCAIRN" }, { PCI_CHIP_PITCAIRN_6806, "PITCAIRN" }, { PCI_CHIP_PITCAIRN_6808, "PITCAIRN" }, { PCI_CHIP_PITCAIRN_6809, "PITCAIRN" }, { PCI_CHIP_PITCAIRN_6810, "PITCAIRN" }, { PCI_CHIP_PITCAIRN_6811, "PITCAIRN" }, { PCI_CHIP_PITCAIRN_6816, "PITCAIRN" }, { PCI_CHIP_PITCAIRN_6817, "PITCAIRN" }, { PCI_CHIP_PITCAIRN_6818, "PITCAIRN" }, { PCI_CHIP_PITCAIRN_6819, "PITCAIRN" }, { PCI_CHIP_PITCAIRN_684C, "PITCAIRN" }, { PCI_CHIP_VERDE_6820, "VERDE" }, { PCI_CHIP_VERDE_6821, "VERDE" }, { PCI_CHIP_VERDE_6822, "VERDE" }, { PCI_CHIP_VERDE_6823, "VERDE" }, { PCI_CHIP_VERDE_6824, "VERDE" }, { PCI_CHIP_VERDE_6825, "VERDE" }, { PCI_CHIP_VERDE_6826, "VERDE" }, { PCI_CHIP_VERDE_6827, "VERDE" }, { PCI_CHIP_VERDE_6828, "VERDE" }, { PCI_CHIP_VERDE_6829, "VERDE" }, { PCI_CHIP_VERDE_682A, "VERDE" }, { PCI_CHIP_VERDE_682B, "VERDE" }, { PCI_CHIP_VERDE_682D, "VERDE" }, { PCI_CHIP_VERDE_682F, "VERDE" }, { PCI_CHIP_VERDE_6830, "VERDE" }, { PCI_CHIP_VERDE_6831, "VERDE" }, { PCI_CHIP_VERDE_6835, "VERDE" }, { PCI_CHIP_VERDE_6837, "VERDE" }, { PCI_CHIP_VERDE_6838, "VERDE" }, { PCI_CHIP_VERDE_6839, "VERDE" }, { PCI_CHIP_VERDE_683B, "VERDE" }, { PCI_CHIP_VERDE_683D, "VERDE" }, { PCI_CHIP_VERDE_683F, "VERDE" }, { PCI_CHIP_OLAND_6600, "OLAND" }, { PCI_CHIP_OLAND_6601, "OLAND" }, { PCI_CHIP_OLAND_6602, "OLAND" }, { PCI_CHIP_OLAND_6603, "OLAND" }, { PCI_CHIP_OLAND_6606, "OLAND" }, { PCI_CHIP_OLAND_6607, "OLAND" }, { PCI_CHIP_OLAND_6610, "OLAND" }, { PCI_CHIP_OLAND_6611, "OLAND" }, { PCI_CHIP_OLAND_6613, "OLAND" }, { PCI_CHIP_OLAND_6620, "OLAND" }, { PCI_CHIP_OLAND_6621, "OLAND" }, { PCI_CHIP_OLAND_6623, "OLAND" }, { PCI_CHIP_OLAND_6631, "OLAND" }, { PCI_CHIP_HAINAN_6660, "HAINAN" }, { PCI_CHIP_HAINAN_6663, "HAINAN" }, { PCI_CHIP_HAINAN_6664, "HAINAN" }, { PCI_CHIP_HAINAN_6665, "HAINAN" }, { PCI_CHIP_HAINAN_6667, "HAINAN" }, { PCI_CHIP_HAINAN_666F, "HAINAN" }, { PCI_CHIP_BONAIRE_6640, "BONAIRE" }, { PCI_CHIP_BONAIRE_6641, "BONAIRE" }, { PCI_CHIP_BONAIRE_6649, "BONAIRE" }, { PCI_CHIP_BONAIRE_6650, "BONAIRE" }, { PCI_CHIP_BONAIRE_6651, "BONAIRE" }, { PCI_CHIP_BONAIRE_6658, "BONAIRE" }, { PCI_CHIP_BONAIRE_665C, "BONAIRE" }, { PCI_CHIP_BONAIRE_665D, "BONAIRE" }, { PCI_CHIP_KABINI_9830, "KABINI" }, { PCI_CHIP_KABINI_9831, "KABINI" }, { PCI_CHIP_KABINI_9832, "KABINI" }, { PCI_CHIP_KABINI_9833, "KABINI" }, { PCI_CHIP_KABINI_9834, "KABINI" }, { PCI_CHIP_KABINI_9835, "KABINI" }, { PCI_CHIP_KABINI_9836, "KABINI" }, { PCI_CHIP_KABINI_9837, "KABINI" }, { PCI_CHIP_KABINI_9838, "KABINI" }, { PCI_CHIP_KABINI_9839, "KABINI" }, { PCI_CHIP_KABINI_983A, "KABINI" }, { PCI_CHIP_KABINI_983B, "KABINI" }, { PCI_CHIP_KABINI_983C, "KABINI" }, { PCI_CHIP_KABINI_983D, "KABINI" }, { PCI_CHIP_KABINI_983E, "KABINI" }, { PCI_CHIP_KABINI_983F, "KABINI" }, { PCI_CHIP_KAVERI_1304, "KAVERI" }, { PCI_CHIP_KAVERI_1305, "KAVERI" }, { PCI_CHIP_KAVERI_1306, "KAVERI" }, { PCI_CHIP_KAVERI_1307, "KAVERI" }, { PCI_CHIP_KAVERI_1309, "KAVERI" }, { PCI_CHIP_KAVERI_130A, "KAVERI" }, { PCI_CHIP_KAVERI_130B, "KAVERI" }, { PCI_CHIP_KAVERI_130C, "KAVERI" }, { PCI_CHIP_KAVERI_130D, "KAVERI" }, { PCI_CHIP_KAVERI_130E, "KAVERI" }, { PCI_CHIP_KAVERI_130F, "KAVERI" }, { PCI_CHIP_KAVERI_1310, "KAVERI" }, { PCI_CHIP_KAVERI_1311, "KAVERI" }, { PCI_CHIP_KAVERI_1312, "KAVERI" }, { PCI_CHIP_KAVERI_1313, "KAVERI" }, { PCI_CHIP_KAVERI_1315, "KAVERI" }, { PCI_CHIP_KAVERI_1316, "KAVERI" }, { PCI_CHIP_KAVERI_1317, "KAVERI" }, { PCI_CHIP_KAVERI_131B, "KAVERI" }, { PCI_CHIP_KAVERI_131C, "KAVERI" }, { PCI_CHIP_KAVERI_131D, "KAVERI" }, { PCI_CHIP_HAWAII_67A0, "HAWAII" }, { PCI_CHIP_HAWAII_67A1, "HAWAII" }, { PCI_CHIP_HAWAII_67A2, "HAWAII" }, { PCI_CHIP_HAWAII_67A8, "HAWAII" }, { PCI_CHIP_HAWAII_67A9, "HAWAII" }, { PCI_CHIP_HAWAII_67AA, "HAWAII" }, { PCI_CHIP_HAWAII_67B0, "HAWAII" }, { PCI_CHIP_HAWAII_67B1, "HAWAII" }, { PCI_CHIP_HAWAII_67B8, "HAWAII" }, { PCI_CHIP_HAWAII_67B9, "HAWAII" }, { PCI_CHIP_HAWAII_67BA, "HAWAII" }, { PCI_CHIP_HAWAII_67BE, "HAWAII" }, { -1, NULL } }; xf86-video-ati-7.3.0/src/ati_pciids_gen.h0000644000175000017500000006336312256365422015037 00000000000000#define PCI_CHIP_RV380_3150 0x3150 #define PCI_CHIP_RV380_3151 0x3151 #define PCI_CHIP_RV380_3152 0x3152 #define PCI_CHIP_RV380_3154 0x3154 #define PCI_CHIP_RV380_3155 0x3155 #define PCI_CHIP_RV380_3E50 0x3E50 #define PCI_CHIP_RV380_3E54 0x3E54 #define PCI_CHIP_RS100_4136 0x4136 #define PCI_CHIP_RS200_4137 0x4137 #define PCI_CHIP_R300_AD 0x4144 #define PCI_CHIP_R300_AE 0x4145 #define PCI_CHIP_R300_AF 0x4146 #define PCI_CHIP_R300_AG 0x4147 #define PCI_CHIP_R350_AH 0x4148 #define PCI_CHIP_R350_AI 0x4149 #define PCI_CHIP_R350_AJ 0x414A #define PCI_CHIP_R350_AK 0x414B #define PCI_CHIP_RV350_AP 0x4150 #define PCI_CHIP_RV350_AQ 0x4151 #define PCI_CHIP_RV360_AR 0x4152 #define PCI_CHIP_RV350_AS 0x4153 #define PCI_CHIP_RV350_AT 0x4154 #define PCI_CHIP_RV350_4155 0x4155 #define PCI_CHIP_RV350_AV 0x4156 #define PCI_CHIP_MACH32 0x4158 #define PCI_CHIP_RS250_4237 0x4237 #define PCI_CHIP_R200_BB 0x4242 #define PCI_CHIP_RS100_4336 0x4336 #define PCI_CHIP_RS200_4337 0x4337 #define PCI_CHIP_MACH64CT 0x4354 #define PCI_CHIP_MACH64CX 0x4358 #define PCI_CHIP_RS250_4437 0x4437 #define PCI_CHIP_MACH64ET 0x4554 #define PCI_CHIP_MACH64GB 0x4742 #define PCI_CHIP_MACH64GD 0x4744 #define PCI_CHIP_MACH64GI 0x4749 #define PCI_CHIP_MACH64GL 0x474C #define PCI_CHIP_MACH64GM 0x474D #define PCI_CHIP_MACH64GN 0x474E #define PCI_CHIP_MACH64GO 0x474F #define PCI_CHIP_MACH64GP 0x4750 #define PCI_CHIP_MACH64GQ 0x4751 #define PCI_CHIP_MACH64GR 0x4752 #define PCI_CHIP_MACH64GS 0x4753 #define PCI_CHIP_MACH64GT 0x4754 #define PCI_CHIP_MACH64GU 0x4755 #define PCI_CHIP_MACH64GV 0x4756 #define PCI_CHIP_MACH64GW 0x4757 #define PCI_CHIP_MACH64GX 0x4758 #define PCI_CHIP_MACH64GY 0x4759 #define PCI_CHIP_MACH64GZ 0x475A #define PCI_CHIP_RV250_If 0x4966 #define PCI_CHIP_RV250_Ig 0x4967 #define PCI_CHIP_R420_JH 0x4A48 #define PCI_CHIP_R420_JI 0x4A49 #define PCI_CHIP_R420_JJ 0x4A4A #define PCI_CHIP_R420_JK 0x4A4B #define PCI_CHIP_R420_JL 0x4A4C #define PCI_CHIP_R420_JM 0x4A4D #define PCI_CHIP_R420_JN 0x4A4E #define PCI_CHIP_R420_4A4F 0x4A4F #define PCI_CHIP_R420_JP 0x4A50 #define PCI_CHIP_R420_JT 0x4A54 #define PCI_CHIP_R481_4B48 0x4B48 #define PCI_CHIP_R481_4B49 0x4B49 #define PCI_CHIP_R481_4B4A 0x4B4A #define PCI_CHIP_R481_4B4B 0x4B4B #define PCI_CHIP_R481_4B4C 0x4B4C #define PCI_CHIP_MACH64LB 0x4C42 #define PCI_CHIP_MACH64LD 0x4C44 #define PCI_CHIP_RAGE128LE 0x4C45 #define PCI_CHIP_RAGE128LF 0x4C46 #define PCI_CHIP_MACH64LG 0x4C47 #define PCI_CHIP_MACH64LI 0x4C49 #define PCI_CHIP_MACH64LM 0x4C4D #define PCI_CHIP_MACH64LN 0x4C4E #define PCI_CHIP_MACH64LP 0x4C50 #define PCI_CHIP_MACH64LQ 0x4C51 #define PCI_CHIP_MACH64LR 0x4C52 #define PCI_CHIP_MACH64LS 0x4C53 #define PCI_CHIP_RADEON_LW 0x4C57 #define PCI_CHIP_RADEON_LX 0x4C58 #define PCI_CHIP_RADEON_LY 0x4C59 #define PCI_CHIP_RADEON_LZ 0x4C5A #define PCI_CHIP_RV250_Ld 0x4C64 #define PCI_CHIP_RV250_Lf 0x4C66 #define PCI_CHIP_RV250_Lg 0x4C67 #define PCI_CHIP_RV280_4C6E 0x4C6E #define PCI_CHIP_RAGE128MF 0x4D46 #define PCI_CHIP_RAGE128ML 0x4D4C #define PCI_CHIP_R300_ND 0x4E44 #define PCI_CHIP_R300_NE 0x4E45 #define PCI_CHIP_R300_NF 0x4E46 #define PCI_CHIP_R300_NG 0x4E47 #define PCI_CHIP_R350_NH 0x4E48 #define PCI_CHIP_R350_NI 0x4E49 #define PCI_CHIP_R360_NJ 0x4E4A #define PCI_CHIP_R350_NK 0x4E4B #define PCI_CHIP_RV350_NP 0x4E50 #define PCI_CHIP_RV350_NQ 0x4E51 #define PCI_CHIP_RV350_NR 0x4E52 #define PCI_CHIP_RV350_NS 0x4E53 #define PCI_CHIP_RV350_NT 0x4E54 #define PCI_CHIP_RV350_NV 0x4E56 #define PCI_CHIP_RAGE128PA 0x5041 #define PCI_CHIP_RAGE128PB 0x5042 #define PCI_CHIP_RAGE128PC 0x5043 #define PCI_CHIP_RAGE128PD 0x5044 #define PCI_CHIP_RAGE128PE 0x5045 #define PCI_CHIP_RAGE128PF 0x5046 #define PCI_CHIP_RAGE128PG 0x5047 #define PCI_CHIP_RAGE128PH 0x5048 #define PCI_CHIP_RAGE128PI 0x5049 #define PCI_CHIP_RAGE128PJ 0x504A #define PCI_CHIP_RAGE128PK 0x504B #define PCI_CHIP_RAGE128PL 0x504C #define PCI_CHIP_RAGE128PM 0x504D #define PCI_CHIP_RAGE128PN 0x504E #define PCI_CHIP_RAGE128PO 0x504F #define PCI_CHIP_RAGE128PP 0x5050 #define PCI_CHIP_RAGE128PQ 0x5051 #define PCI_CHIP_RAGE128PR 0x5052 #define PCI_CHIP_RAGE128PS 0x5053 #define PCI_CHIP_RAGE128PT 0x5054 #define PCI_CHIP_RAGE128PU 0x5055 #define PCI_CHIP_RAGE128PV 0x5056 #define PCI_CHIP_RAGE128PW 0x5057 #define PCI_CHIP_RAGE128PX 0x5058 #define PCI_CHIP_RADEON_QD 0x5144 #define PCI_CHIP_RADEON_QE 0x5145 #define PCI_CHIP_RADEON_QF 0x5146 #define PCI_CHIP_RADEON_QG 0x5147 #define PCI_CHIP_R200_QH 0x5148 #define PCI_CHIP_R200_QL 0x514C #define PCI_CHIP_R200_QM 0x514D #define PCI_CHIP_RV200_QW 0x5157 #define PCI_CHIP_RV200_QX 0x5158 #define PCI_CHIP_RV100_QY 0x5159 #define PCI_CHIP_RV100_QZ 0x515A #define PCI_CHIP_RN50_515E 0x515E #define PCI_CHIP_RAGE128RE 0x5245 #define PCI_CHIP_RAGE128RF 0x5246 #define PCI_CHIP_RAGE128RG 0x5247 #define PCI_CHIP_RAGE128RK 0x524B #define PCI_CHIP_RAGE128RL 0x524C #define PCI_CHIP_RAGE128SE 0x5345 #define PCI_CHIP_RAGE128SF 0x5346 #define PCI_CHIP_RAGE128SG 0x5347 #define PCI_CHIP_RAGE128SH 0x5348 #define PCI_CHIP_RAGE128SK 0x534B #define PCI_CHIP_RAGE128SL 0x534C #define PCI_CHIP_RAGE128SM 0x534D #define PCI_CHIP_RAGE128SN 0x534E #define PCI_CHIP_RAGE128TF 0x5446 #define PCI_CHIP_RAGE128TL 0x544C #define PCI_CHIP_RAGE128TR 0x5452 #define PCI_CHIP_RAGE128TS 0x5453 #define PCI_CHIP_RAGE128TT 0x5454 #define PCI_CHIP_RAGE128TU 0x5455 #define PCI_CHIP_RV370_5460 0x5460 #define PCI_CHIP_RV370_5462 0x5462 #define PCI_CHIP_RV370_5464 0x5464 #define PCI_CHIP_R423_UH 0x5548 #define PCI_CHIP_R423_UI 0x5549 #define PCI_CHIP_R423_UJ 0x554A #define PCI_CHIP_R423_UK 0x554B #define PCI_CHIP_R430_554C 0x554C #define PCI_CHIP_R430_554D 0x554D #define PCI_CHIP_R430_554E 0x554E #define PCI_CHIP_R430_554F 0x554F #define PCI_CHIP_R423_5550 0x5550 #define PCI_CHIP_R423_UQ 0x5551 #define PCI_CHIP_R423_UR 0x5552 #define PCI_CHIP_R423_UT 0x5554 #define PCI_CHIP_RV410_564A 0x564A #define PCI_CHIP_RV410_564B 0x564B #define PCI_CHIP_RV410_564F 0x564F #define PCI_CHIP_RV410_5652 0x5652 #define PCI_CHIP_RV410_5653 0x5653 #define PCI_CHIP_RV410_5657 0x5657 #define PCI_CHIP_MACH64VT 0x5654 #define PCI_CHIP_MACH64VU 0x5655 #define PCI_CHIP_MACH64VV 0x5656 #define PCI_CHIP_RS300_5834 0x5834 #define PCI_CHIP_RS300_5835 0x5835 #define PCI_CHIP_RS480_5954 0x5954 #define PCI_CHIP_RS480_5955 0x5955 #define PCI_CHIP_RV280_5960 0x5960 #define PCI_CHIP_RV280_5961 0x5961 #define PCI_CHIP_RV280_5962 0x5962 #define PCI_CHIP_RV280_5964 0x5964 #define PCI_CHIP_RV280_5965 0x5965 #define PCI_CHIP_RN50_5969 0x5969 #define PCI_CHIP_RS482_5974 0x5974 #define PCI_CHIP_RS485_5975 0x5975 #define PCI_CHIP_RS400_5A41 0x5A41 #define PCI_CHIP_RS400_5A42 0x5A42 #define PCI_CHIP_RC410_5A61 0x5A61 #define PCI_CHIP_RC410_5A62 0x5A62 #define PCI_CHIP_RV370_5B60 0x5B60 #define PCI_CHIP_RV370_5B62 0x5B62 #define PCI_CHIP_RV370_5B63 0x5B63 #define PCI_CHIP_RV370_5B64 0x5B64 #define PCI_CHIP_RV370_5B65 0x5B65 #define PCI_CHIP_RV280_5C61 0x5C61 #define PCI_CHIP_RV280_5C63 0x5C63 #define PCI_CHIP_R430_5D48 0x5D48 #define PCI_CHIP_R430_5D49 0x5D49 #define PCI_CHIP_R430_5D4A 0x5D4A #define PCI_CHIP_R480_5D4C 0x5D4C #define PCI_CHIP_R480_5D4D 0x5D4D #define PCI_CHIP_R480_5D4E 0x5D4E #define PCI_CHIP_R480_5D4F 0x5D4F #define PCI_CHIP_R480_5D50 0x5D50 #define PCI_CHIP_R480_5D52 0x5D52 #define PCI_CHIP_R423_5D57 0x5D57 #define PCI_CHIP_RV410_5E48 0x5E48 #define PCI_CHIP_RV410_5E4A 0x5E4A #define PCI_CHIP_RV410_5E4B 0x5E4B #define PCI_CHIP_RV410_5E4C 0x5E4C #define PCI_CHIP_RV410_5E4D 0x5E4D #define PCI_CHIP_RV410_5E4F 0x5E4F #define PCI_CHIP_R520_7100 0x7100 #define PCI_CHIP_R520_7101 0x7101 #define PCI_CHIP_R520_7102 0x7102 #define PCI_CHIP_R520_7103 0x7103 #define PCI_CHIP_R520_7104 0x7104 #define PCI_CHIP_R520_7105 0x7105 #define PCI_CHIP_R520_7106 0x7106 #define PCI_CHIP_R520_7108 0x7108 #define PCI_CHIP_R520_7109 0x7109 #define PCI_CHIP_R520_710A 0x710A #define PCI_CHIP_R520_710B 0x710B #define PCI_CHIP_R520_710C 0x710C #define PCI_CHIP_R520_710E 0x710E #define PCI_CHIP_R520_710F 0x710F #define PCI_CHIP_RV515_7140 0x7140 #define PCI_CHIP_RV515_7141 0x7141 #define PCI_CHIP_RV515_7142 0x7142 #define PCI_CHIP_RV515_7143 0x7143 #define PCI_CHIP_RV515_7144 0x7144 #define PCI_CHIP_RV515_7145 0x7145 #define PCI_CHIP_RV515_7146 0x7146 #define PCI_CHIP_RV515_7147 0x7147 #define PCI_CHIP_RV515_7149 0x7149 #define PCI_CHIP_RV515_714A 0x714A #define PCI_CHIP_RV515_714B 0x714B #define PCI_CHIP_RV515_714C 0x714C #define PCI_CHIP_RV515_714D 0x714D #define PCI_CHIP_RV515_714E 0x714E #define PCI_CHIP_RV515_714F 0x714F #define PCI_CHIP_RV515_7151 0x7151 #define PCI_CHIP_RV515_7152 0x7152 #define PCI_CHIP_RV515_7153 0x7153 #define PCI_CHIP_RV515_715E 0x715E #define PCI_CHIP_RV515_715F 0x715F #define PCI_CHIP_RV515_7180 0x7180 #define PCI_CHIP_RV515_7181 0x7181 #define PCI_CHIP_RV515_7183 0x7183 #define PCI_CHIP_RV515_7186 0x7186 #define PCI_CHIP_RV515_7187 0x7187 #define PCI_CHIP_RV515_7188 0x7188 #define PCI_CHIP_RV515_718A 0x718A #define PCI_CHIP_RV515_718B 0x718B #define PCI_CHIP_RV515_718C 0x718C #define PCI_CHIP_RV515_718D 0x718D #define PCI_CHIP_RV515_718F 0x718F #define PCI_CHIP_RV515_7193 0x7193 #define PCI_CHIP_RV515_7196 0x7196 #define PCI_CHIP_RV515_719B 0x719B #define PCI_CHIP_RV515_719F 0x719F #define PCI_CHIP_RV530_71C0 0x71C0 #define PCI_CHIP_RV530_71C1 0x71C1 #define PCI_CHIP_RV530_71C2 0x71C2 #define PCI_CHIP_RV530_71C3 0x71C3 #define PCI_CHIP_RV530_71C4 0x71C4 #define PCI_CHIP_RV530_71C5 0x71C5 #define PCI_CHIP_RV530_71C6 0x71C6 #define PCI_CHIP_RV530_71C7 0x71C7 #define PCI_CHIP_RV530_71CD 0x71CD #define PCI_CHIP_RV530_71CE 0x71CE #define PCI_CHIP_RV530_71D2 0x71D2 #define PCI_CHIP_RV530_71D4 0x71D4 #define PCI_CHIP_RV530_71D5 0x71D5 #define PCI_CHIP_RV530_71D6 0x71D6 #define PCI_CHIP_RV530_71DA 0x71DA #define PCI_CHIP_RV530_71DE 0x71DE #define PCI_CHIP_RV515_7200 0x7200 #define PCI_CHIP_RV515_7210 0x7210 #define PCI_CHIP_RV515_7211 0x7211 #define PCI_CHIP_R580_7240 0x7240 #define PCI_CHIP_R580_7243 0x7243 #define PCI_CHIP_R580_7244 0x7244 #define PCI_CHIP_R580_7245 0x7245 #define PCI_CHIP_R580_7246 0x7246 #define PCI_CHIP_R580_7247 0x7247 #define PCI_CHIP_R580_7248 0x7248 #define PCI_CHIP_R580_7249 0x7249 #define PCI_CHIP_R580_724A 0x724A #define PCI_CHIP_R580_724B 0x724B #define PCI_CHIP_R580_724C 0x724C #define PCI_CHIP_R580_724D 0x724D #define PCI_CHIP_R580_724E 0x724E #define PCI_CHIP_R580_724F 0x724F #define PCI_CHIP_RV570_7280 0x7280 #define PCI_CHIP_RV560_7281 0x7281 #define PCI_CHIP_RV560_7283 0x7283 #define PCI_CHIP_R580_7284 0x7284 #define PCI_CHIP_RV560_7287 0x7287 #define PCI_CHIP_RV570_7288 0x7288 #define PCI_CHIP_RV570_7289 0x7289 #define PCI_CHIP_RV570_728B 0x728B #define PCI_CHIP_RV570_728C 0x728C #define PCI_CHIP_RV560_7290 0x7290 #define PCI_CHIP_RV560_7291 0x7291 #define PCI_CHIP_RV560_7293 0x7293 #define PCI_CHIP_RV560_7297 0x7297 #define PCI_CHIP_RS350_7834 0x7834 #define PCI_CHIP_RS350_7835 0x7835 #define PCI_CHIP_RS690_791E 0x791E #define PCI_CHIP_RS690_791F 0x791F #define PCI_CHIP_RS600_793F 0x793F #define PCI_CHIP_RS600_7941 0x7941 #define PCI_CHIP_RS600_7942 0x7942 #define PCI_CHIP_RS740_796C 0x796C #define PCI_CHIP_RS740_796D 0x796D #define PCI_CHIP_RS740_796E 0x796E #define PCI_CHIP_RS740_796F 0x796F #define PCI_CHIP_R600_9400 0x9400 #define PCI_CHIP_R600_9401 0x9401 #define PCI_CHIP_R600_9402 0x9402 #define PCI_CHIP_R600_9403 0x9403 #define PCI_CHIP_R600_9405 0x9405 #define PCI_CHIP_R600_940A 0x940A #define PCI_CHIP_R600_940B 0x940B #define PCI_CHIP_R600_940F 0x940F #define PCI_CHIP_RV770_9440 0x9440 #define PCI_CHIP_RV770_9441 0x9441 #define PCI_CHIP_RV770_9442 0x9442 #define PCI_CHIP_RV770_9443 0x9443 #define PCI_CHIP_RV770_9444 0x9444 #define PCI_CHIP_RV770_9446 0x9446 #define PCI_CHIP_RV770_944A 0x944A #define PCI_CHIP_RV770_944B 0x944B #define PCI_CHIP_RV770_944C 0x944C #define PCI_CHIP_RV770_944E 0x944E #define PCI_CHIP_RV770_9450 0x9450 #define PCI_CHIP_RV770_9452 0x9452 #define PCI_CHIP_RV770_9456 0x9456 #define PCI_CHIP_RV770_945A 0x945A #define PCI_CHIP_RV770_945B 0x945B #define PCI_CHIP_RV770_945E 0x945E #define PCI_CHIP_RV790_9460 0x9460 #define PCI_CHIP_RV790_9462 0x9462 #define PCI_CHIP_RV770_946A 0x946A #define PCI_CHIP_RV770_946B 0x946B #define PCI_CHIP_RV770_947A 0x947A #define PCI_CHIP_RV770_947B 0x947B #define PCI_CHIP_RV730_9480 0x9480 #define PCI_CHIP_RV730_9487 0x9487 #define PCI_CHIP_RV730_9488 0x9488 #define PCI_CHIP_RV730_9489 0x9489 #define PCI_CHIP_RV730_948A 0x948A #define PCI_CHIP_RV730_948F 0x948F #define PCI_CHIP_RV730_9490 0x9490 #define PCI_CHIP_RV730_9491 0x9491 #define PCI_CHIP_RV730_9495 0x9495 #define PCI_CHIP_RV730_9498 0x9498 #define PCI_CHIP_RV730_949C 0x949C #define PCI_CHIP_RV730_949E 0x949E #define PCI_CHIP_RV730_949F 0x949F #define PCI_CHIP_RV740_94A0 0x94A0 #define PCI_CHIP_RV740_94A1 0x94A1 #define PCI_CHIP_RV740_94A3 0x94A3 #define PCI_CHIP_RV740_94B1 0x94B1 #define PCI_CHIP_RV740_94B3 0x94B3 #define PCI_CHIP_RV740_94B4 0x94B4 #define PCI_CHIP_RV740_94B5 0x94B5 #define PCI_CHIP_RV740_94B9 0x94B9 #define PCI_CHIP_RV610_94C0 0x94C0 #define PCI_CHIP_RV610_94C1 0x94C1 #define PCI_CHIP_RV610_94C3 0x94C3 #define PCI_CHIP_RV610_94C4 0x94C4 #define PCI_CHIP_RV610_94C5 0x94C5 #define PCI_CHIP_RV610_94C6 0x94C6 #define PCI_CHIP_RV610_94C7 0x94C7 #define PCI_CHIP_RV610_94C8 0x94C8 #define PCI_CHIP_RV610_94C9 0x94C9 #define PCI_CHIP_RV610_94CB 0x94CB #define PCI_CHIP_RV610_94CC 0x94CC #define PCI_CHIP_RV610_94CD 0x94CD #define PCI_CHIP_RV670_9500 0x9500 #define PCI_CHIP_RV670_9501 0x9501 #define PCI_CHIP_RV670_9504 0x9504 #define PCI_CHIP_RV670_9505 0x9505 #define PCI_CHIP_RV670_9506 0x9506 #define PCI_CHIP_RV670_9507 0x9507 #define PCI_CHIP_RV670_9508 0x9508 #define PCI_CHIP_RV670_9509 0x9509 #define PCI_CHIP_RV670_950F 0x950F #define PCI_CHIP_RV670_9511 0x9511 #define PCI_CHIP_RV670_9515 0x9515 #define PCI_CHIP_RV670_9517 0x9517 #define PCI_CHIP_RV670_9519 0x9519 #define PCI_CHIP_RV710_9540 0x9540 #define PCI_CHIP_RV710_9541 0x9541 #define PCI_CHIP_RV710_9542 0x9542 #define PCI_CHIP_RV710_954E 0x954E #define PCI_CHIP_RV710_954F 0x954F #define PCI_CHIP_RV710_9552 0x9552 #define PCI_CHIP_RV710_9553 0x9553 #define PCI_CHIP_RV710_9555 0x9555 #define PCI_CHIP_RV710_9557 0x9557 #define PCI_CHIP_RV710_955F 0x955F #define PCI_CHIP_RV630_9580 0x9580 #define PCI_CHIP_RV630_9581 0x9581 #define PCI_CHIP_RV630_9583 0x9583 #define PCI_CHIP_RV630_9586 0x9586 #define PCI_CHIP_RV630_9587 0x9587 #define PCI_CHIP_RV630_9588 0x9588 #define PCI_CHIP_RV630_9589 0x9589 #define PCI_CHIP_RV630_958A 0x958A #define PCI_CHIP_RV630_958B 0x958B #define PCI_CHIP_RV630_958C 0x958C #define PCI_CHIP_RV630_958D 0x958D #define PCI_CHIP_RV630_958E 0x958E #define PCI_CHIP_RV630_958F 0x958F #define PCI_CHIP_RV620_95C0 0x95C0 #define PCI_CHIP_RV620_95C2 0x95C2 #define PCI_CHIP_RV620_95C4 0x95C4 #define PCI_CHIP_RV620_95C5 0x95C5 #define PCI_CHIP_RV620_95C6 0x95C6 #define PCI_CHIP_RV620_95C7 0x95C7 #define PCI_CHIP_RV620_95C9 0x95C9 #define PCI_CHIP_RV620_95CC 0x95CC #define PCI_CHIP_RV620_95CD 0x95CD #define PCI_CHIP_RV620_95CE 0x95CE #define PCI_CHIP_RV620_95CF 0x95CF #define PCI_CHIP_RV635_9590 0x9590 #define PCI_CHIP_RV635_9596 0x9596 #define PCI_CHIP_RV635_9597 0x9597 #define PCI_CHIP_RV635_9598 0x9598 #define PCI_CHIP_RV635_9599 0x9599 #define PCI_CHIP_RV635_9591 0x9591 #define PCI_CHIP_RV635_9593 0x9593 #define PCI_CHIP_RV635_9595 0x9595 #define PCI_CHIP_RV635_959B 0x959B #define PCI_CHIP_RS780_9610 0x9610 #define PCI_CHIP_RS780_9611 0x9611 #define PCI_CHIP_RS780_9612 0x9612 #define PCI_CHIP_RS780_9613 0x9613 #define PCI_CHIP_RS780_9614 0x9614 #define PCI_CHIP_RS780_9615 0x9615 #define PCI_CHIP_RS780_9616 0x9616 #define PCI_CHIP_SUMO_9640 0x9640 #define PCI_CHIP_SUMO_9641 0x9641 #define PCI_CHIP_SUMO2_9642 0x9642 #define PCI_CHIP_SUMO2_9643 0x9643 #define PCI_CHIP_SUMO2_9644 0x9644 #define PCI_CHIP_SUMO2_9645 0x9645 #define PCI_CHIP_SUMO_9647 0x9647 #define PCI_CHIP_SUMO_9648 0x9648 #define PCI_CHIP_SUMO2_9649 0x9649 #define PCI_CHIP_SUMO_964A 0x964A #define PCI_CHIP_SUMO_964B 0x964B #define PCI_CHIP_SUMO_964C 0x964C #define PCI_CHIP_SUMO_964E 0x964E #define PCI_CHIP_SUMO_964F 0x964F #define PCI_CHIP_RS880_9710 0x9710 #define PCI_CHIP_RS880_9711 0x9711 #define PCI_CHIP_RS880_9712 0x9712 #define PCI_CHIP_RS880_9713 0x9713 #define PCI_CHIP_RS880_9714 0x9714 #define PCI_CHIP_RS880_9715 0x9715 #define PCI_CHIP_PALM_9802 0x9802 #define PCI_CHIP_PALM_9803 0x9803 #define PCI_CHIP_PALM_9804 0x9804 #define PCI_CHIP_PALM_9805 0x9805 #define PCI_CHIP_PALM_9806 0x9806 #define PCI_CHIP_PALM_9807 0x9807 #define PCI_CHIP_PALM_9808 0x9808 #define PCI_CHIP_PALM_9809 0x9809 #define PCI_CHIP_PALM_980A 0x980A #define PCI_CHIP_CYPRESS_6880 0x6880 #define PCI_CHIP_CYPRESS_6888 0x6888 #define PCI_CHIP_CYPRESS_6889 0x6889 #define PCI_CHIP_CYPRESS_688A 0x688A #define PCI_CHIP_CYPRESS_688C 0x688C #define PCI_CHIP_CYPRESS_688D 0x688D #define PCI_CHIP_CYPRESS_6898 0x6898 #define PCI_CHIP_CYPRESS_6899 0x6899 #define PCI_CHIP_CYPRESS_689B 0x689B #define PCI_CHIP_CYPRESS_689E 0x689E #define PCI_CHIP_HEMLOCK_689C 0x689C #define PCI_CHIP_HEMLOCK_689D 0x689D #define PCI_CHIP_JUNIPER_68A0 0x68A0 #define PCI_CHIP_JUNIPER_68A1 0x68A1 #define PCI_CHIP_JUNIPER_68A8 0x68A8 #define PCI_CHIP_JUNIPER_68A9 0x68A9 #define PCI_CHIP_JUNIPER_68B0 0x68B0 #define PCI_CHIP_JUNIPER_68B8 0x68B8 #define PCI_CHIP_JUNIPER_68B9 0x68B9 #define PCI_CHIP_JUNIPER_68BA 0x68BA #define PCI_CHIP_JUNIPER_68BE 0x68BE #define PCI_CHIP_JUNIPER_68BF 0x68BF #define PCI_CHIP_REDWOOD_68C0 0x68C0 #define PCI_CHIP_REDWOOD_68C1 0x68C1 #define PCI_CHIP_REDWOOD_68C7 0x68C7 #define PCI_CHIP_REDWOOD_68C8 0x68C8 #define PCI_CHIP_REDWOOD_68C9 0x68C9 #define PCI_CHIP_REDWOOD_68D8 0x68D8 #define PCI_CHIP_REDWOOD_68D9 0x68D9 #define PCI_CHIP_REDWOOD_68DA 0x68DA #define PCI_CHIP_REDWOOD_68DE 0x68DE #define PCI_CHIP_CEDAR_68E0 0x68E0 #define PCI_CHIP_CEDAR_68E1 0x68E1 #define PCI_CHIP_CEDAR_68E4 0x68E4 #define PCI_CHIP_CEDAR_68E5 0x68E5 #define PCI_CHIP_CEDAR_68E8 0x68E8 #define PCI_CHIP_CEDAR_68E9 0x68E9 #define PCI_CHIP_CEDAR_68F1 0x68F1 #define PCI_CHIP_CEDAR_68F2 0x68F2 #define PCI_CHIP_CEDAR_68F8 0x68F8 #define PCI_CHIP_CEDAR_68F9 0x68F9 #define PCI_CHIP_CEDAR_68FA 0x68FA #define PCI_CHIP_CEDAR_68FE 0x68FE #define PCI_CHIP_CAYMAN_6700 0x6700 #define PCI_CHIP_CAYMAN_6701 0x6701 #define PCI_CHIP_CAYMAN_6702 0x6702 #define PCI_CHIP_CAYMAN_6703 0x6703 #define PCI_CHIP_CAYMAN_6704 0x6704 #define PCI_CHIP_CAYMAN_6705 0x6705 #define PCI_CHIP_CAYMAN_6706 0x6706 #define PCI_CHIP_CAYMAN_6707 0x6707 #define PCI_CHIP_CAYMAN_6708 0x6708 #define PCI_CHIP_CAYMAN_6709 0x6709 #define PCI_CHIP_CAYMAN_6718 0x6718 #define PCI_CHIP_CAYMAN_6719 0x6719 #define PCI_CHIP_CAYMAN_671C 0x671C #define PCI_CHIP_CAYMAN_671D 0x671D #define PCI_CHIP_CAYMAN_671F 0x671F #define PCI_CHIP_BARTS_6720 0x6720 #define PCI_CHIP_BARTS_6721 0x6721 #define PCI_CHIP_BARTS_6722 0x6722 #define PCI_CHIP_BARTS_6723 0x6723 #define PCI_CHIP_BARTS_6724 0x6724 #define PCI_CHIP_BARTS_6725 0x6725 #define PCI_CHIP_BARTS_6726 0x6726 #define PCI_CHIP_BARTS_6727 0x6727 #define PCI_CHIP_BARTS_6728 0x6728 #define PCI_CHIP_BARTS_6729 0x6729 #define PCI_CHIP_BARTS_6738 0x6738 #define PCI_CHIP_BARTS_6739 0x6739 #define PCI_CHIP_BARTS_673E 0x673E #define PCI_CHIP_TURKS_6740 0x6740 #define PCI_CHIP_TURKS_6741 0x6741 #define PCI_CHIP_TURKS_6742 0x6742 #define PCI_CHIP_TURKS_6743 0x6743 #define PCI_CHIP_TURKS_6744 0x6744 #define PCI_CHIP_TURKS_6745 0x6745 #define PCI_CHIP_TURKS_6746 0x6746 #define PCI_CHIP_TURKS_6747 0x6747 #define PCI_CHIP_TURKS_6748 0x6748 #define PCI_CHIP_TURKS_6749 0x6749 #define PCI_CHIP_TURKS_674A 0x674A #define PCI_CHIP_TURKS_6750 0x6750 #define PCI_CHIP_TURKS_6751 0x6751 #define PCI_CHIP_TURKS_6758 0x6758 #define PCI_CHIP_TURKS_6759 0x6759 #define PCI_CHIP_TURKS_675B 0x675B #define PCI_CHIP_TURKS_675D 0x675D #define PCI_CHIP_TURKS_675F 0x675F #define PCI_CHIP_TURKS_6840 0x6840 #define PCI_CHIP_TURKS_6841 0x6841 #define PCI_CHIP_TURKS_6842 0x6842 #define PCI_CHIP_TURKS_6843 0x6843 #define PCI_CHIP_TURKS_6849 0x6849 #define PCI_CHIP_TURKS_6850 0x6850 #define PCI_CHIP_TURKS_6858 0x6858 #define PCI_CHIP_TURKS_6859 0x6859 #define PCI_CHIP_CAICOS_6760 0x6760 #define PCI_CHIP_CAICOS_6761 0x6761 #define PCI_CHIP_CAICOS_6762 0x6762 #define PCI_CHIP_CAICOS_6763 0x6763 #define PCI_CHIP_CAICOS_6764 0x6764 #define PCI_CHIP_CAICOS_6765 0x6765 #define PCI_CHIP_CAICOS_6766 0x6766 #define PCI_CHIP_CAICOS_6767 0x6767 #define PCI_CHIP_CAICOS_6768 0x6768 #define PCI_CHIP_CAICOS_6770 0x6770 #define PCI_CHIP_CAICOS_6771 0x6771 #define PCI_CHIP_CAICOS_6772 0x6772 #define PCI_CHIP_CAICOS_6778 0x6778 #define PCI_CHIP_CAICOS_6779 0x6779 #define PCI_CHIP_CAICOS_677B 0x677B #define PCI_CHIP_ARUBA_9900 0x9900 #define PCI_CHIP_ARUBA_9901 0x9901 #define PCI_CHIP_ARUBA_9903 0x9903 #define PCI_CHIP_ARUBA_9904 0x9904 #define PCI_CHIP_ARUBA_9905 0x9905 #define PCI_CHIP_ARUBA_9906 0x9906 #define PCI_CHIP_ARUBA_9907 0x9907 #define PCI_CHIP_ARUBA_9908 0x9908 #define PCI_CHIP_ARUBA_9909 0x9909 #define PCI_CHIP_ARUBA_990A 0x990A #define PCI_CHIP_ARUBA_990B 0x990B #define PCI_CHIP_ARUBA_990C 0x990C #define PCI_CHIP_ARUBA_990D 0x990D #define PCI_CHIP_ARUBA_990E 0x990E #define PCI_CHIP_ARUBA_990F 0x990F #define PCI_CHIP_ARUBA_9910 0x9910 #define PCI_CHIP_ARUBA_9913 0x9913 #define PCI_CHIP_ARUBA_9917 0x9917 #define PCI_CHIP_ARUBA_9918 0x9918 #define PCI_CHIP_ARUBA_9919 0x9919 #define PCI_CHIP_ARUBA_9990 0x9990 #define PCI_CHIP_ARUBA_9991 0x9991 #define PCI_CHIP_ARUBA_9992 0x9992 #define PCI_CHIP_ARUBA_9993 0x9993 #define PCI_CHIP_ARUBA_9994 0x9994 #define PCI_CHIP_ARUBA_9995 0x9995 #define PCI_CHIP_ARUBA_9996 0x9996 #define PCI_CHIP_ARUBA_9997 0x9997 #define PCI_CHIP_ARUBA_9998 0x9998 #define PCI_CHIP_ARUBA_9999 0x9999 #define PCI_CHIP_ARUBA_999A 0x999A #define PCI_CHIP_ARUBA_999B 0x999B #define PCI_CHIP_ARUBA_999C 0x999C #define PCI_CHIP_ARUBA_999D 0x999D #define PCI_CHIP_ARUBA_99A0 0x99A0 #define PCI_CHIP_ARUBA_99A2 0x99A2 #define PCI_CHIP_ARUBA_99A4 0x99A4 #define PCI_CHIP_TAHITI_6780 0x6780 #define PCI_CHIP_TAHITI_6784 0x6784 #define PCI_CHIP_TAHITI_6788 0x6788 #define PCI_CHIP_TAHITI_678A 0x678A #define PCI_CHIP_TAHITI_6790 0x6790 #define PCI_CHIP_TAHITI_6791 0x6791 #define PCI_CHIP_TAHITI_6792 0x6792 #define PCI_CHIP_TAHITI_6798 0x6798 #define PCI_CHIP_TAHITI_6799 0x6799 #define PCI_CHIP_TAHITI_679A 0x679A #define PCI_CHIP_TAHITI_679B 0x679B #define PCI_CHIP_TAHITI_679E 0x679E #define PCI_CHIP_TAHITI_679F 0x679F #define PCI_CHIP_PITCAIRN_6800 0x6800 #define PCI_CHIP_PITCAIRN_6801 0x6801 #define PCI_CHIP_PITCAIRN_6802 0x6802 #define PCI_CHIP_PITCAIRN_6806 0x6806 #define PCI_CHIP_PITCAIRN_6808 0x6808 #define PCI_CHIP_PITCAIRN_6809 0x6809 #define PCI_CHIP_PITCAIRN_6810 0x6810 #define PCI_CHIP_PITCAIRN_6811 0x6811 #define PCI_CHIP_PITCAIRN_6816 0x6816 #define PCI_CHIP_PITCAIRN_6817 0x6817 #define PCI_CHIP_PITCAIRN_6818 0x6818 #define PCI_CHIP_PITCAIRN_6819 0x6819 #define PCI_CHIP_PITCAIRN_684C 0x684C #define PCI_CHIP_VERDE_6820 0x6820 #define PCI_CHIP_VERDE_6821 0x6821 #define PCI_CHIP_VERDE_6822 0x6822 #define PCI_CHIP_VERDE_6823 0x6823 #define PCI_CHIP_VERDE_6824 0x6824 #define PCI_CHIP_VERDE_6825 0x6825 #define PCI_CHIP_VERDE_6826 0x6826 #define PCI_CHIP_VERDE_6827 0x6827 #define PCI_CHIP_VERDE_6828 0x6828 #define PCI_CHIP_VERDE_6829 0x6829 #define PCI_CHIP_VERDE_682A 0x682A #define PCI_CHIP_VERDE_682B 0x682B #define PCI_CHIP_VERDE_682D 0x682D #define PCI_CHIP_VERDE_682F 0x682F #define PCI_CHIP_VERDE_6830 0x6830 #define PCI_CHIP_VERDE_6831 0x6831 #define PCI_CHIP_VERDE_6835 0x6835 #define PCI_CHIP_VERDE_6837 0x6837 #define PCI_CHIP_VERDE_6838 0x6838 #define PCI_CHIP_VERDE_6839 0x6839 #define PCI_CHIP_VERDE_683B 0x683B #define PCI_CHIP_VERDE_683D 0x683D #define PCI_CHIP_VERDE_683F 0x683F #define PCI_CHIP_OLAND_6600 0x6600 #define PCI_CHIP_OLAND_6601 0x6601 #define PCI_CHIP_OLAND_6602 0x6602 #define PCI_CHIP_OLAND_6603 0x6603 #define PCI_CHIP_OLAND_6606 0x6606 #define PCI_CHIP_OLAND_6607 0x6607 #define PCI_CHIP_OLAND_6610 0x6610 #define PCI_CHIP_OLAND_6611 0x6611 #define PCI_CHIP_OLAND_6613 0x6613 #define PCI_CHIP_OLAND_6620 0x6620 #define PCI_CHIP_OLAND_6621 0x6621 #define PCI_CHIP_OLAND_6623 0x6623 #define PCI_CHIP_OLAND_6631 0x6631 #define PCI_CHIP_HAINAN_6660 0x6660 #define PCI_CHIP_HAINAN_6663 0x6663 #define PCI_CHIP_HAINAN_6664 0x6664 #define PCI_CHIP_HAINAN_6665 0x6665 #define PCI_CHIP_HAINAN_6667 0x6667 #define PCI_CHIP_HAINAN_666F 0x666F #define PCI_CHIP_BONAIRE_6640 0x6640 #define PCI_CHIP_BONAIRE_6641 0x6641 #define PCI_CHIP_BONAIRE_6649 0x6649 #define PCI_CHIP_BONAIRE_6650 0x6650 #define PCI_CHIP_BONAIRE_6651 0x6651 #define PCI_CHIP_BONAIRE_6658 0x6658 #define PCI_CHIP_BONAIRE_665C 0x665C #define PCI_CHIP_BONAIRE_665D 0x665D #define PCI_CHIP_KABINI_9830 0x9830 #define PCI_CHIP_KABINI_9831 0x9831 #define PCI_CHIP_KABINI_9832 0x9832 #define PCI_CHIP_KABINI_9833 0x9833 #define PCI_CHIP_KABINI_9834 0x9834 #define PCI_CHIP_KABINI_9835 0x9835 #define PCI_CHIP_KABINI_9836 0x9836 #define PCI_CHIP_KABINI_9837 0x9837 #define PCI_CHIP_KABINI_9838 0x9838 #define PCI_CHIP_KABINI_9839 0x9839 #define PCI_CHIP_KABINI_983A 0x983A #define PCI_CHIP_KABINI_983B 0x983B #define PCI_CHIP_KABINI_983C 0x983C #define PCI_CHIP_KABINI_983D 0x983D #define PCI_CHIP_KABINI_983E 0x983E #define PCI_CHIP_KABINI_983F 0x983F #define PCI_CHIP_KAVERI_1304 0x1304 #define PCI_CHIP_KAVERI_1305 0x1305 #define PCI_CHIP_KAVERI_1306 0x1306 #define PCI_CHIP_KAVERI_1307 0x1307 #define PCI_CHIP_KAVERI_1309 0x1309 #define PCI_CHIP_KAVERI_130A 0x130A #define PCI_CHIP_KAVERI_130B 0x130B #define PCI_CHIP_KAVERI_130C 0x130C #define PCI_CHIP_KAVERI_130D 0x130D #define PCI_CHIP_KAVERI_130E 0x130E #define PCI_CHIP_KAVERI_130F 0x130F #define PCI_CHIP_KAVERI_1310 0x1310 #define PCI_CHIP_KAVERI_1311 0x1311 #define PCI_CHIP_KAVERI_1312 0x1312 #define PCI_CHIP_KAVERI_1313 0x1313 #define PCI_CHIP_KAVERI_1315 0x1315 #define PCI_CHIP_KAVERI_1316 0x1316 #define PCI_CHIP_KAVERI_1317 0x1317 #define PCI_CHIP_KAVERI_131B 0x131B #define PCI_CHIP_KAVERI_131C 0x131C #define PCI_CHIP_KAVERI_131D 0x131D #define PCI_CHIP_HAWAII_67A0 0x67A0 #define PCI_CHIP_HAWAII_67A1 0x67A1 #define PCI_CHIP_HAWAII_67A2 0x67A2 #define PCI_CHIP_HAWAII_67A8 0x67A8 #define PCI_CHIP_HAWAII_67A9 0x67A9 #define PCI_CHIP_HAWAII_67AA 0x67AA #define PCI_CHIP_HAWAII_67B0 0x67B0 #define PCI_CHIP_HAWAII_67B1 0x67B1 #define PCI_CHIP_HAWAII_67B8 0x67B8 #define PCI_CHIP_HAWAII_67B9 0x67B9 #define PCI_CHIP_HAWAII_67BA 0x67BA #define PCI_CHIP_HAWAII_67BE 0x67BE xf86-video-ati-7.3.0/src/radeon_misc.c0000664000175000017500000000436412177731114014347 00000000000000/* * Copyright 2000 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org * * 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 Marc Aurele La France not be used in advertising or * publicity pertaining to distribution of the software without specific, * written prior permission. Marc Aurele La France makes no representations * about the suitability of this software for any purpose. It is provided * "as-is" without express or implied warranty. * * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO * EVENT SHALL MARC AURELE LA FRANCE 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "radeon_probe.h" #include "radeon_version.h" #include "xf86.h" /* Module loader interface for subsidiary driver module */ static XF86ModuleVersionInfo RADEONVersionRec = { RADEON_DRIVER_NAME, MODULEVENDORSTRING, MODINFOSTRING1, MODINFOSTRING2, XORG_VERSION_CURRENT, RADEON_VERSION_MAJOR, RADEON_VERSION_MINOR, RADEON_VERSION_PATCH, ABI_CLASS_VIDEODRV, ABI_VIDEODRV_VERSION, MOD_CLASS_VIDEODRV, {0, 0, 0, 0} }; /* * RADEONSetup -- * * This function is called every time the module is loaded. */ static pointer RADEONSetup ( pointer Module, pointer Options, int *ErrorMajor, int *ErrorMinor ) { static Bool Inited = FALSE; if (!Inited) { Inited = TRUE; xf86AddDriver(&RADEON, Module, HaveDriverFuncs); } return (pointer)TRUE; } /* The following record must be called radeonModuleData */ _X_EXPORT XF86ModuleData radeonModuleData = { &RADEONVersionRec, RADEONSetup, NULL }; xf86-video-ati-7.3.0/src/radeon_glamor.h0000664000175000017500000000652212234257031014673 00000000000000/* * Copyright © 2011 Intel Corporation. * 2012 Advanced Micro Devices, 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. */ #ifndef RADEON_GLAMOR_H #define RADEON_GLAMOR_H #include "xf86xv.h" #ifdef USE_GLAMOR #include "radeon_surface.h" Bool radeon_glamor_pre_init(ScrnInfoPtr scrn); Bool radeon_glamor_init(ScreenPtr screen); Bool radeon_glamor_create_screen_resources(ScreenPtr screen); void radeon_glamor_free_screen(int scrnIndex, int flags); void radeon_glamor_flush(ScrnInfoPtr pScrn); Bool radeon_glamor_create_textured_pixmap(PixmapPtr pixmap); void radeon_glamor_exchange_buffers(PixmapPtr src, PixmapPtr dst); Bool radeon_glamor_pixmap_is_offscreen(PixmapPtr pixmap); XF86VideoAdaptorPtr radeon_glamor_xv_init(ScreenPtr pScreen, int num_adapt); struct radeon_pixmap { struct radeon_surface surface; struct radeon_bo *bo; uint32_t tiling_flags; int stride; }; #if HAS_DEVPRIVATEKEYREC extern DevPrivateKeyRec glamor_pixmap_index; #else extern int glamor_pixmap_index; #endif static inline struct radeon_pixmap *radeon_get_pixmap_private(PixmapPtr pixmap) { #if HAS_DEVPRIVATEKEYREC return dixGetPrivate(&pixmap->devPrivates, &glamor_pixmap_index); #else return dixLookupPrivate(&pixmap->devPrivates, &glamor_pixmap_index); #endif } static inline void radeon_set_pixmap_private(PixmapPtr pixmap, struct radeon_pixmap *priv) { dixSetPrivate(&pixmap->devPrivates, &glamor_pixmap_index, priv); } #else static inline Bool radeon_glamor_pre_init(ScrnInfoPtr scrn) { return FALSE; } static inline Bool radeon_glamor_init(ScreenPtr screen) { return FALSE; } static inline Bool radeon_glamor_create_screen_resources(ScreenPtr screen) { return FALSE; } static inline void radeon_glamor_free_screen(int scrnIndex, int flags) { } static inline void radeon_glamor_flush(ScrnInfoPtr pScrn) { } static inline Bool radeon_glamor_create_textured_pixmap(PixmapPtr pixmap) { return TRUE; } static inline void radeon_glamor_exchange_buffers(PixmapPtr src, PixmapPtr dst) {} static inline Bool radeon_glamor_pixmap_is_offscreen(PixmapPtr pixmap) { return FALSE; } static inline struct radeon_pixmap *radeon_get_pixmap_private(PixmapPtr pixmap) { return NULL; } static inline XF86VideoAdaptorPtr radeon_glamor_xv_init(ScreenPtr pScreen, int num_adapt) { return NULL; } #endif #endif /* RADEON_GLAMOR_H */ xf86-video-ati-7.3.0/src/pcidb/0000775000175000017500000000000012270504207013045 500000000000000xf86-video-ati-7.3.0/src/pcidb/parse_pci_ids.pl0000775000175000017500000000557312177731114016150 00000000000000#!/usr/bin/perl # # Copyright 2007 Red Hat Inc. # This crappy script written by Dave Airlie to avoid hassle of adding # ids in every place. # use strict; use warnings; use Text::CSV_XS; my $file = $ARGV[0]; my $atioutfile = 'ati_pciids_gen.h'; my $radeonpcichipsetfile = 'radeon_pci_chipset_gen.h'; my $radeonpcidevicematchfile = 'radeon_pci_device_match_gen.h'; my $radeonchipsetfile = 'radeon_chipset_gen.h'; my $radeonchipinfofile = 'radeon_chipinfo_gen.h'; my $csv = Text::CSV_XS->new(); open (CSV, "<", $file) or die $!; open (ATIOUT, ">", $atioutfile) or die; open (PCICHIPSET, ">", $radeonpcichipsetfile) or die; open (PCIDEVICEMATCH, ">", $radeonpcidevicematchfile) or die; open (RADEONCHIPSET, ">", $radeonchipsetfile) or die; open (RADEONCHIPINFO, ">", $radeonchipinfofile) or die; print RADEONCHIPSET "/* This file is autogenerated please do not edit */\n"; print RADEONCHIPSET "SymTabRec RADEONChipsets[] = {\n"; print PCICHIPSET "/* This file is autogenerated please do not edit */\n"; print PCICHIPSET "static PciChipsets RADEONPciChipsets[] = {\n"; print PCIDEVICEMATCH "/* This file is autogenerated please do not edit */\n"; print PCIDEVICEMATCH "static const struct pci_id_match radeon_device_match[] = {\n"; print RADEONCHIPINFO "/* This file is autogenerated please do not edit */\n"; print RADEONCHIPINFO "static RADEONCardInfo RADEONCards[] = {\n"; while () { if ($csv->parse($_)) { my @columns = $csv->fields(); if ((substr($columns[0], 0, 1) ne "#")) { print ATIOUT "#define PCI_CHIP_$columns[1] $columns[0]\n"; if (($columns[2] ne "R128") && ($columns[2] ne "MACH64") && ($columns[2] ne "MACH32")) { print PCICHIPSET " { PCI_CHIP_$columns[1], PCI_CHIP_$columns[1], RES_SHARED_VGA },\n"; print PCIDEVICEMATCH " ATI_DEVICE_MATCH( PCI_CHIP_$columns[1], 0 ),\n"; print RADEONCHIPSET " { PCI_CHIP_$columns[1], \"$columns[8]\" },\n"; print RADEONCHIPINFO " { $columns[0], CHIP_FAMILY_$columns[2], "; if ($columns[3] eq "1") { print RADEONCHIPINFO "1, "; } else { print RADEONCHIPINFO "0, "; } if ($columns[4] eq "1") { print RADEONCHIPINFO "1, "; } else { print RADEONCHIPINFO "0, "; } if ($columns[5] eq "1") { print RADEONCHIPINFO "1, "; } else { print RADEONCHIPINFO "0, "; } if ($columns[6] eq "1") { print RADEONCHIPINFO "1, "; } else { print RADEONCHIPINFO "0, "; } if ($columns[7] eq "1") { print RADEONCHIPINFO "1 "; } else { print RADEONCHIPINFO "0 "; } print RADEONCHIPINFO "},\n"; } } } else { my $err = $csv->error_input; print "Failed to parse line: $err"; } } print RADEONCHIPINFO "};\n"; print RADEONCHIPSET " { -1, NULL }\n};\n"; print PCICHIPSET " { -1, -1, RES_UNDEFINED }\n};\n"; print PCIDEVICEMATCH " { 0, 0, 0 }\n};\n"; close CSV; close ATIOUT; close PCICHIPSET; close PCIDEVICEMATCH; close RADEONCHIPSET; close RADEONCHIPINFO; xf86-video-ati-7.3.0/src/pcidb/ati_pciids.csv0000644000175000017500000012016612256365422015626 00000000000000"#pciid","define","family","mobility","igp","nocrtc2","Nointtvout","singledac","name" "0x3150","RV380_3150","RV380",1,,,,,"ATI Radeon Mobility X600 (M24) 3150 (PCIE)" "0x3151","RV380_3151","RV380",,,,,,"ATI FireMV 2400 (PCI)" "0x3152","RV380_3152","RV380",1,,,,,"ATI Radeon Mobility X300 (M24) 3152 (PCIE)" "0x3154","RV380_3154","RV380",1,,,,,"ATI FireGL M24 GL 3154 (PCIE)" "0x3155","RV380_3155","RV380",1,,,,,"ATI FireMV 2400 3155 (PCI)" "0x3E50","RV380_3E50","RV380",,,,,,"ATI Radeon X600 (RV380) 3E50 (PCIE)" "0x3E54","RV380_3E54","RV380",,,,,,"ATI FireGL V3200 (RV380) 3E54 (PCIE)" "0x4136","RS100_4136","RS100",,1,,,1,"ATI Radeon IGP320 (A3) 4136" "0x4137","RS200_4137","RS200",,1,,,1,"ATI Radeon IGP330/340/350 (A4) 4137" "0x4144","R300_AD","R300",,,,,,"ATI Radeon 9500 AD (AGP)" "0x4145","R300_AE","R300",,,,,,"ATI Radeon 9500 AE (AGP)" "0x4146","R300_AF","R300",,,,,,"ATI Radeon 9600TX AF (AGP)" "0x4147","R300_AG","R300",,,,,,"ATI FireGL Z1 AG (AGP)" "0x4148","R350_AH","R350",,,,,,"ATI Radeon 9800SE AH (AGP)" "0x4149","R350_AI","R350",,,,,,"ATI Radeon 9800 AI (AGP)" "0x414A","R350_AJ","R350",,,,,,"ATI Radeon 9800 AJ (AGP)" "0x414B","R350_AK","R350",,,,,,"ATI FireGL X2 AK (AGP)" "0x4150","RV350_AP","RV350",,,,,,"ATI Radeon 9600 AP (AGP)" "0x4151","RV350_AQ","RV350",,,,,,"ATI Radeon 9600SE AQ (AGP)" "0x4152","RV360_AR","RV350",,,,,,"ATI Radeon 9600XT AR (AGP)" "0x4153","RV350_AS","RV350",,,,,,"ATI Radeon 9600 AS (AGP)" "0x4154","RV350_AT","RV350",,,,,,"ATI FireGL T2 AT (AGP)" "0x4155","RV350_4155","RV350",,,,,,"ATI Radeon 9650" "0x4156","RV350_AV","RV350",,,,,,"ATI FireGL RV360 AV (AGP)" "0x4158","MACH32","MACH32",,,,,, "0x4237","RS250_4237","RS200",,1,,,1,"ATI Radeon 7000 IGP (A4+) 4237" "0x4242","R200_BB","R200",,,,1,,"ATI Radeon 8500 AIW BB (AGP)" "0x4336","RS100_4336","RS100",1,1,,,1,"ATI Radeon IGP320M (U1) 4336" "0x4337","RS200_4337","RS200",1,1,,,1,"ATI Radeon IGP330M/340M/350M (U2) 4337" "0x4354","MACH64CT","MACH64",,,,,, "0x4358","MACH64CX","MACH64",,,,,, "0x4437","RS250_4437","RS200",1,1,,,1,"ATI Radeon Mobility 7000 IGP 4437" "0x4554","MACH64ET","MACH64",,,,,, "0x4742","MACH64GB","MACH64",,,,,, "0x4744","MACH64GD","MACH64",,,,,, "0x4749","MACH64GI","MACH64",,,,,, "0x474C","MACH64GL","MACH64",,,,,, "0x474D","MACH64GM","MACH64",,,,,, "0x474E","MACH64GN","MACH64",,,,,, "0x474F","MACH64GO","MACH64",,,,,, "0x4750","MACH64GP","MACH64",,,,,, "0x4751","MACH64GQ","MACH64",,,,,, "0x4752","MACH64GR","MACH64",,,,,, "0x4753","MACH64GS","MACH64",,,,,, "0x4754","MACH64GT","MACH64",,,,,, "0x4755","MACH64GU","MACH64",,,,,, "0x4756","MACH64GV","MACH64",,,,,, "0x4757","MACH64GW","MACH64",,,,,, "0x4758","MACH64GX","MACH64",,,,,, "0x4759","MACH64GY","MACH64",,,,,, "0x475A","MACH64GZ","MACH64",,,,,, "0x4966","RV250_If","RV250",,,,,,"ATI Radeon 9000/PRO If (AGP/PCI)" "0x4967","RV250_Ig","RV250",,,,,,"ATI Radeon 9000 Ig (AGP/PCI)" "0x4A48","R420_JH","R420",,,,,,"ATI Radeon X800 (R420) JH (AGP)" "0x4A49","R420_JI","R420",,,,,,"ATI Radeon X800PRO (R420) JI (AGP)" "0x4A4A","R420_JJ","R420",,,,,,"ATI Radeon X800SE (R420) JJ (AGP)" "0x4A4B","R420_JK","R420",,,,,,"ATI Radeon X800 (R420) JK (AGP)" "0x4A4C","R420_JL","R420",,,,,,"ATI Radeon X800 (R420) JL (AGP)" "0x4A4D","R420_JM","R420",,,,,,"ATI FireGL X3 (R420) JM (AGP)" "0x4A4E","R420_JN","R420",1,,,,,"ATI Radeon Mobility 9800 (M18) JN (AGP)" "0x4A4F","R420_4A4F","R420",,,,,,"ATI Radeon X800 SE (R420) (AGP)" "0x4A50","R420_JP","R420",,,,,,"ATI Radeon X800XT (R420) JP (AGP)" "0x4A54","R420_JT","R420",,,,,,"ATI Radeon X800 VE (R420) JT (AGP)" "0x4B48","R481_4B48","R420",,,,,,"ATI Radeon X850 (R480) (AGP)" "0x4B49","R481_4B49","R420",,,,,,"ATI Radeon X850 XT (R480) (AGP)" "0x4B4A","R481_4B4A","R420",,,,,,"ATI Radeon X850 SE (R480) (AGP)" "0x4B4B","R481_4B4B","R420",,,,,,"ATI Radeon X850 PRO (R480) (AGP)" "0x4B4C","R481_4B4C","R420",,,,,,"ATI Radeon X850 XT PE (R480) (AGP)" "0x4C42","MACH64LB","MACH64",,,,,, "0x4C44","MACH64LD","MACH64",,,,,, "0x4C45","RAGE128LE","R128",,,,,, "0x4C46","RAGE128LF","R128",,,,,, "0x4C47","MACH64LG","MACH64",,,,,, "0x4C49","MACH64LI","MACH64",,,,,, "0x4C4D","MACH64LM","MACH64",,,,,, "0x4C4E","MACH64LN","MACH64",,,,,, "0x4C50","MACH64LP","MACH64",,,,,, "0x4C51","MACH64LQ","MACH64",,,,,, "0x4C52","MACH64LR","MACH64",,,,,, "0x4C53","MACH64LS","MACH64",,,,,, "0x4C57","RADEON_LW","RV200",1,,,,,"ATI Radeon Mobility M7 LW (AGP)" "0x4C58","RADEON_LX","RV200",1,,,,,"ATI Mobility FireGL 7800 M7 LX (AGP)" "0x4C59","RADEON_LY","RV100",1,,,,,"ATI Radeon Mobility M6 LY (AGP)" "0x4C5A","RADEON_LZ","RV100",1,,,,,"ATI Radeon Mobility M6 LZ (AGP)" "0x4C64","RV250_Ld","RV250",1,,,,,"ATI FireGL Mobility 9000 (M9) Ld (AGP)" "0x4C66","RV250_Lf","RV250",1,,,,,"ATI Radeon Mobility 9000 (M9) Lf (AGP)" "0x4C67","RV250_Lg","RV250",1,,,,,"ATI Radeon Mobility 9000 (M9) Lg (AGP)" "0x4C6E","RV280_4C6E","RV280",1,,,,,"ATI FireMV 2400 PCI" "0x4D46","RAGE128MF","R128",,,,,, "0x4D4C","RAGE128ML","R128",,,,,, "0x4E44","R300_ND","R300",,,,,,"ATI Radeon 9700 Pro ND (AGP)" "0x4E45","R300_NE","R300",,,,,,"ATI Radeon 9700/9500Pro NE (AGP)" "0x4E46","R300_NF","R300",,,,,,"ATI Radeon 9600TX NF (AGP)" "0x4E47","R300_NG","R300",,,,,,"ATI FireGL X1 NG (AGP)" "0x4E48","R350_NH","R350",,,,,,"ATI Radeon 9800PRO NH (AGP)" "0x4E49","R350_NI","R350",,,,,,"ATI Radeon 9800 NI (AGP)" "0x4E4A","R360_NJ","R350",,,,,,"ATI FireGL X2 NK (AGP)" "0x4E4B","R350_NK","R350",,,,,,"ATI Radeon 9800XT NJ (AGP)" "0x4E50","RV350_NP","RV350",1,,,,,"ATI Radeon Mobility 9600/9700 (M10/M11) NP (AGP)" "0x4E51","RV350_NQ","RV350",1,,,,,"ATI Radeon Mobility 9600 (M10) NQ (AGP)" "0x4E52","RV350_NR","RV350",1,,,,,"ATI Radeon Mobility 9600 (M11) NR (AGP)" "0x4E53","RV350_NS","RV350",1,,,,,"ATI Radeon Mobility 9600 (M10) NS (AGP)" "0x4E54","RV350_NT","RV350",1,,,,,"ATI FireGL Mobility T2 (M10) NT (AGP)" "0x4E56","RV350_NV","RV350",1,,,,,"ATI FireGL Mobility T2e (M11) NV (AGP)" "0x5041","RAGE128PA","R128",,,,,, "0x5042","RAGE128PB","R128",,,,,, "0x5043","RAGE128PC","R128",,,,,, "0x5044","RAGE128PD","R128",,,,,, "0x5045","RAGE128PE","R128",,,,,, "0x5046","RAGE128PF","R128",,,,,, "0x5047","RAGE128PG","R128",,,,,, "0x5048","RAGE128PH","R128",,,,,, "0x5049","RAGE128PI","R128",,,,,, "0x504A","RAGE128PJ","R128",,,,,, "0x504B","RAGE128PK","R128",,,,,, "0x504C","RAGE128PL","R128",,,,,, "0x504D","RAGE128PM","R128",,,,,, "0x504E","RAGE128PN","R128",,,,,, "0x504F","RAGE128PO","R128",,,,,, "0x5050","RAGE128PP","R128",,,,,, "0x5051","RAGE128PQ","R128",,,,,, "0x5052","RAGE128PR","R128",,,,,, "0x5053","RAGE128PS","R128",,,,,, "0x5054","RAGE128PT","R128",,,,,, "0x5055","RAGE128PU","R128",,,,,, "0x5056","RAGE128PV","R128",,,,,, "0x5057","RAGE128PW","R128",,,,,, "0x5058","RAGE128PX","R128",,,,,, "0x5144","RADEON_QD","RADEON",,,1,1,,"ATI Radeon QD (AGP)" "0x5145","RADEON_QE","RADEON",,,1,1,,"ATI Radeon QE (AGP)" "0x5146","RADEON_QF","RADEON",,,1,1,,"ATI Radeon QF (AGP)" "0x5147","RADEON_QG","RADEON",,,1,1,,"ATI Radeon QG (AGP)" "0x5148","R200_QH","R200",,,,1,,"ATI FireGL 8700/8800 QH (AGP)" "0x514C","R200_QL","R200",,,,1,,"ATI Radeon 8500 QL (AGP)" "0x514D","R200_QM","R200",,,,1,,"ATI Radeon 9100 QM (AGP)" "0x5157","RV200_QW","RV200",,,,,,"ATI Radeon 7500 QW (AGP/PCI)" "0x5158","RV200_QX","RV200",,,,,,"ATI Radeon 7500 QX (AGP/PCI)" "0x5159","RV100_QY","RV100",,,,,,"ATI Radeon VE/7000 QY (AGP/PCI)" "0x515A","RV100_QZ","RV100",,,,,,"ATI Radeon VE/7000 QZ (AGP/PCI)" "0x515E","RN50_515E","RV100",,,1,,,"ATI ES1000 515E (PCI)" "0x5245","RAGE128RE","R128",,,,,, "0x5246","RAGE128RF","R128",,,,,, "0x5247","RAGE128RG","R128",,,,,, "0x524B","RAGE128RK","R128",,,,,, "0x524C","RAGE128RL","R128",,,,,, "0x5345","RAGE128SE","R128",,,,,, "0x5346","RAGE128SF","R128",,,,,, "0x5347","RAGE128SG","R128",,,,,, "0x5348","RAGE128SH","R128",,,,,, "0x534B","RAGE128SK","R128",,,,,, "0x534C","RAGE128SL","R128",,,,,, "0x534D","RAGE128SM","R128",,,,,, "0x534E","RAGE128SN","R128",,,,,, "0x5446","RAGE128TF","R128",,,,,, "0x544C","RAGE128TL","R128",,,,,, "0x5452","RAGE128TR","R128",,,,,, "0x5453","RAGE128TS","R128",,,,,, "0x5454","RAGE128TT","R128",,,,,, "0x5455","RAGE128TU","R128",,,,,, "0x5460","RV370_5460","RV380",1,,,,,"ATI Radeon Mobility X300 (M22) 5460 (PCIE)" "0x5462","RV370_5462","RV380",1,,,,,"ATI Radeon Mobility X600 SE (M24C) 5462 (PCIE)" "0x5464","RV370_5464","RV380",1,,,,,"ATI FireGL M22 GL 5464 (PCIE)" "0x5548","R423_UH","R420",,,,,,"ATI Radeon X800 (R423) UH (PCIE)" "0x5549","R423_UI","R420",,,,,,"ATI Radeon X800PRO (R423) UI (PCIE)" "0x554A","R423_UJ","R420",,,,,,"ATI Radeon X800LE (R423) UJ (PCIE)" "0x554B","R423_UK","R420",,,,,,"ATI Radeon X800SE (R423) UK (PCIE)" "0x554C","R430_554C","R420",,,,,,"ATI Radeon X800 XTP (R430) (PCIE)" "0x554D","R430_554D","R420",,,,,,"ATI Radeon X800 XL (R430) (PCIE)" "0x554E","R430_554E","R420",,,,,,"ATI Radeon X800 SE (R430) (PCIE)" "0x554F","R430_554F","R420",,,,,,"ATI Radeon X800 (R430) (PCIE)" "0x5550","R423_5550","R420",,,,,,"ATI FireGL V7100 (R423) (PCIE)" "0x5551","R423_UQ","R420",,,,,,"ATI FireGL V5100 (R423) UQ (PCIE)" "0x5552","R423_UR","R420",,,,,,"ATI FireGL unknown (R423) UR (PCIE)" "0x5554","R423_UT","R420",,,,,,"ATI FireGL unknown (R423) UT (PCIE)" "0x564A","RV410_564A","RV410",1,,,,,"ATI Mobility FireGL V5000 (M26) (PCIE)" "0x564B","RV410_564B","RV410",1,,,,,"ATI Mobility FireGL V5000 (M26) (PCIE)" "0x564F","RV410_564F","RV410",1,,,,,"ATI Mobility Radeon X700 XL (M26) (PCIE)" "0x5652","RV410_5652","RV410",1,,,,,"ATI Mobility Radeon X700 (M26) (PCIE)" "0x5653","RV410_5653","RV410",1,,,,,"ATI Mobility Radeon X700 (M26) (PCIE)" "0x5657","RV410_5657","RV410",,,,,,"ATI Radeon X550XTX 5657 (PCIE)" "0x5654","MACH64VT","MACH64",,,,,, "0x5655","MACH64VU","MACH64",,,,,, "0x5656","MACH64VV","MACH64",,,,,, "0x5834","RS300_5834","RS300",,1,,,1,"ATI Radeon 9100 IGP (A5) 5834" "0x5835","RS300_5835","RS300",1,1,,,1,"ATI Radeon Mobility 9100 IGP (U3) 5835" "0x5954","RS480_5954","RS480",,1,,,1,"ATI Radeon XPRESS 200 5954 (PCIE)" "0x5955","RS480_5955","RS480",1,1,,,1,"ATI Radeon XPRESS 200M 5955 (PCIE)" "0x5960","RV280_5960","RV280",,,,,,"ATI Radeon 9250 5960 (AGP)" "0x5961","RV280_5961","RV280",,,,,,"ATI Radeon 9200 5961 (AGP)" "0x5962","RV280_5962","RV280",,,,,,"ATI Radeon 9200 5962 (AGP)" "0x5964","RV280_5964","RV280",,,,,,"ATI Radeon 9200SE 5964 (AGP)" "0x5965","RV280_5965","RV280",,,,,,"ATI FireMV 2200 (PCI)" "0x5969","RN50_5969","RV100",,,1,,,"ATI ES1000 5969 (PCI)" "0x5974","RS482_5974","RS480",1,1,,,1,"ATI Radeon XPRESS 200 5974 (PCIE)" "0x5975","RS485_5975","RS480",1,1,,,1,"ATI Radeon XPRESS 200M 5975 (PCIE)" "0x5A41","RS400_5A41","RS400",,1,,,1,"ATI Radeon XPRESS 200 5A41 (PCIE)" "0x5A42","RS400_5A42","RS400",1,1,,,1,"ATI Radeon XPRESS 200M 5A42 (PCIE)" "0x5A61","RC410_5A61","RS400",,1,,,1,"ATI Radeon XPRESS 200 5A61 (PCIE)" "0x5A62","RC410_5A62","RS400",1,1,,,1,"ATI Radeon XPRESS 200M 5A62 (PCIE)" "0x5B60","RV370_5B60","RV380",,,,,,"ATI Radeon X300 (RV370) 5B60 (PCIE)" "0x5B62","RV370_5B62","RV380",,,,,,"ATI Radeon X600 (RV370) 5B62 (PCIE)" "0x5B63","RV370_5B63","RV380",,,,,,"ATI Radeon X550 (RV370) 5B63 (PCIE)" "0x5B64","RV370_5B64","RV380",,,,,,"ATI FireGL V3100 (RV370) 5B64 (PCIE)" "0x5B65","RV370_5B65","RV380",,,,,,"ATI FireMV 2200 PCIE (RV370) 5B65 (PCIE)" "0x5C61","RV280_5C61","RV280",1,,,,,"ATI Radeon Mobility 9200 (M9+) 5C61 (AGP)" "0x5C63","RV280_5C63","RV280",1,,,,,"ATI Radeon Mobility 9200 (M9+) 5C63 (AGP)" "0x5D48","R430_5D48","R420",1,,,,,"ATI Mobility Radeon X800 XT (M28) (PCIE)" "0x5D49","R430_5D49","R420",1,,,,,"ATI Mobility FireGL V5100 (M28) (PCIE)" "0x5D4A","R430_5D4A","R420",1,,,,,"ATI Mobility Radeon X800 (M28) (PCIE)" "0x5D4C","R480_5D4C","R420",,,,,,"ATI Radeon X850 5D4C (PCIE)" "0x5D4D","R480_5D4D","R420",,,,,,"ATI Radeon X850 XT PE (R480) (PCIE)" "0x5D4E","R480_5D4E","R420",,,,,,"ATI Radeon X850 SE (R480) (PCIE)" "0x5D4F","R480_5D4F","R420",,,,,,"ATI Radeon X850 PRO (R480) (PCIE)" "0x5D50","R480_5D50","R420",,,,,,"ATI unknown Radeon / FireGL (R480) 5D50 (PCIE)" "0x5D52","R480_5D52","R420",,,,,,"ATI Radeon X850 XT (R480) (PCIE)" "0x5D57","R423_5D57","R420",,,,,,"ATI Radeon X800XT (R423) 5D57 (PCIE)" "0x5E48","RV410_5E48","RV410",,,,,,"ATI FireGL V5000 (RV410) (PCIE)" "0x5E4A","RV410_5E4A","RV410",,,,,,"ATI Radeon X700 XT (RV410) (PCIE)" "0x5E4B","RV410_5E4B","RV410",,,,,,"ATI Radeon X700 PRO (RV410) (PCIE)" "0x5E4C","RV410_5E4C","RV410",,,,,,"ATI Radeon X700 SE (RV410) (PCIE)" "0x5E4D","RV410_5E4D","RV410",,,,,,"ATI Radeon X700 (RV410) (PCIE)" "0x5E4F","RV410_5E4F","RV410",,,,,,"ATI Radeon X700 SE (RV410) (PCIE)" "0x7100","R520_7100","R520",,,,,,"ATI Radeon X1800" "0x7101","R520_7101","R520",1,,,,,"ATI Mobility Radeon X1800 XT" "0x7102","R520_7102","R520",1,,,,,"ATI Mobility Radeon X1800" "0x7103","R520_7103","R520",1,,,,,"ATI Mobility FireGL V7200" "0x7104","R520_7104","R520",,,,,,"ATI FireGL V7200" "0x7105","R520_7105","R520",,,,,,"ATI FireGL V5300" "0x7106","R520_7106","R520",1,,,,,"ATI Mobility FireGL V7100" "0x7108","R520_7108","R520",,,,,,"ATI Radeon X1800" "0x7109","R520_7109","R520",,,,,,"ATI Radeon X1800" "0x710A","R520_710A","R520",,,,,,"ATI Radeon X1800" "0x710B","R520_710B","R520",,,,,,"ATI Radeon X1800" "0x710C","R520_710C","R520",,,,,,"ATI Radeon X1800" "0x710E","R520_710E","R520",,,,,,"ATI FireGL V7300" "0x710F","R520_710F","R520",,,,,,"ATI FireGL V7350" "0x7140","RV515_7140","RV515",,,,,,"ATI Radeon X1600" "0x7141","RV515_7141","RV515",,,,,,"ATI RV505" "0x7142","RV515_7142","RV515",,,,,,"ATI Radeon X1300/X1550" "0x7143","RV515_7143","RV515",,,,,,"ATI Radeon X1550" "0x7144","RV515_7144","RV515",1,,,,,"ATI M54-GL" "0x7145","RV515_7145","RV515",1,,,,,"ATI Mobility Radeon X1400" "0x7146","RV515_7146","RV515",,,,,,"ATI Radeon X1300/X1550" "0x7147","RV515_7147","RV515",,,,,,"ATI Radeon X1550 64-bit" "0x7149","RV515_7149","RV515",1,,,,,"ATI Mobility Radeon X1300" "0x714A","RV515_714A","RV515",1,,,,,"ATI Mobility Radeon X1300" "0x714B","RV515_714B","RV515",1,,,,,"ATI Mobility Radeon X1300" "0x714C","RV515_714C","RV515",1,,,,,"ATI Mobility Radeon X1300" "0x714D","RV515_714D","RV515",,,,,,"ATI Radeon X1300" "0x714E","RV515_714E","RV515",,,,,,"ATI Radeon X1300" "0x714F","RV515_714F","RV515",,,,,,"ATI RV505" "0x7151","RV515_7151","RV515",,,,,,"ATI RV505" "0x7152","RV515_7152","RV515",,,,,,"ATI FireGL V3300" "0x7153","RV515_7153","RV515",,,,,,"ATI FireGL V3350" "0x715E","RV515_715E","RV515",,,,,,"ATI Radeon X1300" "0x715F","RV515_715F","RV515",,,,,,"ATI Radeon X1550 64-bit" "0x7180","RV515_7180","RV515",,,,,,"ATI Radeon X1300/X1550" "0x7181","RV515_7181","RV515",,,,,,"ATI Radeon X1600" "0x7183","RV515_7183","RV515",,,,,,"ATI Radeon X1300/X1550" "0x7186","RV515_7186","RV515",1,,,,,"ATI Mobility Radeon X1450" "0x7187","RV515_7187","RV515",,,,,,"ATI Radeon X1300/X1550" "0x7188","RV515_7188","RV515",1,,,,,"ATI Mobility Radeon X2300" "0x718A","RV515_718A","RV515",1,,,,,"ATI Mobility Radeon X2300" "0x718B","RV515_718B","RV515",1,,,,,"ATI Mobility Radeon X1350" "0x718C","RV515_718C","RV515",1,,,,,"ATI Mobility Radeon X1350" "0x718D","RV515_718D","RV515",1,,,,,"ATI Mobility Radeon X1450" "0x718F","RV515_718F","RV515",,,,,,"ATI Radeon X1300" "0x7193","RV515_7193","RV515",,,,,,"ATI Radeon X1550" "0x7196","RV515_7196","RV515",1,,,,,"ATI Mobility Radeon X1350" "0x719B","RV515_719B","RV515",,,,,,"ATI FireMV 2250" "0x719F","RV515_719F","RV515",,,,,,"ATI Radeon X1550 64-bit" "0x71C0","RV530_71C0","RV530",,,,,,"ATI Radeon X1600" "0x71C1","RV530_71C1","RV530",,,,,,"ATI Radeon X1650" "0x71C2","RV530_71C2","RV530",,,,,,"ATI Radeon X1600" "0x71C3","RV530_71C3","RV530",,,,,,"ATI Radeon X1600" "0x71C4","RV530_71C4","RV530",1,,,,,"ATI Mobility FireGL V5200" "0x71C5","RV530_71C5","RV530",1,,,,,"ATI Mobility Radeon X1600" "0x71C6","RV530_71C6","RV530",,,,,,"ATI Radeon X1650" "0x71C7","RV530_71C7","RV530",,,,,,"ATI Radeon X1650" "0x71CD","RV530_71CD","RV530",,,,,,"ATI Radeon X1600" "0x71CE","RV530_71CE","RV530",,,,,,"ATI Radeon X1300 XT/X1600 Pro" "0x71D2","RV530_71D2","RV530",,,,,,"ATI FireGL V3400" "0x71D4","RV530_71D4","RV530",1,,,,,"ATI Mobility FireGL V5250" "0x71D5","RV530_71D5","RV530",1,,,,,"ATI Mobility Radeon X1700" "0x71D6","RV530_71D6","RV530",1,,,,,"ATI Mobility Radeon X1700 XT" "0x71DA","RV530_71DA","RV530",,,,,,"ATI FireGL V5200" "0x71DE","RV530_71DE","RV530",1,,,,,"ATI Mobility Radeon X1700" "0x7200","RV515_7200","RV515",,,,,,"ATI Radeon X2300HD" "0x7210","RV515_7210","RV515",1,,,,,"ATI Mobility Radeon HD 2300" "0x7211","RV515_7211","RV515",1,,,,,"ATI Mobility Radeon HD 2300" "0x7240","R580_7240","R580",,,,,,"ATI Radeon X1950" "0x7243","R580_7243","R580",,,,,,"ATI Radeon X1900" "0x7244","R580_7244","R580",,,,,,"ATI Radeon X1950" "0x7245","R580_7245","R580",,,,,,"ATI Radeon X1900" "0x7246","R580_7246","R580",,,,,,"ATI Radeon X1900" "0x7247","R580_7247","R580",,,,,,"ATI Radeon X1900" "0x7248","R580_7248","R580",,,,,,"ATI Radeon X1900" "0x7249","R580_7249","R580",,,,,,"ATI Radeon X1900" "0x724A","R580_724A","R580",,,,,,"ATI Radeon X1900" "0x724B","R580_724B","R580",,,,,,"ATI Radeon X1900" "0x724C","R580_724C","R580",,,,,,"ATI Radeon X1900" "0x724D","R580_724D","R580",,,,,,"ATI Radeon X1900" "0x724E","R580_724E","R580",,,,,,"ATI AMD Stream Processor" "0x724F","R580_724F","R580",,,,,,"ATI Radeon X1900" "0x7280","RV570_7280","RV570",,,,,,"ATI Radeon X1950" "0x7281","RV560_7281","RV560",,,,,,"ATI RV560" "0x7283","RV560_7283","RV560",,,,,,"ATI RV560" "0x7284","R580_7284","R580",1,,,,,"ATI Mobility Radeon X1900" "0x7287","RV560_7287","RV560",,,,,,"ATI RV560" "0x7288","RV570_7288","RV570",,,,,,"ATI Radeon X1950 GT" "0x7289","RV570_7289","RV570",,,,,,"ATI RV570" "0x728B","RV570_728B","RV570",,,,,,"ATI RV570" "0x728C","RV570_728C","RV570",,,,,,"ATI FireGL V7400" "0x7290","RV560_7290","RV560",,,,,,"ATI RV560" "0x7291","RV560_7291","RV560",,,,,,"ATI Radeon X1650" "0x7293","RV560_7293","RV560",,,,,,"ATI Radeon X1650" "0x7297","RV560_7297","RV560",,,,,,"ATI RV560" "0x7834","RS350_7834","RS300",,1,,,1,"ATI Radeon 9100 PRO IGP 7834" "0x7835","RS350_7835","RS300",1,1,,,1,"ATI Radeon Mobility 9200 IGP 7835" "0x791E","RS690_791E","RS690",,1,,,1,"ATI Radeon X1200" "0x791F","RS690_791F","RS690",,1,,,1,"ATI Radeon X1200" "0x793F","RS600_793F","RS600",,1,,,1,"ATI Radeon X1200" "0x7941","RS600_7941","RS600",,1,,,1,"ATI Radeon X1200" "0x7942","RS600_7942","RS600",,1,,,1,"ATI Radeon X1200" "0x796C","RS740_796C","RS740",,1,,,1,"ATI RS740" "0x796D","RS740_796D","RS740",,1,,,1,"ATI RS740M" "0x796E","RS740_796E","RS740",,1,,,1,"ATI RS740" "0x796F","RS740_796F","RS740",,1,,,1,"ATI RS740M" "0x9400","R600_9400","R600",,,,,,"ATI Radeon HD 2900 XT" "0x9401","R600_9401","R600",,,,,,"ATI Radeon HD 2900 XT" "0x9402","R600_9402","R600",,,,,,"ATI Radeon HD 2900 XT" "0x9403","R600_9403","R600",,,,,,"ATI Radeon HD 2900 Pro" "0x9405","R600_9405","R600",,,,,,"ATI Radeon HD 2900 GT" "0x940A","R600_940A","R600",,,,,,"ATI FireGL V8650" "0x940B","R600_940B","R600",,,,,,"ATI FireGL V8600" "0x940F","R600_940F","R600",,,,,,"ATI FireGL V7600" "0x9440","RV770_9440","RV770",,,,,,"ATI Radeon 4800 Series" "0x9441","RV770_9441","RV770",,,,,,"ATI Radeon HD 4870 x2" "0x9442","RV770_9442","RV770",,,,,,"ATI Radeon 4800 Series" "0x9443","RV770_9443","RV770",,,,,,"ATI Radeon HD 4850 x2" "0x9444","RV770_9444","RV770",,,,,,"ATI FirePro V8750 (FireGL)" "0x9446","RV770_9446","RV770",,,,,,"ATI FirePro V7760 (FireGL)" "0x944A","RV770_944A","RV770",1,,,,,"ATI Mobility RADEON HD 4850" "0x944B","RV770_944B","RV770",1,,,,,"ATI Mobility RADEON HD 4850 X2" "0x944C","RV770_944C","RV770",,,,,,"ATI Radeon 4800 Series" "0x944E","RV770_944E","RV770",,,,,,"ATI FirePro RV770" "0x9450","RV770_9450","RV770",,,,,,"AMD FireStream 9270" "0x9452","RV770_9452","RV770",,,,,,"AMD FireStream 9250" "0x9456","RV770_9456","RV770",,,,,,"ATI FirePro V8700 (FireGL)" "0x945A","RV770_945A","RV770",1,,,,,"ATI Mobility RADEON HD 4870" "0x945B","RV770_945B","RV770",1,,,,,"ATI Mobility RADEON M98" "0x945E","RV770_945E","RV770",1,,,,,"ATI Mobility RADEON HD 4870" "0x9460","RV790_9460","RV770",,,,,,"ATI Radeon 4800 Series" "0x9462","RV790_9462","RV770",,,,,,"ATI Radeon 4800 Series" "0x946A","RV770_946A","RV770",1,,,,,"ATI FirePro M7750" "0x946B","RV770_946B","RV770",1,,,,,"ATI M98" "0x947A","RV770_947A","RV770",1,,,,,"ATI M98" "0x947B","RV770_947B","RV770",1,,,,,"ATI M98" "0x9480","RV730_9480","RV730",1,,,,,"ATI Mobility Radeon HD 4650" "0x9487","RV730_9487","RV730",,,,,,"ATI Radeon RV730 (AGP)" "0x9488","RV730_9488","RV730",1,,,,,"ATI Mobility Radeon HD 4670" "0x9489","RV730_9489","RV730",1,,,,,"ATI FirePro M5750" "0x948A","RV730_948A","RV730",1,,,,,"ATI Mobility Radeon HD 4670" "0x948F","RV730_948F","RV730",,,,,,"ATI Radeon RV730 (AGP)" "0x9490","RV730_9490","RV730",,,,,,"ATI RV730XT [Radeon HD 4670]" "0x9491","RV730_9491","RV730",,,,,,"ATI RADEON E4600" "0x9495","RV730_9495","RV730",,,,,,"ATI Radeon HD 4600 Series" "0x9498","RV730_9498","RV730",,,,,,"ATI RV730 PRO [Radeon HD 4650]" "0x949C","RV730_949C","RV730",,,,,,"ATI FirePro V7750 (FireGL)" "0x949E","RV730_949E","RV730",,,,,,"ATI FirePro V5700 (FireGL)" "0x949F","RV730_949F","RV730",,,,,,"ATI FirePro V3750 (FireGL)" "0x94A0","RV740_94A0","RV740",1,,,,,"ATI Mobility Radeon HD 4830" "0x94A1","RV740_94A1","RV740",1,,,,,"ATI Mobility Radeon HD 4850" "0x94A3","RV740_94A3","RV740",1,,,,,"ATI FirePro M7740" "0x94B1","RV740_94B1","RV740",,,,,,"ATI RV740" "0x94B3","RV740_94B3","RV740",,,,,,"ATI Radeon HD 4770" "0x94B4","RV740_94B4","RV740",,,,,,"ATI Radeon HD 4700 Series" "0x94B5","RV740_94B5","RV740",,,,,,"ATI Radeon HD 4770" "0x94B9","RV740_94B9","RV740",1,,,,,"ATI FirePro M5750" "0x94C0","RV610_94C0","RV610",,,,,,"ATI RV610" "0x94C1","RV610_94C1","RV610",,,,,,"ATI Radeon HD 2400 XT" "0x94C3","RV610_94C3","RV610",,,,,,"ATI Radeon HD 2400 Pro" "0x94C4","RV610_94C4","RV610",,,,,,"ATI Radeon HD 2400 PRO AGP" "0x94C5","RV610_94C5","RV610",,,,,,"ATI FireGL V4000" "0x94C6","RV610_94C6","RV610",,,,,,"ATI RV610" "0x94C7","RV610_94C7","RV610",,,,,,"ATI Radeon HD 2350" "0x94C8","RV610_94C8","RV610",1,,,,,"ATI Mobility Radeon HD 2400 XT" "0x94C9","RV610_94C9","RV610",1,,,,,"ATI Mobility Radeon HD 2400" "0x94CB","RV610_94CB","RV610",1,,,,,"ATI RADEON E2400" "0x94CC","RV610_94CC","RV610",,,,,,"ATI RV610" "0x94CD","RV610_94CD","RV610",,,,,,"ATI FireMV 2260" "0x9500","RV670_9500","RV670",,,,,,"ATI RV670" "0x9501","RV670_9501","RV670",,,,,,"ATI Radeon HD3870" "0x9504","RV670_9504","RV670",1,,,,,"ATI Mobility Radeon HD 3850" "0x9505","RV670_9505","RV670",,,,,,"ATI Radeon HD3850" "0x9506","RV670_9506","RV670",1,,,,,"ATI Mobility Radeon HD 3850 X2" "0x9507","RV670_9507","RV670",,,,,,"ATI RV670" "0x9508","RV670_9508","RV670",1,,,,,"ATI Mobility Radeon HD 3870" "0x9509","RV670_9509","RV670",1,,,,,"ATI Mobility Radeon HD 3870 X2" "0x950F","RV670_950F","RV670",,,,,,"ATI Radeon HD3870 X2" "0x9511","RV670_9511","RV670",,,,,,"ATI FireGL V7700" "0x9515","RV670_9515","RV670",,,,,,"ATI Radeon HD3850" "0x9517","RV670_9517","RV670",,,,,,"ATI Radeon HD3690" "0x9519","RV670_9519","RV670",,,,,,"AMD Firestream 9170" "0x9540","RV710_9540","RV710",,,,,,"ATI Radeon HD 4550" "0x9541","RV710_9541","RV710",,,,,,"ATI Radeon RV710" "0x9542","RV710_9542","RV710",,,,,,"ATI Radeon RV710" "0x954E","RV710_954E","RV710",,,,,,"ATI Radeon RV710" "0x954F","RV710_954F","RV710",,,,,,"ATI Radeon HD 4350" "0x9552","RV710_9552","RV710",1,,,,,"ATI Mobility Radeon 4300 Series" "0x9553","RV710_9553","RV710",1,,,,,"ATI Mobility Radeon 4500 Series" "0x9555","RV710_9555","RV710",1,,,,,"ATI Mobility Radeon 4500 Series" "0x9557","RV710_9557","RV710",1,,,,,"ATI FirePro RG220" "0x955F","RV710_955F","RV710",1,,,,,"ATI Mobility Radeon 4330" "0x9580","RV630_9580","RV630",,,,,,"ATI RV630" "0x9581","RV630_9581","RV630",1,,,,,"ATI Mobility Radeon HD 2600" "0x9583","RV630_9583","RV630",1,,,,,"ATI Mobility Radeon HD 2600 XT" "0x9586","RV630_9586","RV630",,,,,,"ATI Radeon HD 2600 XT AGP" "0x9587","RV630_9587","RV630",,,,,,"ATI Radeon HD 2600 Pro AGP" "0x9588","RV630_9588","RV630",,,,,,"ATI Radeon HD 2600 XT" "0x9589","RV630_9589","RV630",,,,,,"ATI Radeon HD 2600 Pro" "0x958A","RV630_958A","RV630",,,,,,"ATI Gemini RV630" "0x958B","RV630_958B","RV630",1,,,,,"ATI Gemini Mobility Radeon HD 2600 XT" "0x958C","RV630_958C","RV630",,,,,,"ATI FireGL V5600" "0x958D","RV630_958D","RV630",,,,,,"ATI FireGL V3600" "0x958E","RV630_958E","RV630",,,,,,"ATI Radeon HD 2600 LE" "0x958F","RV630_958F","RV630",1,,,,,"ATI Mobility FireGL Graphics Processor" "0x95C0","RV620_95C0","RV620",,,,,,"ATI Radeon HD 3470" "0x95C2","RV620_95C2","RV620",1,,,,,"ATI Mobility Radeon HD 3430" "0x95C4","RV620_95C4","RV620",1,,,,,"ATI Mobility Radeon HD 3400 Series" "0x95C5","RV620_95C5","RV620",,,,,,"ATI Radeon HD 3450" "0x95C6","RV620_95C6","RV620",,,,,,"ATI Radeon HD 3450" "0x95C7","RV620_95C7","RV620",,,,,,"ATI Radeon HD 3430" "0x95C9","RV620_95C9","RV620",,,,,,"ATI Radeon HD 3450" "0x95CC","RV620_95CC","RV620",,,,,,"ATI FirePro V3700" "0x95CD","RV620_95CD","RV620",,,,,,"ATI FireMV 2450" "0x95CE","RV620_95CE","RV620",,,,,,"ATI FireMV 2260" "0x95CF","RV620_95CF","RV620",,,,,,"ATI FireMV 2260" "0x9590","RV635_9590","RV635",,,,,,"ATI Radeon HD 3600 Series" "0x9596","RV635_9596","RV635",,,,,,"ATI Radeon HD 3650 AGP" "0x9597","RV635_9597","RV635",,,,,,"ATI Radeon HD 3600 PRO" "0x9598","RV635_9598","RV635",,,,,,"ATI Radeon HD 3600 XT" "0x9599","RV635_9599","RV635",,,,,,"ATI Radeon HD 3600 PRO" "0x9591","RV635_9591","RV635",1,,,,,"ATI Mobility Radeon HD 3650" "0x9593","RV635_9593","RV635",1,,,,,"ATI Mobility Radeon HD 3670" "0x9595","RV635_9595","RV635",1,,,,,"ATI Mobility FireGL V5700" "0x959B","RV635_959B","RV635",1,,,,,"ATI Mobility FireGL V5725" "0x9610","RS780_9610","RS780",,1,,,1,"ATI Radeon HD 3200 Graphics" "0x9611","RS780_9611","RS780",,1,,,1,"ATI Radeon 3100 Graphics" "0x9612","RS780_9612","RS780",,1,,,1,"ATI Radeon HD 3200 Graphics" "0x9613","RS780_9613","RS780",,1,,,1,"ATI Radeon 3100 Graphics" "0x9614","RS780_9614","RS780",,1,,,1,"ATI Radeon HD 3300 Graphics" "0x9615","RS780_9615","RS780",,1,,,1,"ATI Radeon HD 3200 Graphics" "0x9616","RS780_9616","RS780",,1,,,1,"ATI Radeon 3000 Graphics" "0x9640","SUMO_9640","SUMO",,1,,,1,"SUMO" "0x9641","SUMO_9641","SUMO",1,1,,,1,"SUMO" "0x9642","SUMO2_9642","SUMO2",,1,,,1,"SUMO2" "0x9643","SUMO2_9643","SUMO2",1,1,,,1,"SUMO2" "0x9644","SUMO2_9644","SUMO2",,1,,,1,"SUMO2" "0x9645","SUMO2_9645","SUMO2",1,1,,,1,"SUMO2" "0x9647","SUMO_9647","SUMO",1,1,,,1,"SUMO" "0x9648","SUMO_9648","SUMO",1,1,,,1,"SUMO" "0x9649","SUMO2_9649","SUMO2",1,1,,,1,"SUMO2" "0x964A","SUMO_964A","SUMO",,1,,,1,"SUMO" "0x964B","SUMO_964B","SUMO",,1,,,1,"SUMO" "0x964C","SUMO_964C","SUMO",,1,,,1,"SUMO" "0x964E","SUMO_964E","SUMO",1,1,,,1,"SUMO" "0x964F","SUMO_964F","SUMO",1,1,,,1,"SUMO" "0x9710","RS880_9710","RS880",,1,,,1,"ATI Radeon HD 4200" "0x9711","RS880_9711","RS880",,1,,,1,"ATI Radeon 4100" "0x9712","RS880_9712","RS880",1,1,,,1,"ATI Mobility Radeon HD 4200" "0x9713","RS880_9713","RS880",1,1,,,1,"ATI Mobility Radeon 4100" "0x9714","RS880_9714","RS880",,1,,,1,"ATI Radeon HD 4290" "0x9715","RS880_9715","RS880",,1,,,1,"ATI Radeon HD 4250" "0x9802","PALM_9802","PALM",,1,,,1,"AMD Radeon HD 6310 Graphics" "0x9803","PALM_9803","PALM",,1,,,1,"AMD Radeon HD 6310 Graphics" "0x9804","PALM_9804","PALM",,1,,,1,"AMD Radeon HD 6250 Graphics" "0x9805","PALM_9805","PALM",,1,,,1,"AMD Radeon HD 6250 Graphics" "0x9806","PALM_9806","PALM",,1,,,1,"AMD Radeon HD 6300 Series Graphics" "0x9807","PALM_9807","PALM",,1,,,1,"AMD Radeon HD 6200 Series Graphics" "0x9808","PALM_9808","PALM",,1,,,1,"PALM" "0x9809","PALM_9809","PALM",,1,,,1,"PALM" "0x980A","PALM_980A","PALM",,1,,,1,"PALM" "0x6880","CYPRESS_6880","CYPRESS",1,,,,,"CYPRESS" "0x6888","CYPRESS_6888","CYPRESS",,,,,,"ATI FirePro (FireGL) Graphics Adapter" "0x6889","CYPRESS_6889","CYPRESS",,,,,,"ATI FirePro (FireGL) Graphics Adapter" "0x688A","CYPRESS_688A","CYPRESS",,,,,,"ATI FirePro (FireGL) Graphics Adapter" "0x688C","CYPRESS_688C","CYPRESS",,,,,,"AMD Firestream 9370" "0x688D","CYPRESS_688D","CYPRESS",,,,,,"AMD Firestream 9350" "0x6898","CYPRESS_6898","CYPRESS",,,,,,"ATI Radeon HD 5800 Series" "0x6899","CYPRESS_6899","CYPRESS",,,,,,"ATI Radeon HD 5800 Series" "0x689B","CYPRESS_689B","CYPRESS",,,,,,"ATI Radeon HD 5800 Series" "0x689E","CYPRESS_689E","CYPRESS",,,,,,"ATI Radeon HD 5800 Series" "0x689C","HEMLOCK_689C","HEMLOCK",,,,,,"ATI Radeon HD 5900 Series" "0x689D","HEMLOCK_689D","HEMLOCK",,,,,,"ATI Radeon HD 5900 Series" "0x68A0","JUNIPER_68A0","JUNIPER",1,,,,,"ATI Mobility Radeon HD 5800 Series" "0x68A1","JUNIPER_68A1","JUNIPER",1,,,,,"ATI Mobility Radeon HD 5800 Series" "0x68A8","JUNIPER_68A8","JUNIPER",,,,,,"ATI FirePro (FireGL) Graphics Adapter" "0x68A9","JUNIPER_68A9","JUNIPER",,,,,,"ATI FirePro (FireGL) Graphics Adapter" "0x68B0","JUNIPER_68B0","JUNIPER",1,,,,,"ATI Mobility Radeon HD 5800 Series" "0x68B8","JUNIPER_68B8","JUNIPER",,,,,,"ATI Radeon HD 5700 Series" "0x68B9","JUNIPER_68B9","JUNIPER",,,,,,"ATI Radeon HD 5700 Series" "0x68BA","JUNIPER_68BA","JUNIPER",,,,,,"ATI Radeon HD 6700 Series" "0x68BE","JUNIPER_68BE","JUNIPER",,,,,,"ATI Radeon HD 5700 Series" "0x68BF","JUNIPER_68BF","JUNIPER",,,,,,"ATI Radeon HD 6700 Series" "0x68C0","REDWOOD_68C0","REDWOOD",1,,,,,"ATI Mobility Radeon HD 5000 Series" "0x68C1","REDWOOD_68C1","REDWOOD",1,,,,,"ATI Mobility Radeon HD 5000 Series" "0x68C7","REDWOOD_68C7","REDWOOD",1,,,,,"ATI Mobility Radeon HD 5570" "0x68C8","REDWOOD_68C8","REDWOOD",,,,,,"ATI FirePro (FireGL) Graphics Adapter" "0x68C9","REDWOOD_68C9","REDWOOD",,,,,,"ATI FirePro (FireGL) Graphics Adapter" "0x68D8","REDWOOD_68D8","REDWOOD",,,,,,"ATI Radeon HD 5670" "0x68D9","REDWOOD_68D9","REDWOOD",,,,,,"ATI Radeon HD 5570" "0x68DA","REDWOOD_68DA","REDWOOD",,,,,,"ATI Radeon HD 5500 Series" "0x68DE","REDWOOD_68DE","REDWOOD",,,,,,"REDWOOD" "0x68E0","CEDAR_68E0","CEDAR",1,,,,,"ATI Mobility Radeon HD 5000 Series" "0x68E1","CEDAR_68E1","CEDAR",1,,,,,"ATI Mobility Radeon HD 5000 Series" "0x68E4","CEDAR_68E4","CEDAR",1,,,,,"ATI Mobility Radeon Graphics" "0x68E5","CEDAR_68E5","CEDAR",1,,,,,"ATI Mobility Radeon Graphics" "0x68E8","CEDAR_68E8","CEDAR",,,,,,"CEDAR" "0x68E9","CEDAR_68E9","CEDAR",,,,,,"ATI FirePro (FireGL) Graphics Adapter" "0x68F1","CEDAR_68F1","CEDAR",,,,,,"ATI FirePro (FireGL) Graphics Adapter" "0x68F2","CEDAR_68F2","CEDAR",,,,,,"ATI FirePro 2270" "0x68F8","CEDAR_68F8","CEDAR",,,,,,"CEDAR" "0x68F9","CEDAR_68F9","CEDAR",,,,,,"ATI Radeon HD 5450" "0x68FA","CEDAR_68FA","CEDAR",,,,,,"CEDAR" "0x68FE","CEDAR_68FE","CEDAR",,,,,,"CEDAR" "0x6700","CAYMAN_6700","CAYMAN",,,,,,"CAYMAN" "0x6701","CAYMAN_6701","CAYMAN",,,,,,"CAYMAN" "0x6702","CAYMAN_6702","CAYMAN",,,,,,"CAYMAN" "0x6703","CAYMAN_6703","CAYMAN",,,,,,"CAYMAN" "0x6704","CAYMAN_6704","CAYMAN",,,,,,"CAYMAN" "0x6705","CAYMAN_6705","CAYMAN",,,,,,"CAYMAN" "0x6706","CAYMAN_6706","CAYMAN",,,,,,"CAYMAN" "0x6707","CAYMAN_6707","CAYMAN",,,,,,"CAYMAN" "0x6708","CAYMAN_6708","CAYMAN",,,,,,"CAYMAN" "0x6709","CAYMAN_6709","CAYMAN",,,,,,"CAYMAN" "0x6718","CAYMAN_6718","CAYMAN",,,,,,"AMD Radeon HD 6900 Series" "0x6719","CAYMAN_6719","CAYMAN",,,,,,"AMD Radeon HD 6900 Series" "0x671C","CAYMAN_671C","CAYMAN",,,,,,"CAYMAN" "0x671D","CAYMAN_671D","CAYMAN",,,,,,"CAYMAN" "0x671F","CAYMAN_671F","CAYMAN",,,,,,"CAYMAN" "0x6720","BARTS_6720","BARTS",1,,,,,"AMD Radeon HD 6900M Series" "0x6721","BARTS_6721","BARTS",1,,,,,"Mobility Radeon HD 6000 Series" "0x6722","BARTS_6722","BARTS",,,,,,"BARTS" "0x6723","BARTS_6723","BARTS",,,,,,"BARTS" "0x6724","BARTS_6724","BARTS",1,,,,,"Mobility Radeon HD 6000 Series" "0x6725","BARTS_6725","BARTS",1,,,,,"Mobility Radeon HD 6000 Series" "0x6726","BARTS_6726","BARTS",,,,,,"BARTS" "0x6727","BARTS_6727","BARTS",,,,,,"BARTS" "0x6728","BARTS_6728","BARTS",,,,,,"BARTS" "0x6729","BARTS_6729","BARTS",,,,,,"BARTS" "0x6738","BARTS_6738","BARTS",,,,,,"AMD Radeon HD 6800 Series" "0x6739","BARTS_6739","BARTS",,,,,,"AMD Radeon HD 6800 Series" "0x673E","BARTS_673E","BARTS",,,,,,"AMD Radeon HD 6700 Series" "0x6740","TURKS_6740","TURKS",1,,,,,"TURKS" "0x6741","TURKS_6741","TURKS",1,,,,,"TURKS" "0x6742","TURKS_6742","TURKS",1,,,,,"TURKS" "0x6743","TURKS_6743","TURKS",1,,,,,"TURKS" "0x6744","TURKS_6744","TURKS",1,,,,,"TURKS" "0x6745","TURKS_6745","TURKS",1,,,,,"TURKS" "0x6746","TURKS_6746","TURKS",,,,,,"TURKS" "0x6747","TURKS_6747","TURKS",,,,,,"TURKS" "0x6748","TURKS_6748","TURKS",,,,,,"TURKS" "0x6749","TURKS_6749","TURKS",,,,,,"TURKS" "0x674A","TURKS_674A","TURKS",,,,,,"TURKS" "0x6750","TURKS_6750","TURKS",,,,,,"TURKS" "0x6751","TURKS_6751","TURKS",,,,,,"TURKS" "0x6758","TURKS_6758","TURKS",,,,,,"TURKS" "0x6759","TURKS_6759","TURKS",,,,,,"TURKS" "0x675B","TURKS_675B","TURKS",,,,,,"TURKS" "0x675D","TURKS_675D","TURKS",,,,,,"TURKS" "0x675F","TURKS_675F","TURKS",,,,,,"TURKS" "0x6840","TURKS_6840","TURKS",1,,,,,"TURKS" "0x6841","TURKS_6841","TURKS",1,,,,,"TURKS" "0x6842","TURKS_6842","TURKS",1,,,,,"TURKS" "0x6843","TURKS_6843","TURKS",1,,,,,"TURKS" "0x6849","TURKS_6849","TURKS",,,,,,"TURKS" "0x6850","TURKS_6850","TURKS",,,,,,"TURKS" "0x6858","TURKS_6858","TURKS",,,,,,"TURKS" "0x6859","TURKS_6859","TURKS",,,,,,"TURKS" "0x6760","CAICOS_6760","CAICOS",1,,,,,"CAICOS" "0x6761","CAICOS_6761","CAICOS",1,,,,,"CAICOS" "0x6762","CAICOS_6762","CAICOS",,,,,,"CAICOS" "0x6763","CAICOS_6763","CAICOS",,,,,,"CAICOS" "0x6764","CAICOS_6764","CAICOS",1,,,,,"CAICOS" "0x6765","CAICOS_6765","CAICOS",1,,,,,"CAICOS" "0x6766","CAICOS_6766","CAICOS",,,,,,"CAICOS" "0x6767","CAICOS_6767","CAICOS",,,,,,"CAICOS" "0x6768","CAICOS_6768","CAICOS",,,,,,"CAICOS" "0x6770","CAICOS_6770","CAICOS",,,,,,"CAICOS" "0x6771","CAICOS_6771","CAICOS",,,,,,"CAICOS" "0x6772","CAICOS_6772","CAICOS",,,,,,"CAICOS" "0x6778","CAICOS_6778","CAICOS",,,,,,"CAICOS" "0x6779","CAICOS_6779","CAICOS",,,,,,"CAICOS" "0x677B","CAICOS_677B","CAICOS",,,,,,"CAICOS" "0x9900","ARUBA_9900","ARUBA",1,1,,,,"ARUBA" "0x9901","ARUBA_9901","ARUBA",,1,,,,"ARUBA" "0x9903","ARUBA_9903","ARUBA",1,1,,,,"ARUBA" "0x9904","ARUBA_9904","ARUBA",,1,,,,"ARUBA" "0x9905","ARUBA_9905","ARUBA",,1,,,,"ARUBA" "0x9906","ARUBA_9906","ARUBA",,1,,,,"ARUBA" "0x9907","ARUBA_9907","ARUBA",1,1,,,,"ARUBA" "0x9908","ARUBA_9908","ARUBA",1,1,,,,"ARUBA" "0x9909","ARUBA_9909","ARUBA",1,1,,,,"ARUBA" "0x990A","ARUBA_990A","ARUBA",1,1,,,,"ARUBA" "0x990B","ARUBA_990B","ARUBA",1,1,,,,"ARUBA" "0x990C","ARUBA_990C","ARUBA",,1,,,,"ARUBA" "0x990D","ARUBA_990D","ARUBA",1,1,,,,"ARUBA" "0x990E","ARUBA_990E","ARUBA",,1,,,,"ARUBA" "0x990F","ARUBA_990F","ARUBA",1,1,,,,"ARUBA" "0x9910","ARUBA_9910","ARUBA",1,1,,,,"ARUBA" "0x9913","ARUBA_9913","ARUBA",1,1,,,,"ARUBA" "0x9917","ARUBA_9917","ARUBA",,1,,,,"ARUBA" "0x9918","ARUBA_9918","ARUBA",,1,,,,"ARUBA" "0x9919","ARUBA_9919","ARUBA",,1,,,,"ARUBA" "0x9990","ARUBA_9990","ARUBA",1,1,,,,"ARUBA" "0x9991","ARUBA_9991","ARUBA",,1,,,,"ARUBA" "0x9992","ARUBA_9992","ARUBA",1,1,,,,"ARUBA" "0x9993","ARUBA_9993","ARUBA",,1,,,,"ARUBA" "0x9994","ARUBA_9994","ARUBA",1,1,,,,"ARUBA" "0x9995","ARUBA_9995","ARUBA",1,1,,,,"ARUBA" "0x9996","ARUBA_9996","ARUBA",,1,,,,"ARUBA" "0x9997","ARUBA_9997","ARUBA",1,1,,,,"ARUBA" "0x9998","ARUBA_9998","ARUBA",,1,,,,"ARUBA" "0x9999","ARUBA_9999","ARUBA",1,1,,,,"ARUBA" "0x999A","ARUBA_999A","ARUBA",1,1,,,,"ARUBA" "0x999B","ARUBA_999B","ARUBA",1,1,,,,"ARUBA" "0x999C","ARUBA_999C","ARUBA",,1,,,,"ARUBA" "0x999D","ARUBA_999D","ARUBA",,1,,,,"ARUBA" "0x99A0","ARUBA_99A0","ARUBA",1,1,,,,"ARUBA" "0x99A2","ARUBA_99A2","ARUBA",1,1,,,,"ARUBA" "0x99A4","ARUBA_99A4","ARUBA",,1,,,,"ARUBA" "0x6780","TAHITI_6780","TAHITI",,,,,,"TAHITI" "0x6784","TAHITI_6784","TAHITI",,,,,,"TAHITI" "0x6788","TAHITI_6788","TAHITI",,,,,,"TAHITI" "0x678A","TAHITI_678A","TAHITI",,,,,,"TAHITI" "0x6790","TAHITI_6790","TAHITI",,,,,,"TAHITI" "0x6791","TAHITI_6791","TAHITI",,,,,,"TAHITI" "0x6792","TAHITI_6792","TAHITI",,,,,,"TAHITI" "0x6798","TAHITI_6798","TAHITI",,,,,,"TAHITI" "0x6799","TAHITI_6799","TAHITI",,,,,,"TAHITI" "0x679A","TAHITI_679A","TAHITI",,,,,,"TAHITI" "0x679B","TAHITI_679B","TAHITI",,,,,,"TAHITI" "0x679E","TAHITI_679E","TAHITI",,,,,,"TAHITI" "0x679F","TAHITI_679F","TAHITI",,,,,,"TAHITI" "0x6800","PITCAIRN_6800","PITCAIRN",1,,,,,"PITCAIRN" "0x6801","PITCAIRN_6801","PITCAIRN",1,,,,,"PITCAIRN" "0x6802","PITCAIRN_6802","PITCAIRN",1,,,,,"PITCAIRN" "0x6806","PITCAIRN_6806","PITCAIRN",,,,,,"PITCAIRN" "0x6808","PITCAIRN_6808","PITCAIRN",,,,,,"PITCAIRN" "0x6809","PITCAIRN_6809","PITCAIRN",,,,,,"PITCAIRN" "0x6810","PITCAIRN_6810","PITCAIRN",,,,,,"PITCAIRN" "0x6811","PITCAIRN_6811","PITCAIRN",,,,,,"PITCAIRN" "0x6816","PITCAIRN_6816","PITCAIRN",,,,,,"PITCAIRN" "0x6817","PITCAIRN_6817","PITCAIRN",,,,,,"PITCAIRN" "0x6818","PITCAIRN_6818","PITCAIRN",,,,,,"PITCAIRN" "0x6819","PITCAIRN_6819","PITCAIRN",,,,,,"PITCAIRN" "0x684C","PITCAIRN_684C","PITCAIRN",,,,,,"PITCAIRN" "0x6820","VERDE_6820","VERDE",1,,,,,"VERDE" "0x6821","VERDE_6821","VERDE",1,,,,,"VERDE" "0x6822","VERDE_6822","VERDE",1,,,,,"VERDE" "0x6823","VERDE_6823","VERDE",1,,,,,"VERDE" "0x6824","VERDE_6824","VERDE",1,,,,,"VERDE" "0x6825","VERDE_6825","VERDE",1,,,,,"VERDE" "0x6826","VERDE_6826","VERDE",1,,,,,"VERDE" "0x6827","VERDE_6827","VERDE",1,,,,,"VERDE" "0x6828","VERDE_6828","VERDE",,,,,,"VERDE" "0x6829","VERDE_6829","VERDE",,,,,,"VERDE" "0x682A","VERDE_682A","VERDE",1,,,,,"VERDE" "0x682B","VERDE_682B","VERDE",1,,,,,"VERDE" "0x682D","VERDE_682D","VERDE",1,,,,,"VERDE" "0x682F","VERDE_682F","VERDE",1,,,,,"VERDE" "0x6830","VERDE_6830","VERDE",1,,,,,"VERDE" "0x6831","VERDE_6831","VERDE",1,,,,,"VERDE" "0x6835","VERDE_6835","VERDE",,,,,,"VERDE" "0x6837","VERDE_6837","VERDE",,,,,,"VERDE" "0x6838","VERDE_6838","VERDE",,,,,,"VERDE" "0x6839","VERDE_6839","VERDE",,,,,,"VERDE" "0x683B","VERDE_683B","VERDE",,,,,,"VERDE" "0x683D","VERDE_683D","VERDE",,,,,,"VERDE" "0x683F","VERDE_683F","VERDE",,,,,,"VERDE" "0x6600","OLAND_6600","OLAND",1,,,,,"OLAND" "0x6601","OLAND_6601","OLAND",1,,,,,"OLAND" "0x6602","OLAND_6602","OLAND",1,,,,,"OLAND" "0x6603","OLAND_6603","OLAND",1,,,,,"OLAND" "0x6606","OLAND_6606","OLAND",1,,,,,"OLAND" "0x6607","OLAND_6607","OLAND",1,,,,,"OLAND" "0x6610","OLAND_6610","OLAND",,,,,,"OLAND" "0x6611","OLAND_6611","OLAND",,,,,,"OLAND" "0x6613","OLAND_6613","OLAND",,,,,,"OLAND" "0x6620","OLAND_6620","OLAND",1,,,,,"OLAND" "0x6621","OLAND_6621","OLAND",1,,,,,"OLAND" "0x6623","OLAND_6623","OLAND",1,,,,,"OLAND" "0x6631","OLAND_6631","OLAND",,,,,,"OLAND" "0x6660","HAINAN_6660","HAINAN",1,,,,,"HAINAN" "0x6663","HAINAN_6663","HAINAN",1,,,,,"HAINAN" "0x6664","HAINAN_6664","HAINAN",1,,,,,"HAINAN" "0x6665","HAINAN_6665","HAINAN",1,,,,,"HAINAN" "0x6667","HAINAN_6667","HAINAN",1,,,,,"HAINAN" "0x666F","HAINAN_666F","HAINAN",1,,,,,"HAINAN" "0x6640","BONAIRE_6640","BONAIRE",1,,,,,"BONAIRE" "0x6641","BONAIRE_6641","BONAIRE",1,,,,,"BONAIRE" "0x6649","BONAIRE_6649","BONAIRE",,,,,,"BONAIRE" "0x6650","BONAIRE_6650","BONAIRE",,,,,,"BONAIRE" "0x6651","BONAIRE_6651","BONAIRE",,,,,,"BONAIRE" "0x6658","BONAIRE_6658","BONAIRE",,,,,,"BONAIRE" "0x665C","BONAIRE_665C","BONAIRE",,,,,,"BONAIRE" "0x665D","BONAIRE_665D","BONAIRE",,,,,,"BONAIRE" "0x9830","KABINI_9830","KABINI",1,1,,,1,"KABINI" "0x9831","KABINI_9831","KABINI",,1,,,1,"KABINI" "0x9832","KABINI_9832","KABINI",1,1,,,1,"KABINI" "0x9833","KABINI_9833","KABINI",,1,,,1,"KABINI" "0x9834","KABINI_9834","KABINI",1,1,,,1,"KABINI" "0x9835","KABINI_9835","KABINI",,1,,,1,"KABINI" "0x9836","KABINI_9836","KABINI",1,1,,,1,"KABINI" "0x9837","KABINI_9837","KABINI",,1,,,1,"KABINI" "0x9838","KABINI_9838","KABINI",1,1,,,1,"KABINI" "0x9839","KABINI_9839","KABINI",1,1,,,1,"KABINI" "0x983A","KABINI_983A","KABINI",,1,,,1,"KABINI" "0x983B","KABINI_983B","KABINI",1,1,,,1,"KABINI" "0x983C","KABINI_983C","KABINI",,1,,,1,"KABINI" "0x983D","KABINI_983D","KABINI",,1,,,1,"KABINI" "0x983E","KABINI_983E","KABINI",,1,,,1,"KABINI" "0x983F","KABINI_983F","KABINI",,1,,,1,"KABINI" "0x1304","KAVERI_1304","KAVERI",1,1,,,1,"KAVERI" "0x1305","KAVERI_1305","KAVERI",,1,,,1,"KAVERI" "0x1306","KAVERI_1306","KAVERI",1,1,,,1,"KAVERI" "0x1307","KAVERI_1307","KAVERI",,1,,,1,"KAVERI" "0x1309","KAVERI_1309","KAVERI",1,1,,,1,"KAVERI" "0x130A","KAVERI_130A","KAVERI",1,1,,,1,"KAVERI" "0x130B","KAVERI_130B","KAVERI",1,1,,,1,"KAVERI" "0x130C","KAVERI_130C","KAVERI",1,1,,,1,"KAVERI" "0x130D","KAVERI_130D","KAVERI",1,1,,,1,"KAVERI" "0x130E","KAVERI_130E","KAVERI",1,1,,,1,"KAVERI" "0x130F","KAVERI_130F","KAVERI",,1,,,1,"KAVERI" "0x1310","KAVERI_1310","KAVERI",,1,,,1,"KAVERI" "0x1311","KAVERI_1311","KAVERI",,1,,,1,"KAVERI" "0x1312","KAVERI_1312","KAVERI",,1,,,1,"KAVERI" "0x1313","KAVERI_1313","KAVERI",,1,,,1,"KAVERI" "0x1315","KAVERI_1315","KAVERI",,1,,,1,"KAVERI" "0x1316","KAVERI_1316","KAVERI",,1,,,1,"KAVERI" "0x1317","KAVERI_1317","KAVERI",1,1,,,1,"KAVERI" "0x131B","KAVERI_131B","KAVERI",,1,,,1,"KAVERI" "0x131C","KAVERI_131C","KAVERI",,1,,,1,"KAVERI" "0x131D","KAVERI_131D","KAVERI",,1,,,1,"KAVERI" "0x67A0","HAWAII_67A0","HAWAII",,,,,,"HAWAII" "0x67A1","HAWAII_67A1","HAWAII",,,,,,"HAWAII" "0x67A2","HAWAII_67A2","HAWAII",,,,,,"HAWAII" "0x67A8","HAWAII_67A8","HAWAII",,,,,,"HAWAII" "0x67A9","HAWAII_67A9","HAWAII",,,,,,"HAWAII" "0x67AA","HAWAII_67AA","HAWAII",,,,,,"HAWAII" "0x67B0","HAWAII_67B0","HAWAII",,,,,,"HAWAII" "0x67B1","HAWAII_67B1","HAWAII",,,,,,"HAWAII" "0x67B8","HAWAII_67B8","HAWAII",,,,,,"HAWAII" "0x67B9","HAWAII_67B9","HAWAII",,,,,,"HAWAII" "0x67BA","HAWAII_67BA","HAWAII",,,,,,"HAWAII" "0x67BE","HAWAII_67BE","HAWAII",,,,,,"HAWAII" xf86-video-ati-7.3.0/src/r600_reg_r6xx.h0000664000175000017500000007227112177731114014406 00000000000000/* * RadeonHD R6xx, R7xx Register documentation * * Copyright (C) 2008-2009 Advanced Micro Devices, Inc. * Copyright (C) 2008-2009 Matthias Hopf * * 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) 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 _R600_REG_R6xx_H_ #define _R600_REG_R6xx_H_ /* * Registers for R6xx chips that are not documented yet */ enum { MM_INDEX = 0x0000, MM_DATA = 0x0004, SRBM_STATUS = 0x0e50, RLC_RQ_PENDING_bit = 1 << 3, RCU_RQ_PENDING_bit = 1 << 4, GRBM_RQ_PENDING_bit = 1 << 5, HI_RQ_PENDING_bit = 1 << 6, IO_EXTERN_SIGNAL_bit = 1 << 7, VMC_BUSY_bit = 1 << 8, MCB_BUSY_bit = 1 << 9, MCDZ_BUSY_bit = 1 << 10, MCDY_BUSY_bit = 1 << 11, MCDX_BUSY_bit = 1 << 12, MCDW_BUSY_bit = 1 << 13, SEM_BUSY_bit = 1 << 14, SRBM_STATUS__RLC_BUSY_bit = 1 << 15, PDMA_BUSY_bit = 1 << 16, IH_BUSY_bit = 1 << 17, CSC_BUSY_bit = 1 << 20, CMC7_BUSY_bit = 1 << 21, CMC6_BUSY_bit = 1 << 22, CMC5_BUSY_bit = 1 << 23, CMC4_BUSY_bit = 1 << 24, CMC3_BUSY_bit = 1 << 25, CMC2_BUSY_bit = 1 << 26, CMC1_BUSY_bit = 1 << 27, CMC0_BUSY_bit = 1 << 28, BIF_BUSY_bit = 1 << 29, IDCT_BUSY_bit = 1 << 30, SRBM_READ_ERROR = 0x0e98, READ_ADDRESS_mask = 0xffff << 2, READ_ADDRESS_shift = 2, READ_REQUESTER_HI_bit = 1 << 24, READ_REQUESTER_GRBM_bit = 1 << 25, READ_REQUESTER_RCU_bit = 1 << 26, READ_REQUESTER_RLC_bit = 1 << 27, READ_ERROR_bit = 1 << 31, SRBM_INT_STATUS = 0x0ea4, RDERR_INT_STAT_bit = 1 << 0, GFX_CNTX_SWITCH_INT_STAT_bit = 1 << 1, SRBM_INT_ACK = 0x0ea8, RDERR_INT_ACK_bit = 1 << 0, GFX_CNTX_SWITCH_INT_ACK_bit = 1 << 1, R6XX_MC_VM_FB_LOCATION = 0x2180, VENDOR_DEVICE_ID = 0x4000, HDP_MEM_COHERENCY_FLUSH_CNTL = 0x5480, D1GRPH_PRIMARY_SURFACE_ADDRESS = 0x6110, D1GRPH_PITCH = 0x6120, D1GRPH_Y_END = 0x6138, GRBM_STATUS = 0x8010, CMDFIFO_AVAIL_mask = 0x1f << 0, CMDFIFO_AVAIL_shift = 0, SRBM_RQ_PENDING_bit = 1 << 5, CP_RQ_PENDING_bit = 1 << 6, CF_RQ_PENDING_bit = 1 << 7, PF_RQ_PENDING_bit = 1 << 8, GRBM_EE_BUSY_bit = 1 << 10, GRBM_STATUS__VC_BUSY_bit = 1 << 11, DB03_CLEAN_bit = 1 << 12, CB03_CLEAN_bit = 1 << 13, VGT_BUSY_NO_DMA_bit = 1 << 16, GRBM_STATUS__VGT_BUSY_bit = 1 << 17, TA03_BUSY_bit = 1 << 18, GRBM_STATUS__TC_BUSY_bit = 1 << 19, SX_BUSY_bit = 1 << 20, SH_BUSY_bit = 1 << 21, SPI03_BUSY_bit = 1 << 22, SMX_BUSY_bit = 1 << 23, SC_BUSY_bit = 1 << 24, PA_BUSY_bit = 1 << 25, DB03_BUSY_bit = 1 << 26, CR_BUSY_bit = 1 << 27, CP_COHERENCY_BUSY_bit = 1 << 28, GRBM_STATUS__CP_BUSY_bit = 1 << 29, CB03_BUSY_bit = 1 << 30, GUI_ACTIVE_bit = 1 << 31, GRBM_STATUS2 = 0x8014, CR_CLEAN_bit = 1 << 0, SMX_CLEAN_bit = 1 << 1, SPI0_BUSY_bit = 1 << 8, SPI1_BUSY_bit = 1 << 9, SPI2_BUSY_bit = 1 << 10, SPI3_BUSY_bit = 1 << 11, TA0_BUSY_bit = 1 << 12, TA1_BUSY_bit = 1 << 13, TA2_BUSY_bit = 1 << 14, TA3_BUSY_bit = 1 << 15, DB0_BUSY_bit = 1 << 16, DB1_BUSY_bit = 1 << 17, DB2_BUSY_bit = 1 << 18, DB3_BUSY_bit = 1 << 19, CB0_BUSY_bit = 1 << 20, CB1_BUSY_bit = 1 << 21, CB2_BUSY_bit = 1 << 22, CB3_BUSY_bit = 1 << 23, GRBM_SOFT_RESET = 0x8020, SOFT_RESET_CP_bit = 1 << 0, SOFT_RESET_CB_bit = 1 << 1, SOFT_RESET_CR_bit = 1 << 2, SOFT_RESET_DB_bit = 1 << 3, SOFT_RESET_PA_bit = 1 << 5, SOFT_RESET_SC_bit = 1 << 6, SOFT_RESET_SMX_bit = 1 << 7, SOFT_RESET_SPI_bit = 1 << 8, SOFT_RESET_SH_bit = 1 << 9, SOFT_RESET_SX_bit = 1 << 10, SOFT_RESET_TC_bit = 1 << 11, SOFT_RESET_TA_bit = 1 << 12, SOFT_RESET_VC_bit = 1 << 13, SOFT_RESET_VGT_bit = 1 << 14, SOFT_RESET_GRBM_GCA_bit = 1 << 15, WAIT_UNTIL = 0x8040, WAIT_CP_DMA_IDLE_bit = 1 << 8, WAIT_CMDFIFO_bit = 1 << 10, WAIT_2D_IDLE_bit = 1 << 14, WAIT_3D_IDLE_bit = 1 << 15, WAIT_2D_IDLECLEAN_bit = 1 << 16, WAIT_3D_IDLECLEAN_bit = 1 << 17, WAIT_EXTERN_SIG_bit = 1 << 19, CMDFIFO_ENTRIES_mask = 0x1f << 20, CMDFIFO_ENTRIES_shift = 20, GRBM_READ_ERROR = 0x8058, /* READ_ADDRESS_mask = 0xffff << 2, */ /* READ_ADDRESS_shift = 2, */ READ_REQUESTER_SRBM_bit = 1 << 28, READ_REQUESTER_CP_bit = 1 << 29, READ_REQUESTER_WU_POLL_bit = 1 << 30, /* READ_ERROR_bit = 1 << 31, */ SCRATCH_REG0 = 0x8500, SCRATCH_REG1 = 0x8504, SCRATCH_REG2 = 0x8508, SCRATCH_REG3 = 0x850c, SCRATCH_REG4 = 0x8510, SCRATCH_REG5 = 0x8514, SCRATCH_REG6 = 0x8518, SCRATCH_REG7 = 0x851c, SCRATCH_UMSK = 0x8540, SCRATCH_ADDR = 0x8544, CP_COHER_CNTL = 0x85f0, DEST_BASE_0_ENA_bit = 1 << 0, DEST_BASE_1_ENA_bit = 1 << 1, SO0_DEST_BASE_ENA_bit = 1 << 2, SO1_DEST_BASE_ENA_bit = 1 << 3, SO2_DEST_BASE_ENA_bit = 1 << 4, SO3_DEST_BASE_ENA_bit = 1 << 5, CB0_DEST_BASE_ENA_bit = 1 << 6, CB1_DEST_BASE_ENA_bit = 1 << 7, CB2_DEST_BASE_ENA_bit = 1 << 8, CB3_DEST_BASE_ENA_bit = 1 << 9, CB4_DEST_BASE_ENA_bit = 1 << 10, CB5_DEST_BASE_ENA_bit = 1 << 11, CB6_DEST_BASE_ENA_bit = 1 << 12, CB7_DEST_BASE_ENA_bit = 1 << 13, DB_DEST_BASE_ENA_bit = 1 << 14, CR_DEST_BASE_ENA_bit = 1 << 15, TC_ACTION_ENA_bit = 1 << 23, VC_ACTION_ENA_bit = 1 << 24, CB_ACTION_ENA_bit = 1 << 25, DB_ACTION_ENA_bit = 1 << 26, SH_ACTION_ENA_bit = 1 << 27, SMX_ACTION_ENA_bit = 1 << 28, CR0_ACTION_ENA_bit = 1 << 29, CR1_ACTION_ENA_bit = 1 << 30, CR2_ACTION_ENA_bit = 1 << 31, CP_COHER_SIZE = 0x85f4, CP_COHER_BASE = 0x85f8, CP_COHER_STATUS = 0x85fc, MATCHING_GFX_CNTX_mask = 0xff << 0, MATCHING_GFX_CNTX_shift = 0, MATCHING_CR_CNTX_mask = 0xffff << 8, MATCHING_CR_CNTX_shift = 8, STATUS_bit = 1 << 31, CP_STALLED_STAT1 = 0x8674, RBIU_TO_DMA_NOT_RDY_TO_RCV_bit = 1 << 0, RBIU_TO_IBS_NOT_RDY_TO_RCV_bit = 1 << 1, RBIU_TO_SEM_NOT_RDY_TO_RCV_bit = 1 << 2, RBIU_TO_2DREGS_NOT_RDY_TO_RCV_bit = 1 << 3, RBIU_TO_MEMWR_NOT_RDY_TO_RCV_bit = 1 << 4, RBIU_TO_MEMRD_NOT_RDY_TO_RCV_bit = 1 << 5, RBIU_TO_EOPD_NOT_RDY_TO_RCV_bit = 1 << 6, RBIU_TO_RECT_NOT_RDY_TO_RCV_bit = 1 << 7, RBIU_TO_STRMO_NOT_RDY_TO_RCV_bit = 1 << 8, RBIU_TO_PSTAT_NOT_RDY_TO_RCV_bit = 1 << 9, MIU_WAITING_ON_RDREQ_FREE_bit = 1 << 16, MIU_WAITING_ON_WRREQ_FREE_bit = 1 << 17, MIU_NEEDS_AVAIL_WRREQ_PHASE_bit = 1 << 18, RCIU_WAITING_ON_GRBM_FREE_bit = 1 << 24, RCIU_WAITING_ON_VGT_FREE_bit = 1 << 25, RCIU_STALLED_ON_ME_READ_bit = 1 << 26, RCIU_STALLED_ON_DMA_READ_bit = 1 << 27, RCIU_HALTED_BY_REG_VIOLATION_bit = 1 << 28, CP_STALLED_STAT2 = 0x8678, PFP_TO_CSF_NOT_RDY_TO_RCV_bit = 1 << 0, PFP_TO_MEQ_NOT_RDY_TO_RCV_bit = 1 << 1, PFP_TO_VGT_NOT_RDY_TO_RCV_bit = 1 << 2, PFP_HALTED_BY_INSTR_VIOLATION_bit = 1 << 3, MULTIPASS_IB_PENDING_IN_PFP_bit = 1 << 4, ME_BRUSH_WC_NOT_RDY_TO_RCV_bit = 1 << 8, ME_STALLED_ON_BRUSH_LOGIC_bit = 1 << 9, CR_CNTX_NOT_AVAIL_TO_ME_bit = 1 << 10, GFX_CNTX_NOT_AVAIL_TO_ME_bit = 1 << 11, ME_RCIU_NOT_RDY_TO_RCV_bit = 1 << 12, ME_TO_CONST_NOT_RDY_TO_RCV_bit = 1 << 13, ME_WAITING_DATA_FROM_PFP_bit = 1 << 14, ME_WAITING_ON_PARTIAL_FLUSH_bit = 1 << 15, RECT_FIFO_NEEDS_CR_RECT_DONE_bit = 1 << 16, RECT_FIFO_NEEDS_WR_CONFIRM_bit = 1 << 17, EOPD_FIFO_NEEDS_SC_EOP_DONE_bit = 1 << 18, EOPD_FIFO_NEEDS_SMX_EOP_DONE_bit = 1 << 19, EOPD_FIFO_NEEDS_WR_CONFIRM_bit = 1 << 20, EOPD_FIFO_NEEDS_SIGNAL_SEM_bit = 1 << 21, SO_NUMPRIM_FIFO_NEEDS_SOADDR_bit = 1 << 22, SO_NUMPRIM_FIFO_NEEDS_NUMPRIM_bit = 1 << 23, PIPE_STATS_FIFO_NEEDS_SAMPLE_bit = 1 << 24, SURF_SYNC_NEEDS_IDLE_CNTXS_bit = 1 << 30, SURF_SYNC_NEEDS_ALL_CLEAN_bit = 1 << 31, CP_BUSY_STAT = 0x867c, REG_BUS_FIFO_BUSY_bit = 1 << 0, RING_FETCHING_DATA_bit = 1 << 1, INDR1_FETCHING_DATA_bit = 1 << 2, INDR2_FETCHING_DATA_bit = 1 << 3, STATE_FETCHING_DATA_bit = 1 << 4, PRED_FETCHING_DATA_bit = 1 << 5, COHER_CNTR_NEQ_ZERO_bit = 1 << 6, PFP_PARSING_PACKETS_bit = 1 << 7, ME_PARSING_PACKETS_bit = 1 << 8, RCIU_PFP_BUSY_bit = 1 << 9, RCIU_ME_BUSY_bit = 1 << 10, OUTSTANDING_READ_TAGS_bit = 1 << 11, SEM_CMDFIFO_NOT_EMPTY_bit = 1 << 12, SEM_FAILED_AND_HOLDING_bit = 1 << 13, SEM_POLLING_FOR_PASS_bit = 1 << 14, _3D_BUSY_bit = 1 << 15, _2D_BUSY_bit = 1 << 16, CP_STAT = 0x8680, CSF_RING_BUSY_bit = 1 << 0, CSF_WPTR_POLL_BUSY_bit = 1 << 1, CSF_INDIRECT1_BUSY_bit = 1 << 2, CSF_INDIRECT2_BUSY_bit = 1 << 3, CSF_STATE_BUSY_bit = 1 << 4, CSF_PREDICATE_BUSY_bit = 1 << 5, CSF_BUSY_bit = 1 << 6, MIU_RDREQ_BUSY_bit = 1 << 7, MIU_WRREQ_BUSY_bit = 1 << 8, ROQ_RING_BUSY_bit = 1 << 9, ROQ_INDIRECT1_BUSY_bit = 1 << 10, ROQ_INDIRECT2_BUSY_bit = 1 << 11, ROQ_STATE_BUSY_bit = 1 << 12, ROQ_PREDICATE_BUSY_bit = 1 << 13, ROQ_ALIGN_BUSY_bit = 1 << 14, PFP_BUSY_bit = 1 << 15, MEQ_BUSY_bit = 1 << 16, ME_BUSY_bit = 1 << 17, QUERY_BUSY_bit = 1 << 18, SEMAPHORE_BUSY_bit = 1 << 19, INTERRUPT_BUSY_bit = 1 << 20, SURFACE_SYNC_BUSY_bit = 1 << 21, DMA_BUSY_bit = 1 << 22, RCIU_BUSY_bit = 1 << 23, CP_STAT__CP_BUSY_bit = 1 << 31, CP_ME_CNTL = 0x86d8, ME_STATMUX_mask = 0xff << 0, ME_STATMUX_shift = 0, ME_HALT_bit = 1 << 28, CP_ME_STATUS = 0x86dc, CP_RB_RPTR = 0x8700, RB_RPTR_mask = 0xfffff << 0, RB_RPTR_shift = 0, CP_RB_WPTR_DELAY = 0x8704, PRE_WRITE_TIMER_mask = 0xfffffff << 0, PRE_WRITE_TIMER_shift = 0, PRE_WRITE_LIMIT_mask = 0x0f << 28, PRE_WRITE_LIMIT_shift = 28, CP_ROQ_RB_STAT = 0x8780, ROQ_RPTR_PRIMARY_mask = 0x3ff << 0, ROQ_RPTR_PRIMARY_shift = 0, ROQ_WPTR_PRIMARY_mask = 0x3ff << 16, ROQ_WPTR_PRIMARY_shift = 16, CP_ROQ_IB1_STAT = 0x8784, ROQ_RPTR_INDIRECT1_mask = 0x3ff << 0, ROQ_RPTR_INDIRECT1_shift = 0, ROQ_WPTR_INDIRECT1_mask = 0x3ff << 16, ROQ_WPTR_INDIRECT1_shift = 16, CP_ROQ_IB2_STAT = 0x8788, ROQ_RPTR_INDIRECT2_mask = 0x3ff << 0, ROQ_RPTR_INDIRECT2_shift = 0, ROQ_WPTR_INDIRECT2_mask = 0x3ff << 16, ROQ_WPTR_INDIRECT2_shift = 16, CP_MEQ_STAT = 0x8794, MEQ_RPTR_mask = 0x3ff << 0, MEQ_RPTR_shift = 0, MEQ_WPTR_mask = 0x3ff << 16, MEQ_WPTR_shift = 16, CC_GC_SHADER_PIPE_CONFIG = 0x8950, INACTIVE_QD_PIPES_mask = 0xff << 8, INACTIVE_QD_PIPES_shift = 8, R6XX_MAX_QD_PIPES = 8, INACTIVE_SIMDS_mask = 0xff << 16, INACTIVE_SIMDS_shift = 16, R6XX_MAX_SIMDS = 8, GC_USER_SHADER_PIPE_CONFIG = 0x8954, VC_ENHANCE = 0x9714, DB_DEBUG = 0x9830, PREZ_MUST_WAIT_FOR_POSTZ_DONE = 1 << 31, DB_WATERMARKS = 0x00009838, DEPTH_FREE_mask = 0x1f << 0, DEPTH_FREE_shift = 0, DEPTH_FLUSH_mask = 0x3f << 5, DEPTH_FLUSH_shift = 5, FORCE_SUMMARIZE_mask = 0x0f << 11, FORCE_SUMMARIZE_shift = 11, DEPTH_PENDING_FREE_mask = 0x1f << 15, DEPTH_PENDING_FREE_shift = 15, DEPTH_CACHELINE_FREE_mask = 0x1f << 20, DEPTH_CACHELINE_FREE_shift = 20, EARLY_Z_PANIC_DISABLE_bit = 1 << 25, LATE_Z_PANIC_DISABLE_bit = 1 << 26, RE_Z_PANIC_DISABLE_bit = 1 << 27, DB_EXTRA_DEBUG_mask = 0x0f << 28, DB_EXTRA_DEBUG_shift = 28, CP_RB_BASE = 0xc100, CP_RB_CNTL = 0xc104, RB_BUFSZ_mask = 0x3f << 0, CP_RB_WPTR = 0xc114, RB_WPTR_mask = 0xfffff << 0, RB_WPTR_shift = 0, CP_RB_RPTR_WR = 0xc108, RB_RPTR_WR_mask = 0xfffff << 0, RB_RPTR_WR_shift = 0, CP_INT_STATUS = 0xc128, DISABLE_CNTX_SWITCH_INT_STAT_bit = 1 << 0, ENABLE_CNTX_SWITCH_INT_STAT_bit = 1 << 1, SEM_SIGNAL_INT_STAT_bit = 1 << 18, CNTX_BUSY_INT_STAT_bit = 1 << 19, CNTX_EMPTY_INT_STAT_bit = 1 << 20, WAITMEM_SEM_INT_STAT_bit = 1 << 21, PRIV_INSTR_INT_STAT_bit = 1 << 22, PRIV_REG_INT_STAT_bit = 1 << 23, OPCODE_ERROR_INT_STAT_bit = 1 << 24, SCRATCH_INT_STAT_bit = 1 << 25, TIME_STAMP_INT_STAT_bit = 1 << 26, RESERVED_BIT_ERROR_INT_STAT_bit = 1 << 27, DMA_INT_STAT_bit = 1 << 28, IB2_INT_STAT_bit = 1 << 29, IB1_INT_STAT_bit = 1 << 30, RB_INT_STAT_bit = 1 << 31, // SX_ALPHA_TEST_CONTROL = 0x00028410, ALPHA_FUNC__REF_NEVER = 0, ALPHA_FUNC__REF_ALWAYS = 7, // DB_SHADER_CONTROL = 0x0002880c, Z_ORDER__EARLY_Z_THEN_LATE_Z = 2, // PA_SU_SC_MODE_CNTL = 0x00028814, // POLY_MODE_mask = 0x03 << 3, POLY_MODE__TRIANGLES = 0, POLY_MODE__DUAL_MODE, // POLYMODE_FRONT_PTYPE_mask = 0x07 << 5, POLYMODE_PTYPE__POINTS = 0, POLYMODE_PTYPE__LINES, POLYMODE_PTYPE__TRIANGLES, PA_SC_AA_SAMPLE_LOCS_8S_WD1_M = 0x00028c20, DB_SRESULTS_COMPARE_STATE0 = 0x00028d28, /* See autoregs: DB_SRESULTS_COMPARE_STATE1 */ // DB_SRESULTS_COMPARE_STATE1 = 0x00028d2c, DB_ALPHA_TO_MASK = 0x00028d44, ALPHA_TO_MASK_ENABLE = 1 << 0, ALPHA_TO_MASK_OFFSET0_mask = 0x03 << 8, ALPHA_TO_MASK_OFFSET0_shift = 8, ALPHA_TO_MASK_OFFSET1_mask = 0x03 << 10, ALPHA_TO_MASK_OFFSET1_shift = 10, ALPHA_TO_MASK_OFFSET2_mask = 0x03 << 12, ALPHA_TO_MASK_OFFSET2_shift = 12, ALPHA_TO_MASK_OFFSET3_mask = 0x03 << 14, ALPHA_TO_MASK_OFFSET3_shift = 14, // SQ_VTX_CONSTANT_WORD2_0 = 0x00038008, // SQ_VTX_CONSTANT_WORD2_0__DATA_FORMAT_mask = 0x3f << 20, FMT_INVALID=0, FMT_8, FMT_4_4, FMT_3_3_2, FMT_16=5, FMT_16_FLOAT, FMT_8_8, FMT_5_6_5, FMT_6_5_5, FMT_1_5_5_5, FMT_4_4_4_4, FMT_5_5_5_1, FMT_32, FMT_32_FLOAT, FMT_16_16, FMT_16_16_FLOAT=16, FMT_8_24, FMT_8_24_FLOAT, FMT_24_8, FMT_24_8_FLOAT, FMT_10_11_11, FMT_10_11_11_FLOAT, FMT_11_11_10, FMT_11_11_10_FLOAT, FMT_2_10_10_10, FMT_8_8_8_8, FMT_10_10_10_2, FMT_X24_8_32_FLOAT, FMT_32_32, FMT_32_32_FLOAT, FMT_16_16_16_16, FMT_16_16_16_16_FLOAT=32, FMT_32_32_32_32=34, FMT_32_32_32_32_FLOAT, FMT_1 = 37, FMT_GB_GR=39, FMT_BG_RG, FMT_32_AS_8, FMT_32_AS_8_8, FMT_5_9_9_9_SHAREDEXP, FMT_8_8_8, FMT_16_16_16, FMT_16_16_16_FLOAT, FMT_32_32_32, FMT_32_32_32_FLOAT=48, // High level register file lengths SQ_ALU_CONSTANT = SQ_ALU_CONSTANT0_0, /* 256 PS, 256 VS */ SQ_ALU_CONSTANT_ps_num = 256, SQ_ALU_CONSTANT_vs_num = 256, SQ_ALU_CONSTANT_all_num = 512, SQ_ALU_CONSTANT_offset = 16, SQ_ALU_CONSTANT_ps = 0, SQ_ALU_CONSTANT_vs = SQ_ALU_CONSTANT_ps + SQ_ALU_CONSTANT_ps_num, SQ_TEX_RESOURCE = SQ_TEX_RESOURCE_WORD0_0, /* 160 PS, 160 VS, 16 FS, 160 GS */ SQ_TEX_RESOURCE_ps_num = 160, SQ_TEX_RESOURCE_vs_num = 160, SQ_TEX_RESOURCE_fs_num = 16, SQ_TEX_RESOURCE_gs_num = 160, SQ_TEX_RESOURCE_all_num = 496, SQ_TEX_RESOURCE_offset = 28, SQ_TEX_RESOURCE_ps = 0, SQ_TEX_RESOURCE_vs = SQ_TEX_RESOURCE_ps + SQ_TEX_RESOURCE_ps_num, SQ_TEX_RESOURCE_fs = SQ_TEX_RESOURCE_vs + SQ_TEX_RESOURCE_vs_num, SQ_TEX_RESOURCE_gs = SQ_TEX_RESOURCE_fs + SQ_TEX_RESOURCE_fs_num, SQ_VTX_RESOURCE = SQ_VTX_CONSTANT_WORD0_0, /* 160 PS, 160 VS, 16 FS, 160 GS */ SQ_VTX_RESOURCE_ps_num = 160, SQ_VTX_RESOURCE_vs_num = 160, SQ_VTX_RESOURCE_fs_num = 16, SQ_VTX_RESOURCE_gs_num = 160, SQ_VTX_RESOURCE_all_num = 496, SQ_VTX_RESOURCE_offset = 28, SQ_VTX_RESOURCE_ps = 0, SQ_VTX_RESOURCE_vs = SQ_VTX_RESOURCE_ps + SQ_VTX_RESOURCE_ps_num, SQ_VTX_RESOURCE_fs = SQ_VTX_RESOURCE_vs + SQ_VTX_RESOURCE_vs_num, SQ_VTX_RESOURCE_gs = SQ_VTX_RESOURCE_fs + SQ_VTX_RESOURCE_fs_num, SQ_TEX_SAMPLER_WORD = SQ_TEX_SAMPLER_WORD0_0, /* 18 per PS, VS, GS */ SQ_TEX_SAMPLER_WORD_ps_num = 18, SQ_TEX_SAMPLER_WORD_vs_num = 18, SQ_TEX_SAMPLER_WORD_gs_num = 18, SQ_TEX_SAMPLER_WORD_all_num = 54, SQ_TEX_SAMPLER_WORD_offset = 12, SQ_TEX_SAMPLER_WORD_ps = 0, SQ_TEX_SAMPLER_WORD_vs = SQ_TEX_SAMPLER_WORD_ps + SQ_TEX_SAMPLER_WORD_ps_num, SQ_TEX_SAMPLER_WORD_gs = SQ_TEX_SAMPLER_WORD_vs + SQ_TEX_SAMPLER_WORD_vs_num, SQ_LOOP_CONST = SQ_LOOP_CONST_0, /* 32 per PS, VS, GS */ SQ_LOOP_CONST_ps_num = 32, SQ_LOOP_CONST_vs_num = 32, SQ_LOOP_CONST_gs_num = 32, SQ_LOOP_CONST_all_num = 96, SQ_LOOP_CONST_offset = 4, SQ_LOOP_CONST_ps = 0, SQ_LOOP_CONST_vs = SQ_LOOP_CONST_ps + SQ_LOOP_CONST_ps_num, SQ_LOOP_CONST_gs = SQ_LOOP_CONST_vs + SQ_LOOP_CONST_vs_num, SQ_BOOL_CONST = SQ_BOOL_CONST_0, /* 32 bits per PS, VS, GS */ SQ_BOOL_CONST_ps_num = 1, SQ_BOOL_CONST_vs_num = 1, SQ_BOOL_CONST_gs_num = 1, SQ_BOOL_CONST_all_num = 3, SQ_BOOL_CONST_offset = 4, SQ_BOOL_CONST_ps = 0, SQ_BOOL_CONST_vs = SQ_BOOL_CONST_ps + SQ_BOOL_CONST_ps_num, SQ_BOOL_CONST_gs = SQ_BOOL_CONST_vs + SQ_BOOL_CONST_vs_num, }; #endif xf86-video-ati-7.3.0/src/evergreen_accel.c0000664000175000017500000013260212177731114015172 00000000000000/* * Copyright 2010 Advanced Micro Devices, 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: Alex Deucher * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "xf86.h" #include #include "radeon.h" #include "evergreen_shader.h" #include "radeon_reg.h" #include "evergreen_reg.h" #include "evergreen_state.h" #include "radeon_drm.h" #include "radeon_vbo.h" #include "radeon_exa_shared.h" static const uint32_t EVERGREEN_ROP[16] = { RADEON_ROP3_ZERO, /* GXclear */ RADEON_ROP3_DSa, /* Gxand */ RADEON_ROP3_SDna, /* GXandReverse */ RADEON_ROP3_S, /* GXcopy */ RADEON_ROP3_DSna, /* GXandInverted */ RADEON_ROP3_D, /* GXnoop */ RADEON_ROP3_DSx, /* GXxor */ RADEON_ROP3_DSo, /* GXor */ RADEON_ROP3_DSon, /* GXnor */ RADEON_ROP3_DSxn, /* GXequiv */ RADEON_ROP3_Dn, /* GXinvert */ RADEON_ROP3_SDno, /* GXorReverse */ RADEON_ROP3_Sn, /* GXcopyInverted */ RADEON_ROP3_DSno, /* GXorInverted */ RADEON_ROP3_DSan, /* GXnand */ RADEON_ROP3_ONE, /* GXset */ }; void evergreen_start_3d(ScrnInfoPtr pScrn) { RADEONInfoPtr info = RADEONPTR(pScrn); BEGIN_BATCH(3); PACK3(IT_CONTEXT_CONTROL, 2); E32(0x80000000); E32(0x80000000); END_BATCH(); } unsigned eg_tile_split(unsigned tile_split) { switch (tile_split) { case 64: tile_split = 0; break; case 128: tile_split = 1; break; case 256: tile_split = 2; break; case 512: tile_split = 3; break; case 1024: tile_split = 4; break; case 2048: tile_split = 5; break; default: case 4096: tile_split = 6; break; } return tile_split; } static unsigned eg_macro_tile_aspect(unsigned macro_tile_aspect) { switch (macro_tile_aspect) { default: case 1: macro_tile_aspect = 0; break; case 2: macro_tile_aspect = 1; break; case 4: macro_tile_aspect = 2; break; case 8: macro_tile_aspect = 3; break; } return macro_tile_aspect; } static unsigned eg_bank_wh(unsigned bankwh) { switch (bankwh) { default: case 1: bankwh = 0; break; case 2: bankwh = 1; break; case 4: bankwh = 2; break; case 8: bankwh = 3; break; } return bankwh; } static unsigned eg_nbanks(unsigned nbanks) { switch (nbanks) { default: case 2: nbanks = 0; break; case 4: nbanks = 1; break; case 8: nbanks = 2; break; case 16: nbanks = 3; break; } return nbanks; } /* * Setup of functional groups */ // asic stack/thread/gpr limits - need to query the drm static void evergreen_sq_setup(ScrnInfoPtr pScrn, sq_config_t *sq_conf) { uint32_t sq_config, sq_gpr_resource_mgmt_1, sq_gpr_resource_mgmt_2, sq_gpr_resource_mgmt_3; uint32_t sq_thread_resource_mgmt, sq_thread_resource_mgmt_2; uint32_t sq_stack_resource_mgmt_1, sq_stack_resource_mgmt_2, sq_stack_resource_mgmt_3; RADEONInfoPtr info = RADEONPTR(pScrn); if ((info->ChipFamily == CHIP_FAMILY_CEDAR) || (info->ChipFamily == CHIP_FAMILY_PALM) || (info->ChipFamily == CHIP_FAMILY_SUMO) || (info->ChipFamily == CHIP_FAMILY_SUMO2) || (info->ChipFamily == CHIP_FAMILY_CAICOS)) sq_config = 0; else sq_config = VC_ENABLE_bit; sq_config |= (EXPORT_SRC_C_bit | (sq_conf->cs_prio << CS_PRIO_shift) | (sq_conf->ls_prio << LS_PRIO_shift) | (sq_conf->hs_prio << HS_PRIO_shift) | (sq_conf->ps_prio << PS_PRIO_shift) | (sq_conf->vs_prio << VS_PRIO_shift) | (sq_conf->gs_prio << GS_PRIO_shift) | (sq_conf->es_prio << ES_PRIO_shift)); sq_gpr_resource_mgmt_1 = ((sq_conf->num_ps_gprs << NUM_PS_GPRS_shift) | (sq_conf->num_vs_gprs << NUM_VS_GPRS_shift) | (sq_conf->num_temp_gprs << NUM_CLAUSE_TEMP_GPRS_shift)); sq_gpr_resource_mgmt_2 = ((sq_conf->num_gs_gprs << NUM_GS_GPRS_shift) | (sq_conf->num_es_gprs << NUM_ES_GPRS_shift)); sq_gpr_resource_mgmt_3 = ((sq_conf->num_hs_gprs << NUM_HS_GPRS_shift) | (sq_conf->num_ls_gprs << NUM_LS_GPRS_shift)); sq_thread_resource_mgmt = ((sq_conf->num_ps_threads << NUM_PS_THREADS_shift) | (sq_conf->num_vs_threads << NUM_VS_THREADS_shift) | (sq_conf->num_gs_threads << NUM_GS_THREADS_shift) | (sq_conf->num_es_threads << NUM_ES_THREADS_shift)); sq_thread_resource_mgmt_2 = ((sq_conf->num_hs_threads << NUM_HS_THREADS_shift) | (sq_conf->num_ls_threads << NUM_LS_THREADS_shift)); sq_stack_resource_mgmt_1 = ((sq_conf->num_ps_stack_entries << NUM_PS_STACK_ENTRIES_shift) | (sq_conf->num_vs_stack_entries << NUM_VS_STACK_ENTRIES_shift)); sq_stack_resource_mgmt_2 = ((sq_conf->num_gs_stack_entries << NUM_GS_STACK_ENTRIES_shift) | (sq_conf->num_es_stack_entries << NUM_ES_STACK_ENTRIES_shift)); sq_stack_resource_mgmt_3 = ((sq_conf->num_hs_stack_entries << NUM_HS_STACK_ENTRIES_shift) | (sq_conf->num_ls_stack_entries << NUM_LS_STACK_ENTRIES_shift)); BEGIN_BATCH(16); /* disable dyn gprs */ EREG(SQ_DYN_GPR_CNTL_PS_FLUSH_REQ, 0); PACK0(SQ_CONFIG, 4); E32(sq_config); E32(sq_gpr_resource_mgmt_1); E32(sq_gpr_resource_mgmt_2); E32(sq_gpr_resource_mgmt_3); PACK0(SQ_THREAD_RESOURCE_MGMT, 5); E32(sq_thread_resource_mgmt); E32(sq_thread_resource_mgmt_2); E32(sq_stack_resource_mgmt_1); E32(sq_stack_resource_mgmt_2); E32(sq_stack_resource_mgmt_3); END_BATCH(); } /* cayman has some minor differences in CB_COLOR*_INFO and _ATTRIB, but none that * we use here. */ void evergreen_set_render_target(ScrnInfoPtr pScrn, cb_config_t *cb_conf, uint32_t domain) { uint32_t cb_color_info, cb_color_attrib = 0, cb_color_dim; unsigned pitch, slice, w, h, array_mode, nbanks; uint32_t tile_split, macro_aspect, bankw, bankh; RADEONInfoPtr info = RADEONPTR(pScrn); if (cb_conf->surface) { switch (cb_conf->surface->level[0].mode) { case RADEON_SURF_MODE_1D: array_mode = 2; break; case RADEON_SURF_MODE_2D: array_mode = 4; break; default: array_mode = 0; break; } w = cb_conf->surface->level[0].npix_x; h = cb_conf->surface->level[0].npix_y; pitch = (cb_conf->surface->level[0].nblk_x >> 3) - 1; slice = ((cb_conf->surface->level[0].nblk_x * cb_conf->surface->level[0].nblk_y) / 64) - 1; tile_split = cb_conf->surface->tile_split; macro_aspect = cb_conf->surface->mtilea; bankw = cb_conf->surface->bankw; bankh = cb_conf->surface->bankh; tile_split = eg_tile_split(tile_split); macro_aspect = eg_macro_tile_aspect(macro_aspect); bankw = eg_bank_wh(bankw); bankh = eg_bank_wh(bankh); } else { pitch = (cb_conf->w / 8) - 1; h = RADEON_ALIGN(cb_conf->h, 8); slice = ((cb_conf->w * h) / 64) - 1; array_mode = cb_conf->array_mode; w = cb_conf->w; tile_split = 4; macro_aspect = 0; bankw = 0; bankh = 0; } nbanks = info->num_banks; nbanks = eg_nbanks(nbanks); cb_color_attrib |= (tile_split << CB_COLOR0_ATTRIB__TILE_SPLIT_shift)| (nbanks << CB_COLOR0_ATTRIB__NUM_BANKS_shift) | (bankw << CB_COLOR0_ATTRIB__BANK_WIDTH_shift) | (bankh << CB_COLOR0_ATTRIB__BANK_HEIGHT_shift) | (macro_aspect << CB_COLOR0_ATTRIB__MACRO_TILE_ASPECT_shift); cb_color_info = ((cb_conf->endian << ENDIAN_shift) | (cb_conf->format << CB_COLOR0_INFO__FORMAT_shift) | (array_mode << CB_COLOR0_INFO__ARRAY_MODE_shift) | (cb_conf->number_type << NUMBER_TYPE_shift) | (cb_conf->comp_swap << COMP_SWAP_shift) | (cb_conf->source_format << SOURCE_FORMAT_shift) | (cb_conf->resource_type << RESOURCE_TYPE_shift)); if (cb_conf->blend_clamp) cb_color_info |= BLEND_CLAMP_bit; if (cb_conf->fast_clear) cb_color_info |= FAST_CLEAR_bit; if (cb_conf->compression) cb_color_info |= COMPRESSION_bit; if (cb_conf->blend_bypass) cb_color_info |= BLEND_BYPASS_bit; if (cb_conf->simple_float) cb_color_info |= SIMPLE_FLOAT_bit; if (cb_conf->round_mode) cb_color_info |= CB_COLOR0_INFO__ROUND_MODE_bit; if (cb_conf->tile_compact) cb_color_info |= CB_COLOR0_INFO__TILE_COMPACT_bit; if (cb_conf->rat) cb_color_info |= RAT_bit; /* bit 4 needs to be set for linear and depth/stencil surfaces */ if (cb_conf->non_disp_tiling) cb_color_attrib |= CB_COLOR0_ATTRIB__NON_DISP_TILING_ORDER_bit; switch (cb_conf->resource_type) { case BUFFER: /* number of elements in the surface */ cb_color_dim = pitch * slice; break; default: /* w/h of the surface */ cb_color_dim = (((w - 1) << WIDTH_MAX_shift) | ((cb_conf->h - 1) << HEIGHT_MAX_shift)); break; } BEGIN_BATCH(3 + 2); EREG(CB_COLOR0_BASE + (0x3c * cb_conf->id), (cb_conf->base >> 8)); RELOC_BATCH(cb_conf->bo, 0, domain); END_BATCH(); /* Set CMASK & FMASK buffer to the offset of color buffer as * we don't use those this shouldn't cause any issue and we * then have a valid cmd stream */ BEGIN_BATCH(3 + 2); EREG(CB_COLOR0_CMASK + (0x3c * cb_conf->id), (0 >> 8)); RELOC_BATCH(cb_conf->bo, 0, domain); END_BATCH(); BEGIN_BATCH(3 + 2); EREG(CB_COLOR0_FMASK + (0x3c * cb_conf->id), (0 >> 8)); RELOC_BATCH(cb_conf->bo, 0, domain); END_BATCH(); /* tiling config */ BEGIN_BATCH(3 + 2); EREG(CB_COLOR0_ATTRIB + (0x3c * cb_conf->id), cb_color_attrib); RELOC_BATCH(cb_conf->bo, 0, domain); END_BATCH(); BEGIN_BATCH(3 + 2); EREG(CB_COLOR0_INFO + (0x3c * cb_conf->id), cb_color_info); RELOC_BATCH(cb_conf->bo, 0, domain); END_BATCH(); BEGIN_BATCH(33); EREG(CB_COLOR0_PITCH + (0x3c * cb_conf->id), pitch); EREG(CB_COLOR0_SLICE + (0x3c * cb_conf->id), slice); EREG(CB_COLOR0_VIEW + (0x3c * cb_conf->id), 0); EREG(CB_COLOR0_DIM + (0x3c * cb_conf->id), cb_color_dim); EREG(CB_COLOR0_CMASK_SLICE + (0x3c * cb_conf->id), 0); EREG(CB_COLOR0_FMASK_SLICE + (0x3c * cb_conf->id), 0); PACK0(CB_COLOR0_CLEAR_WORD0 + (0x3c * cb_conf->id), 4); E32(0); E32(0); E32(0); E32(0); EREG(CB_TARGET_MASK, (cb_conf->pmask << TARGET0_ENABLE_shift)); EREG(CB_COLOR_CONTROL, (EVERGREEN_ROP[cb_conf->rop] | (CB_NORMAL << CB_COLOR_CONTROL__MODE_shift))); EREG(CB_BLEND0_CONTROL, cb_conf->blendcntl); END_BATCH(); } void evergreen_set_blend_color(ScrnInfoPtr pScrn, float *color) { RADEONInfoPtr info = RADEONPTR(pScrn); BEGIN_BATCH(2 + 4); PACK0(CB_BLEND_RED, 4); EFLOAT(color[0]); /* R */ EFLOAT(color[1]); /* G */ EFLOAT(color[2]); /* B */ EFLOAT(color[3]); /* A */ END_BATCH(); } static void evergreen_cp_set_surface_sync(ScrnInfoPtr pScrn, uint32_t sync_type, uint32_t size, uint64_t mc_addr, struct radeon_bo *bo, uint32_t rdomains, uint32_t wdomain) { RADEONInfoPtr info = RADEONPTR(pScrn); uint32_t cp_coher_size; if (size == 0xffffffff) cp_coher_size = 0xffffffff; else cp_coher_size = ((size + 255) >> 8); BEGIN_BATCH(5 + 2); PACK3(IT_SURFACE_SYNC, 4); E32(sync_type); E32(cp_coher_size); E32((mc_addr >> 8)); E32(10); /* poll interval */ RELOC_BATCH(bo, rdomains, wdomain); END_BATCH(); } /* inserts a wait for vline in the command stream */ void evergreen_cp_wait_vline_sync(ScrnInfoPtr pScrn, PixmapPtr pPix, xf86CrtcPtr crtc, int start, int stop) { RADEONInfoPtr info = RADEONPTR(pScrn); drmmode_crtc_private_ptr drmmode_crtc; if (!crtc) return; drmmode_crtc = crtc->driver_private; if (!crtc->enabled) return; if (pPix != pScrn->pScreen->GetScreenPixmap(pScrn->pScreen)) return; start = max(start, crtc->y); stop = min(stop, crtc->y + crtc->mode.VDisplay); if (start >= stop) return; BEGIN_BATCH(11); /* set the VLINE range */ EREG(EVERGREEN_VLINE_START_END, /* this is just a marker */ (start << EVERGREEN_VLINE_START_SHIFT) | (stop << EVERGREEN_VLINE_END_SHIFT)); /* tell the CP to poll the VLINE state register */ PACK3(IT_WAIT_REG_MEM, 6); E32(IT_WAIT_REG | IT_WAIT_EQ); E32(IT_WAIT_ADDR(EVERGREEN_VLINE_STATUS)); E32(0); E32(0); // Ref value E32(EVERGREEN_VLINE_STAT); // Mask E32(10); // Wait interval /* add crtc reloc */ PACK3(IT_NOP, 1); E32(drmmode_crtc->mode_crtc->crtc_id); END_BATCH(); } void evergreen_set_spi(ScrnInfoPtr pScrn, int vs_export_count, int num_interp) { RADEONInfoPtr info = RADEONPTR(pScrn); BEGIN_BATCH(8); /* Interpolator setup */ EREG(SPI_VS_OUT_CONFIG, (vs_export_count << VS_EXPORT_COUNT_shift)); PACK0(SPI_PS_IN_CONTROL_0, 3); E32(((num_interp << NUM_INTERP_shift) | LINEAR_GRADIENT_ENA_bit)); // SPI_PS_IN_CONTROL_0 E32(0); // SPI_PS_IN_CONTROL_1 E32(0); // SPI_INTERP_CONTROL_0 END_BATCH(); } void evergreen_fs_setup(ScrnInfoPtr pScrn, shader_config_t *fs_conf, uint32_t domain) { RADEONInfoPtr info = RADEONPTR(pScrn); uint32_t sq_pgm_resources; sq_pgm_resources = ((fs_conf->num_gprs << NUM_GPRS_shift) | (fs_conf->stack_size << STACK_SIZE_shift)); if (fs_conf->dx10_clamp) sq_pgm_resources |= DX10_CLAMP_bit; BEGIN_BATCH(3 + 2); EREG(SQ_PGM_START_FS, fs_conf->shader_addr >> 8); RELOC_BATCH(fs_conf->bo, domain, 0); END_BATCH(); BEGIN_BATCH(3); EREG(SQ_PGM_RESOURCES_FS, sq_pgm_resources); END_BATCH(); } /* cayman has some minor differences in SQ_PGM_RESOUCES_VS and _RESOURCES_2_VS, * but none that we use here. */ void evergreen_vs_setup(ScrnInfoPtr pScrn, shader_config_t *vs_conf, uint32_t domain) { RADEONInfoPtr info = RADEONPTR(pScrn); uint32_t sq_pgm_resources, sq_pgm_resources_2; sq_pgm_resources = ((vs_conf->num_gprs << NUM_GPRS_shift) | (vs_conf->stack_size << STACK_SIZE_shift)); if (vs_conf->dx10_clamp) sq_pgm_resources |= DX10_CLAMP_bit; if (vs_conf->uncached_first_inst) sq_pgm_resources |= UNCACHED_FIRST_INST_bit; sq_pgm_resources_2 = ((vs_conf->single_round << SINGLE_ROUND_shift) | (vs_conf->double_round << DOUBLE_ROUND_shift)); if (vs_conf->allow_sdi) sq_pgm_resources_2 |= ALLOW_SINGLE_DENORM_IN_bit; if (vs_conf->allow_sd0) sq_pgm_resources_2 |= ALLOW_SINGLE_DENORM_OUT_bit; if (vs_conf->allow_ddi) sq_pgm_resources_2 |= ALLOW_DOUBLE_DENORM_IN_bit; if (vs_conf->allow_ddo) sq_pgm_resources_2 |= ALLOW_DOUBLE_DENORM_OUT_bit; /* flush SQ cache */ evergreen_cp_set_surface_sync(pScrn, SH_ACTION_ENA_bit, vs_conf->shader_size, vs_conf->shader_addr, vs_conf->bo, domain, 0); BEGIN_BATCH(3 + 2); EREG(SQ_PGM_START_VS, vs_conf->shader_addr >> 8); RELOC_BATCH(vs_conf->bo, domain, 0); END_BATCH(); BEGIN_BATCH(4); PACK0(SQ_PGM_RESOURCES_VS, 2); E32(sq_pgm_resources); E32(sq_pgm_resources_2); END_BATCH(); } /* cayman has some minor differences in SQ_PGM_RESOUCES_PS and _RESOURCES_2_PS, * but none that we use here. */ void evergreen_ps_setup(ScrnInfoPtr pScrn, shader_config_t *ps_conf, uint32_t domain) { RADEONInfoPtr info = RADEONPTR(pScrn); uint32_t sq_pgm_resources, sq_pgm_resources_2; sq_pgm_resources = ((ps_conf->num_gprs << NUM_GPRS_shift) | (ps_conf->stack_size << STACK_SIZE_shift)); if (ps_conf->dx10_clamp) sq_pgm_resources |= DX10_CLAMP_bit; if (ps_conf->uncached_first_inst) sq_pgm_resources |= UNCACHED_FIRST_INST_bit; if (ps_conf->clamp_consts) sq_pgm_resources |= CLAMP_CONSTS_bit; sq_pgm_resources_2 = ((ps_conf->single_round << SINGLE_ROUND_shift) | (ps_conf->double_round << DOUBLE_ROUND_shift)); if (ps_conf->allow_sdi) sq_pgm_resources_2 |= ALLOW_SINGLE_DENORM_IN_bit; if (ps_conf->allow_sd0) sq_pgm_resources_2 |= ALLOW_SINGLE_DENORM_OUT_bit; if (ps_conf->allow_ddi) sq_pgm_resources_2 |= ALLOW_DOUBLE_DENORM_IN_bit; if (ps_conf->allow_ddo) sq_pgm_resources_2 |= ALLOW_DOUBLE_DENORM_OUT_bit; /* flush SQ cache */ evergreen_cp_set_surface_sync(pScrn, SH_ACTION_ENA_bit, ps_conf->shader_size, ps_conf->shader_addr, ps_conf->bo, domain, 0); BEGIN_BATCH(3 + 2); EREG(SQ_PGM_START_PS, ps_conf->shader_addr >> 8); RELOC_BATCH(ps_conf->bo, domain, 0); END_BATCH(); BEGIN_BATCH(5); PACK0(SQ_PGM_RESOURCES_PS, 3); E32(sq_pgm_resources); E32(sq_pgm_resources_2); E32(ps_conf->export_mode); END_BATCH(); } void evergreen_set_alu_consts(ScrnInfoPtr pScrn, const_config_t *const_conf, uint32_t domain) { RADEONInfoPtr info = RADEONPTR(pScrn); /* size reg is units of 16 consts (4 dwords each) */ uint32_t size = const_conf->size_bytes >> 8; if (size == 0) size = 1; #if X_BYTE_ORDER == X_BIG_ENDIAN { uint32_t count = size << 4, *p = const_conf->cpu_ptr; while(count--) { *p = cpu_to_le32(*p); p++; } } #endif /* flush SQ cache */ evergreen_cp_set_surface_sync(pScrn, SH_ACTION_ENA_bit, const_conf->size_bytes, const_conf->const_addr, const_conf->bo, domain, 0); switch (const_conf->type) { case SHADER_TYPE_VS: BEGIN_BATCH(3); EREG(SQ_ALU_CONST_BUFFER_SIZE_VS_0, size); END_BATCH(); BEGIN_BATCH(3 + 2); EREG(SQ_ALU_CONST_CACHE_VS_0, const_conf->const_addr >> 8); RELOC_BATCH(const_conf->bo, domain, 0); END_BATCH(); break; case SHADER_TYPE_PS: BEGIN_BATCH(3); EREG(SQ_ALU_CONST_BUFFER_SIZE_PS_0, size); END_BATCH(); BEGIN_BATCH(3 + 2); EREG(SQ_ALU_CONST_CACHE_PS_0, const_conf->const_addr >> 8); RELOC_BATCH(const_conf->bo, domain, 0); END_BATCH(); break; default: ErrorF("Unsupported const type %d\n", const_conf->type); break; } } void evergreen_set_bool_consts(ScrnInfoPtr pScrn, int offset, uint32_t val) { RADEONInfoPtr info = RADEONPTR(pScrn); /* bool register order is: ps, vs/es, gs, hs, ls, cs; one register each * 1 bits per bool; 32 bools each for ps, vs/es, gs, hs, ls, cs. */ BEGIN_BATCH(3); EREG(SQ_BOOL_CONST + offset * SQ_BOOL_CONST_offset, val); END_BATCH(); } /* cayman has some minor differences in SQ_VTX_CONSTANT_WORD2_0 and _WORD3_0, * but none that we use here. */ static void evergreen_set_vtx_resource(ScrnInfoPtr pScrn, vtx_resource_t *res, uint32_t domain) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; uint32_t sq_vtx_constant_word2, sq_vtx_constant_word3, sq_vtx_constant_word4; sq_vtx_constant_word2 = ((((res->vb_addr) >> 32) & BASE_ADDRESS_HI_mask) | ((res->vtx_size_dw << 2) << SQ_VTX_CONSTANT_WORD2_0__STRIDE_shift) | (res->format << SQ_VTX_CONSTANT_WORD2_0__DATA_FORMAT_shift) | (res->num_format_all << SQ_VTX_CONSTANT_WORD2_0__NUM_FORMAT_ALL_shift) | (res->endian << SQ_VTX_CONSTANT_WORD2_0__ENDIAN_SWAP_shift)); if (res->clamp_x) sq_vtx_constant_word2 |= SQ_VTX_CONSTANT_WORD2_0__CLAMP_X_bit; if (res->format_comp_all) sq_vtx_constant_word2 |= SQ_VTX_CONSTANT_WORD2_0__FORMAT_COMP_ALL_bit; if (res->srf_mode_all) sq_vtx_constant_word2 |= SQ_VTX_CONSTANT_WORD2_0__SRF_MODE_ALL_bit; sq_vtx_constant_word3 = ((res->dst_sel_x << SQ_VTX_CONSTANT_WORD3_0__DST_SEL_X_shift) | (res->dst_sel_y << SQ_VTX_CONSTANT_WORD3_0__DST_SEL_Y_shift) | (res->dst_sel_z << SQ_VTX_CONSTANT_WORD3_0__DST_SEL_Z_shift) | (res->dst_sel_w << SQ_VTX_CONSTANT_WORD3_0__DST_SEL_W_shift)); if (res->uncached) sq_vtx_constant_word3 |= SQ_VTX_CONSTANT_WORD3_0__UNCACHED_bit; /* XXX ??? */ sq_vtx_constant_word4 = 0; /* flush vertex cache */ if ((info->ChipFamily == CHIP_FAMILY_CEDAR) || (info->ChipFamily == CHIP_FAMILY_PALM) || (info->ChipFamily == CHIP_FAMILY_SUMO) || (info->ChipFamily == CHIP_FAMILY_SUMO2) || (info->ChipFamily == CHIP_FAMILY_CAICOS) || (info->ChipFamily == CHIP_FAMILY_CAYMAN) || (info->ChipFamily == CHIP_FAMILY_ARUBA)) evergreen_cp_set_surface_sync(pScrn, TC_ACTION_ENA_bit, accel_state->vbo.vb_offset, 0, res->bo, domain, 0); else evergreen_cp_set_surface_sync(pScrn, VC_ACTION_ENA_bit, accel_state->vbo.vb_offset, 0, res->bo, domain, 0); BEGIN_BATCH(10 + 2); PACK0(SQ_FETCH_RESOURCE + res->id * SQ_FETCH_RESOURCE_offset, 8); E32(res->vb_addr & 0xffffffff); // 0: BASE_ADDRESS E32((res->vtx_num_entries << 2) - 1); // 1: SIZE E32(sq_vtx_constant_word2); // 2: BASE_HI, STRIDE, CLAMP, FORMAT, ENDIAN E32(sq_vtx_constant_word3); // 3: swizzles E32(sq_vtx_constant_word4); // 4: num elements E32(0); // 5: n/a E32(0); // 6: n/a E32(SQ_TEX_VTX_VALID_BUFFER << SQ_VTX_CONSTANT_WORD7_0__TYPE_shift); // 7: TYPE RELOC_BATCH(res->bo, domain, 0); END_BATCH(); } /* cayman has some minor differences in SQ_TEX_CONSTANT_WORD0_0 and _WORD4_0, * but none that we use here. */ void evergreen_set_tex_resource(ScrnInfoPtr pScrn, tex_resource_t *tex_res, uint32_t domain) { RADEONInfoPtr info = RADEONPTR(pScrn); uint32_t sq_tex_resource_word0, sq_tex_resource_word1, sq_tex_resource_word4; uint32_t sq_tex_resource_word5, sq_tex_resource_word6, sq_tex_resource_word7; uint32_t array_mode, pitch, tile_split, macro_aspect, bankw, bankh, nbanks; if (tex_res->surface) { switch (tex_res->surface->level[0].mode) { case RADEON_SURF_MODE_1D: array_mode = 2; break; case RADEON_SURF_MODE_2D: array_mode = 4; break; default: array_mode = 0; break; } pitch = tex_res->surface->level[0].nblk_x >> 3; tile_split = tex_res->surface->tile_split; macro_aspect = tex_res->surface->mtilea; bankw = tex_res->surface->bankw; bankh = tex_res->surface->bankh; tile_split = eg_tile_split(tile_split); macro_aspect = eg_macro_tile_aspect(macro_aspect); bankw = eg_bank_wh(bankw); bankh = eg_bank_wh(bankh); } else { array_mode = tex_res->array_mode; pitch = (tex_res->pitch + 7) >> 3; tile_split = 4; macro_aspect = 0; bankw = 0; bankh = 0; } nbanks = info->num_banks; nbanks = eg_nbanks(nbanks); sq_tex_resource_word0 = (tex_res->dim << DIM_shift); if (tex_res->w) sq_tex_resource_word0 |= ( ((pitch - 1) << PITCH_shift) | ((tex_res->w - 1) << TEX_WIDTH_shift) ); if (tex_res->tile_type) sq_tex_resource_word0 |= SQ_TEX_RESOURCE_WORD0_0__NON_DISP_TILING_ORDER_bit; sq_tex_resource_word1 = (array_mode << SQ_TEX_RESOURCE_WORD1_0__ARRAY_MODE_shift); if (tex_res->h) sq_tex_resource_word1 |= ((tex_res->h - 1) << TEX_HEIGHT_shift); if (tex_res->depth) sq_tex_resource_word1 |= ((tex_res->depth - 1) << TEX_DEPTH_shift); sq_tex_resource_word4 = ((tex_res->format_comp_x << FORMAT_COMP_X_shift) | (tex_res->format_comp_y << FORMAT_COMP_Y_shift) | (tex_res->format_comp_z << FORMAT_COMP_Z_shift) | (tex_res->format_comp_w << FORMAT_COMP_W_shift) | (tex_res->num_format_all << SQ_TEX_RESOURCE_WORD4_0__NUM_FORMAT_ALL_shift) | (tex_res->endian << SQ_TEX_RESOURCE_WORD4_0__ENDIAN_SWAP_shift) | (tex_res->dst_sel_x << SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift) | (tex_res->dst_sel_y << SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift) | (tex_res->dst_sel_z << SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift) | (tex_res->dst_sel_w << SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift) | (tex_res->base_level << BASE_LEVEL_shift)); if (tex_res->srf_mode_all) sq_tex_resource_word4 |= SQ_TEX_RESOURCE_WORD4_0__SRF_MODE_ALL_bit; if (tex_res->force_degamma) sq_tex_resource_word4 |= SQ_TEX_RESOURCE_WORD4_0__FORCE_DEGAMMA_bit; sq_tex_resource_word5 = ((tex_res->last_level << LAST_LEVEL_shift) | (tex_res->base_array << BASE_ARRAY_shift) | (tex_res->last_array << LAST_ARRAY_shift)); sq_tex_resource_word6 = ((tex_res->min_lod << SQ_TEX_RESOURCE_WORD6_0__MIN_LOD_shift) | (tex_res->perf_modulation << PERF_MODULATION_shift) | (tile_split << SQ_TEX_RESOURCE_WORD6_0__TILE_SPLIT_shift)); if (tex_res->interlaced) sq_tex_resource_word6 |= INTERLACED_bit; sq_tex_resource_word7 = ((tex_res->format << SQ_TEX_RESOURCE_WORD7_0__DATA_FORMAT_shift) | (macro_aspect << SQ_TEX_RESOURCE_WORD7_0__MACRO_TILE_ASPECT_shift) | (nbanks << SQ_TEX_RESOURCE_WORD7_0__NUM_BANKS_shift) | (bankw << SQ_TEX_RESOURCE_WORD7_0__BANK_WIDTH_shift) | (bankh << SQ_TEX_RESOURCE_WORD7_0__BANK_HEIGHT_shift) | (SQ_TEX_VTX_VALID_TEXTURE << SQ_TEX_RESOURCE_WORD7_0__TYPE_shift)); /* flush texture cache */ evergreen_cp_set_surface_sync(pScrn, TC_ACTION_ENA_bit, tex_res->size, tex_res->base, tex_res->bo, domain, 0); BEGIN_BATCH(10 + 4); PACK0(SQ_FETCH_RESOURCE + tex_res->id * SQ_FETCH_RESOURCE_offset, 8); E32(sq_tex_resource_word0); E32(sq_tex_resource_word1); E32(((tex_res->base) >> 8)); E32(((tex_res->mip_base) >> 8)); E32(sq_tex_resource_word4); E32(sq_tex_resource_word5); E32(sq_tex_resource_word6); E32(sq_tex_resource_word7); RELOC_BATCH(tex_res->bo, domain, 0); RELOC_BATCH(tex_res->mip_bo, domain, 0); END_BATCH(); } /* cayman has some minor differences in SQ_TEX_SAMPLER_WORD0_0, * but none that we use here. */ void evergreen_set_tex_sampler (ScrnInfoPtr pScrn, tex_sampler_t *s) { RADEONInfoPtr info = RADEONPTR(pScrn); uint32_t sq_tex_sampler_word0, sq_tex_sampler_word1, sq_tex_sampler_word2; sq_tex_sampler_word0 = ((s->clamp_x << SQ_TEX_SAMPLER_WORD0_0__CLAMP_X_shift) | (s->clamp_y << CLAMP_Y_shift) | (s->clamp_z << CLAMP_Z_shift) | (s->xy_mag_filter << XY_MAG_FILTER_shift) | (s->xy_min_filter << XY_MIN_FILTER_shift) | (s->z_filter << Z_FILTER_shift) | (s->mip_filter << MIP_FILTER_shift) | (s->border_color << BORDER_COLOR_TYPE_shift) | (s->depth_compare << DEPTH_COMPARE_FUNCTION_shift) | (s->chroma_key << CHROMA_KEY_shift)); sq_tex_sampler_word1 = ((s->min_lod << SQ_TEX_SAMPLER_WORD1_0__MIN_LOD_shift) | (s->max_lod << MAX_LOD_shift) | (s->perf_mip << PERF_MIP_shift) | (s->perf_z << PERF_Z_shift)); sq_tex_sampler_word2 = ((s->lod_bias << SQ_TEX_SAMPLER_WORD2_0__LOD_BIAS_shift) | (s->lod_bias2 << LOD_BIAS_SEC_shift)); if (s->mc_coord_truncate) sq_tex_sampler_word2 |= MC_COORD_TRUNCATE_bit; if (s->force_degamma) sq_tex_sampler_word2 |= SQ_TEX_SAMPLER_WORD2_0__FORCE_DEGAMMA_bit; if (s->truncate_coord) sq_tex_sampler_word2 |= TRUNCATE_COORD_bit; if (s->disable_cube_wrap) sq_tex_sampler_word2 |= SQ_TEX_SAMPLER_WORD2_0__DISABLE_CUBE_WRAP_bit; if (s->type) sq_tex_sampler_word2 |= SQ_TEX_SAMPLER_WORD2_0__TYPE_bit; BEGIN_BATCH(5); PACK0(SQ_TEX_SAMPLER_WORD + s->id * SQ_TEX_SAMPLER_WORD_offset, 3); E32(sq_tex_sampler_word0); E32(sq_tex_sampler_word1); E32(sq_tex_sampler_word2); END_BATCH(); } /* workarounds for hw bugs in eg+ */ /* only affects screen/window/generic/vport. cliprects are not affected */ static void evergreen_fix_scissor_coordinates(ScrnInfoPtr pScrn, int *x1, int *y1, int *x2, int *y2) { RADEONInfoPtr info = RADEONPTR(pScrn); /* all eg+ asics */ if (*x2 == 0) *x1 = 1; if (*y2 == 0) *y1 = 1; /* cayman/tn only */ if (info->ChipFamily >= CHIP_FAMILY_CAYMAN) { /* cliprects aren't affected so we can use them to clip if we need * a true 1x1 clip region */ if ((*x2 == 1) && (*y2 == 1)) *x2 = 2; } } //XXX deal with clip offsets in clip setup void evergreen_set_screen_scissor(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2) { RADEONInfoPtr info = RADEONPTR(pScrn); evergreen_fix_scissor_coordinates(pScrn, &x1, &y1, &x2, &y2); BEGIN_BATCH(4); PACK0(PA_SC_SCREEN_SCISSOR_TL, 2); E32(((x1 << PA_SC_SCREEN_SCISSOR_TL__TL_X_shift) | (y1 << PA_SC_SCREEN_SCISSOR_TL__TL_Y_shift))); E32(((x2 << PA_SC_SCREEN_SCISSOR_BR__BR_X_shift) | (y2 << PA_SC_SCREEN_SCISSOR_BR__BR_Y_shift))); END_BATCH(); } void evergreen_set_vport_scissor(ScrnInfoPtr pScrn, int id, int x1, int y1, int x2, int y2) { RADEONInfoPtr info = RADEONPTR(pScrn); evergreen_fix_scissor_coordinates(pScrn, &x1, &y1, &x2, &y2); BEGIN_BATCH(4); PACK0(PA_SC_VPORT_SCISSOR_0_TL + id * PA_SC_VPORT_SCISSOR_0_TL_offset, 2); E32(((x1 << PA_SC_VPORT_SCISSOR_0_TL__TL_X_shift) | (y1 << PA_SC_VPORT_SCISSOR_0_TL__TL_Y_shift) | WINDOW_OFFSET_DISABLE_bit)); E32(((x2 << PA_SC_VPORT_SCISSOR_0_BR__BR_X_shift) | (y2 << PA_SC_VPORT_SCISSOR_0_BR__BR_Y_shift))); END_BATCH(); } void evergreen_set_generic_scissor(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2) { RADEONInfoPtr info = RADEONPTR(pScrn); evergreen_fix_scissor_coordinates(pScrn, &x1, &y1, &x2, &y2); BEGIN_BATCH(4); PACK0(PA_SC_GENERIC_SCISSOR_TL, 2); E32(((x1 << PA_SC_GENERIC_SCISSOR_TL__TL_X_shift) | (y1 << PA_SC_GENERIC_SCISSOR_TL__TL_Y_shift) | WINDOW_OFFSET_DISABLE_bit)); E32(((x2 << PA_SC_GENERIC_SCISSOR_BR__BR_X_shift) | (y2 << PA_SC_GENERIC_SCISSOR_TL__TL_Y_shift))); END_BATCH(); } void evergreen_set_window_scissor(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2) { RADEONInfoPtr info = RADEONPTR(pScrn); evergreen_fix_scissor_coordinates(pScrn, &x1, &y1, &x2, &y2); BEGIN_BATCH(4); PACK0(PA_SC_WINDOW_SCISSOR_TL, 2); E32(((x1 << PA_SC_WINDOW_SCISSOR_TL__TL_X_shift) | (y1 << PA_SC_WINDOW_SCISSOR_TL__TL_Y_shift) | WINDOW_OFFSET_DISABLE_bit)); E32(((x2 << PA_SC_WINDOW_SCISSOR_BR__BR_X_shift) | (y2 << PA_SC_WINDOW_SCISSOR_BR__BR_Y_shift))); END_BATCH(); } void evergreen_set_clip_rect(ScrnInfoPtr pScrn, int id, int x1, int y1, int x2, int y2) { RADEONInfoPtr info = RADEONPTR(pScrn); BEGIN_BATCH(4); PACK0(PA_SC_CLIPRECT_0_TL + id * PA_SC_CLIPRECT_0_TL_offset, 2); E32(((x1 << PA_SC_CLIPRECT_0_TL__TL_X_shift) | (y1 << PA_SC_CLIPRECT_0_TL__TL_Y_shift))); E32(((x2 << PA_SC_CLIPRECT_0_BR__BR_X_shift) | (y2 << PA_SC_CLIPRECT_0_BR__BR_Y_shift))); END_BATCH(); } /* * Setup of default state */ void evergreen_set_default_state(ScrnInfoPtr pScrn) { tex_resource_t tex_res; shader_config_t fs_conf; sq_config_t sq_conf; int i; RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; if (info->ChipFamily >= CHIP_FAMILY_CAYMAN) { cayman_set_default_state(pScrn); return; } if (accel_state->XInited3D) return; memset(&tex_res, 0, sizeof(tex_resource_t)); memset(&fs_conf, 0, sizeof(shader_config_t)); accel_state->XInited3D = TRUE; evergreen_start_3d(pScrn); /* SQ */ sq_conf.ps_prio = 0; sq_conf.vs_prio = 1; sq_conf.gs_prio = 2; sq_conf.es_prio = 3; sq_conf.hs_prio = 0; sq_conf.ls_prio = 0; sq_conf.cs_prio = 0; switch (info->ChipFamily) { case CHIP_FAMILY_CEDAR: default: sq_conf.num_ps_gprs = 93; sq_conf.num_vs_gprs = 46; sq_conf.num_temp_gprs = 4; sq_conf.num_gs_gprs = 31; sq_conf.num_es_gprs = 31; sq_conf.num_hs_gprs = 23; sq_conf.num_ls_gprs = 23; sq_conf.num_ps_threads = 96; sq_conf.num_vs_threads = 16; sq_conf.num_gs_threads = 16; sq_conf.num_es_threads = 16; sq_conf.num_hs_threads = 16; sq_conf.num_ls_threads = 16; sq_conf.num_ps_stack_entries = 42; sq_conf.num_vs_stack_entries = 42; sq_conf.num_gs_stack_entries = 42; sq_conf.num_es_stack_entries = 42; sq_conf.num_hs_stack_entries = 42; sq_conf.num_ls_stack_entries = 42; break; case CHIP_FAMILY_REDWOOD: sq_conf.num_ps_gprs = 93; sq_conf.num_vs_gprs = 46; sq_conf.num_temp_gprs = 4; sq_conf.num_gs_gprs = 31; sq_conf.num_es_gprs = 31; sq_conf.num_hs_gprs = 23; sq_conf.num_ls_gprs = 23; sq_conf.num_ps_threads = 128; sq_conf.num_vs_threads = 20; sq_conf.num_gs_threads = 20; sq_conf.num_es_threads = 20; sq_conf.num_hs_threads = 20; sq_conf.num_ls_threads = 20; sq_conf.num_ps_stack_entries = 42; sq_conf.num_vs_stack_entries = 42; sq_conf.num_gs_stack_entries = 42; sq_conf.num_es_stack_entries = 42; sq_conf.num_hs_stack_entries = 42; sq_conf.num_ls_stack_entries = 42; break; case CHIP_FAMILY_JUNIPER: sq_conf.num_ps_gprs = 93; sq_conf.num_vs_gprs = 46; sq_conf.num_temp_gprs = 4; sq_conf.num_gs_gprs = 31; sq_conf.num_es_gprs = 31; sq_conf.num_hs_gprs = 23; sq_conf.num_ls_gprs = 23; sq_conf.num_ps_threads = 128; sq_conf.num_vs_threads = 20; sq_conf.num_gs_threads = 20; sq_conf.num_es_threads = 20; sq_conf.num_hs_threads = 20; sq_conf.num_ls_threads = 20; sq_conf.num_ps_stack_entries = 85; sq_conf.num_vs_stack_entries = 85; sq_conf.num_gs_stack_entries = 85; sq_conf.num_es_stack_entries = 85; sq_conf.num_hs_stack_entries = 85; sq_conf.num_ls_stack_entries = 85; break; case CHIP_FAMILY_CYPRESS: case CHIP_FAMILY_HEMLOCK: sq_conf.num_ps_gprs = 93; sq_conf.num_vs_gprs = 46; sq_conf.num_temp_gprs = 4; sq_conf.num_gs_gprs = 31; sq_conf.num_es_gprs = 31; sq_conf.num_hs_gprs = 23; sq_conf.num_ls_gprs = 23; sq_conf.num_ps_threads = 128; sq_conf.num_vs_threads = 20; sq_conf.num_gs_threads = 20; sq_conf.num_es_threads = 20; sq_conf.num_hs_threads = 20; sq_conf.num_ls_threads = 20; sq_conf.num_ps_stack_entries = 85; sq_conf.num_vs_stack_entries = 85; sq_conf.num_gs_stack_entries = 85; sq_conf.num_es_stack_entries = 85; sq_conf.num_hs_stack_entries = 85; sq_conf.num_ls_stack_entries = 85; break; case CHIP_FAMILY_PALM: sq_conf.num_ps_gprs = 93; sq_conf.num_vs_gprs = 46; sq_conf.num_temp_gprs = 4; sq_conf.num_gs_gprs = 31; sq_conf.num_es_gprs = 31; sq_conf.num_hs_gprs = 23; sq_conf.num_ls_gprs = 23; sq_conf.num_ps_threads = 96; sq_conf.num_vs_threads = 16; sq_conf.num_gs_threads = 16; sq_conf.num_es_threads = 16; sq_conf.num_hs_threads = 16; sq_conf.num_ls_threads = 16; sq_conf.num_ps_stack_entries = 42; sq_conf.num_vs_stack_entries = 42; sq_conf.num_gs_stack_entries = 42; sq_conf.num_es_stack_entries = 42; sq_conf.num_hs_stack_entries = 42; sq_conf.num_ls_stack_entries = 42; break; case CHIP_FAMILY_SUMO: sq_conf.num_ps_gprs = 93; sq_conf.num_vs_gprs = 46; sq_conf.num_temp_gprs = 4; sq_conf.num_gs_gprs = 31; sq_conf.num_es_gprs = 31; sq_conf.num_hs_gprs = 23; sq_conf.num_ls_gprs = 23; sq_conf.num_ps_threads = 96; sq_conf.num_vs_threads = 25; sq_conf.num_gs_threads = 25; sq_conf.num_es_threads = 25; sq_conf.num_hs_threads = 25; sq_conf.num_ls_threads = 25; sq_conf.num_ps_stack_entries = 42; sq_conf.num_vs_stack_entries = 42; sq_conf.num_gs_stack_entries = 42; sq_conf.num_es_stack_entries = 42; sq_conf.num_hs_stack_entries = 42; sq_conf.num_ls_stack_entries = 42; break; case CHIP_FAMILY_SUMO2: sq_conf.num_ps_gprs = 93; sq_conf.num_vs_gprs = 46; sq_conf.num_temp_gprs = 4; sq_conf.num_gs_gprs = 31; sq_conf.num_es_gprs = 31; sq_conf.num_hs_gprs = 23; sq_conf.num_ls_gprs = 23; sq_conf.num_ps_threads = 96; sq_conf.num_vs_threads = 25; sq_conf.num_gs_threads = 25; sq_conf.num_es_threads = 25; sq_conf.num_hs_threads = 25; sq_conf.num_ls_threads = 25; sq_conf.num_ps_stack_entries = 85; sq_conf.num_vs_stack_entries = 85; sq_conf.num_gs_stack_entries = 85; sq_conf.num_es_stack_entries = 85; sq_conf.num_hs_stack_entries = 85; sq_conf.num_ls_stack_entries = 85; break; case CHIP_FAMILY_BARTS: sq_conf.num_ps_gprs = 93; sq_conf.num_vs_gprs = 46; sq_conf.num_temp_gprs = 4; sq_conf.num_gs_gprs = 31; sq_conf.num_es_gprs = 31; sq_conf.num_hs_gprs = 23; sq_conf.num_ls_gprs = 23; sq_conf.num_ps_threads = 128; sq_conf.num_vs_threads = 20; sq_conf.num_gs_threads = 20; sq_conf.num_es_threads = 20; sq_conf.num_hs_threads = 20; sq_conf.num_ls_threads = 20; sq_conf.num_ps_stack_entries = 85; sq_conf.num_vs_stack_entries = 85; sq_conf.num_gs_stack_entries = 85; sq_conf.num_es_stack_entries = 85; sq_conf.num_hs_stack_entries = 85; sq_conf.num_ls_stack_entries = 85; break; case CHIP_FAMILY_TURKS: sq_conf.num_ps_gprs = 93; sq_conf.num_vs_gprs = 46; sq_conf.num_temp_gprs = 4; sq_conf.num_gs_gprs = 31; sq_conf.num_es_gprs = 31; sq_conf.num_hs_gprs = 23; sq_conf.num_ls_gprs = 23; sq_conf.num_ps_threads = 128; sq_conf.num_vs_threads = 20; sq_conf.num_gs_threads = 20; sq_conf.num_es_threads = 20; sq_conf.num_hs_threads = 20; sq_conf.num_ls_threads = 20; sq_conf.num_ps_stack_entries = 42; sq_conf.num_vs_stack_entries = 42; sq_conf.num_gs_stack_entries = 42; sq_conf.num_es_stack_entries = 42; sq_conf.num_hs_stack_entries = 42; sq_conf.num_ls_stack_entries = 42; break; case CHIP_FAMILY_CAICOS: sq_conf.num_ps_gprs = 93; sq_conf.num_vs_gprs = 46; sq_conf.num_temp_gprs = 4; sq_conf.num_gs_gprs = 31; sq_conf.num_es_gprs = 31; sq_conf.num_hs_gprs = 23; sq_conf.num_ls_gprs = 23; sq_conf.num_ps_threads = 128; sq_conf.num_vs_threads = 10; sq_conf.num_gs_threads = 10; sq_conf.num_es_threads = 10; sq_conf.num_hs_threads = 10; sq_conf.num_ls_threads = 10; sq_conf.num_ps_stack_entries = 42; sq_conf.num_vs_stack_entries = 42; sq_conf.num_gs_stack_entries = 42; sq_conf.num_es_stack_entries = 42; sq_conf.num_hs_stack_entries = 42; sq_conf.num_ls_stack_entries = 42; break; } evergreen_sq_setup(pScrn, &sq_conf); BEGIN_BATCH(27); EREG(SQ_LDS_ALLOC_PS, 0); EREG(SQ_LDS_RESOURCE_MGMT, 0x10001000); EREG(SQ_DYN_GPR_RESOURCE_LIMIT_1, 0); PACK0(SQ_ESGS_RING_ITEMSIZE, 6); E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); PACK0(SQ_GS_VERT_ITEMSIZE, 4); E32(0); E32(0); E32(0); E32(0); PACK0(SQ_VTX_BASE_VTX_LOC, 2); E32(0); E32(0); END_BATCH(); /* DB */ BEGIN_BATCH(3 + 2); EREG(DB_Z_INFO, 0); RELOC_BATCH(accel_state->shaders_bo, RADEON_GEM_DOMAIN_VRAM, 0); END_BATCH(); BEGIN_BATCH(3 + 2); EREG(DB_STENCIL_INFO, 0); RELOC_BATCH(accel_state->shaders_bo, RADEON_GEM_DOMAIN_VRAM, 0); END_BATCH(); BEGIN_BATCH(3 + 2); EREG(DB_HTILE_DATA_BASE, 0); RELOC_BATCH(accel_state->shaders_bo, RADEON_GEM_DOMAIN_VRAM, 0); END_BATCH(); BEGIN_BATCH(49); EREG(DB_DEPTH_CONTROL, 0); PACK0(PA_SC_VPORT_ZMIN_0, 2); EFLOAT(0.0); // PA_SC_VPORT_ZMIN_0 EFLOAT(1.0); // PA_SC_VPORT_ZMAX_0 PACK0(DB_RENDER_CONTROL, 5); E32(STENCIL_COMPRESS_DISABLE_bit | DEPTH_COMPRESS_DISABLE_bit); // DB_RENDER_CONTROL E32(0); // DB_COUNT_CONTROL E32(0); // DB_DEPTH_VIEW E32(0x2a); // DB_RENDER_OVERRIDE E32(0); // DB_RENDER_OVERRIDE2 PACK0(DB_STENCIL_CLEAR, 2); E32(0); // DB_STENCIL_CLEAR E32(0); // DB_DEPTH_CLEAR EREG(DB_ALPHA_TO_MASK, ((2 << ALPHA_TO_MASK_OFFSET0_shift) | (2 << ALPHA_TO_MASK_OFFSET1_shift) | (2 << ALPHA_TO_MASK_OFFSET2_shift) | (2 << ALPHA_TO_MASK_OFFSET3_shift))); EREG(DB_SHADER_CONTROL, ((EARLY_Z_THEN_LATE_Z << Z_ORDER_shift) | DUAL_EXPORT_ENABLE_bit)); /* Only useful if no depth export */ // SX EREG(SX_MISC, 0); // CB PACK0(SX_ALPHA_TEST_CONTROL, 5); E32(0); // SX_ALPHA_TEST_CONTROL E32(0x00000000); //CB_BLEND_RED E32(0x00000000); //CB_BLEND_GREEN E32(0x00000000); //CB_BLEND_BLUE E32(0x00000000); //CB_BLEND_ALPHA EREG(CB_SHADER_MASK, OUTPUT0_ENABLE_mask); // SC EREG(PA_SC_WINDOW_OFFSET, ((0 << WINDOW_X_OFFSET_shift) | (0 << WINDOW_Y_OFFSET_shift))); EREG(PA_SC_CLIPRECT_RULE, CLIP_RULE_mask); EREG(PA_SC_EDGERULE, 0xAAAAAAAA); EREG(PA_SU_HARDWARE_SCREEN_OFFSET, 0); END_BATCH(); /* clip boolean is set to always visible -> doesn't matter */ for (i = 0; i < PA_SC_CLIPRECT_0_TL_num; i++) evergreen_set_clip_rect (pScrn, i, 0, 0, 8192, 8192); for (i = 0; i < PA_SC_VPORT_SCISSOR_0_TL_num; i++) evergreen_set_vport_scissor (pScrn, i, 0, 0, 8192, 8192); BEGIN_BATCH(57); PACK0(PA_SC_MODE_CNTL_0, 2); E32(0); // PA_SC_MODE_CNTL_0 E32(0); // PA_SC_MODE_CNTL_1 PACK0(PA_SC_LINE_CNTL, 16); E32(0); // PA_SC_LINE_CNTL E32(0); // PA_SC_AA_CONFIG E32(((X_ROUND_TO_EVEN << PA_SU_VTX_CNTL__ROUND_MODE_shift) | PIX_CENTER_bit)); // PA_SU_VTX_CNTL EFLOAT(1.0); // PA_CL_GB_VERT_CLIP_ADJ EFLOAT(1.0); // PA_CL_GB_VERT_DISC_ADJ EFLOAT(1.0); // PA_CL_GB_HORZ_CLIP_ADJ EFLOAT(1.0); // PA_CL_GB_HORZ_DISC_ADJ E32(0); // PA_SC_AA_SAMPLE_LOCS_0 E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); // PA_SC_AA_SAMPLE_LOCS_7 E32(0xFFFFFFFF); // PA_SC_AA_MASK // CL PACK0(PA_CL_CLIP_CNTL, 8); E32(CLIP_DISABLE_bit); // PA_CL_CLIP_CNTL E32(FACE_bit); // PA_SU_SC_MODE_CNTL E32(VTX_XY_FMT_bit); // PA_CL_VTE_CNTL E32(0); // PA_CL_VS_OUT_CNTL E32(0); // PA_CL_NANINF_CNTL E32(0); // PA_SU_LINE_STIPPLE_CNTL E32(0); // PA_SU_LINE_STIPPLE_SCALE E32(0); // PA_SU_PRIM_FILTER_CNTL // SU PACK0(PA_SU_POLY_OFFSET_DB_FMT_CNTL, 6); E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); /* src = semantic id 0; mask = semantic id 1 */ EREG(SPI_VS_OUT_ID_0, ((0 << SEMANTIC_0_shift) | (1 << SEMANTIC_1_shift))); PACK0(SPI_PS_INPUT_CNTL_0 + (0 << 2), 2); /* SPI_PS_INPUT_CNTL_0 maps to GPR[0] - load with semantic id 0 */ E32(((0 << SEMANTIC_shift) | (0x01 << DEFAULT_VAL_shift))); /* SPI_PS_INPUT_CNTL_1 maps to GPR[1] - load with semantic id 1 */ E32(((1 << SEMANTIC_shift) | (0x01 << DEFAULT_VAL_shift))); PACK0(SPI_INPUT_Z, 8); E32(0); // SPI_INPUT_Z E32(0); // SPI_FOG_CNTL E32(LINEAR_CENTROID_ENA__X_ON_AT_CENTROID << LINEAR_CENTROID_ENA_shift); // SPI_BARYC_CNTL E32(0); // SPI_PS_IN_CONTROL_2 E32(0); E32(0); E32(0); E32(0); END_BATCH(); // clear FS fs_conf.bo = accel_state->shaders_bo; evergreen_fs_setup(pScrn, &fs_conf, RADEON_GEM_DOMAIN_VRAM); // VGT BEGIN_BATCH(46); PACK0(VGT_MAX_VTX_INDX, 4); E32(0xffffff); E32(0); E32(0); E32(0); PACK0(VGT_INSTANCE_STEP_RATE_0, 2); E32(0); E32(0); PACK0(VGT_REUSE_OFF, 2); E32(0); E32(0); PACK0(PA_SU_POINT_SIZE, 17); E32(0); // PA_SU_POINT_SIZE E32(0); // PA_SU_POINT_MINMAX E32((8 << PA_SU_LINE_CNTL__WIDTH_shift)); /* Line width 1 pixel */ // PA_SU_LINE_CNTL E32(0); // PA_SC_LINE_STIPPLE E32(0); // VGT_OUTPUT_PATH_CNTL E32(0); // VGT_HOS_CNTL E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); E32(0); // VGT_GS_MODE EREG(VGT_PRIMITIVEID_EN, 0); EREG(VGT_MULTI_PRIM_IB_RESET_EN, 0); EREG(VGT_SHADER_STAGES_EN, 0); PACK0(VGT_STRMOUT_CONFIG, 2); E32(0); E32(0); END_BATCH(); } /* * Commands */ void evergreen_draw_auto(ScrnInfoPtr pScrn, draw_config_t *draw_conf) { RADEONInfoPtr info = RADEONPTR(pScrn); BEGIN_BATCH(10); EREG(VGT_PRIMITIVE_TYPE, draw_conf->prim_type); PACK3(IT_INDEX_TYPE, 1); #if X_BYTE_ORDER == X_BIG_ENDIAN E32(IT_INDEX_TYPE_SWAP_MODE(ENDIAN_8IN32) | draw_conf->index_type); #else E32(draw_conf->index_type); #endif PACK3(IT_NUM_INSTANCES, 1); E32(draw_conf->num_instances); PACK3(IT_DRAW_INDEX_AUTO, 2); E32(draw_conf->num_indices); E32(draw_conf->vgt_draw_initiator); END_BATCH(); } void evergreen_finish_op(ScrnInfoPtr pScrn, int vtx_size) { RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_accel_state *accel_state = info->accel_state; draw_config_t draw_conf; vtx_resource_t vtx_res; if (accel_state->vbo.vb_start_op == -1) return; CLEAR (draw_conf); CLEAR (vtx_res); if (accel_state->vbo.vb_offset == accel_state->vbo.vb_start_op) { radeon_ib_discard(pScrn); radeon_cs_flush_indirect(pScrn); return; } /* Vertex buffer setup */ accel_state->vbo.vb_size = accel_state->vbo.vb_offset - accel_state->vbo.vb_start_op; vtx_res.id = SQ_FETCH_RESOURCE_vs; vtx_res.vtx_size_dw = vtx_size / 4; vtx_res.vtx_num_entries = accel_state->vbo.vb_size / 4; vtx_res.vb_addr = accel_state->vbo.vb_start_op; vtx_res.bo = accel_state->vbo.vb_bo; vtx_res.dst_sel_x = SQ_SEL_X; vtx_res.dst_sel_y = SQ_SEL_Y; vtx_res.dst_sel_z = SQ_SEL_Z; vtx_res.dst_sel_w = SQ_SEL_W; #if X_BYTE_ORDER == X_BIG_ENDIAN vtx_res.endian = SQ_ENDIAN_8IN32; #endif evergreen_set_vtx_resource(pScrn, &vtx_res, RADEON_GEM_DOMAIN_GTT); /* Draw */ draw_conf.prim_type = DI_PT_RECTLIST; draw_conf.vgt_draw_initiator = DI_SRC_SEL_AUTO_INDEX; draw_conf.num_instances = 1; draw_conf.num_indices = vtx_res.vtx_num_entries / vtx_res.vtx_size_dw; draw_conf.index_type = DI_INDEX_SIZE_16_BIT; evergreen_draw_auto(pScrn, &draw_conf); /* sync dst surface */ evergreen_cp_set_surface_sync(pScrn, (CB_ACTION_ENA_bit | CB0_DEST_BASE_ENA_bit), accel_state->dst_size, 0, accel_state->dst_obj.bo, 0, accel_state->dst_obj.domain); accel_state->vbo.vb_start_op = -1; accel_state->cbuf.vb_start_op = -1; accel_state->ib_reset_op = 0; } xf86-video-ati-7.3.0/src/r600_reg_auto_r6xx.h0000664000175000017500000057113212177731114015436 00000000000000/* * RadeonHD R6xx, R7xx Register documentation * * Copyright (C) 2008-2009 Advanced Micro Devices, Inc. * Copyright (C) 2008-2009 Matthias Hopf * * 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) 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 _AUTOREGS #define _AUTOREGS enum { VGT_VTX_VECT_EJECT_REG = 0x000088b0, PRIM_COUNT_mask = 0x3ff << 0, PRIM_COUNT_shift = 0, VGT_LAST_COPY_STATE = 0x000088c0, SRC_STATE_ID_mask = 0x07 << 0, SRC_STATE_ID_shift = 0, DST_STATE_ID_mask = 0x07 << 16, DST_STATE_ID_shift = 16, VGT_CACHE_INVALIDATION = 0x000088c4, CACHE_INVALIDATION_mask = 0x03 << 0, CACHE_INVALIDATION_shift = 0, VC_ONLY = 0x00, TC_ONLY = 0x01, VC_AND_TC = 0x02, VS_NO_EXTRA_BUFFER_bit = 1 << 5, VGT_GS_PER_ES = 0x000088c8, VGT_ES_PER_GS = 0x000088cc, VGT_GS_VERTEX_REUSE = 0x000088d4, VERT_REUSE_mask = 0x1f << 0, VERT_REUSE_shift = 0, VGT_MC_LAT_CNTL = 0x000088d8, MC_TIME_STAMP_RES_mask = 0x03 << 0, MC_TIME_STAMP_RES_shift = 0, X_0_992_MAX_LATENCY = 0x00, X_0_496_MAX_LATENCY = 0x01, X_0_248_MAX_LATENCY = 0x02, X_0_124_MAX_LATENCY = 0x03, VGT_GS_PER_VS = 0x000088e8, GS_PER_VS_mask = 0x0f << 0, GS_PER_VS_shift = 0, VGT_CNTL_STATUS = 0x000088f0, VGT_OUT_INDX_BUSY_bit = 1 << 0, VGT_OUT_BUSY_bit = 1 << 1, VGT_PT_BUSY_bit = 1 << 2, VGT_TE_BUSY_bit = 1 << 3, VGT_VR_BUSY_bit = 1 << 4, VGT_GRP_BUSY_bit = 1 << 5, VGT_DMA_REQ_BUSY_bit = 1 << 6, VGT_DMA_BUSY_bit = 1 << 7, VGT_GS_BUSY_bit = 1 << 8, VGT_BUSY_bit = 1 << 9, VGT_PRIMITIVE_TYPE = 0x00008958, VGT_PRIMITIVE_TYPE__PRIM_TYPE_mask = 0x3f << 0, VGT_PRIMITIVE_TYPE__PRIM_TYPE_shift = 0, DI_PT_NONE = 0x00, DI_PT_POINTLIST = 0x01, DI_PT_LINELIST = 0x02, DI_PT_LINESTRIP = 0x03, DI_PT_TRILIST = 0x04, DI_PT_TRIFAN = 0x05, DI_PT_TRISTRIP = 0x06, DI_PT_UNUSED_0 = 0x07, DI_PT_UNUSED_1 = 0x08, DI_PT_UNUSED_2 = 0x09, DI_PT_LINELIST_ADJ = 0x0a, DI_PT_LINESTRIP_ADJ = 0x0b, DI_PT_TRILIST_ADJ = 0x0c, DI_PT_TRISTRIP_ADJ = 0x0d, DI_PT_UNUSED_3 = 0x0e, DI_PT_UNUSED_4 = 0x0f, DI_PT_TRI_WITH_WFLAGS = 0x10, DI_PT_RECTLIST = 0x11, DI_PT_LINELOOP = 0x12, DI_PT_QUADLIST = 0x13, DI_PT_QUADSTRIP = 0x14, DI_PT_POLYGON = 0x15, DI_PT_2D_COPY_RECT_LIST_V0 = 0x16, DI_PT_2D_COPY_RECT_LIST_V1 = 0x17, DI_PT_2D_COPY_RECT_LIST_V2 = 0x18, DI_PT_2D_COPY_RECT_LIST_V3 = 0x19, DI_PT_2D_FILL_RECT_LIST = 0x1a, DI_PT_2D_LINE_STRIP = 0x1b, DI_PT_2D_TRI_STRIP = 0x1c, VGT_INDEX_TYPE = 0x0000895c, INDEX_TYPE_mask = 0x03 << 0, INDEX_TYPE_shift = 0, DI_INDEX_SIZE_16_BIT = 0x00, DI_INDEX_SIZE_32_BIT = 0x01, VGT_STRMOUT_BUFFER_FILLED_SIZE_0 = 0x00008960, VGT_STRMOUT_BUFFER_FILLED_SIZE_1 = 0x00008964, VGT_STRMOUT_BUFFER_FILLED_SIZE_2 = 0x00008968, VGT_STRMOUT_BUFFER_FILLED_SIZE_3 = 0x0000896c, VGT_NUM_INDICES = 0x00008970, VGT_NUM_INSTANCES = 0x00008974, PA_CL_CNTL_STATUS = 0x00008a10, CL_BUSY_bit = 1 << 31, PA_CL_ENHANCE = 0x00008a14, CLIP_VTX_REORDER_ENA_bit = 1 << 0, NUM_CLIP_SEQ_mask = 0x03 << 1, NUM_CLIP_SEQ_shift = 1, CLIPPED_PRIM_SEQ_STALL_bit = 1 << 3, VE_NAN_PROC_DISABLE_bit = 1 << 4, PA_SU_CNTL_STATUS = 0x00008a50, SU_BUSY_bit = 1 << 31, PA_SC_LINE_STIPPLE_STATE = 0x00008b10, CURRENT_PTR_mask = 0x0f << 0, CURRENT_PTR_shift = 0, CURRENT_COUNT_mask = 0xff << 8, CURRENT_COUNT_shift = 8, PA_SC_MULTI_CHIP_CNTL = 0x00008b20, LOG2_NUM_CHIPS_mask = 0x07 << 0, LOG2_NUM_CHIPS_shift = 0, MULTI_CHIP_TILE_SIZE_mask = 0x03 << 3, MULTI_CHIP_TILE_SIZE_shift = 3, X_16_X_16_PIXEL_TILE_PER_CHIP = 0x00, X_32_X_32_PIXEL_TILE_PER_CHIP = 0x01, X_64_X_64_PIXEL_TILE_PER_CHIP = 0x02, X_128X128_PIXEL_TILE_PER_CHIP = 0x03, CHIP_TILE_X_LOC_mask = 0x07 << 5, CHIP_TILE_X_LOC_shift = 5, CHIP_TILE_Y_LOC_mask = 0x07 << 8, CHIP_TILE_Y_LOC_shift = 8, CHIP_SUPER_TILE_B_bit = 1 << 11, PA_SC_AA_SAMPLE_LOCS_2S = 0x00008b40, S0_X_mask = 0x0f << 0, S0_X_shift = 0, S0_Y_mask = 0x0f << 4, S0_Y_shift = 4, S1_X_mask = 0x0f << 8, S1_X_shift = 8, S1_Y_mask = 0x0f << 12, S1_Y_shift = 12, PA_SC_AA_SAMPLE_LOCS_4S = 0x00008b44, /* S0_X_mask = 0x0f << 0, */ /* S0_X_shift = 0, */ /* S0_Y_mask = 0x0f << 4, */ /* S0_Y_shift = 4, */ /* S1_X_mask = 0x0f << 8, */ /* S1_X_shift = 8, */ /* S1_Y_mask = 0x0f << 12, */ /* S1_Y_shift = 12, */ S2_X_mask = 0x0f << 16, S2_X_shift = 16, S2_Y_mask = 0x0f << 20, S2_Y_shift = 20, S3_X_mask = 0x0f << 24, S3_X_shift = 24, S3_Y_mask = 0x0f << 28, S3_Y_shift = 28, PA_SC_AA_SAMPLE_LOCS_8S_WD0 = 0x00008b48, /* S0_X_mask = 0x0f << 0, */ /* S0_X_shift = 0, */ /* S0_Y_mask = 0x0f << 4, */ /* S0_Y_shift = 4, */ /* S1_X_mask = 0x0f << 8, */ /* S1_X_shift = 8, */ /* S1_Y_mask = 0x0f << 12, */ /* S1_Y_shift = 12, */ /* S2_X_mask = 0x0f << 16, */ /* S2_X_shift = 16, */ /* S2_Y_mask = 0x0f << 20, */ /* S2_Y_shift = 20, */ /* S3_X_mask = 0x0f << 24, */ /* S3_X_shift = 24, */ /* S3_Y_mask = 0x0f << 28, */ /* S3_Y_shift = 28, */ PA_SC_AA_SAMPLE_LOCS_8S_WD1 = 0x00008b4c, S4_X_mask = 0x0f << 0, S4_X_shift = 0, S4_Y_mask = 0x0f << 4, S4_Y_shift = 4, S5_X_mask = 0x0f << 8, S5_X_shift = 8, S5_Y_mask = 0x0f << 12, S5_Y_shift = 12, S6_X_mask = 0x0f << 16, S6_X_shift = 16, S6_Y_mask = 0x0f << 20, S6_Y_shift = 20, S7_X_mask = 0x0f << 24, S7_X_shift = 24, S7_Y_mask = 0x0f << 28, S7_Y_shift = 28, PA_SC_CNTL_STATUS = 0x00008be0, MPASS_OVERFLOW_bit = 1 << 30, PA_SC_ENHANCE = 0x00008bf0, FORCE_EOV_MAX_CLK_CNT_mask = 0xfff << 0, FORCE_EOV_MAX_CLK_CNT_shift = 0, FORCE_EOV_MAX_TILE_CNT_mask = 0xfff << 12, FORCE_EOV_MAX_TILE_CNT_shift = 12, SQ_CONFIG = 0x00008c00, VC_ENABLE_bit = 1 << 0, EXPORT_SRC_C_bit = 1 << 1, DX9_CONSTS_bit = 1 << 2, ALU_INST_PREFER_VECTOR_bit = 1 << 3, SQ_CONFIG__DX10_CLAMP_bit = 1 << 4, ALU_PREFER_ONE_WATERFALL_bit = 1 << 5, ALU_MAX_ONE_WATERFALL_bit = 1 << 6, CLAUSE_SEQ_PRIO_mask = 0x03 << 8, CLAUSE_SEQ_PRIO_shift = 8, SQ_CL_PRIO_RND_ROBIN = 0x00, SQ_CL_PRIO_MACRO_SEQ = 0x01, SQ_CL_PRIO_NONE = 0x02, PS_PRIO_mask = 0x03 << 24, PS_PRIO_shift = 24, VS_PRIO_mask = 0x03 << 26, VS_PRIO_shift = 26, GS_PRIO_mask = 0x03 << 28, GS_PRIO_shift = 28, ES_PRIO_mask = 0x03 << 30, ES_PRIO_shift = 30, SQ_GPR_RESOURCE_MGMT_1 = 0x00008c04, NUM_PS_GPRS_mask = 0xff << 0, NUM_PS_GPRS_shift = 0, NUM_VS_GPRS_mask = 0xff << 16, NUM_VS_GPRS_shift = 16, NUM_CLAUSE_TEMP_GPRS_mask = 0x0f << 28, NUM_CLAUSE_TEMP_GPRS_shift = 28, SQ_GPR_RESOURCE_MGMT_2 = 0x00008c08, NUM_GS_GPRS_mask = 0xff << 0, NUM_GS_GPRS_shift = 0, NUM_ES_GPRS_mask = 0xff << 16, NUM_ES_GPRS_shift = 16, SQ_THREAD_RESOURCE_MGMT = 0x00008c0c, NUM_PS_THREADS_mask = 0xff << 0, NUM_PS_THREADS_shift = 0, NUM_VS_THREADS_mask = 0xff << 8, NUM_VS_THREADS_shift = 8, NUM_GS_THREADS_mask = 0xff << 16, NUM_GS_THREADS_shift = 16, NUM_ES_THREADS_mask = 0xff << 24, NUM_ES_THREADS_shift = 24, SQ_STACK_RESOURCE_MGMT_1 = 0x00008c10, NUM_PS_STACK_ENTRIES_mask = 0xfff << 0, NUM_PS_STACK_ENTRIES_shift = 0, NUM_VS_STACK_ENTRIES_mask = 0xfff << 16, NUM_VS_STACK_ENTRIES_shift = 16, SQ_STACK_RESOURCE_MGMT_2 = 0x00008c14, NUM_GS_STACK_ENTRIES_mask = 0xfff << 0, NUM_GS_STACK_ENTRIES_shift = 0, NUM_ES_STACK_ENTRIES_mask = 0xfff << 16, NUM_ES_STACK_ENTRIES_shift = 16, SQ_ESGS_RING_BASE = 0x00008c40, SQ_ESGS_RING_SIZE = 0x00008c44, SQ_GSVS_RING_BASE = 0x00008c48, SQ_GSVS_RING_SIZE = 0x00008c4c, SQ_ESTMP_RING_BASE = 0x00008c50, SQ_ESTMP_RING_SIZE = 0x00008c54, SQ_GSTMP_RING_BASE = 0x00008c58, SQ_GSTMP_RING_SIZE = 0x00008c5c, SQ_VSTMP_RING_BASE = 0x00008c60, SQ_VSTMP_RING_SIZE = 0x00008c64, SQ_PSTMP_RING_BASE = 0x00008c68, SQ_PSTMP_RING_SIZE = 0x00008c6c, SQ_FBUF_RING_BASE = 0x00008c70, SQ_FBUF_RING_SIZE = 0x00008c74, SQ_REDUC_RING_BASE = 0x00008c78, SQ_REDUC_RING_SIZE = 0x00008c7c, SQ_ALU_WORD1_OP3 = 0x00008dfc, SRC2_SEL_mask = 0x1ff << 0, SRC2_SEL_shift = 0, SQ_ALU_SRC_0 = 0xf8, SQ_ALU_SRC_1 = 0xf9, SQ_ALU_SRC_1_INT = 0xfa, SQ_ALU_SRC_M_1_INT = 0xfb, SQ_ALU_SRC_0_5 = 0xfc, SQ_ALU_SRC_LITERAL = 0xfd, SQ_ALU_SRC_PV = 0xfe, SQ_ALU_SRC_PS = 0xff, SRC2_REL_bit = 1 << 9, SRC2_CHAN_mask = 0x03 << 10, SRC2_CHAN_shift = 10, SQ_CHAN_X = 0x00, SQ_CHAN_Y = 0x01, SQ_CHAN_Z = 0x02, SQ_CHAN_W = 0x03, SRC2_NEG_bit = 1 << 12, SQ_ALU_WORD1_OP3__ALU_INST_mask = 0x1f << 13, SQ_ALU_WORD1_OP3__ALU_INST_shift = 13, SQ_OP3_INST_MUL_LIT = 0x0c, SQ_OP3_INST_MUL_LIT_M2 = 0x0d, SQ_OP3_INST_MUL_LIT_M4 = 0x0e, SQ_OP3_INST_MUL_LIT_D2 = 0x0f, SQ_OP3_INST_MULADD = 0x10, SQ_OP3_INST_MULADD_M2 = 0x11, SQ_OP3_INST_MULADD_M4 = 0x12, SQ_OP3_INST_MULADD_D2 = 0x13, SQ_OP3_INST_MULADD_IEEE = 0x14, SQ_OP3_INST_MULADD_IEEE_M2 = 0x15, SQ_OP3_INST_MULADD_IEEE_M4 = 0x16, SQ_OP3_INST_MULADD_IEEE_D2 = 0x17, SQ_OP3_INST_CNDE = 0x18, SQ_OP3_INST_CNDGT = 0x19, SQ_OP3_INST_CNDGE = 0x1a, SQ_OP3_INST_CNDE_INT = 0x1c, SQ_OP3_INST_CNDGT_INT = 0x1d, SQ_OP3_INST_CNDGE_INT = 0x1e, SQ_TEX_WORD2 = 0x00008dfc, OFFSET_X_mask = 0x1f << 0, OFFSET_X_shift = 0, OFFSET_Y_mask = 0x1f << 5, OFFSET_Y_shift = 5, OFFSET_Z_mask = 0x1f << 10, OFFSET_Z_shift = 10, SAMPLER_ID_mask = 0x1f << 15, SAMPLER_ID_shift = 15, SQ_TEX_WORD2__SRC_SEL_X_mask = 0x07 << 20, SQ_TEX_WORD2__SRC_SEL_X_shift = 20, SQ_SEL_X = 0x00, SQ_SEL_Y = 0x01, SQ_SEL_Z = 0x02, SQ_SEL_W = 0x03, SQ_SEL_0 = 0x04, SQ_SEL_1 = 0x05, SRC_SEL_Y_mask = 0x07 << 23, SRC_SEL_Y_shift = 23, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SRC_SEL_Z_mask = 0x07 << 26, SRC_SEL_Z_shift = 26, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SRC_SEL_W_mask = 0x07 << 29, SRC_SEL_W_shift = 29, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_CF_ALLOC_EXPORT_WORD1 = 0x00008dfc, BURST_COUNT_mask = 0x0f << 17, BURST_COUNT_shift = 17, END_OF_PROGRAM_bit = 1 << 21, VALID_PIXEL_MODE_bit = 1 << 22, SQ_CF_ALLOC_EXPORT_WORD1__CF_INST_mask = 0x7f << 23, SQ_CF_ALLOC_EXPORT_WORD1__CF_INST_shift = 23, SQ_CF_INST_MEM_STREAM0 = 0x20, SQ_CF_INST_MEM_STREAM1 = 0x21, SQ_CF_INST_MEM_STREAM2 = 0x22, SQ_CF_INST_MEM_STREAM3 = 0x23, SQ_CF_INST_MEM_SCRATCH = 0x24, SQ_CF_INST_MEM_REDUCTION = 0x25, SQ_CF_INST_MEM_RING = 0x26, SQ_CF_INST_EXPORT = 0x27, SQ_CF_INST_EXPORT_DONE = 0x28, WHOLE_QUAD_MODE_bit = 1 << 30, BARRIER_bit = 1 << 31, SQ_CF_ALU_WORD1 = 0x00008dfc, KCACHE_MODE1_mask = 0x03 << 0, KCACHE_MODE1_shift = 0, SQ_CF_KCACHE_NOP = 0x00, SQ_CF_KCACHE_LOCK_1 = 0x01, SQ_CF_KCACHE_LOCK_2 = 0x02, SQ_CF_KCACHE_LOCK_LOOP_INDEX = 0x03, KCACHE_ADDR0_mask = 0xff << 2, KCACHE_ADDR0_shift = 2, KCACHE_ADDR1_mask = 0xff << 10, KCACHE_ADDR1_shift = 10, SQ_CF_ALU_WORD1__COUNT_mask = 0x7f << 18, SQ_CF_ALU_WORD1__COUNT_shift = 18, SQ_CF_ALU_WORD1__ALT_CONST_bit = 1 << 25, SQ_CF_ALU_WORD1__CF_INST_mask = 0x0f << 26, SQ_CF_ALU_WORD1__CF_INST_shift = 26, SQ_CF_INST_ALU = 0x08, SQ_CF_INST_ALU_PUSH_BEFORE = 0x09, SQ_CF_INST_ALU_POP_AFTER = 0x0a, SQ_CF_INST_ALU_POP2_AFTER = 0x0b, SQ_CF_INST_ALU_CONTINUE = 0x0d, SQ_CF_INST_ALU_BREAK = 0x0e, SQ_CF_INST_ALU_ELSE_AFTER = 0x0f, /* WHOLE_QUAD_MODE_bit = 1 << 30, */ /* BARRIER_bit = 1 << 31, */ SQ_TEX_WORD1 = 0x00008dfc, SQ_TEX_WORD1__DST_GPR_mask = 0x7f << 0, SQ_TEX_WORD1__DST_GPR_shift = 0, SQ_TEX_WORD1__DST_REL_bit = 1 << 7, SQ_TEX_WORD1__DST_SEL_X_mask = 0x07 << 9, SQ_TEX_WORD1__DST_SEL_X_shift = 9, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_SEL_MASK = 0x07, SQ_TEX_WORD1__DST_SEL_Y_mask = 0x07 << 12, SQ_TEX_WORD1__DST_SEL_Y_shift = 12, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_TEX_WORD1__DST_SEL_Z_mask = 0x07 << 15, SQ_TEX_WORD1__DST_SEL_Z_shift = 15, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_TEX_WORD1__DST_SEL_W_mask = 0x07 << 18, SQ_TEX_WORD1__DST_SEL_W_shift = 18, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_TEX_WORD1__LOD_BIAS_mask = 0x7f << 21, SQ_TEX_WORD1__LOD_BIAS_shift = 21, COORD_TYPE_X_bit = 1 << 28, COORD_TYPE_Y_bit = 1 << 29, COORD_TYPE_Z_bit = 1 << 30, COORD_TYPE_W_bit = 1 << 31, SQ_VTX_WORD0 = 0x00008dfc, VTX_INST_mask = 0x1f << 0, VTX_INST_shift = 0, SQ_VTX_INST_FETCH = 0x00, SQ_VTX_INST_SEMANTIC = 0x01, FETCH_TYPE_mask = 0x03 << 5, FETCH_TYPE_shift = 5, SQ_VTX_FETCH_VERTEX_DATA = 0x00, SQ_VTX_FETCH_INSTANCE_DATA = 0x01, SQ_VTX_FETCH_NO_INDEX_OFFSET = 0x02, FETCH_WHOLE_QUAD_bit = 1 << 7, BUFFER_ID_mask = 0xff << 8, BUFFER_ID_shift = 8, SRC_GPR_mask = 0x7f << 16, SRC_GPR_shift = 16, SRC_REL_bit = 1 << 23, SQ_VTX_WORD0__SRC_SEL_X_mask = 0x03 << 24, SQ_VTX_WORD0__SRC_SEL_X_shift = 24, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ MEGA_FETCH_COUNT_mask = 0x3f << 26, MEGA_FETCH_COUNT_shift = 26, SQ_CF_ALLOC_EXPORT_WORD1_SWIZ = 0x00008dfc, SEL_X_mask = 0x07 << 0, SEL_X_shift = 0, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SEL_Y_mask = 0x07 << 3, SEL_Y_shift = 3, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SEL_Z_mask = 0x07 << 6, SEL_Z_shift = 6, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SEL_W_mask = 0x07 << 9, SEL_W_shift = 9, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_ALU_WORD1 = 0x00008dfc, ENCODING_mask = 0x07 << 15, ENCODING_shift = 15, BANK_SWIZZLE_mask = 0x07 << 18, BANK_SWIZZLE_shift = 18, SQ_ALU_VEC_012 = 0x00, SQ_ALU_VEC_021 = 0x01, SQ_ALU_VEC_120 = 0x02, SQ_ALU_VEC_102 = 0x03, SQ_ALU_VEC_201 = 0x04, SQ_ALU_VEC_210 = 0x05, SQ_ALU_WORD1__DST_GPR_mask = 0x7f << 21, SQ_ALU_WORD1__DST_GPR_shift = 21, SQ_ALU_WORD1__DST_REL_bit = 1 << 28, DST_CHAN_mask = 0x03 << 29, DST_CHAN_shift = 29, CHAN_X = 0x00, CHAN_Y = 0x01, CHAN_Z = 0x02, CHAN_W = 0x03, SQ_ALU_WORD1__CLAMP_bit = 1 << 31, SQ_CF_ALU_WORD0 = 0x00008dfc, SQ_CF_ALU_WORD0__ADDR_mask = 0x3fffff << 0, SQ_CF_ALU_WORD0__ADDR_shift = 0, KCACHE_BANK0_mask = 0x0f << 22, KCACHE_BANK0_shift = 22, KCACHE_BANK1_mask = 0x0f << 26, KCACHE_BANK1_shift = 26, KCACHE_MODE0_mask = 0x03 << 30, KCACHE_MODE0_shift = 30, /* SQ_CF_KCACHE_NOP = 0x00, */ /* SQ_CF_KCACHE_LOCK_1 = 0x01, */ /* SQ_CF_KCACHE_LOCK_2 = 0x02, */ /* SQ_CF_KCACHE_LOCK_LOOP_INDEX = 0x03, */ SQ_VTX_WORD2 = 0x00008dfc, SQ_VTX_WORD2__OFFSET_mask = 0xffff << 0, SQ_VTX_WORD2__OFFSET_shift = 0, SQ_VTX_WORD2__ENDIAN_SWAP_mask = 0x03 << 16, SQ_VTX_WORD2__ENDIAN_SWAP_shift = 16, SQ_ENDIAN_NONE = 0x00, SQ_ENDIAN_8IN16 = 0x01, SQ_ENDIAN_8IN32 = 0x02, CONST_BUF_NO_STRIDE_bit = 1 << 18, MEGA_FETCH_bit = 1 << 19, SQ_VTX_WORD2__ALT_CONST_bit = 1 << 20, SQ_ALU_WORD1_OP2_V2 = 0x00008dfc, SRC0_ABS_bit = 1 << 0, SRC1_ABS_bit = 1 << 1, UPDATE_EXECUTE_MASK_bit = 1 << 2, UPDATE_PRED_bit = 1 << 3, WRITE_MASK_bit = 1 << 4, SQ_ALU_WORD1_OP2_V2__OMOD_mask = 0x03 << 5, SQ_ALU_WORD1_OP2_V2__OMOD_shift = 5, SQ_ALU_OMOD_OFF = 0x00, SQ_ALU_OMOD_M2 = 0x01, SQ_ALU_OMOD_M4 = 0x02, SQ_ALU_OMOD_D2 = 0x03, SQ_ALU_WORD1_OP2_V2__ALU_INST_mask = 0x7ff << 7, SQ_ALU_WORD1_OP2_V2__ALU_INST_shift = 7, SQ_OP2_INST_ADD = 0x00, SQ_OP2_INST_MUL = 0x01, SQ_OP2_INST_MUL_IEEE = 0x02, SQ_OP2_INST_MAX = 0x03, SQ_OP2_INST_MIN = 0x04, SQ_OP2_INST_MAX_DX10 = 0x05, SQ_OP2_INST_MIN_DX10 = 0x06, SQ_OP2_INST_SETE = 0x08, SQ_OP2_INST_SETGT = 0x09, SQ_OP2_INST_SETGE = 0x0a, SQ_OP2_INST_SETNE = 0x0b, SQ_OP2_INST_SETE_DX10 = 0x0c, SQ_OP2_INST_SETGT_DX10 = 0x0d, SQ_OP2_INST_SETGE_DX10 = 0x0e, SQ_OP2_INST_SETNE_DX10 = 0x0f, SQ_OP2_INST_FRACT = 0x10, SQ_OP2_INST_TRUNC = 0x11, SQ_OP2_INST_CEIL = 0x12, SQ_OP2_INST_RNDNE = 0x13, SQ_OP2_INST_FLOOR = 0x14, SQ_OP2_INST_MOVA = 0x15, SQ_OP2_INST_MOVA_FLOOR = 0x16, SQ_OP2_INST_MOVA_INT = 0x18, SQ_OP2_INST_MOV = 0x19, SQ_OP2_INST_NOP = 0x1a, SQ_OP2_INST_PRED_SETGT_UINT = 0x1e, SQ_OP2_INST_PRED_SETGE_UINT = 0x1f, SQ_OP2_INST_PRED_SETE = 0x20, SQ_OP2_INST_PRED_SETGT = 0x21, SQ_OP2_INST_PRED_SETGE = 0x22, SQ_OP2_INST_PRED_SETNE = 0x23, SQ_OP2_INST_PRED_SET_INV = 0x24, SQ_OP2_INST_PRED_SET_POP = 0x25, SQ_OP2_INST_PRED_SET_CLR = 0x26, SQ_OP2_INST_PRED_SET_RESTORE = 0x27, SQ_OP2_INST_PRED_SETE_PUSH = 0x28, SQ_OP2_INST_PRED_SETGT_PUSH = 0x29, SQ_OP2_INST_PRED_SETGE_PUSH = 0x2a, SQ_OP2_INST_PRED_SETNE_PUSH = 0x2b, SQ_OP2_INST_KILLE = 0x2c, SQ_OP2_INST_KILLGT = 0x2d, SQ_OP2_INST_KILLGE = 0x2e, SQ_OP2_INST_KILLNE = 0x2f, SQ_OP2_INST_AND_INT = 0x30, SQ_OP2_INST_OR_INT = 0x31, SQ_OP2_INST_XOR_INT = 0x32, SQ_OP2_INST_NOT_INT = 0x33, SQ_OP2_INST_ADD_INT = 0x34, SQ_OP2_INST_SUB_INT = 0x35, SQ_OP2_INST_MAX_INT = 0x36, SQ_OP2_INST_MIN_INT = 0x37, SQ_OP2_INST_MAX_UINT = 0x38, SQ_OP2_INST_MIN_UINT = 0x39, SQ_OP2_INST_SETE_INT = 0x3a, SQ_OP2_INST_SETGT_INT = 0x3b, SQ_OP2_INST_SETGE_INT = 0x3c, SQ_OP2_INST_SETNE_INT = 0x3d, SQ_OP2_INST_SETGT_UINT = 0x3e, SQ_OP2_INST_SETGE_UINT = 0x3f, SQ_OP2_INST_KILLGT_UINT = 0x40, SQ_OP2_INST_KILLGE_UINT = 0x41, SQ_OP2_INST_PRED_SETE_INT = 0x42, SQ_OP2_INST_PRED_SETGT_INT = 0x43, SQ_OP2_INST_PRED_SETGE_INT = 0x44, SQ_OP2_INST_PRED_SETNE_INT = 0x45, SQ_OP2_INST_KILLE_INT = 0x46, SQ_OP2_INST_KILLGT_INT = 0x47, SQ_OP2_INST_KILLGE_INT = 0x48, SQ_OP2_INST_KILLNE_INT = 0x49, SQ_OP2_INST_PRED_SETE_PUSH_INT = 0x4a, SQ_OP2_INST_PRED_SETGT_PUSH_INT = 0x4b, SQ_OP2_INST_PRED_SETGE_PUSH_INT = 0x4c, SQ_OP2_INST_PRED_SETNE_PUSH_INT = 0x4d, SQ_OP2_INST_PRED_SETLT_PUSH_INT = 0x4e, SQ_OP2_INST_PRED_SETLE_PUSH_INT = 0x4f, SQ_OP2_INST_DOT4 = 0x50, SQ_OP2_INST_DOT4_IEEE = 0x51, SQ_OP2_INST_CUBE = 0x52, SQ_OP2_INST_MAX4 = 0x53, SQ_OP2_INST_MOVA_GPR_INT = 0x60, SQ_OP2_INST_EXP_IEEE = 0x61, SQ_OP2_INST_LOG_CLAMPED = 0x62, SQ_OP2_INST_LOG_IEEE = 0x63, SQ_OP2_INST_RECIP_CLAMPED = 0x64, SQ_OP2_INST_RECIP_FF = 0x65, SQ_OP2_INST_RECIP_IEEE = 0x66, SQ_OP2_INST_RECIPSQRT_CLAMPED = 0x67, SQ_OP2_INST_RECIPSQRT_FF = 0x68, SQ_OP2_INST_RECIPSQRT_IEEE = 0x69, SQ_OP2_INST_SQRT_IEEE = 0x6a, SQ_OP2_INST_FLT_TO_INT = 0x6b, SQ_OP2_INST_INT_TO_FLT = 0x6c, SQ_OP2_INST_UINT_TO_FLT = 0x6d, SQ_OP2_INST_SIN = 0x6e, SQ_OP2_INST_COS = 0x6f, SQ_OP2_INST_ASHR_INT = 0x70, SQ_OP2_INST_LSHR_INT = 0x71, SQ_OP2_INST_LSHL_INT = 0x72, SQ_OP2_INST_MULLO_INT = 0x73, SQ_OP2_INST_MULHI_INT = 0x74, SQ_OP2_INST_MULLO_UINT = 0x75, SQ_OP2_INST_MULHI_UINT = 0x76, SQ_OP2_INST_RECIP_INT = 0x77, SQ_OP2_INST_RECIP_UINT = 0x78, SQ_OP2_INST_FLT_TO_UINT = 0x79, SQ_CF_ALLOC_EXPORT_WORD1_BUF = 0x00008dfc, ARRAY_SIZE_mask = 0xfff << 0, ARRAY_SIZE_shift = 0, COMP_MASK_mask = 0x0f << 12, COMP_MASK_shift = 12, SQ_CF_WORD0 = 0x00008dfc, SQ_CF_ALLOC_EXPORT_WORD0 = 0x00008dfc, ARRAY_BASE_mask = 0x1fff << 0, ARRAY_BASE_shift = 0, SQ_CF_ALLOC_EXPORT_WORD0__TYPE_mask = 0x03 << 13, SQ_CF_ALLOC_EXPORT_WORD0__TYPE_shift = 13, SQ_EXPORT_PIXEL = 0x00, SQ_EXPORT_POS = 0x01, SQ_EXPORT_PARAM = 0x02, X_UNUSED_FOR_SX_EXPORTS = 0x03, RW_GPR_mask = 0x7f << 15, RW_GPR_shift = 15, RW_REL_bit = 1 << 22, INDEX_GPR_mask = 0x7f << 23, INDEX_GPR_shift = 23, ELEM_SIZE_mask = 0x03 << 30, ELEM_SIZE_shift = 30, SQ_VTX_WORD1 = 0x00008dfc, SQ_VTX_WORD1__DST_SEL_X_mask = 0x07 << 9, SQ_VTX_WORD1__DST_SEL_X_shift = 9, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_VTX_WORD1__DST_SEL_Y_mask = 0x07 << 12, SQ_VTX_WORD1__DST_SEL_Y_shift = 12, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_VTX_WORD1__DST_SEL_Z_mask = 0x07 << 15, SQ_VTX_WORD1__DST_SEL_Z_shift = 15, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ SQ_VTX_WORD1__DST_SEL_W_mask = 0x07 << 18, SQ_VTX_WORD1__DST_SEL_W_shift = 18, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ /* SQ_SEL_MASK = 0x07, */ USE_CONST_FIELDS_bit = 1 << 21, SQ_VTX_WORD1__DATA_FORMAT_mask = 0x3f << 22, SQ_VTX_WORD1__DATA_FORMAT_shift = 22, SQ_VTX_WORD1__NUM_FORMAT_ALL_mask = 0x03 << 28, SQ_VTX_WORD1__NUM_FORMAT_ALL_shift = 28, SQ_NUM_FORMAT_NORM = 0x00, SQ_NUM_FORMAT_INT = 0x01, SQ_NUM_FORMAT_SCALED = 0x02, SQ_VTX_WORD1__FORMAT_COMP_ALL_bit = 1 << 30, SQ_VTX_WORD1__SRF_MODE_ALL_bit = 1 << 31, SQ_ALU_WORD1_OP2 = 0x00008dfc, /* SRC0_ABS_bit = 1 << 0, */ /* SRC1_ABS_bit = 1 << 1, */ /* UPDATE_EXECUTE_MASK_bit = 1 << 2, */ /* UPDATE_PRED_bit = 1 << 3, */ /* WRITE_MASK_bit = 1 << 4, */ FOG_MERGE_bit = 1 << 5, SQ_ALU_WORD1_OP2__OMOD_mask = 0x03 << 6, SQ_ALU_WORD1_OP2__OMOD_shift = 6, /* SQ_ALU_OMOD_OFF = 0x00, */ /* SQ_ALU_OMOD_M2 = 0x01, */ /* SQ_ALU_OMOD_M4 = 0x02, */ /* SQ_ALU_OMOD_D2 = 0x03, */ SQ_ALU_WORD1_OP2__ALU_INST_mask = 0x3ff << 8, SQ_ALU_WORD1_OP2__ALU_INST_shift = 8, /* SQ_OP2_INST_ADD = 0x00, */ /* SQ_OP2_INST_MUL = 0x01, */ /* SQ_OP2_INST_MUL_IEEE = 0x02, */ /* SQ_OP2_INST_MAX = 0x03, */ /* SQ_OP2_INST_MIN = 0x04, */ /* SQ_OP2_INST_MAX_DX10 = 0x05, */ /* SQ_OP2_INST_MIN_DX10 = 0x06, */ /* SQ_OP2_INST_SETE = 0x08, */ /* SQ_OP2_INST_SETGT = 0x09, */ /* SQ_OP2_INST_SETGE = 0x0a, */ /* SQ_OP2_INST_SETNE = 0x0b, */ /* SQ_OP2_INST_SETE_DX10 = 0x0c, */ /* SQ_OP2_INST_SETGT_DX10 = 0x0d, */ /* SQ_OP2_INST_SETGE_DX10 = 0x0e, */ /* SQ_OP2_INST_SETNE_DX10 = 0x0f, */ /* SQ_OP2_INST_FRACT = 0x10, */ /* SQ_OP2_INST_TRUNC = 0x11, */ /* SQ_OP2_INST_CEIL = 0x12, */ /* SQ_OP2_INST_RNDNE = 0x13, */ /* SQ_OP2_INST_FLOOR = 0x14, */ /* SQ_OP2_INST_MOVA = 0x15, */ /* SQ_OP2_INST_MOVA_FLOOR = 0x16, */ /* SQ_OP2_INST_MOVA_INT = 0x18, */ /* SQ_OP2_INST_MOV = 0x19, */ /* SQ_OP2_INST_NOP = 0x1a, */ /* SQ_OP2_INST_PRED_SETGT_UINT = 0x1e, */ /* SQ_OP2_INST_PRED_SETGE_UINT = 0x1f, */ /* SQ_OP2_INST_PRED_SETE = 0x20, */ /* SQ_OP2_INST_PRED_SETGT = 0x21, */ /* SQ_OP2_INST_PRED_SETGE = 0x22, */ /* SQ_OP2_INST_PRED_SETNE = 0x23, */ /* SQ_OP2_INST_PRED_SET_INV = 0x24, */ /* SQ_OP2_INST_PRED_SET_POP = 0x25, */ /* SQ_OP2_INST_PRED_SET_CLR = 0x26, */ /* SQ_OP2_INST_PRED_SET_RESTORE = 0x27, */ /* SQ_OP2_INST_PRED_SETE_PUSH = 0x28, */ /* SQ_OP2_INST_PRED_SETGT_PUSH = 0x29, */ /* SQ_OP2_INST_PRED_SETGE_PUSH = 0x2a, */ /* SQ_OP2_INST_PRED_SETNE_PUSH = 0x2b, */ /* SQ_OP2_INST_KILLE = 0x2c, */ /* SQ_OP2_INST_KILLGT = 0x2d, */ /* SQ_OP2_INST_KILLGE = 0x2e, */ /* SQ_OP2_INST_KILLNE = 0x2f, */ /* SQ_OP2_INST_AND_INT = 0x30, */ /* SQ_OP2_INST_OR_INT = 0x31, */ /* SQ_OP2_INST_XOR_INT = 0x32, */ /* SQ_OP2_INST_NOT_INT = 0x33, */ /* SQ_OP2_INST_ADD_INT = 0x34, */ /* SQ_OP2_INST_SUB_INT = 0x35, */ /* SQ_OP2_INST_MAX_INT = 0x36, */ /* SQ_OP2_INST_MIN_INT = 0x37, */ /* SQ_OP2_INST_MAX_UINT = 0x38, */ /* SQ_OP2_INST_MIN_UINT = 0x39, */ /* SQ_OP2_INST_SETE_INT = 0x3a, */ /* SQ_OP2_INST_SETGT_INT = 0x3b, */ /* SQ_OP2_INST_SETGE_INT = 0x3c, */ /* SQ_OP2_INST_SETNE_INT = 0x3d, */ /* SQ_OP2_INST_SETGT_UINT = 0x3e, */ /* SQ_OP2_INST_SETGE_UINT = 0x3f, */ /* SQ_OP2_INST_KILLGT_UINT = 0x40, */ /* SQ_OP2_INST_KILLGE_UINT = 0x41, */ /* SQ_OP2_INST_PRED_SETE_INT = 0x42, */ /* SQ_OP2_INST_PRED_SETGT_INT = 0x43, */ /* SQ_OP2_INST_PRED_SETGE_INT = 0x44, */ /* SQ_OP2_INST_PRED_SETNE_INT = 0x45, */ /* SQ_OP2_INST_KILLE_INT = 0x46, */ /* SQ_OP2_INST_KILLGT_INT = 0x47, */ /* SQ_OP2_INST_KILLGE_INT = 0x48, */ /* SQ_OP2_INST_KILLNE_INT = 0x49, */ /* SQ_OP2_INST_PRED_SETE_PUSH_INT = 0x4a, */ /* SQ_OP2_INST_PRED_SETGT_PUSH_INT = 0x4b, */ /* SQ_OP2_INST_PRED_SETGE_PUSH_INT = 0x4c, */ /* SQ_OP2_INST_PRED_SETNE_PUSH_INT = 0x4d, */ /* SQ_OP2_INST_PRED_SETLT_PUSH_INT = 0x4e, */ /* SQ_OP2_INST_PRED_SETLE_PUSH_INT = 0x4f, */ /* SQ_OP2_INST_DOT4 = 0x50, */ /* SQ_OP2_INST_DOT4_IEEE = 0x51, */ /* SQ_OP2_INST_CUBE = 0x52, */ /* SQ_OP2_INST_MAX4 = 0x53, */ /* SQ_OP2_INST_MOVA_GPR_INT = 0x60, */ /* SQ_OP2_INST_EXP_IEEE = 0x61, */ /* SQ_OP2_INST_LOG_CLAMPED = 0x62, */ /* SQ_OP2_INST_LOG_IEEE = 0x63, */ /* SQ_OP2_INST_RECIP_CLAMPED = 0x64, */ /* SQ_OP2_INST_RECIP_FF = 0x65, */ /* SQ_OP2_INST_RECIP_IEEE = 0x66, */ /* SQ_OP2_INST_RECIPSQRT_CLAMPED = 0x67, */ /* SQ_OP2_INST_RECIPSQRT_FF = 0x68, */ /* SQ_OP2_INST_RECIPSQRT_IEEE = 0x69, */ /* SQ_OP2_INST_SQRT_IEEE = 0x6a, */ /* SQ_OP2_INST_FLT_TO_INT = 0x6b, */ /* SQ_OP2_INST_INT_TO_FLT = 0x6c, */ /* SQ_OP2_INST_UINT_TO_FLT = 0x6d, */ /* SQ_OP2_INST_SIN = 0x6e, */ /* SQ_OP2_INST_COS = 0x6f, */ /* SQ_OP2_INST_ASHR_INT = 0x70, */ /* SQ_OP2_INST_LSHR_INT = 0x71, */ /* SQ_OP2_INST_LSHL_INT = 0x72, */ /* SQ_OP2_INST_MULLO_INT = 0x73, */ /* SQ_OP2_INST_MULHI_INT = 0x74, */ /* SQ_OP2_INST_MULLO_UINT = 0x75, */ /* SQ_OP2_INST_MULHI_UINT = 0x76, */ /* SQ_OP2_INST_RECIP_INT = 0x77, */ /* SQ_OP2_INST_RECIP_UINT = 0x78, */ /* SQ_OP2_INST_FLT_TO_UINT = 0x79, */ SQ_CF_WORD1 = 0x00008dfc, POP_COUNT_mask = 0x07 << 0, POP_COUNT_shift = 0, CF_CONST_mask = 0x1f << 3, CF_CONST_shift = 3, COND_mask = 0x03 << 8, COND_shift = 8, SQ_CF_COND_ACTIVE = 0x00, SQ_CF_COND_FALSE = 0x01, SQ_CF_COND_BOOL = 0x02, SQ_CF_COND_NOT_BOOL = 0x03, SQ_CF_WORD1__COUNT_mask = 0x07 << 10, SQ_CF_WORD1__COUNT_shift = 10, CALL_COUNT_mask = 0x3f << 13, CALL_COUNT_shift = 13, COUNT_3_bit = 1 << 19, /* END_OF_PROGRAM_bit = 1 << 21, */ /* VALID_PIXEL_MODE_bit = 1 << 22, */ SQ_CF_WORD1__CF_INST_mask = 0x7f << 23, SQ_CF_WORD1__CF_INST_shift = 23, SQ_CF_INST_NOP = 0x00, SQ_CF_INST_TEX = 0x01, SQ_CF_INST_VTX = 0x02, SQ_CF_INST_VTX_TC = 0x03, SQ_CF_INST_LOOP_START = 0x04, SQ_CF_INST_LOOP_END = 0x05, SQ_CF_INST_LOOP_START_DX10 = 0x06, SQ_CF_INST_LOOP_START_NO_AL = 0x07, SQ_CF_INST_LOOP_CONTINUE = 0x08, SQ_CF_INST_LOOP_BREAK = 0x09, SQ_CF_INST_JUMP = 0x0a, SQ_CF_INST_PUSH = 0x0b, SQ_CF_INST_PUSH_ELSE = 0x0c, SQ_CF_INST_ELSE = 0x0d, SQ_CF_INST_POP = 0x0e, SQ_CF_INST_POP_JUMP = 0x0f, SQ_CF_INST_POP_PUSH = 0x10, SQ_CF_INST_POP_PUSH_ELSE = 0x11, SQ_CF_INST_CALL = 0x12, SQ_CF_INST_CALL_FS = 0x13, SQ_CF_INST_RETURN = 0x14, SQ_CF_INST_EMIT_VERTEX = 0x15, SQ_CF_INST_EMIT_CUT_VERTEX = 0x16, SQ_CF_INST_CUT_VERTEX = 0x17, SQ_CF_INST_KILL = 0x18, /* WHOLE_QUAD_MODE_bit = 1 << 30, */ /* BARRIER_bit = 1 << 31, */ SQ_VTX_WORD1_SEM = 0x00008dfc, SEMANTIC_ID_mask = 0xff << 0, SEMANTIC_ID_shift = 0, SQ_TEX_WORD0 = 0x00008dfc, TEX_INST_mask = 0x1f << 0, TEX_INST_shift = 0, SQ_TEX_INST_VTX_FETCH = 0x00, SQ_TEX_INST_VTX_SEMANTIC = 0x01, SQ_TEX_INST_LD = 0x03, SQ_TEX_INST_GET_TEXTURE_RESINFO = 0x04, SQ_TEX_INST_GET_NUMBER_OF_SAMPLES = 0x05, SQ_TEX_INST_GET_LOD = 0x06, SQ_TEX_INST_GET_GRADIENTS_H = 0x07, SQ_TEX_INST_GET_GRADIENTS_V = 0x08, SQ_TEX_INST_GET_LERP = 0x09, SQ_TEX_INST_RESERVED_10 = 0x0a, SQ_TEX_INST_SET_GRADIENTS_H = 0x0b, SQ_TEX_INST_SET_GRADIENTS_V = 0x0c, SQ_TEX_INST_PASS = 0x0d, X_Z_SET_INDEX_FOR_ARRAY_OF_CUBEMAPS = 0x0e, SQ_TEX_INST_SAMPLE = 0x10, SQ_TEX_INST_SAMPLE_L = 0x11, SQ_TEX_INST_SAMPLE_LB = 0x12, SQ_TEX_INST_SAMPLE_LZ = 0x13, SQ_TEX_INST_SAMPLE_G = 0x14, SQ_TEX_INST_SAMPLE_G_L = 0x15, SQ_TEX_INST_SAMPLE_G_LB = 0x16, SQ_TEX_INST_SAMPLE_G_LZ = 0x17, SQ_TEX_INST_SAMPLE_C = 0x18, SQ_TEX_INST_SAMPLE_C_L = 0x19, SQ_TEX_INST_SAMPLE_C_LB = 0x1a, SQ_TEX_INST_SAMPLE_C_LZ = 0x1b, SQ_TEX_INST_SAMPLE_C_G = 0x1c, SQ_TEX_INST_SAMPLE_C_G_L = 0x1d, SQ_TEX_INST_SAMPLE_C_G_LB = 0x1e, SQ_TEX_INST_SAMPLE_C_G_LZ = 0x1f, BC_FRAC_MODE_bit = 1 << 5, /* FETCH_WHOLE_QUAD_bit = 1 << 7, */ RESOURCE_ID_mask = 0xff << 8, RESOURCE_ID_shift = 8, /* SRC_GPR_mask = 0x7f << 16, */ /* SRC_GPR_shift = 16, */ /* SRC_REL_bit = 1 << 23, */ SQ_TEX_WORD0__ALT_CONST_bit = 1 << 24, SQ_VTX_WORD1_GPR = 0x00008dfc, SQ_VTX_WORD1_GPR__DST_GPR_mask = 0x7f << 0, SQ_VTX_WORD1_GPR__DST_GPR_shift = 0, SQ_VTX_WORD1_GPR__DST_REL_bit = 1 << 7, SQ_ALU_WORD0 = 0x00008dfc, SRC0_SEL_mask = 0x1ff << 0, SRC0_SEL_shift = 0, /* SQ_ALU_SRC_0 = 0xf8, */ /* SQ_ALU_SRC_1 = 0xf9, */ /* SQ_ALU_SRC_1_INT = 0xfa, */ /* SQ_ALU_SRC_M_1_INT = 0xfb, */ /* SQ_ALU_SRC_0_5 = 0xfc, */ /* SQ_ALU_SRC_LITERAL = 0xfd, */ /* SQ_ALU_SRC_PV = 0xfe, */ /* SQ_ALU_SRC_PS = 0xff, */ SRC0_REL_bit = 1 << 9, SRC0_CHAN_mask = 0x03 << 10, SRC0_CHAN_shift = 10, /* SQ_CHAN_X = 0x00, */ /* SQ_CHAN_Y = 0x01, */ /* SQ_CHAN_Z = 0x02, */ /* SQ_CHAN_W = 0x03, */ SRC0_NEG_bit = 1 << 12, SRC1_SEL_mask = 0x1ff << 13, SRC1_SEL_shift = 13, /* SQ_ALU_SRC_0 = 0xf8, */ /* SQ_ALU_SRC_1 = 0xf9, */ /* SQ_ALU_SRC_1_INT = 0xfa, */ /* SQ_ALU_SRC_M_1_INT = 0xfb, */ /* SQ_ALU_SRC_0_5 = 0xfc, */ /* SQ_ALU_SRC_LITERAL = 0xfd, */ /* SQ_ALU_SRC_PV = 0xfe, */ /* SQ_ALU_SRC_PS = 0xff, */ SRC1_REL_bit = 1 << 22, SRC1_CHAN_mask = 0x03 << 23, SRC1_CHAN_shift = 23, /* SQ_CHAN_X = 0x00, */ /* SQ_CHAN_Y = 0x01, */ /* SQ_CHAN_Z = 0x02, */ /* SQ_CHAN_W = 0x03, */ SRC1_NEG_bit = 1 << 25, INDEX_MODE_mask = 0x07 << 26, INDEX_MODE_shift = 26, SQ_INDEX_AR_X = 0x00, SQ_INDEX_AR_Y = 0x01, SQ_INDEX_AR_Z = 0x02, SQ_INDEX_AR_W = 0x03, SQ_INDEX_LOOP = 0x04, PRED_SEL_mask = 0x03 << 29, PRED_SEL_shift = 29, SQ_PRED_SEL_OFF = 0x00, SQ_PRED_SEL_ZERO = 0x02, SQ_PRED_SEL_ONE = 0x03, LAST_bit = 1 << 31, SX_EXPORT_BUFFER_SIZES = 0x0000900c, COLOR_BUFFER_SIZE_mask = 0xff << 0, COLOR_BUFFER_SIZE_shift = 0, POSITION_BUFFER_SIZE_mask = 0xff << 8, POSITION_BUFFER_SIZE_shift = 8, SMX_BUFFER_SIZE_mask = 0xff << 16, SMX_BUFFER_SIZE_shift = 16, SX_MEMORY_EXPORT_BASE = 0x00009010, SX_MEMORY_EXPORT_SIZE = 0x00009014, SPI_CONFIG_CNTL = 0x00009100, GPR_WRITE_PRIORITY_mask = 0x1f << 0, GPR_WRITE_PRIORITY_shift = 0, X_PRIORITY_ORDER = 0x00, X_PRIORITY_ORDER_VS = 0x01, DISABLE_INTERP_1_bit = 1 << 5, DEBUG_THREAD_TYPE_SEL_mask = 0x03 << 6, DEBUG_THREAD_TYPE_SEL_shift = 6, DEBUG_GROUP_SEL_mask = 0x1f << 8, DEBUG_GROUP_SEL_shift = 8, DEBUG_GRBM_OVERRIDE_bit = 1 << 13, SPI_CONFIG_CNTL_1 = 0x0000913c, VTX_DONE_DELAY_mask = 0x0f << 0, VTX_DONE_DELAY_shift = 0, X_DELAY_10_CLKS = 0x00, X_DELAY_11_CLKS = 0x01, X_DELAY_12_CLKS = 0x02, X_DELAY_13_CLKS = 0x03, X_DELAY_14_CLKS = 0x04, X_DELAY_15_CLKS = 0x05, X_DELAY_16_CLKS = 0x06, X_DELAY_17_CLKS = 0x07, X_DELAY_2_CLKS = 0x08, X_DELAY_3_CLKS = 0x09, X_DELAY_4_CLKS = 0x0a, X_DELAY_5_CLKS = 0x0b, X_DELAY_6_CLKS = 0x0c, X_DELAY_7_CLKS = 0x0d, X_DELAY_8_CLKS = 0x0e, X_DELAY_9_CLKS = 0x0f, INTERP_ONE_PRIM_PER_ROW_bit = 1 << 4, TD_FILTER4 = 0x00009400, WEIGHT_1_mask = 0x7ff << 0, WEIGHT_1_shift = 0, WEIGHT_0_mask = 0x7ff << 11, WEIGHT_0_shift = 11, WEIGHT_PAIR_bit = 1 << 22, PHASE_mask = 0x0f << 23, PHASE_shift = 23, DIRECTION_bit = 1 << 27, TD_FILTER4_1 = 0x00009404, TD_FILTER4_1_num = 35, /* WEIGHT_1_mask = 0x7ff << 0, */ /* WEIGHT_1_shift = 0, */ /* WEIGHT_0_mask = 0x7ff << 11, */ /* WEIGHT_0_shift = 11, */ TD_CNTL = 0x00009490, SYNC_PHASE_SH_mask = 0x03 << 0, SYNC_PHASE_SH_shift = 0, SYNC_PHASE_VC_SMX_mask = 0x03 << 4, SYNC_PHASE_VC_SMX_shift = 4, TD0_CNTL = 0x00009494, TD0_CNTL_num = 4, ID_OVERRIDE_mask = 0x03 << 28, ID_OVERRIDE_shift = 28, TD0_STATUS = 0x000094a4, TD0_STATUS_num = 4, BUSY_bit = 1 << 31, TA_CNTL = 0x00009504, GRADIENT_CREDIT_mask = 0x1f << 0, GRADIENT_CREDIT_shift = 0, WALKER_CREDIT_mask = 0x1f << 8, WALKER_CREDIT_shift = 8, ALIGNER_CREDIT_mask = 0x1f << 16, ALIGNER_CREDIT_shift = 16, TD_FIFO_CREDIT_mask = 0x3ff << 22, TD_FIFO_CREDIT_shift = 22, TA_CNTL_AUX = 0x00009508, DISABLE_CUBE_WRAP_bit = 1 << 0, SYNC_GRADIENT_bit = 1 << 24, SYNC_WALKER_bit = 1 << 25, SYNC_ALIGNER_bit = 1 << 26, BILINEAR_PRECISION_bit = 1 << 31, TA0_CNTL = 0x00009510, /* ID_OVERRIDE_mask = 0x03 << 28, */ /* ID_OVERRIDE_shift = 28, */ TA1_CNTL = 0x00009514, /* ID_OVERRIDE_mask = 0x03 << 28, */ /* ID_OVERRIDE_shift = 28, */ TA2_CNTL = 0x00009518, /* ID_OVERRIDE_mask = 0x03 << 28, */ /* ID_OVERRIDE_shift = 28, */ TA3_CNTL = 0x0000951c, /* ID_OVERRIDE_mask = 0x03 << 28, */ /* ID_OVERRIDE_shift = 28, */ TA0_STATUS = 0x00009520, FG_PFIFO_EMPTYB_bit = 1 << 12, FG_LFIFO_EMPTYB_bit = 1 << 13, FG_SFIFO_EMPTYB_bit = 1 << 14, FL_PFIFO_EMPTYB_bit = 1 << 16, FL_LFIFO_EMPTYB_bit = 1 << 17, FL_SFIFO_EMPTYB_bit = 1 << 18, FA_PFIFO_EMPTYB_bit = 1 << 20, FA_LFIFO_EMPTYB_bit = 1 << 21, FA_SFIFO_EMPTYB_bit = 1 << 22, IN_BUSY_bit = 1 << 24, FG_BUSY_bit = 1 << 25, FL_BUSY_bit = 1 << 27, TA_BUSY_bit = 1 << 28, FA_BUSY_bit = 1 << 29, AL_BUSY_bit = 1 << 30, /* BUSY_bit = 1 << 31, */ TA1_STATUS = 0x00009524, /* FG_PFIFO_EMPTYB_bit = 1 << 12, */ /* FG_LFIFO_EMPTYB_bit = 1 << 13, */ /* FG_SFIFO_EMPTYB_bit = 1 << 14, */ /* FL_PFIFO_EMPTYB_bit = 1 << 16, */ /* FL_LFIFO_EMPTYB_bit = 1 << 17, */ /* FL_SFIFO_EMPTYB_bit = 1 << 18, */ /* FA_PFIFO_EMPTYB_bit = 1 << 20, */ /* FA_LFIFO_EMPTYB_bit = 1 << 21, */ /* FA_SFIFO_EMPTYB_bit = 1 << 22, */ /* IN_BUSY_bit = 1 << 24, */ /* FG_BUSY_bit = 1 << 25, */ /* FL_BUSY_bit = 1 << 27, */ /* TA_BUSY_bit = 1 << 28, */ /* FA_BUSY_bit = 1 << 29, */ /* AL_BUSY_bit = 1 << 30, */ /* BUSY_bit = 1 << 31, */ TA2_STATUS = 0x00009528, /* FG_PFIFO_EMPTYB_bit = 1 << 12, */ /* FG_LFIFO_EMPTYB_bit = 1 << 13, */ /* FG_SFIFO_EMPTYB_bit = 1 << 14, */ /* FL_PFIFO_EMPTYB_bit = 1 << 16, */ /* FL_LFIFO_EMPTYB_bit = 1 << 17, */ /* FL_SFIFO_EMPTYB_bit = 1 << 18, */ /* FA_PFIFO_EMPTYB_bit = 1 << 20, */ /* FA_LFIFO_EMPTYB_bit = 1 << 21, */ /* FA_SFIFO_EMPTYB_bit = 1 << 22, */ /* IN_BUSY_bit = 1 << 24, */ /* FG_BUSY_bit = 1 << 25, */ /* FL_BUSY_bit = 1 << 27, */ /* TA_BUSY_bit = 1 << 28, */ /* FA_BUSY_bit = 1 << 29, */ /* AL_BUSY_bit = 1 << 30, */ /* BUSY_bit = 1 << 31, */ TA3_STATUS = 0x0000952c, /* FG_PFIFO_EMPTYB_bit = 1 << 12, */ /* FG_LFIFO_EMPTYB_bit = 1 << 13, */ /* FG_SFIFO_EMPTYB_bit = 1 << 14, */ /* FL_PFIFO_EMPTYB_bit = 1 << 16, */ /* FL_LFIFO_EMPTYB_bit = 1 << 17, */ /* FL_SFIFO_EMPTYB_bit = 1 << 18, */ /* FA_PFIFO_EMPTYB_bit = 1 << 20, */ /* FA_LFIFO_EMPTYB_bit = 1 << 21, */ /* FA_SFIFO_EMPTYB_bit = 1 << 22, */ /* IN_BUSY_bit = 1 << 24, */ /* FG_BUSY_bit = 1 << 25, */ /* FL_BUSY_bit = 1 << 27, */ /* TA_BUSY_bit = 1 << 28, */ /* FA_BUSY_bit = 1 << 29, */ /* AL_BUSY_bit = 1 << 30, */ /* BUSY_bit = 1 << 31, */ TC_STATUS = 0x00009600, TC_BUSY_bit = 1 << 0, TC_INVALIDATE = 0x00009604, START_bit = 1 << 0, TC_CNTL = 0x00009608, FORCE_HIT_bit = 1 << 0, FORCE_MISS_bit = 1 << 1, L2_SIZE_mask = 0x0f << 5, L2_SIZE_shift = 5, _256K = 0x00, _224K = 0x01, _192K = 0x02, _160K = 0x03, _128K = 0x04, _96K = 0x05, _64K = 0x06, _32K = 0x07, L2_DISABLE_LATE_HIT_bit = 1 << 9, DISABLE_VERT_PERF_bit = 1 << 10, DISABLE_INVAL_BUSY_bit = 1 << 11, DISABLE_INVAL_SAME_SURFACE_bit = 1 << 12, PARTITION_MODE_mask = 0x03 << 13, PARTITION_MODE_shift = 13, X_VERTEX = 0x00, MISS_ARB_MODE_bit = 1 << 15, HIT_ARB_MODE_bit = 1 << 16, DISABLE_WRITE_DELAY_bit = 1 << 17, HIT_FIFO_DEPTH_bit = 1 << 18, VC_CNTL = 0x00009700, L2_INVALIDATE_bit = 1 << 0, RESERVED_bit = 1 << 1, CC_FORCE_MISS_bit = 1 << 2, MI_CHAN_SEL_mask = 0x03 << 3, MI_CHAN_SEL_shift = 3, X_MC0_USES_CH_0_1 = 0x00, X_MC0_USES_CH_0_3 = 0x01, X_VC_MC0_IS_ACTIVE = 0x02, X_VC_MC1_IS_DISABLED = 0x03, MI_STEER_DISABLE_bit = 1 << 5, MI_CREDIT_CTR_mask = 0x0f << 6, MI_CREDIT_CTR_shift = 6, MI_CREDIT_WE_bit = 1 << 10, MI_REQ_STALL_THLD_mask = 0x07 << 11, MI_REQ_STALL_THLD_shift = 11, X_LATENCY_EXCEEDS_399_CLOCKS = 0x00, X_LATENCY_EXCEEDS_415_CLOCKS = 0x01, X_LATENCY_EXCEEDS_431_CLOCKS = 0x02, X_LATENCY_EXCEEDS_447_CLOCKS = 0x03, X_LATENCY_EXCEEDS_463_CLOCKS = 0x04, X_LATENCY_EXCEEDS_479_CLOCKS = 0x05, X_LATENCY_EXCEEDS_495_CLOCKS = 0x06, X_LATENCY_EXCEEDS_511_CLOCKS = 0x07, VC_CNTL__MI_TIMESTAMP_RES_mask = 0x1f << 14, VC_CNTL__MI_TIMESTAMP_RES_shift = 14, X_1X_SYSTEM_CLOCK = 0x00, X_2X_SYSTEM_CLOCK = 0x01, X_4X_SYSTEM_CLOCK = 0x02, X_8X_SYSTEM_CLOCK = 0x03, X_16X_SYSTEM_CLOCK = 0x04, X_32X_SYSTEM_CLOCK = 0x05, X_64X_SYSTEM_CLOCK = 0x06, X_128X_SYSTEM_CLOCK = 0x07, X_256X_SYSTEM_CLOCK = 0x08, X_512X_SYSTEM_CLOCK = 0x09, X_1024X_SYSTEM_CLOCK = 0x0a, X_2048X_SYSTEM_CLOCK = 0x0b, X_4092X_SYSTEM_CLOCK = 0x0c, X_8192X_SYSTEM_CLOCK = 0x0d, X_16384X_SYSTEM_CLOCK = 0x0e, X_32768X_SYSTEM_CLOCK = 0x0f, VC_CNTL_STATUS = 0x00009704, RP_BUSY_bit = 1 << 0, RG_BUSY_bit = 1 << 1, VC_BUSY_bit = 1 << 2, CLAMP_DETECT_bit = 1 << 3, VC_CONFIG = 0x00009718, WRITE_DIS_bit = 1 << 0, GPR_DATA_PHASE_ADJ_mask = 0x07 << 1, GPR_DATA_PHASE_ADJ_shift = 1, X_LATENCY_BASE_0_CYCLES = 0x00, X_LATENCY_BASE_1_CYCLES = 0x01, X_LATENCY_BASE_2_CYCLES = 0x02, X_LATENCY_BASE_3_CYCLES = 0x03, TD_SIMD_SYNC_ADJ_mask = 0x07 << 4, TD_SIMD_SYNC_ADJ_shift = 4, X_0_CYCLES_DELAY = 0x00, X_1_CYCLES_DELAY = 0x01, X_2_CYCLES_DELAY = 0x02, X_3_CYCLES_DELAY = 0x03, X_4_CYCLES_DELAY = 0x04, X_5_CYCLES_DELAY = 0x05, X_6_CYCLES_DELAY = 0x06, X_7_CYCLES_DELAY = 0x07, SMX_DC_CTL0 = 0x0000a020, WR_GATHER_STREAM0_bit = 1 << 0, WR_GATHER_STREAM1_bit = 1 << 1, WR_GATHER_STREAM2_bit = 1 << 2, WR_GATHER_STREAM3_bit = 1 << 3, WR_GATHER_SCRATCH_bit = 1 << 4, WR_GATHER_REDUC_BUF_bit = 1 << 5, WR_GATHER_RING_BUF_bit = 1 << 6, WR_GATHER_F_BUF_bit = 1 << 7, DISABLE_CACHES_bit = 1 << 8, AUTO_FLUSH_INVAL_EN_bit = 1 << 10, AUTO_FLUSH_EN_bit = 1 << 11, AUTO_FLUSH_CNT_mask = 0xffff << 12, AUTO_FLUSH_CNT_shift = 12, MC_RD_STALL_FACTOR_mask = 0x03 << 28, MC_RD_STALL_FACTOR_shift = 28, MC_WR_STALL_FACTOR_mask = 0x03 << 30, MC_WR_STALL_FACTOR_shift = 30, SMX_DC_CTL1 = 0x0000a024, OP_FIFO_SKID_mask = 0x7f << 0, OP_FIFO_SKID_shift = 0, CACHE_LINE_SIZE_bit = 1 << 8, MULTI_FLUSH_MODE_bit = 1 << 9, MULTI_FLUSH_REQ_ABORT_IDX_FIFO_SKID_mask = 0x0f << 10, MULTI_FLUSH_REQ_ABORT_IDX_FIFO_SKID_shift = 10, DISABLE_WR_GATHER_RD_HIT_FORCE_EVICT_bit = 1 << 16, DISABLE_WR_GATHER_RD_HIT_COMP_VLDS_CHECK_bit = 1 << 17, DISABLE_FLUSH_ES_ALSO_INVALS_bit = 1 << 18, DISABLE_FLUSH_GS_ALSO_INVALS_bit = 1 << 19, SMX_DC_CTL2 = 0x0000a028, INVALIDATE_CACHES_bit = 1 << 0, CACHES_INVALID_bit = 1 << 1, CACHES_DIRTY_bit = 1 << 2, FLUSH_ALL_bit = 1 << 4, FLUSH_GS_THREADS_bit = 1 << 8, FLUSH_ES_THREADS_bit = 1 << 9, SMX_DC_MC_INTF_CTL = 0x0000a02c, MC_RD_REQ_CRED_mask = 0xff << 0, MC_RD_REQ_CRED_shift = 0, MC_WR_REQ_CRED_mask = 0xff << 16, MC_WR_REQ_CRED_shift = 16, TD_PS_SAMPLER0_BORDER_RED = 0x0000a400, TD_PS_SAMPLER0_BORDER_RED_num = 18, TD_PS_SAMPLER0_BORDER_RED_offset = 16, TD_PS_SAMPLER0_BORDER_GREEN = 0x0000a404, TD_PS_SAMPLER0_BORDER_GREEN_num = 18, TD_PS_SAMPLER0_BORDER_GREEN_offset = 16, TD_PS_SAMPLER0_BORDER_BLUE = 0x0000a408, TD_PS_SAMPLER0_BORDER_BLUE_num = 18, TD_PS_SAMPLER0_BORDER_BLUE_offset = 16, TD_PS_SAMPLER0_BORDER_ALPHA = 0x0000a40c, TD_PS_SAMPLER0_BORDER_ALPHA_num = 18, TD_PS_SAMPLER0_BORDER_ALPHA_offset = 16, TD_VS_SAMPLER0_BORDER_RED = 0x0000a600, TD_VS_SAMPLER0_BORDER_RED_num = 18, TD_VS_SAMPLER0_BORDER_RED_offset = 16, TD_VS_SAMPLER0_BORDER_GREEN = 0x0000a604, TD_VS_SAMPLER0_BORDER_GREEN_num = 18, TD_VS_SAMPLER0_BORDER_GREEN_offset = 16, TD_VS_SAMPLER0_BORDER_BLUE = 0x0000a608, TD_VS_SAMPLER0_BORDER_BLUE_num = 18, TD_VS_SAMPLER0_BORDER_BLUE_offset = 16, TD_VS_SAMPLER0_BORDER_ALPHA = 0x0000a60c, TD_VS_SAMPLER0_BORDER_ALPHA_num = 18, TD_VS_SAMPLER0_BORDER_ALPHA_offset = 16, TD_GS_SAMPLER0_BORDER_RED = 0x0000a800, TD_GS_SAMPLER0_BORDER_RED_num = 18, TD_GS_SAMPLER0_BORDER_RED_offset = 16, TD_GS_SAMPLER0_BORDER_GREEN = 0x0000a804, TD_GS_SAMPLER0_BORDER_GREEN_num = 18, TD_GS_SAMPLER0_BORDER_GREEN_offset = 16, TD_GS_SAMPLER0_BORDER_BLUE = 0x0000a808, TD_GS_SAMPLER0_BORDER_BLUE_num = 18, TD_GS_SAMPLER0_BORDER_BLUE_offset = 16, TD_GS_SAMPLER0_BORDER_ALPHA = 0x0000a80c, TD_GS_SAMPLER0_BORDER_ALPHA_num = 18, TD_GS_SAMPLER0_BORDER_ALPHA_offset = 16, TD_PS_SAMPLER0_CLEARTYPE_KERNEL = 0x0000aa00, TD_PS_SAMPLER0_CLEARTYPE_KERNEL_num = 18, TD_PS_SAMPLER0_CLEARTYPE_KERNEL__WIDTH_mask = 0x07 << 0, TD_PS_SAMPLER0_CLEARTYPE_KERNEL__WIDTH_shift = 0, TD_PS_SAMPLER0_CLEARTYPE_KERNEL__HEIGHT_mask = 0x07 << 3, TD_PS_SAMPLER0_CLEARTYPE_KERNEL__HEIGHT_shift = 3, DB_DEPTH_SIZE = 0x00028000, PITCH_TILE_MAX_mask = 0x3ff << 0, PITCH_TILE_MAX_shift = 0, SLICE_TILE_MAX_mask = 0xfffff << 10, SLICE_TILE_MAX_shift = 10, DB_DEPTH_VIEW = 0x00028004, SLICE_START_mask = 0x7ff << 0, SLICE_START_shift = 0, SLICE_MAX_mask = 0x7ff << 13, SLICE_MAX_shift = 13, DB_DEPTH_BASE = 0x0002800c, DB_DEPTH_INFO = 0x00028010, DB_DEPTH_INFO__FORMAT_mask = 0x07 << 0, DB_DEPTH_INFO__FORMAT_shift = 0, DEPTH_INVALID = 0x00, DEPTH_16 = 0x01, DEPTH_X8_24 = 0x02, DEPTH_8_24 = 0x03, DEPTH_X8_24_FLOAT = 0x04, DEPTH_8_24_FLOAT = 0x05, DEPTH_32_FLOAT = 0x06, DEPTH_X24_8_32_FLOAT = 0x07, DB_DEPTH_INFO__READ_SIZE_bit = 1 << 3, DB_DEPTH_INFO__ARRAY_MODE_mask = 0x0f << 15, DB_DEPTH_INFO__ARRAY_MODE_shift = 15, ARRAY_2D_TILED_THIN1 = 0x04, TILE_SURFACE_ENABLE_bit = 1 << 25, TILE_COMPACT_bit = 1 << 26, ZRANGE_PRECISION_bit = 1 << 31, DB_HTILE_DATA_BASE = 0x00028014, DB_STENCIL_CLEAR = 0x00028028, DB_STENCIL_CLEAR__CLEAR_mask = 0xff << 0, DB_STENCIL_CLEAR__CLEAR_shift = 0, MIN_mask = 0xff << 16, MIN_shift = 16, DB_DEPTH_CLEAR = 0x0002802c, PA_SC_SCREEN_SCISSOR_TL = 0x00028030, PA_SC_SCREEN_SCISSOR_TL__TL_X_mask = 0x7fff << 0, PA_SC_SCREEN_SCISSOR_TL__TL_X_shift = 0, PA_SC_SCREEN_SCISSOR_TL__TL_Y_mask = 0x7fff << 16, PA_SC_SCREEN_SCISSOR_TL__TL_Y_shift = 16, PA_SC_SCREEN_SCISSOR_BR = 0x00028034, PA_SC_SCREEN_SCISSOR_BR__BR_X_mask = 0x7fff << 0, PA_SC_SCREEN_SCISSOR_BR__BR_X_shift = 0, PA_SC_SCREEN_SCISSOR_BR__BR_Y_mask = 0x7fff << 16, PA_SC_SCREEN_SCISSOR_BR__BR_Y_shift = 16, CB_COLOR0_BASE = 0x00028040, CB_COLOR0_BASE_num = 8, CB_COLOR0_SIZE = 0x00028060, CB_COLOR0_SIZE_num = 8, /* PITCH_TILE_MAX_mask = 0x3ff << 0, */ /* PITCH_TILE_MAX_shift = 0, */ /* SLICE_TILE_MAX_mask = 0xfffff << 10, */ /* SLICE_TILE_MAX_shift = 10, */ CB_COLOR0_VIEW = 0x00028080, CB_COLOR0_VIEW_num = 8, /* SLICE_START_mask = 0x7ff << 0, */ /* SLICE_START_shift = 0, */ /* SLICE_MAX_mask = 0x7ff << 13, */ /* SLICE_MAX_shift = 13, */ CB_COLOR0_INFO = 0x000280a0, CB_COLOR0_INFO_num = 8, ENDIAN_mask = 0x03 << 0, ENDIAN_shift = 0, ENDIAN_NONE = 0x00, ENDIAN_8IN16 = 0x01, ENDIAN_8IN32 = 0x02, ENDIAN_8IN64 = 0x03, CB_COLOR0_INFO__FORMAT_mask = 0x3f << 2, CB_COLOR0_INFO__FORMAT_shift = 2, COLOR_INVALID = 0x00, COLOR_8 = 0x01, COLOR_4_4 = 0x02, COLOR_3_3_2 = 0x03, COLOR_16 = 0x05, COLOR_16_FLOAT = 0x06, COLOR_8_8 = 0x07, COLOR_5_6_5 = 0x08, COLOR_6_5_5 = 0x09, COLOR_1_5_5_5 = 0x0a, COLOR_4_4_4_4 = 0x0b, COLOR_5_5_5_1 = 0x0c, COLOR_32 = 0x0d, COLOR_32_FLOAT = 0x0e, COLOR_16_16 = 0x0f, COLOR_16_16_FLOAT = 0x10, COLOR_8_24 = 0x11, COLOR_8_24_FLOAT = 0x12, COLOR_24_8 = 0x13, COLOR_24_8_FLOAT = 0x14, COLOR_10_11_11 = 0x15, COLOR_10_11_11_FLOAT = 0x16, COLOR_11_11_10 = 0x17, COLOR_11_11_10_FLOAT = 0x18, COLOR_2_10_10_10 = 0x19, COLOR_8_8_8_8 = 0x1a, COLOR_10_10_10_2 = 0x1b, COLOR_X24_8_32_FLOAT = 0x1c, COLOR_32_32 = 0x1d, COLOR_32_32_FLOAT = 0x1e, COLOR_16_16_16_16 = 0x1f, COLOR_16_16_16_16_FLOAT = 0x20, COLOR_32_32_32_32 = 0x22, COLOR_32_32_32_32_FLOAT = 0x23, CB_COLOR0_INFO__ARRAY_MODE_mask = 0x0f << 8, CB_COLOR0_INFO__ARRAY_MODE_shift = 8, ARRAY_LINEAR_GENERAL = 0x00, ARRAY_LINEAR_ALIGNED = 0x01, /* ARRAY_2D_TILED_THIN1 = 0x04, */ NUMBER_TYPE_mask = 0x07 << 12, NUMBER_TYPE_shift = 12, NUMBER_UNORM = 0x00, NUMBER_SNORM = 0x01, NUMBER_USCALED = 0x02, NUMBER_SSCALED = 0x03, NUMBER_UINT = 0x04, NUMBER_SINT = 0x05, NUMBER_SRGB = 0x06, NUMBER_FLOAT = 0x07, CB_COLOR0_INFO__READ_SIZE_bit = 1 << 15, COMP_SWAP_mask = 0x03 << 16, COMP_SWAP_shift = 16, SWAP_STD = 0x00, SWAP_ALT = 0x01, SWAP_STD_REV = 0x02, SWAP_ALT_REV = 0x03, CB_COLOR0_INFO__TILE_MODE_mask = 0x03 << 18, CB_COLOR0_INFO__TILE_MODE_shift = 18, TILE_DISABLE = 0x00, TILE_CLEAR_ENABLE = 0x01, TILE_FRAG_ENABLE = 0x02, BLEND_CLAMP_bit = 1 << 20, CLEAR_COLOR_bit = 1 << 21, BLEND_BYPASS_bit = 1 << 22, BLEND_FLOAT32_bit = 1 << 23, SIMPLE_FLOAT_bit = 1 << 24, CB_COLOR0_INFO__ROUND_MODE_bit = 1 << 25, /* TILE_COMPACT_bit = 1 << 26, */ SOURCE_FORMAT_bit = 1 << 27, CB_COLOR0_TILE = 0x000280c0, CB_COLOR0_TILE_num = 8, CB_COLOR0_FRAG = 0x000280e0, CB_COLOR0_FRAG_num = 8, CB_COLOR0_MASK = 0x00028100, CB_COLOR0_MASK_num = 8, CMASK_BLOCK_MAX_mask = 0xfff << 0, CMASK_BLOCK_MAX_shift = 0, FMASK_TILE_MAX_mask = 0xfffff << 12, FMASK_TILE_MAX_shift = 12, CB_CLEAR_RED = 0x00028120, CB_CLEAR_GREEN = 0x00028124, CB_CLEAR_BLUE = 0x00028128, CB_CLEAR_ALPHA = 0x0002812c, SQ_ALU_CONST_BUFFER_SIZE_PS_0 = 0x00028140, SQ_ALU_CONST_BUFFER_SIZE_PS_0_num = 16, SQ_ALU_CONST_BUFFER_SIZE_PS_0__DATA_mask = 0x1ff << 0, SQ_ALU_CONST_BUFFER_SIZE_PS_0__DATA_shift = 0, SQ_ALU_CONST_BUFFER_SIZE_VS_0 = 0x00028180, SQ_ALU_CONST_BUFFER_SIZE_VS_0_num = 16, SQ_ALU_CONST_BUFFER_SIZE_VS_0__DATA_mask = 0x1ff << 0, SQ_ALU_CONST_BUFFER_SIZE_VS_0__DATA_shift = 0, SQ_ALU_CONST_BUFFER_SIZE_GS_0 = 0x000281c0, SQ_ALU_CONST_BUFFER_SIZE_GS_0_num = 16, SQ_ALU_CONST_BUFFER_SIZE_GS_0__DATA_mask = 0x1ff << 0, SQ_ALU_CONST_BUFFER_SIZE_GS_0__DATA_shift = 0, PA_SC_WINDOW_OFFSET = 0x00028200, WINDOW_X_OFFSET_mask = 0x7fff << 0, WINDOW_X_OFFSET_shift = 0, WINDOW_Y_OFFSET_mask = 0x7fff << 16, WINDOW_Y_OFFSET_shift = 16, PA_SC_WINDOW_SCISSOR_TL = 0x00028204, PA_SC_WINDOW_SCISSOR_TL__TL_X_mask = 0x3fff << 0, PA_SC_WINDOW_SCISSOR_TL__TL_X_shift = 0, PA_SC_WINDOW_SCISSOR_TL__TL_Y_mask = 0x3fff << 16, PA_SC_WINDOW_SCISSOR_TL__TL_Y_shift = 16, WINDOW_OFFSET_DISABLE_bit = 1 << 31, PA_SC_WINDOW_SCISSOR_BR = 0x00028208, PA_SC_WINDOW_SCISSOR_BR__BR_X_mask = 0x3fff << 0, PA_SC_WINDOW_SCISSOR_BR__BR_X_shift = 0, PA_SC_WINDOW_SCISSOR_BR__BR_Y_mask = 0x3fff << 16, PA_SC_WINDOW_SCISSOR_BR__BR_Y_shift = 16, PA_SC_CLIPRECT_RULE = 0x0002820c, CLIP_RULE_mask = 0xffff << 0, CLIP_RULE_shift = 0, PA_SC_CLIPRECT_0_TL = 0x00028210, PA_SC_CLIPRECT_0_TL_num = 4, PA_SC_CLIPRECT_0_TL_offset = 8, PA_SC_CLIPRECT_0_TL__TL_X_mask = 0x3fff << 0, PA_SC_CLIPRECT_0_TL__TL_X_shift = 0, PA_SC_CLIPRECT_0_TL__TL_Y_mask = 0x3fff << 16, PA_SC_CLIPRECT_0_TL__TL_Y_shift = 16, PA_SC_CLIPRECT_0_BR = 0x00028214, PA_SC_CLIPRECT_0_BR_num = 4, PA_SC_CLIPRECT_0_BR_offset = 8, PA_SC_CLIPRECT_0_BR__BR_X_mask = 0x3fff << 0, PA_SC_CLIPRECT_0_BR__BR_X_shift = 0, PA_SC_CLIPRECT_0_BR__BR_Y_mask = 0x3fff << 16, PA_SC_CLIPRECT_0_BR__BR_Y_shift = 16, CB_TARGET_MASK = 0x00028238, TARGET0_ENABLE_mask = 0x0f << 0, TARGET0_ENABLE_shift = 0, TARGET1_ENABLE_mask = 0x0f << 4, TARGET1_ENABLE_shift = 4, TARGET2_ENABLE_mask = 0x0f << 8, TARGET2_ENABLE_shift = 8, TARGET3_ENABLE_mask = 0x0f << 12, TARGET3_ENABLE_shift = 12, TARGET4_ENABLE_mask = 0x0f << 16, TARGET4_ENABLE_shift = 16, TARGET5_ENABLE_mask = 0x0f << 20, TARGET5_ENABLE_shift = 20, TARGET6_ENABLE_mask = 0x0f << 24, TARGET6_ENABLE_shift = 24, TARGET7_ENABLE_mask = 0x0f << 28, TARGET7_ENABLE_shift = 28, CB_SHADER_MASK = 0x0002823c, OUTPUT0_ENABLE_mask = 0x0f << 0, OUTPUT0_ENABLE_shift = 0, OUTPUT1_ENABLE_mask = 0x0f << 4, OUTPUT1_ENABLE_shift = 4, OUTPUT2_ENABLE_mask = 0x0f << 8, OUTPUT2_ENABLE_shift = 8, OUTPUT3_ENABLE_mask = 0x0f << 12, OUTPUT3_ENABLE_shift = 12, OUTPUT4_ENABLE_mask = 0x0f << 16, OUTPUT4_ENABLE_shift = 16, OUTPUT5_ENABLE_mask = 0x0f << 20, OUTPUT5_ENABLE_shift = 20, OUTPUT6_ENABLE_mask = 0x0f << 24, OUTPUT6_ENABLE_shift = 24, OUTPUT7_ENABLE_mask = 0x0f << 28, OUTPUT7_ENABLE_shift = 28, PA_SC_GENERIC_SCISSOR_TL = 0x00028240, PA_SC_GENERIC_SCISSOR_TL__TL_X_mask = 0x3fff << 0, PA_SC_GENERIC_SCISSOR_TL__TL_X_shift = 0, PA_SC_GENERIC_SCISSOR_TL__TL_Y_mask = 0x3fff << 16, PA_SC_GENERIC_SCISSOR_TL__TL_Y_shift = 16, /* WINDOW_OFFSET_DISABLE_bit = 1 << 31, */ PA_SC_GENERIC_SCISSOR_BR = 0x00028244, PA_SC_GENERIC_SCISSOR_BR__BR_X_mask = 0x3fff << 0, PA_SC_GENERIC_SCISSOR_BR__BR_X_shift = 0, PA_SC_GENERIC_SCISSOR_BR__BR_Y_mask = 0x3fff << 16, PA_SC_GENERIC_SCISSOR_BR__BR_Y_shift = 16, PA_SC_VPORT_SCISSOR_0_TL = 0x00028250, PA_SC_VPORT_SCISSOR_0_TL_num = 16, PA_SC_VPORT_SCISSOR_0_TL_offset = 8, PA_SC_VPORT_SCISSOR_0_TL__TL_X_mask = 0x3fff << 0, PA_SC_VPORT_SCISSOR_0_TL__TL_X_shift = 0, PA_SC_VPORT_SCISSOR_0_TL__TL_Y_mask = 0x3fff << 16, PA_SC_VPORT_SCISSOR_0_TL__TL_Y_shift = 16, /* WINDOW_OFFSET_DISABLE_bit = 1 << 31, */ PA_SC_VPORT_SCISSOR_0_BR = 0x00028254, PA_SC_VPORT_SCISSOR_0_BR_num = 16, PA_SC_VPORT_SCISSOR_0_BR_offset = 8, PA_SC_VPORT_SCISSOR_0_BR__BR_X_mask = 0x3fff << 0, PA_SC_VPORT_SCISSOR_0_BR__BR_X_shift = 0, PA_SC_VPORT_SCISSOR_0_BR__BR_Y_mask = 0x3fff << 16, PA_SC_VPORT_SCISSOR_0_BR__BR_Y_shift = 16, PA_SC_VPORT_ZMIN_0 = 0x000282d0, PA_SC_VPORT_ZMIN_0_num = 16, PA_SC_VPORT_ZMIN_0_offset = 8, PA_SC_VPORT_ZMAX_0 = 0x000282d4, PA_SC_VPORT_ZMAX_0_num = 16, PA_SC_VPORT_ZMAX_0_offset = 8, SX_MISC = 0x00028350, MULTIPASS_bit = 1 << 0, SQ_VTX_SEMANTIC_0 = 0x00028380, SQ_VTX_SEMANTIC_0_num = 32, /* SEMANTIC_ID_mask = 0xff << 0, */ /* SEMANTIC_ID_shift = 0, */ VGT_MAX_VTX_INDX = 0x00028400, VGT_MIN_VTX_INDX = 0x00028404, VGT_INDX_OFFSET = 0x00028408, VGT_MULTI_PRIM_IB_RESET_INDX = 0x0002840c, SX_ALPHA_TEST_CONTROL = 0x00028410, ALPHA_FUNC_mask = 0x07 << 0, ALPHA_FUNC_shift = 0, REF_NEVER = 0x00, REF_LESS = 0x01, REF_EQUAL = 0x02, REF_LEQUAL = 0x03, REF_GREATER = 0x04, REF_NOTEQUAL = 0x05, REF_GEQUAL = 0x06, REF_ALWAYS = 0x07, ALPHA_TEST_ENABLE_bit = 1 << 3, ALPHA_TEST_BYPASS_bit = 1 << 8, CB_BLEND_RED = 0x00028414, CB_BLEND_GREEN = 0x00028418, CB_BLEND_BLUE = 0x0002841c, CB_BLEND_ALPHA = 0x00028420, CB_FOG_RED = 0x00028424, CB_FOG_GREEN = 0x00028428, CB_FOG_BLUE = 0x0002842c, DB_STENCILREFMASK = 0x00028430, STENCILREF_mask = 0xff << 0, STENCILREF_shift = 0, STENCILMASK_mask = 0xff << 8, STENCILMASK_shift = 8, STENCILWRITEMASK_mask = 0xff << 16, STENCILWRITEMASK_shift = 16, DB_STENCILREFMASK_BF = 0x00028434, STENCILREF_BF_mask = 0xff << 0, STENCILREF_BF_shift = 0, STENCILMASK_BF_mask = 0xff << 8, STENCILMASK_BF_shift = 8, STENCILWRITEMASK_BF_mask = 0xff << 16, STENCILWRITEMASK_BF_shift = 16, SX_ALPHA_REF = 0x00028438, PA_CL_VPORT_XSCALE_0 = 0x0002843c, PA_CL_VPORT_XSCALE_0_num = 16, PA_CL_VPORT_XSCALE_0_offset = 24, PA_CL_VPORT_XOFFSET_0 = 0x00028440, PA_CL_VPORT_XOFFSET_0_num = 16, PA_CL_VPORT_XOFFSET_0_offset = 24, PA_CL_VPORT_YSCALE_0 = 0x00028444, PA_CL_VPORT_YSCALE_0_num = 16, PA_CL_VPORT_YSCALE_0_offset = 24, PA_CL_VPORT_YOFFSET_0 = 0x00028448, PA_CL_VPORT_YOFFSET_0_num = 16, PA_CL_VPORT_YOFFSET_0_offset = 24, PA_CL_VPORT_ZSCALE_0 = 0x0002844c, PA_CL_VPORT_ZSCALE_0_num = 16, PA_CL_VPORT_ZSCALE_0_offset = 24, PA_CL_VPORT_ZOFFSET_0 = 0x00028450, PA_CL_VPORT_ZOFFSET_0_num = 16, PA_CL_VPORT_ZOFFSET_0_offset = 24, SPI_VS_OUT_ID_0 = 0x00028614, SPI_VS_OUT_ID_0_num = 10, SEMANTIC_0_mask = 0xff << 0, SEMANTIC_0_shift = 0, SEMANTIC_1_mask = 0xff << 8, SEMANTIC_1_shift = 8, SEMANTIC_2_mask = 0xff << 16, SEMANTIC_2_shift = 16, SEMANTIC_3_mask = 0xff << 24, SEMANTIC_3_shift = 24, SPI_PS_INPUT_CNTL_0 = 0x00028644, SPI_PS_INPUT_CNTL_0_num = 32, SEMANTIC_mask = 0xff << 0, SEMANTIC_shift = 0, DEFAULT_VAL_mask = 0x03 << 8, DEFAULT_VAL_shift = 8, X_0_0F = 0x00, FLAT_SHADE_bit = 1 << 10, SEL_CENTROID_bit = 1 << 11, SEL_LINEAR_bit = 1 << 12, CYL_WRAP_mask = 0x0f << 13, CYL_WRAP_shift = 13, PT_SPRITE_TEX_bit = 1 << 17, SEL_SAMPLE_bit = 1 << 18, SPI_VS_OUT_CONFIG = 0x000286c4, VS_PER_COMPONENT_bit = 1 << 0, VS_EXPORT_COUNT_mask = 0x1f << 1, VS_EXPORT_COUNT_shift = 1, VS_EXPORTS_FOG_bit = 1 << 8, VS_OUT_FOG_VEC_ADDR_mask = 0x1f << 9, VS_OUT_FOG_VEC_ADDR_shift = 9, SPI_PS_IN_CONTROL_0 = 0x000286cc, NUM_INTERP_mask = 0x3f << 0, NUM_INTERP_shift = 0, POSITION_ENA_bit = 1 << 8, POSITION_CENTROID_bit = 1 << 9, POSITION_ADDR_mask = 0x1f << 10, POSITION_ADDR_shift = 10, PARAM_GEN_mask = 0x0f << 15, PARAM_GEN_shift = 15, PARAM_GEN_ADDR_mask = 0x7f << 19, PARAM_GEN_ADDR_shift = 19, BARYC_SAMPLE_CNTL_mask = 0x03 << 26, BARYC_SAMPLE_CNTL_shift = 26, CENTROIDS_ONLY = 0x00, CENTERS_ONLY = 0x01, CENTROIDS_AND_CENTERS = 0x02, UNDEF = 0x03, PERSP_GRADIENT_ENA_bit = 1 << 28, LINEAR_GRADIENT_ENA_bit = 1 << 29, POSITION_SAMPLE_bit = 1 << 30, BARYC_AT_SAMPLE_ENA_bit = 1 << 31, SPI_PS_IN_CONTROL_1 = 0x000286d0, GEN_INDEX_PIX_bit = 1 << 0, GEN_INDEX_PIX_ADDR_mask = 0x7f << 1, GEN_INDEX_PIX_ADDR_shift = 1, FRONT_FACE_ENA_bit = 1 << 8, FRONT_FACE_CHAN_mask = 0x03 << 9, FRONT_FACE_CHAN_shift = 9, FRONT_FACE_ALL_BITS_bit = 1 << 11, FRONT_FACE_ADDR_mask = 0x1f << 12, FRONT_FACE_ADDR_shift = 12, FOG_ADDR_mask = 0x7f << 17, FOG_ADDR_shift = 17, FIXED_PT_POSITION_ENA_bit = 1 << 24, FIXED_PT_POSITION_ADDR_mask = 0x1f << 25, FIXED_PT_POSITION_ADDR_shift = 25, SPI_INTERP_CONTROL_0 = 0x000286d4, FLAT_SHADE_ENA_bit = 1 << 0, PNT_SPRITE_ENA_bit = 1 << 1, PNT_SPRITE_OVRD_X_mask = 0x07 << 2, PNT_SPRITE_OVRD_X_shift = 2, SPI_PNT_SPRITE_SEL_0 = 0x00, SPI_PNT_SPRITE_SEL_1 = 0x01, SPI_PNT_SPRITE_SEL_S = 0x02, SPI_PNT_SPRITE_SEL_T = 0x03, SPI_PNT_SPRITE_SEL_NONE = 0x04, PNT_SPRITE_OVRD_Y_mask = 0x07 << 5, PNT_SPRITE_OVRD_Y_shift = 5, /* SPI_PNT_SPRITE_SEL_0 = 0x00, */ /* SPI_PNT_SPRITE_SEL_1 = 0x01, */ /* SPI_PNT_SPRITE_SEL_S = 0x02, */ /* SPI_PNT_SPRITE_SEL_T = 0x03, */ /* SPI_PNT_SPRITE_SEL_NONE = 0x04, */ PNT_SPRITE_OVRD_Z_mask = 0x07 << 8, PNT_SPRITE_OVRD_Z_shift = 8, /* SPI_PNT_SPRITE_SEL_0 = 0x00, */ /* SPI_PNT_SPRITE_SEL_1 = 0x01, */ /* SPI_PNT_SPRITE_SEL_S = 0x02, */ /* SPI_PNT_SPRITE_SEL_T = 0x03, */ /* SPI_PNT_SPRITE_SEL_NONE = 0x04, */ PNT_SPRITE_OVRD_W_mask = 0x07 << 11, PNT_SPRITE_OVRD_W_shift = 11, /* SPI_PNT_SPRITE_SEL_0 = 0x00, */ /* SPI_PNT_SPRITE_SEL_1 = 0x01, */ /* SPI_PNT_SPRITE_SEL_S = 0x02, */ /* SPI_PNT_SPRITE_SEL_T = 0x03, */ /* SPI_PNT_SPRITE_SEL_NONE = 0x04, */ PNT_SPRITE_TOP_1_bit = 1 << 14, SPI_INPUT_Z = 0x000286d8, PROVIDE_Z_TO_SPI_bit = 1 << 0, SPI_FOG_CNTL = 0x000286dc, PASS_FOG_THROUGH_PS_bit = 1 << 0, PIXEL_FOG_FUNC_mask = 0x03 << 1, PIXEL_FOG_FUNC_shift = 1, SPI_FOG_NONE = 0x00, SPI_FOG_EXP = 0x01, SPI_FOG_EXP2 = 0x02, SPI_FOG_LINEAR = 0x03, PIXEL_FOG_SRC_SEL_bit = 1 << 3, VS_FOG_CLAMP_DISABLE_bit = 1 << 4, SPI_FOG_FUNC_SCALE = 0x000286e0, SPI_FOG_FUNC_BIAS = 0x000286e4, CB_BLEND0_CONTROL = 0x00028780, CB_BLEND0_CONTROL_num = 8, COLOR_SRCBLEND_mask = 0x1f << 0, COLOR_SRCBLEND_shift = 0, COLOR_COMB_FCN_mask = 0x07 << 5, COLOR_COMB_FCN_shift = 5, COLOR_DESTBLEND_mask = 0x1f << 8, COLOR_DESTBLEND_shift = 8, OPACITY_WEIGHT_bit = 1 << 13, ALPHA_SRCBLEND_mask = 0x1f << 16, ALPHA_SRCBLEND_shift = 16, ALPHA_COMB_FCN_mask = 0x07 << 21, ALPHA_COMB_FCN_shift = 21, ALPHA_DESTBLEND_mask = 0x1f << 24, ALPHA_DESTBLEND_shift = 24, SEPARATE_ALPHA_BLEND_bit = 1 << 29, VGT_DMA_BASE_HI = 0x000287e4, VGT_DMA_BASE_HI__BASE_ADDR_mask = 0xff << 0, VGT_DMA_BASE_HI__BASE_ADDR_shift = 0, VGT_DMA_BASE = 0x000287e8, VGT_DRAW_INITIATOR = 0x000287f0, SOURCE_SELECT_mask = 0x03 << 0, SOURCE_SELECT_shift = 0, DI_SRC_SEL_DMA = 0x00, DI_SRC_SEL_IMMEDIATE = 0x01, DI_SRC_SEL_AUTO_INDEX = 0x02, DI_SRC_SEL_RESERVED = 0x03, MAJOR_MODE_mask = 0x03 << 2, MAJOR_MODE_shift = 2, DI_MAJOR_MODE_0 = 0x00, DI_MAJOR_MODE_1 = 0x01, SPRITE_EN_bit = 1 << 4, NOT_EOP_bit = 1 << 5, USE_OPAQUE_bit = 1 << 6, VGT_IMMED_DATA = 0x000287f4, VGT_EVENT_ADDRESS_REG = 0x000287f8, ADDRESS_LOW_mask = 0xfffffff << 0, ADDRESS_LOW_shift = 0, DB_DEPTH_CONTROL = 0x00028800, STENCIL_ENABLE_bit = 1 << 0, Z_ENABLE_bit = 1 << 1, Z_WRITE_ENABLE_bit = 1 << 2, ZFUNC_mask = 0x07 << 4, ZFUNC_shift = 4, FRAG_NEVER = 0x00, FRAG_LESS = 0x01, FRAG_EQUAL = 0x02, FRAG_LEQUAL = 0x03, FRAG_GREATER = 0x04, FRAG_NOTEQUAL = 0x05, FRAG_GEQUAL = 0x06, FRAG_ALWAYS = 0x07, BACKFACE_ENABLE_bit = 1 << 7, STENCILFUNC_mask = 0x07 << 8, STENCILFUNC_shift = 8, /* REF_NEVER = 0x00, */ /* REF_LESS = 0x01, */ /* REF_EQUAL = 0x02, */ /* REF_LEQUAL = 0x03, */ /* REF_GREATER = 0x04, */ /* REF_NOTEQUAL = 0x05, */ /* REF_GEQUAL = 0x06, */ /* REF_ALWAYS = 0x07, */ STENCILFAIL_mask = 0x07 << 11, STENCILFAIL_shift = 11, STENCIL_KEEP = 0x00, STENCIL_ZERO = 0x01, STENCIL_REPLACE = 0x02, STENCIL_INCR_CLAMP = 0x03, STENCIL_DECR_CLAMP = 0x04, STENCIL_INVERT = 0x05, STENCIL_INCR_WRAP = 0x06, STENCIL_DECR_WRAP = 0x07, STENCILZPASS_mask = 0x07 << 14, STENCILZPASS_shift = 14, /* STENCIL_KEEP = 0x00, */ /* STENCIL_ZERO = 0x01, */ /* STENCIL_REPLACE = 0x02, */ /* STENCIL_INCR_CLAMP = 0x03, */ /* STENCIL_DECR_CLAMP = 0x04, */ /* STENCIL_INVERT = 0x05, */ /* STENCIL_INCR_WRAP = 0x06, */ /* STENCIL_DECR_WRAP = 0x07, */ STENCILZFAIL_mask = 0x07 << 17, STENCILZFAIL_shift = 17, /* STENCIL_KEEP = 0x00, */ /* STENCIL_ZERO = 0x01, */ /* STENCIL_REPLACE = 0x02, */ /* STENCIL_INCR_CLAMP = 0x03, */ /* STENCIL_DECR_CLAMP = 0x04, */ /* STENCIL_INVERT = 0x05, */ /* STENCIL_INCR_WRAP = 0x06, */ /* STENCIL_DECR_WRAP = 0x07, */ STENCILFUNC_BF_mask = 0x07 << 20, STENCILFUNC_BF_shift = 20, /* REF_NEVER = 0x00, */ /* REF_LESS = 0x01, */ /* REF_EQUAL = 0x02, */ /* REF_LEQUAL = 0x03, */ /* REF_GREATER = 0x04, */ /* REF_NOTEQUAL = 0x05, */ /* REF_GEQUAL = 0x06, */ /* REF_ALWAYS = 0x07, */ STENCILFAIL_BF_mask = 0x07 << 23, STENCILFAIL_BF_shift = 23, /* STENCIL_KEEP = 0x00, */ /* STENCIL_ZERO = 0x01, */ /* STENCIL_REPLACE = 0x02, */ /* STENCIL_INCR_CLAMP = 0x03, */ /* STENCIL_DECR_CLAMP = 0x04, */ /* STENCIL_INVERT = 0x05, */ /* STENCIL_INCR_WRAP = 0x06, */ /* STENCIL_DECR_WRAP = 0x07, */ STENCILZPASS_BF_mask = 0x07 << 26, STENCILZPASS_BF_shift = 26, /* STENCIL_KEEP = 0x00, */ /* STENCIL_ZERO = 0x01, */ /* STENCIL_REPLACE = 0x02, */ /* STENCIL_INCR_CLAMP = 0x03, */ /* STENCIL_DECR_CLAMP = 0x04, */ /* STENCIL_INVERT = 0x05, */ /* STENCIL_INCR_WRAP = 0x06, */ /* STENCIL_DECR_WRAP = 0x07, */ STENCILZFAIL_BF_mask = 0x07 << 29, STENCILZFAIL_BF_shift = 29, /* STENCIL_KEEP = 0x00, */ /* STENCIL_ZERO = 0x01, */ /* STENCIL_REPLACE = 0x02, */ /* STENCIL_INCR_CLAMP = 0x03, */ /* STENCIL_DECR_CLAMP = 0x04, */ /* STENCIL_INVERT = 0x05, */ /* STENCIL_INCR_WRAP = 0x06, */ /* STENCIL_DECR_WRAP = 0x07, */ CB_BLEND_CONTROL = 0x00028804, /* COLOR_SRCBLEND_mask = 0x1f << 0, */ /* COLOR_SRCBLEND_shift = 0, */ BLEND_ZERO = 0x00, BLEND_ONE = 0x01, BLEND_SRC_COLOR = 0x02, BLEND_ONE_MINUS_SRC_COLOR = 0x03, BLEND_SRC_ALPHA = 0x04, BLEND_ONE_MINUS_SRC_ALPHA = 0x05, BLEND_DST_ALPHA = 0x06, BLEND_ONE_MINUS_DST_ALPHA = 0x07, BLEND_DST_COLOR = 0x08, BLEND_ONE_MINUS_DST_COLOR = 0x09, BLEND_SRC_ALPHA_SATURATE = 0x0a, BLEND_BOTH_SRC_ALPHA = 0x0b, BLEND_BOTH_INV_SRC_ALPHA = 0x0c, BLEND_CONSTANT_COLOR = 0x0d, BLEND_ONE_MINUS_CONSTANT_COLOR = 0x0e, BLEND_SRC1_COLOR = 0x0f, BLEND_INV_SRC1_COLOR = 0x10, BLEND_SRC1_ALPHA = 0x11, BLEND_INV_SRC1_ALPHA = 0x12, BLEND_CONSTANT_ALPHA = 0x13, BLEND_ONE_MINUS_CONSTANT_ALPHA = 0x14, /* COLOR_COMB_FCN_mask = 0x07 << 5, */ /* COLOR_COMB_FCN_shift = 5, */ COMB_DST_PLUS_SRC = 0x00, COMB_SRC_MINUS_DST = 0x01, COMB_MIN_DST_SRC = 0x02, COMB_MAX_DST_SRC = 0x03, COMB_DST_MINUS_SRC = 0x04, /* COLOR_DESTBLEND_mask = 0x1f << 8, */ /* COLOR_DESTBLEND_shift = 8, */ /* BLEND_ZERO = 0x00, */ /* BLEND_ONE = 0x01, */ /* BLEND_SRC_COLOR = 0x02, */ /* BLEND_ONE_MINUS_SRC_COLOR = 0x03, */ /* BLEND_SRC_ALPHA = 0x04, */ /* BLEND_ONE_MINUS_SRC_ALPHA = 0x05, */ /* BLEND_DST_ALPHA = 0x06, */ /* BLEND_ONE_MINUS_DST_ALPHA = 0x07, */ /* BLEND_DST_COLOR = 0x08, */ /* BLEND_ONE_MINUS_DST_COLOR = 0x09, */ /* BLEND_SRC_ALPHA_SATURATE = 0x0a, */ /* BLEND_BOTH_SRC_ALPHA = 0x0b, */ /* BLEND_BOTH_INV_SRC_ALPHA = 0x0c, */ /* BLEND_CONSTANT_COLOR = 0x0d, */ /* BLEND_ONE_MINUS_CONSTANT_COLOR = 0x0e, */ /* BLEND_SRC1_COLOR = 0x0f, */ /* BLEND_INV_SRC1_COLOR = 0x10, */ /* BLEND_SRC1_ALPHA = 0x11, */ /* BLEND_INV_SRC1_ALPHA = 0x12, */ /* BLEND_CONSTANT_ALPHA = 0x13, */ /* BLEND_ONE_MINUS_CONSTANT_ALPHA = 0x14, */ /* OPACITY_WEIGHT_bit = 1 << 13, */ /* ALPHA_SRCBLEND_mask = 0x1f << 16, */ /* ALPHA_SRCBLEND_shift = 16, */ /* BLEND_ZERO = 0x00, */ /* BLEND_ONE = 0x01, */ /* BLEND_SRC_COLOR = 0x02, */ /* BLEND_ONE_MINUS_SRC_COLOR = 0x03, */ /* BLEND_SRC_ALPHA = 0x04, */ /* BLEND_ONE_MINUS_SRC_ALPHA = 0x05, */ /* BLEND_DST_ALPHA = 0x06, */ /* BLEND_ONE_MINUS_DST_ALPHA = 0x07, */ /* BLEND_DST_COLOR = 0x08, */ /* BLEND_ONE_MINUS_DST_COLOR = 0x09, */ /* BLEND_SRC_ALPHA_SATURATE = 0x0a, */ /* BLEND_BOTH_SRC_ALPHA = 0x0b, */ /* BLEND_BOTH_INV_SRC_ALPHA = 0x0c, */ /* BLEND_CONSTANT_COLOR = 0x0d, */ /* BLEND_ONE_MINUS_CONSTANT_COLOR = 0x0e, */ /* BLEND_SRC1_COLOR = 0x0f, */ /* BLEND_INV_SRC1_COLOR = 0x10, */ /* BLEND_SRC1_ALPHA = 0x11, */ /* BLEND_INV_SRC1_ALPHA = 0x12, */ /* BLEND_CONSTANT_ALPHA = 0x13, */ /* BLEND_ONE_MINUS_CONSTANT_ALPHA = 0x14, */ /* ALPHA_COMB_FCN_mask = 0x07 << 21, */ /* ALPHA_COMB_FCN_shift = 21, */ /* COMB_DST_PLUS_SRC = 0x00, */ /* COMB_SRC_MINUS_DST = 0x01, */ /* COMB_MIN_DST_SRC = 0x02, */ /* COMB_MAX_DST_SRC = 0x03, */ /* COMB_DST_MINUS_SRC = 0x04, */ /* ALPHA_DESTBLEND_mask = 0x1f << 24, */ /* ALPHA_DESTBLEND_shift = 24, */ /* BLEND_ZERO = 0x00, */ /* BLEND_ONE = 0x01, */ /* BLEND_SRC_COLOR = 0x02, */ /* BLEND_ONE_MINUS_SRC_COLOR = 0x03, */ /* BLEND_SRC_ALPHA = 0x04, */ /* BLEND_ONE_MINUS_SRC_ALPHA = 0x05, */ /* BLEND_DST_ALPHA = 0x06, */ /* BLEND_ONE_MINUS_DST_ALPHA = 0x07, */ /* BLEND_DST_COLOR = 0x08, */ /* BLEND_ONE_MINUS_DST_COLOR = 0x09, */ /* BLEND_SRC_ALPHA_SATURATE = 0x0a, */ /* BLEND_BOTH_SRC_ALPHA = 0x0b, */ /* BLEND_BOTH_INV_SRC_ALPHA = 0x0c, */ /* BLEND_CONSTANT_COLOR = 0x0d, */ /* BLEND_ONE_MINUS_CONSTANT_COLOR = 0x0e, */ /* BLEND_SRC1_COLOR = 0x0f, */ /* BLEND_INV_SRC1_COLOR = 0x10, */ /* BLEND_SRC1_ALPHA = 0x11, */ /* BLEND_INV_SRC1_ALPHA = 0x12, */ /* BLEND_CONSTANT_ALPHA = 0x13, */ /* BLEND_ONE_MINUS_CONSTANT_ALPHA = 0x14, */ /* SEPARATE_ALPHA_BLEND_bit = 1 << 29, */ CB_COLOR_CONTROL = 0x00028808, FOG_ENABLE_bit = 1 << 0, MULTIWRITE_ENABLE_bit = 1 << 1, DITHER_ENABLE_bit = 1 << 2, DEGAMMA_ENABLE_bit = 1 << 3, SPECIAL_OP_mask = 0x07 << 4, SPECIAL_OP_shift = 4, SPECIAL_NORMAL = 0x00, SPECIAL_DISABLE = 0x01, SPECIAL_FAST_CLEAR = 0x02, SPECIAL_FORCE_CLEAR = 0x03, SPECIAL_EXPAND_COLOR = 0x04, SPECIAL_EXPAND_TEXTURE = 0x05, SPECIAL_EXPAND_SAMPLES = 0x06, SPECIAL_RESOLVE_BOX = 0x07, PER_MRT_BLEND_bit = 1 << 7, TARGET_BLEND_ENABLE_mask = 0xff << 8, TARGET_BLEND_ENABLE_shift = 8, ROP3_mask = 0xff << 16, ROP3_shift = 16, DB_SHADER_CONTROL = 0x0002880c, Z_EXPORT_ENABLE_bit = 1 << 0, STENCIL_REF_EXPORT_ENABLE_bit = 1 << 1, Z_ORDER_mask = 0x03 << 4, Z_ORDER_shift = 4, LATE_Z = 0x00, EARLY_Z_THEN_LATE_Z = 0x01, RE_Z = 0x02, EARLY_Z_THEN_RE_Z = 0x03, KILL_ENABLE_bit = 1 << 6, COVERAGE_TO_MASK_ENABLE_bit = 1 << 7, MASK_EXPORT_ENABLE_bit = 1 << 8, DUAL_EXPORT_ENABLE_bit = 1 << 9, EXEC_ON_HIER_FAIL_bit = 1 << 10, EXEC_ON_NOOP_bit = 1 << 11, PA_CL_CLIP_CNTL = 0x00028810, UCP_ENA_0_bit = 1 << 0, UCP_ENA_1_bit = 1 << 1, UCP_ENA_2_bit = 1 << 2, UCP_ENA_3_bit = 1 << 3, UCP_ENA_4_bit = 1 << 4, UCP_ENA_5_bit = 1 << 5, PS_UCP_Y_SCALE_NEG_bit = 1 << 13, PS_UCP_MODE_mask = 0x03 << 14, PS_UCP_MODE_shift = 14, CLIP_DISABLE_bit = 1 << 16, UCP_CULL_ONLY_ENA_bit = 1 << 17, BOUNDARY_EDGE_FLAG_ENA_bit = 1 << 18, DX_CLIP_SPACE_DEF_bit = 1 << 19, DIS_CLIP_ERR_DETECT_bit = 1 << 20, VTX_KILL_OR_bit = 1 << 21, DX_LINEAR_ATTR_CLIP_ENA_bit = 1 << 24, VTE_VPORT_PROVOKE_DISABLE_bit = 1 << 25, ZCLIP_NEAR_DISABLE_bit = 1 << 26, ZCLIP_FAR_DISABLE_bit = 1 << 27, PA_SU_SC_MODE_CNTL = 0x00028814, CULL_FRONT_bit = 1 << 0, CULL_BACK_bit = 1 << 1, FACE_bit = 1 << 2, POLY_MODE_mask = 0x03 << 3, POLY_MODE_shift = 3, X_DISABLE_POLY_MODE = 0x00, X_DUAL_MODE = 0x01, POLYMODE_FRONT_PTYPE_mask = 0x07 << 5, POLYMODE_FRONT_PTYPE_shift = 5, X_DRAW_POINTS = 0x00, X_DRAW_LINES = 0x01, X_DRAW_TRIANGLES = 0x02, POLYMODE_BACK_PTYPE_mask = 0x07 << 8, POLYMODE_BACK_PTYPE_shift = 8, /* X_DRAW_POINTS = 0x00, */ /* X_DRAW_LINES = 0x01, */ /* X_DRAW_TRIANGLES = 0x02, */ POLY_OFFSET_FRONT_ENABLE_bit = 1 << 11, POLY_OFFSET_BACK_ENABLE_bit = 1 << 12, POLY_OFFSET_PARA_ENABLE_bit = 1 << 13, VTX_WINDOW_OFFSET_ENABLE_bit = 1 << 16, PROVOKING_VTX_LAST_bit = 1 << 19, PERSP_CORR_DIS_bit = 1 << 20, MULTI_PRIM_IB_ENA_bit = 1 << 21, PA_CL_VTE_CNTL = 0x00028818, VPORT_X_SCALE_ENA_bit = 1 << 0, VPORT_X_OFFSET_ENA_bit = 1 << 1, VPORT_Y_SCALE_ENA_bit = 1 << 2, VPORT_Y_OFFSET_ENA_bit = 1 << 3, VPORT_Z_SCALE_ENA_bit = 1 << 4, VPORT_Z_OFFSET_ENA_bit = 1 << 5, VTX_XY_FMT_bit = 1 << 8, VTX_Z_FMT_bit = 1 << 9, VTX_W0_FMT_bit = 1 << 10, PERFCOUNTER_REF_bit = 1 << 11, PA_CL_VS_OUT_CNTL = 0x0002881c, CLIP_DIST_ENA_0_bit = 1 << 0, CLIP_DIST_ENA_1_bit = 1 << 1, CLIP_DIST_ENA_2_bit = 1 << 2, CLIP_DIST_ENA_3_bit = 1 << 3, CLIP_DIST_ENA_4_bit = 1 << 4, CLIP_DIST_ENA_5_bit = 1 << 5, CLIP_DIST_ENA_6_bit = 1 << 6, CLIP_DIST_ENA_7_bit = 1 << 7, CULL_DIST_ENA_0_bit = 1 << 8, CULL_DIST_ENA_1_bit = 1 << 9, CULL_DIST_ENA_2_bit = 1 << 10, CULL_DIST_ENA_3_bit = 1 << 11, CULL_DIST_ENA_4_bit = 1 << 12, CULL_DIST_ENA_5_bit = 1 << 13, CULL_DIST_ENA_6_bit = 1 << 14, CULL_DIST_ENA_7_bit = 1 << 15, USE_VTX_POINT_SIZE_bit = 1 << 16, USE_VTX_EDGE_FLAG_bit = 1 << 17, USE_VTX_RENDER_TARGET_INDX_bit = 1 << 18, USE_VTX_VIEWPORT_INDX_bit = 1 << 19, USE_VTX_KILL_FLAG_bit = 1 << 20, VS_OUT_MISC_VEC_ENA_bit = 1 << 21, VS_OUT_CCDIST0_VEC_ENA_bit = 1 << 22, VS_OUT_CCDIST1_VEC_ENA_bit = 1 << 23, PA_CL_NANINF_CNTL = 0x00028820, VTE_XY_INF_DISCARD_bit = 1 << 0, VTE_Z_INF_DISCARD_bit = 1 << 1, VTE_W_INF_DISCARD_bit = 1 << 2, VTE_0XNANINF_IS_0_bit = 1 << 3, VTE_XY_NAN_RETAIN_bit = 1 << 4, VTE_Z_NAN_RETAIN_bit = 1 << 5, VTE_W_NAN_RETAIN_bit = 1 << 6, VTE_W_RECIP_NAN_IS_0_bit = 1 << 7, VS_XY_NAN_TO_INF_bit = 1 << 8, VS_XY_INF_RETAIN_bit = 1 << 9, VS_Z_NAN_TO_INF_bit = 1 << 10, VS_Z_INF_RETAIN_bit = 1 << 11, VS_W_NAN_TO_INF_bit = 1 << 12, VS_W_INF_RETAIN_bit = 1 << 13, VS_CLIP_DIST_INF_DISCARD_bit = 1 << 14, VTE_NO_OUTPUT_NEG_0_bit = 1 << 20, SQ_PGM_START_PS = 0x00028840, SQ_PGM_RESOURCES_PS = 0x00028850, NUM_GPRS_mask = 0xff << 0, NUM_GPRS_shift = 0, STACK_SIZE_mask = 0xff << 8, STACK_SIZE_shift = 8, SQ_PGM_RESOURCES_PS__DX10_CLAMP_bit = 1 << 21, FETCH_CACHE_LINES_mask = 0x07 << 24, FETCH_CACHE_LINES_shift = 24, UNCACHED_FIRST_INST_bit = 1 << 28, CLAMP_CONSTS_bit = 1 << 31, SQ_PGM_EXPORTS_PS = 0x00028854, EXPORT_MODE_mask = 0x1f << 0, EXPORT_MODE_shift = 0, SQ_PGM_START_VS = 0x00028858, SQ_PGM_RESOURCES_VS = 0x00028868, /* NUM_GPRS_mask = 0xff << 0, */ /* NUM_GPRS_shift = 0, */ /* STACK_SIZE_mask = 0xff << 8, */ /* STACK_SIZE_shift = 8, */ SQ_PGM_RESOURCES_VS__DX10_CLAMP_bit = 1 << 21, /* FETCH_CACHE_LINES_mask = 0x07 << 24, */ /* FETCH_CACHE_LINES_shift = 24, */ /* UNCACHED_FIRST_INST_bit = 1 << 28, */ SQ_PGM_START_GS = 0x0002886c, SQ_PGM_RESOURCES_GS = 0x0002887c, /* NUM_GPRS_mask = 0xff << 0, */ /* NUM_GPRS_shift = 0, */ /* STACK_SIZE_mask = 0xff << 8, */ /* STACK_SIZE_shift = 8, */ SQ_PGM_RESOURCES_GS__DX10_CLAMP_bit = 1 << 21, /* FETCH_CACHE_LINES_mask = 0x07 << 24, */ /* FETCH_CACHE_LINES_shift = 24, */ /* UNCACHED_FIRST_INST_bit = 1 << 28, */ SQ_PGM_START_ES = 0x00028880, SQ_PGM_RESOURCES_ES = 0x00028890, /* NUM_GPRS_mask = 0xff << 0, */ /* NUM_GPRS_shift = 0, */ /* STACK_SIZE_mask = 0xff << 8, */ /* STACK_SIZE_shift = 8, */ SQ_PGM_RESOURCES_ES__DX10_CLAMP_bit = 1 << 21, /* FETCH_CACHE_LINES_mask = 0x07 << 24, */ /* FETCH_CACHE_LINES_shift = 24, */ /* UNCACHED_FIRST_INST_bit = 1 << 28, */ SQ_PGM_START_FS = 0x00028894, SQ_PGM_RESOURCES_FS = 0x000288a4, /* NUM_GPRS_mask = 0xff << 0, */ /* NUM_GPRS_shift = 0, */ /* STACK_SIZE_mask = 0xff << 8, */ /* STACK_SIZE_shift = 8, */ SQ_PGM_RESOURCES_FS__DX10_CLAMP_bit = 1 << 21, SQ_ESGS_RING_ITEMSIZE = 0x000288a8, ITEMSIZE_mask = 0x7fff << 0, ITEMSIZE_shift = 0, SQ_GSVS_RING_ITEMSIZE = 0x000288ac, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_ESTMP_RING_ITEMSIZE = 0x000288b0, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_GSTMP_RING_ITEMSIZE = 0x000288b4, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_VSTMP_RING_ITEMSIZE = 0x000288b8, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_PSTMP_RING_ITEMSIZE = 0x000288bc, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_FBUF_RING_ITEMSIZE = 0x000288c0, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_REDUC_RING_ITEMSIZE = 0x000288c4, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_GS_VERT_ITEMSIZE = 0x000288c8, /* ITEMSIZE_mask = 0x7fff << 0, */ /* ITEMSIZE_shift = 0, */ SQ_PGM_CF_OFFSET_PS = 0x000288cc, PGM_CF_OFFSET_mask = 0xfffff << 0, PGM_CF_OFFSET_shift = 0, SQ_PGM_CF_OFFSET_VS = 0x000288d0, /* PGM_CF_OFFSET_mask = 0xfffff << 0, */ /* PGM_CF_OFFSET_shift = 0, */ SQ_PGM_CF_OFFSET_GS = 0x000288d4, /* PGM_CF_OFFSET_mask = 0xfffff << 0, */ /* PGM_CF_OFFSET_shift = 0, */ SQ_PGM_CF_OFFSET_ES = 0x000288d8, /* PGM_CF_OFFSET_mask = 0xfffff << 0, */ /* PGM_CF_OFFSET_shift = 0, */ SQ_PGM_CF_OFFSET_FS = 0x000288dc, /* PGM_CF_OFFSET_mask = 0xfffff << 0, */ /* PGM_CF_OFFSET_shift = 0, */ SQ_VTX_SEMANTIC_CLEAR = 0x000288e0, SQ_ALU_CONST_CACHE_PS_0 = 0x00028940, SQ_ALU_CONST_CACHE_PS_0_num = 16, SQ_ALU_CONST_CACHE_VS_0 = 0x00028980, SQ_ALU_CONST_CACHE_VS_0_num = 16, SQ_ALU_CONST_CACHE_GS_0 = 0x000289c0, SQ_ALU_CONST_CACHE_GS_0_num = 16, PA_SU_POINT_SIZE = 0x00028a00, PA_SU_POINT_SIZE__HEIGHT_mask = 0xffff << 0, PA_SU_POINT_SIZE__HEIGHT_shift = 0, PA_SU_POINT_SIZE__WIDTH_mask = 0xffff << 16, PA_SU_POINT_SIZE__WIDTH_shift = 16, PA_SU_POINT_MINMAX = 0x00028a04, MIN_SIZE_mask = 0xffff << 0, MIN_SIZE_shift = 0, MAX_SIZE_mask = 0xffff << 16, MAX_SIZE_shift = 16, PA_SU_LINE_CNTL = 0x00028a08, PA_SU_LINE_CNTL__WIDTH_mask = 0xffff << 0, PA_SU_LINE_CNTL__WIDTH_shift = 0, PA_SC_LINE_STIPPLE = 0x00028a0c, LINE_PATTERN_mask = 0xffff << 0, LINE_PATTERN_shift = 0, REPEAT_COUNT_mask = 0xff << 16, REPEAT_COUNT_shift = 16, PATTERN_BIT_ORDER_bit = 1 << 28, AUTO_RESET_CNTL_mask = 0x03 << 29, AUTO_RESET_CNTL_shift = 29, VGT_OUTPUT_PATH_CNTL = 0x00028a10, PATH_SELECT_mask = 0x03 << 0, PATH_SELECT_shift = 0, VGT_OUTPATH_VTX_REUSE = 0x00, VGT_OUTPATH_TESS_EN = 0x01, VGT_OUTPATH_PASSTHRU = 0x02, VGT_OUTPATH_GS_BLOCK = 0x03, VGT_HOS_CNTL = 0x00028a14, TESS_MODE_mask = 0x03 << 0, TESS_MODE_shift = 0, VGT_HOS_MAX_TESS_LEVEL = 0x00028a18, VGT_HOS_MIN_TESS_LEVEL = 0x00028a1c, VGT_HOS_REUSE_DEPTH = 0x00028a20, REUSE_DEPTH_mask = 0xff << 0, REUSE_DEPTH_shift = 0, VGT_GROUP_PRIM_TYPE = 0x00028a24, VGT_GROUP_PRIM_TYPE__PRIM_TYPE_mask = 0x1f << 0, VGT_GROUP_PRIM_TYPE__PRIM_TYPE_shift = 0, VGT_GRP_3D_POINT = 0x00, VGT_GRP_3D_LINE = 0x01, VGT_GRP_3D_TRI = 0x02, VGT_GRP_3D_RECT = 0x03, VGT_GRP_3D_QUAD = 0x04, VGT_GRP_2D_COPY_RECT_V0 = 0x05, VGT_GRP_2D_COPY_RECT_V1 = 0x06, VGT_GRP_2D_COPY_RECT_V2 = 0x07, VGT_GRP_2D_COPY_RECT_V3 = 0x08, VGT_GRP_2D_FILL_RECT = 0x09, VGT_GRP_2D_LINE = 0x0a, VGT_GRP_2D_TRI = 0x0b, VGT_GRP_PRIM_INDEX_LINE = 0x0c, VGT_GRP_PRIM_INDEX_TRI = 0x0d, VGT_GRP_PRIM_INDEX_QUAD = 0x0e, VGT_GRP_3D_LINE_ADJ = 0x0f, VGT_GRP_3D_TRI_ADJ = 0x10, RETAIN_ORDER_bit = 1 << 14, RETAIN_QUADS_bit = 1 << 15, PRIM_ORDER_mask = 0x07 << 16, PRIM_ORDER_shift = 16, VGT_GRP_LIST = 0x00, VGT_GRP_STRIP = 0x01, VGT_GRP_FAN = 0x02, VGT_GRP_LOOP = 0x03, VGT_GRP_POLYGON = 0x04, VGT_GROUP_FIRST_DECR = 0x00028a28, FIRST_DECR_mask = 0x0f << 0, FIRST_DECR_shift = 0, VGT_GROUP_DECR = 0x00028a2c, DECR_mask = 0x0f << 0, DECR_shift = 0, VGT_GROUP_VECT_0_CNTL = 0x00028a30, COMP_X_EN_bit = 1 << 0, COMP_Y_EN_bit = 1 << 1, COMP_Z_EN_bit = 1 << 2, COMP_W_EN_bit = 1 << 3, VGT_GROUP_VECT_0_CNTL__STRIDE_mask = 0xff << 8, VGT_GROUP_VECT_0_CNTL__STRIDE_shift = 8, SHIFT_mask = 0xff << 16, SHIFT_shift = 16, VGT_GROUP_VECT_1_CNTL = 0x00028a34, /* COMP_X_EN_bit = 1 << 0, */ /* COMP_Y_EN_bit = 1 << 1, */ /* COMP_Z_EN_bit = 1 << 2, */ /* COMP_W_EN_bit = 1 << 3, */ VGT_GROUP_VECT_1_CNTL__STRIDE_mask = 0xff << 8, VGT_GROUP_VECT_1_CNTL__STRIDE_shift = 8, /* SHIFT_mask = 0xff << 16, */ /* SHIFT_shift = 16, */ VGT_GROUP_VECT_0_FMT_CNTL = 0x00028a38, X_CONV_mask = 0x0f << 0, X_CONV_shift = 0, VGT_GRP_INDEX_16 = 0x00, VGT_GRP_INDEX_32 = 0x01, VGT_GRP_UINT_16 = 0x02, VGT_GRP_UINT_32 = 0x03, VGT_GRP_SINT_16 = 0x04, VGT_GRP_SINT_32 = 0x05, VGT_GRP_FLOAT_32 = 0x06, VGT_GRP_AUTO_PRIM = 0x07, VGT_GRP_FIX_1_23_TO_FLOAT = 0x08, X_OFFSET_mask = 0x0f << 4, X_OFFSET_shift = 4, Y_CONV_mask = 0x0f << 8, Y_CONV_shift = 8, /* VGT_GRP_INDEX_16 = 0x00, */ /* VGT_GRP_INDEX_32 = 0x01, */ /* VGT_GRP_UINT_16 = 0x02, */ /* VGT_GRP_UINT_32 = 0x03, */ /* VGT_GRP_SINT_16 = 0x04, */ /* VGT_GRP_SINT_32 = 0x05, */ /* VGT_GRP_FLOAT_32 = 0x06, */ /* VGT_GRP_AUTO_PRIM = 0x07, */ /* VGT_GRP_FIX_1_23_TO_FLOAT = 0x08, */ Y_OFFSET_mask = 0x0f << 12, Y_OFFSET_shift = 12, Z_CONV_mask = 0x0f << 16, Z_CONV_shift = 16, /* VGT_GRP_INDEX_16 = 0x00, */ /* VGT_GRP_INDEX_32 = 0x01, */ /* VGT_GRP_UINT_16 = 0x02, */ /* VGT_GRP_UINT_32 = 0x03, */ /* VGT_GRP_SINT_16 = 0x04, */ /* VGT_GRP_SINT_32 = 0x05, */ /* VGT_GRP_FLOAT_32 = 0x06, */ /* VGT_GRP_AUTO_PRIM = 0x07, */ /* VGT_GRP_FIX_1_23_TO_FLOAT = 0x08, */ Z_OFFSET_mask = 0x0f << 20, Z_OFFSET_shift = 20, W_CONV_mask = 0x0f << 24, W_CONV_shift = 24, /* VGT_GRP_INDEX_16 = 0x00, */ /* VGT_GRP_INDEX_32 = 0x01, */ /* VGT_GRP_UINT_16 = 0x02, */ /* VGT_GRP_UINT_32 = 0x03, */ /* VGT_GRP_SINT_16 = 0x04, */ /* VGT_GRP_SINT_32 = 0x05, */ /* VGT_GRP_FLOAT_32 = 0x06, */ /* VGT_GRP_AUTO_PRIM = 0x07, */ /* VGT_GRP_FIX_1_23_TO_FLOAT = 0x08, */ W_OFFSET_mask = 0x0f << 28, W_OFFSET_shift = 28, VGT_GROUP_VECT_1_FMT_CNTL = 0x00028a3c, /* X_CONV_mask = 0x0f << 0, */ /* X_CONV_shift = 0, */ /* VGT_GRP_INDEX_16 = 0x00, */ /* VGT_GRP_INDEX_32 = 0x01, */ /* VGT_GRP_UINT_16 = 0x02, */ /* VGT_GRP_UINT_32 = 0x03, */ /* VGT_GRP_SINT_16 = 0x04, */ /* VGT_GRP_SINT_32 = 0x05, */ /* VGT_GRP_FLOAT_32 = 0x06, */ /* VGT_GRP_AUTO_PRIM = 0x07, */ /* VGT_GRP_FIX_1_23_TO_FLOAT = 0x08, */ /* X_OFFSET_mask = 0x0f << 4, */ /* X_OFFSET_shift = 4, */ /* Y_CONV_mask = 0x0f << 8, */ /* Y_CONV_shift = 8, */ /* VGT_GRP_INDEX_16 = 0x00, */ /* VGT_GRP_INDEX_32 = 0x01, */ /* VGT_GRP_UINT_16 = 0x02, */ /* VGT_GRP_UINT_32 = 0x03, */ /* VGT_GRP_SINT_16 = 0x04, */ /* VGT_GRP_SINT_32 = 0x05, */ /* VGT_GRP_FLOAT_32 = 0x06, */ /* VGT_GRP_AUTO_PRIM = 0x07, */ /* VGT_GRP_FIX_1_23_TO_FLOAT = 0x08, */ /* Y_OFFSET_mask = 0x0f << 12, */ /* Y_OFFSET_shift = 12, */ /* Z_CONV_mask = 0x0f << 16, */ /* Z_CONV_shift = 16, */ /* VGT_GRP_INDEX_16 = 0x00, */ /* VGT_GRP_INDEX_32 = 0x01, */ /* VGT_GRP_UINT_16 = 0x02, */ /* VGT_GRP_UINT_32 = 0x03, */ /* VGT_GRP_SINT_16 = 0x04, */ /* VGT_GRP_SINT_32 = 0x05, */ /* VGT_GRP_FLOAT_32 = 0x06, */ /* VGT_GRP_AUTO_PRIM = 0x07, */ /* VGT_GRP_FIX_1_23_TO_FLOAT = 0x08, */ /* Z_OFFSET_mask = 0x0f << 20, */ /* Z_OFFSET_shift = 20, */ /* W_CONV_mask = 0x0f << 24, */ /* W_CONV_shift = 24, */ /* VGT_GRP_INDEX_16 = 0x00, */ /* VGT_GRP_INDEX_32 = 0x01, */ /* VGT_GRP_UINT_16 = 0x02, */ /* VGT_GRP_UINT_32 = 0x03, */ /* VGT_GRP_SINT_16 = 0x04, */ /* VGT_GRP_SINT_32 = 0x05, */ /* VGT_GRP_FLOAT_32 = 0x06, */ /* VGT_GRP_AUTO_PRIM = 0x07, */ /* VGT_GRP_FIX_1_23_TO_FLOAT = 0x08, */ /* W_OFFSET_mask = 0x0f << 28, */ /* W_OFFSET_shift = 28, */ VGT_GS_MODE = 0x00028a40, MODE_mask = 0x03 << 0, MODE_shift = 0, GS_OFF = 0x00, GS_SCENARIO_A = 0x01, GS_SCENARIO_B = 0x02, GS_SCENARIO_G = 0x03, ES_PASSTHRU_bit = 1 << 2, CUT_MODE_mask = 0x03 << 3, CUT_MODE_shift = 3, GS_CUT_1024 = 0x00, GS_CUT_512 = 0x01, GS_CUT_256 = 0x02, GS_CUT_128 = 0x03, PA_SC_MPASS_PS_CNTL = 0x00028a48, MPASS_PIX_VEC_PER_PASS_mask = 0xfffff << 0, MPASS_PIX_VEC_PER_PASS_shift = 0, MPASS_PS_ENA_bit = 1 << 31, PA_SC_MODE_CNTL = 0x00028a4c, MSAA_ENABLE_bit = 1 << 0, CLIPRECT_ENABLE_bit = 1 << 1, LINE_STIPPLE_ENABLE_bit = 1 << 2, MULTI_CHIP_PRIM_DISCARD_ENAB_bit = 1 << 3, WALK_ORDER_ENABLE_bit = 1 << 4, HALVE_DETAIL_SAMPLE_PERF_bit = 1 << 5, WALK_SIZE_bit = 1 << 6, WALK_ALIGNMENT_bit = 1 << 7, WALK_ALIGN8_PRIM_FITS_ST_bit = 1 << 8, TILE_COVER_NO_SCISSOR_bit = 1 << 9, KILL_PIX_POST_HI_Z_bit = 1 << 10, KILL_PIX_POST_DETAIL_MASK_bit = 1 << 11, MULTI_CHIP_SUPERTILE_ENABLE_bit = 1 << 12, TILE_COVER_DISABLE_bit = 1 << 13, FORCE_EOV_CNTDWN_ENABLE_bit = 1 << 14, FORCE_EOV_TILE_ENABLE_bit = 1 << 15, FORCE_EOV_REZ_ENABLE_bit = 1 << 16, PS_ITER_SAMPLE_bit = 1 << 17, VGT_ENHANCE = 0x00028a50, VGT_ENHANCE__MI_TIMESTAMP_RES_mask = 0x03 << 0, VGT_ENHANCE__MI_TIMESTAMP_RES_shift = 0, X_0_992_CLOCKS_LATENCY_RANGE_IN_STEPS_OF_32 = 0x00, X_0_496_CLOCKS_LATENCY_RANGE_IN_STEPS_OF_16 = 0x01, X_0_248_CLOCKS_LATENCY_RANGE_IN_STEPS_OF_8 = 0x02, X_0_124_CLOCKS_LATENCY_RANGE_IN_STEPS_OF_4 = 0x03, MISC_mask = 0x3fffffff << 2, MISC_shift = 2, VGT_GS_OUT_PRIM_TYPE = 0x00028a6c, OUTPRIM_TYPE_mask = 0x3f << 0, OUTPRIM_TYPE_shift = 0, POINTLIST = 0x00, LINESTRIP = 0x01, TRISTRIP = 0x02, VGT_DMA_SIZE = 0x00028a74, VGT_DMA_INDEX_TYPE = 0x00028a7c, /* INDEX_TYPE_mask = 0x03 << 0, */ /* INDEX_TYPE_shift = 0, */ VGT_INDEX_16 = 0x00, VGT_INDEX_32 = 0x01, SWAP_MODE_mask = 0x03 << 2, SWAP_MODE_shift = 2, VGT_DMA_SWAP_NONE = 0x00, VGT_DMA_SWAP_16_BIT = 0x01, VGT_DMA_SWAP_32_BIT = 0x02, VGT_DMA_SWAP_WORD = 0x03, VGT_PRIMITIVEID_EN = 0x00028a84, PRIMITIVEID_EN_bit = 1 << 0, VGT_DMA_NUM_INSTANCES = 0x00028a88, VGT_EVENT_INITIATOR = 0x00028a90, EVENT_TYPE_mask = 0x3f << 0, EVENT_TYPE_shift = 0, CACHE_FLUSH_TS = 0x04, CONTEXT_DONE = 0x05, CACHE_FLUSH = 0x06, VIZQUERY_START = 0x07, VIZQUERY_END = 0x08, SC_WAIT_WC = 0x09, MPASS_PS_CP_REFETCH = 0x0a, MPASS_PS_RST_START = 0x0b, MPASS_PS_INCR_START = 0x0c, RST_PIX_CNT = 0x0d, RST_VTX_CNT = 0x0e, VS_PARTIAL_FLUSH = 0x0f, PS_PARTIAL_FLUSH = 0x10, CACHE_FLUSH_AND_INV_TS_EVENT = 0x14, ZPASS_DONE = 0x15, CACHE_FLUSH_AND_INV_EVENT = 0x16, PERFCOUNTER_START = 0x17, PERFCOUNTER_STOP = 0x18, PIPELINESTAT_START = 0x19, PIPELINESTAT_STOP = 0x1a, PERFCOUNTER_SAMPLE = 0x1b, FLUSH_ES_OUTPUT = 0x1c, FLUSH_GS_OUTPUT = 0x1d, SAMPLE_PIPELINESTAT = 0x1e, SO_VGTSTREAMOUT_FLUSH = 0x1f, SAMPLE_STREAMOUTSTATS = 0x20, RESET_VTX_CNT = 0x21, BLOCK_CONTEXT_DONE = 0x22, CR_CONTEXT_DONE = 0x23, VGT_FLUSH = 0x24, CR_DONE_TS = 0x25, SQ_NON_EVENT = 0x26, SC_SEND_DB_VPZ = 0x27, BOTTOM_OF_PIPE_TS = 0x28, DB_CACHE_FLUSH_AND_INV = 0x2a, ADDRESS_HI_mask = 0xff << 19, ADDRESS_HI_shift = 19, EXTENDED_EVENT_bit = 1 << 27, VGT_MULTI_PRIM_IB_RESET_EN = 0x00028a94, RESET_EN_bit = 1 << 0, VGT_INSTANCE_STEP_RATE_0 = 0x00028aa0, VGT_INSTANCE_STEP_RATE_1 = 0x00028aa4, VGT_STRMOUT_EN = 0x00028ab0, STREAMOUT_bit = 1 << 0, VGT_REUSE_OFF = 0x00028ab4, REUSE_OFF_bit = 1 << 0, VGT_VTX_CNT_EN = 0x00028ab8, VTX_CNT_EN_bit = 1 << 0, VGT_STRMOUT_BUFFER_SIZE_0 = 0x00028ad0, VGT_STRMOUT_VTX_STRIDE_0 = 0x00028ad4, VGT_STRMOUT_VTX_STRIDE_0__STRIDE_mask = 0x3ff << 0, VGT_STRMOUT_VTX_STRIDE_0__STRIDE_shift = 0, VGT_STRMOUT_BUFFER_BASE_0 = 0x00028ad8, VGT_STRMOUT_BUFFER_OFFSET_0 = 0x00028adc, VGT_STRMOUT_BUFFER_SIZE_1 = 0x00028ae0, VGT_STRMOUT_VTX_STRIDE_1 = 0x00028ae4, VGT_STRMOUT_VTX_STRIDE_1__STRIDE_mask = 0x3ff << 0, VGT_STRMOUT_VTX_STRIDE_1__STRIDE_shift = 0, VGT_STRMOUT_BUFFER_BASE_1 = 0x00028ae8, VGT_STRMOUT_BUFFER_OFFSET_1 = 0x00028aec, VGT_STRMOUT_BUFFER_SIZE_2 = 0x00028af0, VGT_STRMOUT_VTX_STRIDE_2 = 0x00028af4, VGT_STRMOUT_VTX_STRIDE_2__STRIDE_mask = 0x3ff << 0, VGT_STRMOUT_VTX_STRIDE_2__STRIDE_shift = 0, VGT_STRMOUT_BUFFER_BASE_2 = 0x00028af8, VGT_STRMOUT_BUFFER_OFFSET_2 = 0x00028afc, VGT_STRMOUT_BUFFER_SIZE_3 = 0x00028b00, VGT_STRMOUT_VTX_STRIDE_3 = 0x00028b04, VGT_STRMOUT_VTX_STRIDE_3__STRIDE_mask = 0x3ff << 0, VGT_STRMOUT_VTX_STRIDE_3__STRIDE_shift = 0, VGT_STRMOUT_BUFFER_BASE_3 = 0x00028b08, VGT_STRMOUT_BUFFER_OFFSET_3 = 0x00028b0c, VGT_STRMOUT_BASE_OFFSET_0 = 0x00028b10, VGT_STRMOUT_BASE_OFFSET_1 = 0x00028b14, VGT_STRMOUT_BASE_OFFSET_2 = 0x00028b18, VGT_STRMOUT_BASE_OFFSET_3 = 0x00028b1c, VGT_STRMOUT_BUFFER_EN = 0x00028b20, BUFFER_0_EN_bit = 1 << 0, BUFFER_1_EN_bit = 1 << 1, BUFFER_2_EN_bit = 1 << 2, BUFFER_3_EN_bit = 1 << 3, VGT_STRMOUT_DRAW_OPAQUE_OFFSET = 0x00028b28, VGT_STRMOUT_DRAW_OPAQUE_BUFFER_FILLED_SIZE = 0x00028b2c, VGT_STRMOUT_DRAW_OPAQUE_VERTEX_STRIDE = 0x00028b30, VGT_STRMOUT_BASE_OFFSET_HI_0 = 0x00028b44, VGT_STRMOUT_BASE_OFFSET_HI_0__BASE_OFFSET_mask = 0x3f << 0, VGT_STRMOUT_BASE_OFFSET_HI_0__BASE_OFFSET_shift = 0, VGT_STRMOUT_BASE_OFFSET_HI_1 = 0x00028b48, VGT_STRMOUT_BASE_OFFSET_HI_1__BASE_OFFSET_mask = 0x3f << 0, VGT_STRMOUT_BASE_OFFSET_HI_1__BASE_OFFSET_shift = 0, VGT_STRMOUT_BASE_OFFSET_HI_2 = 0x00028b4c, VGT_STRMOUT_BASE_OFFSET_HI_2__BASE_OFFSET_mask = 0x3f << 0, VGT_STRMOUT_BASE_OFFSET_HI_2__BASE_OFFSET_shift = 0, VGT_STRMOUT_BASE_OFFSET_HI_3 = 0x00028b50, VGT_STRMOUT_BASE_OFFSET_HI_3__BASE_OFFSET_mask = 0x3f << 0, VGT_STRMOUT_BASE_OFFSET_HI_3__BASE_OFFSET_shift = 0, PA_SC_LINE_CNTL = 0x00028c00, BRES_CNTL_mask = 0xff << 0, BRES_CNTL_shift = 0, USE_BRES_CNTL_bit = 1 << 8, EXPAND_LINE_WIDTH_bit = 1 << 9, LAST_PIXEL_bit = 1 << 10, PA_SC_AA_CONFIG = 0x00028c04, MSAA_NUM_SAMPLES_mask = 0x03 << 0, MSAA_NUM_SAMPLES_shift = 0, AA_MASK_CENTROID_DTMN_bit = 1 << 4, MAX_SAMPLE_DIST_mask = 0x0f << 13, MAX_SAMPLE_DIST_shift = 13, PA_SU_VTX_CNTL = 0x00028c08, PIX_CENTER_bit = 1 << 0, PA_SU_VTX_CNTL__ROUND_MODE_mask = 0x03 << 1, PA_SU_VTX_CNTL__ROUND_MODE_shift = 1, X_TRUNCATE = 0x00, X_ROUND = 0x01, X_ROUND_TO_EVEN = 0x02, X_ROUND_TO_ODD = 0x03, QUANT_MODE_mask = 0x07 << 3, QUANT_MODE_shift = 3, X_1_16TH = 0x00, X_1_8TH = 0x01, X_1_4TH = 0x02, X_1_2 = 0x03, X_1 = 0x04, X_1_256TH = 0x05, PA_CL_GB_VERT_CLIP_ADJ = 0x00028c0c, PA_CL_GB_VERT_DISC_ADJ = 0x00028c10, PA_CL_GB_HORZ_CLIP_ADJ = 0x00028c14, PA_CL_GB_HORZ_DISC_ADJ = 0x00028c18, PA_SC_AA_SAMPLE_LOCS_MCTX = 0x00028c1c, /* S0_X_mask = 0x0f << 0, */ /* S0_X_shift = 0, */ /* S0_Y_mask = 0x0f << 4, */ /* S0_Y_shift = 4, */ /* S1_X_mask = 0x0f << 8, */ /* S1_X_shift = 8, */ /* S1_Y_mask = 0x0f << 12, */ /* S1_Y_shift = 12, */ /* S2_X_mask = 0x0f << 16, */ /* S2_X_shift = 16, */ /* S2_Y_mask = 0x0f << 20, */ /* S2_Y_shift = 20, */ /* S3_X_mask = 0x0f << 24, */ /* S3_X_shift = 24, */ /* S3_Y_mask = 0x0f << 28, */ /* S3_Y_shift = 28, */ PA_SC_AA_SAMPLE_LOCS_8S_WD1_MCTX = 0x00028c20, /* S4_X_mask = 0x0f << 0, */ /* S4_X_shift = 0, */ /* S4_Y_mask = 0x0f << 4, */ /* S4_Y_shift = 4, */ /* S5_X_mask = 0x0f << 8, */ /* S5_X_shift = 8, */ /* S5_Y_mask = 0x0f << 12, */ /* S5_Y_shift = 12, */ /* S6_X_mask = 0x0f << 16, */ /* S6_X_shift = 16, */ /* S6_Y_mask = 0x0f << 20, */ /* S6_Y_shift = 20, */ /* S7_X_mask = 0x0f << 24, */ /* S7_X_shift = 24, */ /* S7_Y_mask = 0x0f << 28, */ /* S7_Y_shift = 28, */ CB_CLRCMP_CONTROL = 0x00028c30, CLRCMP_FCN_SRC_mask = 0x07 << 0, CLRCMP_FCN_SRC_shift = 0, CLRCMP_DRAW_ALWAYS = 0x00, CLRCMP_DRAW_NEVER = 0x01, CLRCMP_DRAW_ON_NEQ = 0x04, CLRCMP_DRAW_ON_EQ = 0x05, CLRCMP_FCN_DST_mask = 0x07 << 8, CLRCMP_FCN_DST_shift = 8, /* CLRCMP_DRAW_ALWAYS = 0x00, */ /* CLRCMP_DRAW_NEVER = 0x01, */ /* CLRCMP_DRAW_ON_NEQ = 0x04, */ /* CLRCMP_DRAW_ON_EQ = 0x05, */ CLRCMP_FCN_SEL_mask = 0x03 << 24, CLRCMP_FCN_SEL_shift = 24, CLRCMP_SEL_DST = 0x00, CLRCMP_SEL_SRC = 0x01, CLRCMP_SEL_AND = 0x02, CB_CLRCMP_SRC = 0x00028c34, CB_CLRCMP_DST = 0x00028c38, CB_CLRCMP_MSK = 0x00028c3c, PA_SC_AA_MASK = 0x00028c48, VGT_VERTEX_REUSE_BLOCK_CNTL = 0x00028c58, VTX_REUSE_DEPTH_mask = 0xff << 0, VTX_REUSE_DEPTH_shift = 0, VGT_OUT_DEALLOC_CNTL = 0x00028c5c, DEALLOC_DIST_mask = 0x7f << 0, DEALLOC_DIST_shift = 0, DB_RENDER_CONTROL = 0x00028d0c, DEPTH_CLEAR_ENABLE_bit = 1 << 0, STENCIL_CLEAR_ENABLE_bit = 1 << 1, DEPTH_COPY_bit = 1 << 2, STENCIL_COPY_bit = 1 << 3, RESUMMARIZE_ENABLE_bit = 1 << 4, STENCIL_COMPRESS_DISABLE_bit = 1 << 5, DEPTH_COMPRESS_DISABLE_bit = 1 << 6, COPY_CENTROID_bit = 1 << 7, COPY_SAMPLE_mask = 0x07 << 8, COPY_SAMPLE_shift = 8, ZPASS_INCREMENT_DISABLE_bit = 1 << 11, DB_RENDER_OVERRIDE = 0x00028d10, FORCE_HIZ_ENABLE_mask = 0x03 << 0, FORCE_HIZ_ENABLE_shift = 0, FORCE_OFF = 0x00, FORCE_ENABLE = 0x01, FORCE_DISABLE = 0x02, FORCE_RESERVED = 0x03, FORCE_HIS_ENABLE0_mask = 0x03 << 2, FORCE_HIS_ENABLE0_shift = 2, /* FORCE_OFF = 0x00, */ /* FORCE_ENABLE = 0x01, */ /* FORCE_DISABLE = 0x02, */ /* FORCE_RESERVED = 0x03, */ FORCE_HIS_ENABLE1_mask = 0x03 << 4, FORCE_HIS_ENABLE1_shift = 4, /* FORCE_OFF = 0x00, */ /* FORCE_ENABLE = 0x01, */ /* FORCE_DISABLE = 0x02, */ /* FORCE_RESERVED = 0x03, */ FORCE_SHADER_Z_ORDER_bit = 1 << 6, FAST_Z_DISABLE_bit = 1 << 7, FAST_STENCIL_DISABLE_bit = 1 << 8, NOOP_CULL_DISABLE_bit = 1 << 9, FORCE_COLOR_KILL_bit = 1 << 10, FORCE_Z_READ_bit = 1 << 11, FORCE_STENCIL_READ_bit = 1 << 12, FORCE_FULL_Z_RANGE_mask = 0x03 << 13, FORCE_FULL_Z_RANGE_shift = 13, /* FORCE_OFF = 0x00, */ /* FORCE_ENABLE = 0x01, */ /* FORCE_DISABLE = 0x02, */ /* FORCE_RESERVED = 0x03, */ FORCE_QC_SMASK_CONFLICT_bit = 1 << 15, DISABLE_VIEWPORT_CLAMP_bit = 1 << 16, IGNORE_SC_ZRANGE_bit = 1 << 17, DB_HTILE_SURFACE = 0x00028d24, HTILE_WIDTH_bit = 1 << 0, HTILE_HEIGHT_bit = 1 << 1, LINEAR_bit = 1 << 2, FULL_CACHE_bit = 1 << 3, HTILE_USES_PRELOAD_WIN_bit = 1 << 4, PRELOAD_bit = 1 << 5, PREFETCH_WIDTH_mask = 0x3f << 6, PREFETCH_WIDTH_shift = 6, PREFETCH_HEIGHT_mask = 0x3f << 12, PREFETCH_HEIGHT_shift = 12, DB_SRESULTS_COMPARE_STATE1 = 0x00028d2c, COMPAREFUNC1_mask = 0x07 << 0, COMPAREFUNC1_shift = 0, /* REF_NEVER = 0x00, */ /* REF_LESS = 0x01, */ /* REF_EQUAL = 0x02, */ /* REF_LEQUAL = 0x03, */ /* REF_GREATER = 0x04, */ /* REF_NOTEQUAL = 0x05, */ /* REF_GEQUAL = 0x06, */ /* REF_ALWAYS = 0x07, */ COMPAREVALUE1_mask = 0xff << 4, COMPAREVALUE1_shift = 4, COMPAREMASK1_mask = 0xff << 12, COMPAREMASK1_shift = 12, ENABLE1_bit = 1 << 24, DB_PRELOAD_CONTROL = 0x00028d30, START_X_mask = 0xff << 0, START_X_shift = 0, START_Y_mask = 0xff << 8, START_Y_shift = 8, MAX_X_mask = 0xff << 16, MAX_X_shift = 16, MAX_Y_mask = 0xff << 24, MAX_Y_shift = 24, DB_PREFETCH_LIMIT = 0x00028d34, DEPTH_HEIGHT_TILE_MAX_mask = 0x3ff << 0, DEPTH_HEIGHT_TILE_MAX_shift = 0, PA_SU_POLY_OFFSET_DB_FMT_CNTL = 0x00028df8, POLY_OFFSET_NEG_NUM_DB_BITS_mask = 0xff << 0, POLY_OFFSET_NEG_NUM_DB_BITS_shift = 0, POLY_OFFSET_DB_IS_FLOAT_FMT_bit = 1 << 8, PA_SU_POLY_OFFSET_CLAMP = 0x00028dfc, PA_SU_POLY_OFFSET_FRONT_SCALE = 0x00028e00, PA_SU_POLY_OFFSET_FRONT_OFFSET = 0x00028e04, PA_SU_POLY_OFFSET_BACK_SCALE = 0x00028e08, PA_SU_POLY_OFFSET_BACK_OFFSET = 0x00028e0c, PA_CL_POINT_X_RAD = 0x00028e10, PA_CL_POINT_Y_RAD = 0x00028e14, PA_CL_POINT_SIZE = 0x00028e18, PA_CL_POINT_CULL_RAD = 0x00028e1c, PA_CL_UCP_0_X = 0x00028e20, PA_CL_UCP_0_X_num = 6, PA_CL_UCP_0_X_offset = 16, PA_CL_UCP_0_Y = 0x00028e24, PA_CL_UCP_0_Y_num = 6, PA_CL_UCP_0_Y_offset = 16, PA_CL_UCP_0_Z = 0x00028e28, PA_CL_UCP_0_Z_num = 6, PA_CL_UCP_0_Z_offset = 16, SQ_ALU_CONSTANT0_0 = 0x00030000, SQ_ALU_CONSTANT1_0 = 0x00030004, SQ_ALU_CONSTANT2_0 = 0x00030008, SQ_ALU_CONSTANT3_0 = 0x0003000c, SQ_VTX_CONSTANT_WORD0_0 = 0x00038000, SQ_TEX_RESOURCE_WORD0_0 = 0x00038000, DIM_mask = 0x07 << 0, DIM_shift = 0, SQ_TEX_DIM_1D = 0x00, SQ_TEX_DIM_2D = 0x01, SQ_TEX_DIM_3D = 0x02, SQ_TEX_DIM_CUBEMAP = 0x03, SQ_TEX_DIM_1D_ARRAY = 0x04, SQ_TEX_DIM_2D_ARRAY = 0x05, SQ_TEX_DIM_2D_MSAA = 0x06, SQ_TEX_DIM_2D_ARRAY_MSAA = 0x07, SQ_TEX_RESOURCE_WORD0_0__TILE_MODE_mask = 0x0f << 3, SQ_TEX_RESOURCE_WORD0_0__TILE_MODE_shift = 3, TILE_TYPE_bit = 1 << 7, PITCH_mask = 0x7ff << 8, PITCH_shift = 8, TEX_WIDTH_mask = 0x1fff << 19, TEX_WIDTH_shift = 19, SQ_VTX_CONSTANT_WORD1_0 = 0x00038004, SQ_TEX_RESOURCE_WORD1_0 = 0x00038004, TEX_HEIGHT_mask = 0x1fff << 0, TEX_HEIGHT_shift = 0, TEX_DEPTH_mask = 0x1fff << 13, TEX_DEPTH_shift = 13, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_mask = 0x3f << 26, SQ_TEX_RESOURCE_WORD1_0__DATA_FORMAT_shift = 26, SQ_VTX_CONSTANT_WORD2_0 = 0x00038008, BASE_ADDRESS_HI_mask = 0xff << 0, BASE_ADDRESS_HI_shift = 0, SQ_VTX_CONSTANT_WORD2_0__STRIDE_mask = 0x7ff << 8, SQ_VTX_CONSTANT_WORD2_0__STRIDE_shift = 8, SQ_VTX_CONSTANT_WORD2_0__CLAMP_X_bit = 1 << 19, SQ_VTX_CONSTANT_WORD2_0__DATA_FORMAT_mask = 0x3f << 20, SQ_VTX_CONSTANT_WORD2_0__DATA_FORMAT_shift = 20, SQ_VTX_CONSTANT_WORD2_0__NUM_FORMAT_ALL_mask = 0x03 << 26, SQ_VTX_CONSTANT_WORD2_0__NUM_FORMAT_ALL_shift = 26, /* SQ_NUM_FORMAT_NORM = 0x00, */ /* SQ_NUM_FORMAT_INT = 0x01, */ /* SQ_NUM_FORMAT_SCALED = 0x02, */ SQ_VTX_CONSTANT_WORD2_0__FORMAT_COMP_ALL_bit = 1 << 28, SQ_VTX_CONSTANT_WORD2_0__SRF_MODE_ALL_bit = 1 << 29, SQ_VTX_CONSTANT_WORD2_0__ENDIAN_SWAP_mask = 0x03 << 30, SQ_VTX_CONSTANT_WORD2_0__ENDIAN_SWAP_shift = 30, /* SQ_ENDIAN_NONE = 0x00, */ /* SQ_ENDIAN_8IN16 = 0x01, */ /* SQ_ENDIAN_8IN32 = 0x02, */ SQ_TEX_RESOURCE_WORD2_0 = 0x00038008, SQ_VTX_CONSTANT_WORD3_0 = 0x0003800c, MEM_REQUEST_SIZE_mask = 0x03 << 0, MEM_REQUEST_SIZE_shift = 0, SQ_TEX_RESOURCE_WORD3_0 = 0x0003800c, SQ_TEX_RESOURCE_WORD4_0 = 0x00038010, FORMAT_COMP_X_mask = 0x03 << 0, FORMAT_COMP_X_shift = 0, SQ_FORMAT_COMP_UNSIGNED = 0x00, SQ_FORMAT_COMP_SIGNED = 0x01, SQ_FORMAT_COMP_UNSIGNED_BIASED = 0x02, FORMAT_COMP_Y_mask = 0x03 << 2, FORMAT_COMP_Y_shift = 2, /* SQ_FORMAT_COMP_UNSIGNED = 0x00, */ /* SQ_FORMAT_COMP_SIGNED = 0x01, */ /* SQ_FORMAT_COMP_UNSIGNED_BIASED = 0x02, */ FORMAT_COMP_Z_mask = 0x03 << 4, FORMAT_COMP_Z_shift = 4, /* SQ_FORMAT_COMP_UNSIGNED = 0x00, */ /* SQ_FORMAT_COMP_SIGNED = 0x01, */ /* SQ_FORMAT_COMP_UNSIGNED_BIASED = 0x02, */ FORMAT_COMP_W_mask = 0x03 << 6, FORMAT_COMP_W_shift = 6, /* SQ_FORMAT_COMP_UNSIGNED = 0x00, */ /* SQ_FORMAT_COMP_SIGNED = 0x01, */ /* SQ_FORMAT_COMP_UNSIGNED_BIASED = 0x02, */ SQ_TEX_RESOURCE_WORD4_0__NUM_FORMAT_ALL_mask = 0x03 << 8, SQ_TEX_RESOURCE_WORD4_0__NUM_FORMAT_ALL_shift = 8, /* SQ_NUM_FORMAT_NORM = 0x00, */ /* SQ_NUM_FORMAT_INT = 0x01, */ /* SQ_NUM_FORMAT_SCALED = 0x02, */ SQ_TEX_RESOURCE_WORD4_0__SRF_MODE_ALL_bit = 1 << 10, SQ_TEX_RESOURCE_WORD4_0__FORCE_DEGAMMA_bit = 1 << 11, SQ_TEX_RESOURCE_WORD4_0__ENDIAN_SWAP_mask = 0x03 << 12, SQ_TEX_RESOURCE_WORD4_0__ENDIAN_SWAP_shift = 12, /* SQ_ENDIAN_NONE = 0x00, */ /* SQ_ENDIAN_8IN16 = 0x01, */ /* SQ_ENDIAN_8IN32 = 0x02, */ REQUEST_SIZE_mask = 0x03 << 14, REQUEST_SIZE_shift = 14, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_mask = 0x07 << 16, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_X_shift = 16, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_mask = 0x07 << 19, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Y_shift = 19, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_mask = 0x07 << 22, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_Z_shift = 22, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_mask = 0x07 << 25, SQ_TEX_RESOURCE_WORD4_0__DST_SEL_W_shift = 25, /* SQ_SEL_X = 0x00, */ /* SQ_SEL_Y = 0x01, */ /* SQ_SEL_Z = 0x02, */ /* SQ_SEL_W = 0x03, */ /* SQ_SEL_0 = 0x04, */ /* SQ_SEL_1 = 0x05, */ BASE_LEVEL_mask = 0x0f << 28, BASE_LEVEL_shift = 28, SQ_TEX_RESOURCE_WORD5_0 = 0x00038014, LAST_LEVEL_mask = 0x0f << 0, LAST_LEVEL_shift = 0, BASE_ARRAY_mask = 0x1fff << 4, BASE_ARRAY_shift = 4, LAST_ARRAY_mask = 0x1fff << 17, LAST_ARRAY_shift = 17, SQ_TEX_RESOURCE_WORD6_0 = 0x00038018, MPEG_CLAMP_mask = 0x03 << 0, MPEG_CLAMP_shift = 0, SQ_TEX_MPEG_CLAMP_OFF = 0x00, SQ_TEX_MPEG_9 = 0x01, SQ_TEX_MPEG_10 = 0x02, PERF_MODULATION_mask = 0x07 << 5, PERF_MODULATION_shift = 5, INTERLACED_bit = 1 << 8, SQ_TEX_RESOURCE_WORD6_0__TYPE_mask = 0x03 << 30, SQ_TEX_RESOURCE_WORD6_0__TYPE_shift = 30, SQ_TEX_VTX_INVALID_TEXTURE = 0x00, SQ_TEX_VTX_INVALID_BUFFER = 0x01, SQ_TEX_VTX_VALID_TEXTURE = 0x02, SQ_TEX_VTX_VALID_BUFFER = 0x03, SQ_VTX_CONSTANT_WORD6_0 = 0x00038018, SQ_VTX_CONSTANT_WORD6_0__TYPE_mask = 0x03 << 30, SQ_VTX_CONSTANT_WORD6_0__TYPE_shift = 30, /* SQ_TEX_VTX_INVALID_TEXTURE = 0x00, */ /* SQ_TEX_VTX_INVALID_BUFFER = 0x01, */ /* SQ_TEX_VTX_VALID_TEXTURE = 0x02, */ /* SQ_TEX_VTX_VALID_BUFFER = 0x03, */ SQ_TEX_SAMPLER_WORD0_0 = 0x0003c000, SQ_TEX_SAMPLER_WORD0_0__CLAMP_X_mask = 0x07 << 0, SQ_TEX_SAMPLER_WORD0_0__CLAMP_X_shift = 0, SQ_TEX_WRAP = 0x00, SQ_TEX_MIRROR = 0x01, SQ_TEX_CLAMP_LAST_TEXEL = 0x02, SQ_TEX_MIRROR_ONCE_LAST_TEXEL = 0x03, SQ_TEX_CLAMP_HALF_BORDER = 0x04, SQ_TEX_MIRROR_ONCE_HALF_BORDER = 0x05, SQ_TEX_CLAMP_BORDER = 0x06, SQ_TEX_MIRROR_ONCE_BORDER = 0x07, CLAMP_Y_mask = 0x07 << 3, CLAMP_Y_shift = 3, /* SQ_TEX_WRAP = 0x00, */ /* SQ_TEX_MIRROR = 0x01, */ /* SQ_TEX_CLAMP_LAST_TEXEL = 0x02, */ /* SQ_TEX_MIRROR_ONCE_LAST_TEXEL = 0x03, */ /* SQ_TEX_CLAMP_HALF_BORDER = 0x04, */ /* SQ_TEX_MIRROR_ONCE_HALF_BORDER = 0x05, */ /* SQ_TEX_CLAMP_BORDER = 0x06, */ /* SQ_TEX_MIRROR_ONCE_BORDER = 0x07, */ CLAMP_Z_mask = 0x07 << 6, CLAMP_Z_shift = 6, /* SQ_TEX_WRAP = 0x00, */ /* SQ_TEX_MIRROR = 0x01, */ /* SQ_TEX_CLAMP_LAST_TEXEL = 0x02, */ /* SQ_TEX_MIRROR_ONCE_LAST_TEXEL = 0x03, */ /* SQ_TEX_CLAMP_HALF_BORDER = 0x04, */ /* SQ_TEX_MIRROR_ONCE_HALF_BORDER = 0x05, */ /* SQ_TEX_CLAMP_BORDER = 0x06, */ /* SQ_TEX_MIRROR_ONCE_BORDER = 0x07, */ XY_MAG_FILTER_mask = 0x07 << 9, XY_MAG_FILTER_shift = 9, SQ_TEX_XY_FILTER_POINT = 0x00, SQ_TEX_XY_FILTER_BILINEAR = 0x01, SQ_TEX_XY_FILTER_BICUBIC = 0x02, XY_MIN_FILTER_mask = 0x07 << 12, XY_MIN_FILTER_shift = 12, /* SQ_TEX_XY_FILTER_POINT = 0x00, */ /* SQ_TEX_XY_FILTER_BILINEAR = 0x01, */ /* SQ_TEX_XY_FILTER_BICUBIC = 0x02, */ Z_FILTER_mask = 0x03 << 15, Z_FILTER_shift = 15, SQ_TEX_Z_FILTER_NONE = 0x00, SQ_TEX_Z_FILTER_POINT = 0x01, SQ_TEX_Z_FILTER_LINEAR = 0x02, MIP_FILTER_mask = 0x03 << 17, MIP_FILTER_shift = 17, /* SQ_TEX_Z_FILTER_NONE = 0x00, */ /* SQ_TEX_Z_FILTER_POINT = 0x01, */ /* SQ_TEX_Z_FILTER_LINEAR = 0x02, */ BORDER_COLOR_TYPE_mask = 0x03 << 22, BORDER_COLOR_TYPE_shift = 22, SQ_TEX_BORDER_COLOR_TRANS_BLACK = 0x00, SQ_TEX_BORDER_COLOR_OPAQUE_BLACK = 0x01, SQ_TEX_BORDER_COLOR_OPAQUE_WHITE = 0x02, SQ_TEX_BORDER_COLOR_REGISTER = 0x03, POINT_SAMPLING_CLAMP_bit = 1 << 24, TEX_ARRAY_OVERRIDE_bit = 1 << 25, DEPTH_COMPARE_FUNCTION_mask = 0x07 << 26, DEPTH_COMPARE_FUNCTION_shift = 26, SQ_TEX_DEPTH_COMPARE_NEVER = 0x00, SQ_TEX_DEPTH_COMPARE_LESS = 0x01, SQ_TEX_DEPTH_COMPARE_EQUAL = 0x02, SQ_TEX_DEPTH_COMPARE_LESSEQUAL = 0x03, SQ_TEX_DEPTH_COMPARE_GREATER = 0x04, SQ_TEX_DEPTH_COMPARE_NOTEQUAL = 0x05, SQ_TEX_DEPTH_COMPARE_GREATEREQUAL = 0x06, SQ_TEX_DEPTH_COMPARE_ALWAYS = 0x07, CHROMA_KEY_mask = 0x03 << 29, CHROMA_KEY_shift = 29, SQ_TEX_CHROMA_KEY_DISABLED = 0x00, SQ_TEX_CHROMA_KEY_KILL = 0x01, SQ_TEX_CHROMA_KEY_BLEND = 0x02, LOD_USES_MINOR_AXIS_bit = 1 << 31, SQ_TEX_SAMPLER_WORD1_0 = 0x0003c004, MIN_LOD_mask = 0x3ff << 0, MIN_LOD_shift = 0, MAX_LOD_mask = 0x3ff << 10, MAX_LOD_shift = 10, SQ_TEX_SAMPLER_WORD1_0__LOD_BIAS_mask = 0xfff << 20, SQ_TEX_SAMPLER_WORD1_0__LOD_BIAS_shift = 20, SQ_TEX_SAMPLER_WORD2_0 = 0x0003c008, LOD_BIAS_SEC_mask = 0xfff << 0, LOD_BIAS_SEC_shift = 0, MC_COORD_TRUNCATE_bit = 1 << 12, SQ_TEX_SAMPLER_WORD2_0__FORCE_DEGAMMA_bit = 1 << 13, HIGH_PRECISION_FILTER_bit = 1 << 14, PERF_MIP_mask = 0x07 << 15, PERF_MIP_shift = 15, PERF_Z_mask = 0x03 << 18, PERF_Z_shift = 18, FETCH_4_bit = 1 << 26, SAMPLE_IS_PCF_bit = 1 << 27, SQ_TEX_SAMPLER_WORD2_0__TYPE_bit = 1 << 31, SQ_VTX_BASE_VTX_LOC = 0x0003cff0, SQ_VTX_START_INST_LOC = 0x0003cff4, SQ_LOOP_CONST_DX10_0 = 0x0003e200, SQ_LOOP_CONST_0 = 0x0003e200, SQ_LOOP_CONST_0__COUNT_mask = 0xfff << 0, SQ_LOOP_CONST_0__COUNT_shift = 0, INIT_mask = 0xfff << 12, INIT_shift = 12, INC_mask = 0xff << 24, INC_shift = 24, SQ_BOOL_CONST_0 = 0x0003e380, SQ_BOOL_CONST_0_num = 3, } ; #endif /* _AUTOREGS */ xf86-video-ati-7.3.0/src/cayman_reg.h0000664000175000017500000003017212177731114014172 00000000000000/* * Cayman Register documentation * * Copyright (C) 2011 Advanced Micro Devices, 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) 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 _CAYMAN_REG_H_ #define _CAYMAN_REG_H_ /* * Register definitions */ #include "cayman_reg_auto.h" enum { SHADER_TYPE_PS, SHADER_TYPE_VS, SHADER_TYPE_GS, SHADER_TYPE_HS, SHADER_TYPE_LS, SHADER_TYPE_CS, SHADER_TYPE_FS, }; /* SET_*_REG offsets + ends */ #define SET_CONFIG_REG_offset 0x00008000 #define SET_CONFIG_REG_end 0x0000ac00 #define SET_CONTEXT_REG_offset 0x00028000 #define SET_CONTEXT_REG_end 0x00029000 #define SET_RESOURCE_offset 0x00030000 #define SET_RESOURCE_end 0x00038000 #define SET_SAMPLER_offset 0x0003c000 #define SET_SAMPLER_end 0x0003c600 #define SET_CTL_CONST_offset 0x0003cff0 #define SET_CTL_CONST_end 0x0003ff0c #define SET_LOOP_CONST_offset 0x0003a200 #define SET_LOOP_CONST_end 0x0003a500 #define SET_BOOL_CONST_offset 0x0003a500 #define SET_BOOL_CONST_end 0x0003a518 /* Packet3 commands */ enum { IT_NOP = 0x10, IT_INDIRECT_BUFFER_END = 0x17, IT_SET_PREDICATION = 0x20, IT_COND_EXEC = 0x22, IT_PRED_EXEC = 0x23, IT_DRAW_INDEX_2 = 0x27, IT_CONTEXT_CONTROL = 0x28, IT_DRAW_INDEX_OFFSET = 0x29, IT_INDEX_TYPE = 0x2A, IT_DRAW_INDEX = 0x2B, IT_DRAW_INDEX_AUTO = 0x2D, IT_DRAW_INDEX_IMMD = 0x2E, IT_NUM_INSTANCES = 0x2F, IT_INDIRECT_BUFFER = 0x32, IT_STRMOUT_BUFFER_UPDATE = 0x34, IT_MEM_SEMAPHORE = 0x39, IT_MPEG_INDEX = 0x3A, IT_WAIT_REG_MEM = 0x3C, IT_MEM_WRITE = 0x3D, IT_SURFACE_SYNC = 0x43, IT_ME_INITIALIZE = 0x44, IT_COND_WRITE = 0x45, IT_EVENT_WRITE = 0x46, IT_EVENT_WRITE_EOP = 0x47, IT_EVENT_WRITE_EOS = 0x48, IT_SET_CONFIG_REG = 0x68, IT_SET_CONTEXT_REG = 0x69, IT_SET_ALU_CONST = 0x6A, IT_SET_BOOL_CONST = 0x6B, IT_SET_LOOP_CONST = 0x6C, IT_SET_RESOURCE = 0x6D, IT_SET_SAMPLER = 0x6E, IT_SET_CTL_CONST = 0x6F, }; /* IT_WAIT_REG_MEM operation encoding */ #define IT_WAIT_ALWAYS (0 << 0) #define IT_WAIT_LT (1 << 0) #define IT_WAIT_LE (2 << 0) #define IT_WAIT_EQ (3 << 0) #define IT_WAIT_NE (4 << 0) #define IT_WAIT_GE (5 << 0) #define IT_WAIT_GT (6 << 0) #define IT_WAIT_REG (0 << 4) #define IT_WAIT_MEM (1 << 4) #define IT_WAIT_ADDR(x) ((x) >> 2) enum { SQ_LDS_ALLOC_PS = 0x288ec, SQ_DYN_GPR_CNTL_PS_FLUSH_REQ = 0x8d8c, CP_COHER_CNTL = 0x85f0, DEST_BASE_0_ENA_bit = 1 << 0, DEST_BASE_1_ENA_bit = 1 << 1, SO0_DEST_BASE_ENA_bit = 1 << 2, SO1_DEST_BASE_ENA_bit = 1 << 3, SO2_DEST_BASE_ENA_bit = 1 << 4, SO3_DEST_BASE_ENA_bit = 1 << 5, CB0_DEST_BASE_ENA_bit = 1 << 6, CB1_DEST_BASE_ENA_bit = 1 << 7, CB2_DEST_BASE_ENA_bit = 1 << 8, CB3_DEST_BASE_ENA_bit = 1 << 9, CB4_DEST_BASE_ENA_bit = 1 << 10, CB5_DEST_BASE_ENA_bit = 1 << 11, CB6_DEST_BASE_ENA_bit = 1 << 12, CB7_DEST_BASE_ENA_bit = 1 << 13, DB_DEST_BASE_ENA_bit = 1 << 14, CB8_DEST_BASE_ENA_bit = 1 << 15, CB9_DEST_BASE_ENA_bit = 1 << 16, CB10_DEST_BASE_ENA_bit = 1 << 17, CB11_DEST_BASE_ENA_bit = 1 << 18, FULL_CACHE_ENA_bit = 1 << 20, TC_ACTION_ENA_bit = 1 << 23, CB_ACTION_ENA_bit = 1 << 25, DB_ACTION_ENA_bit = 1 << 26, SH_ACTION_ENA_bit = 1 << 27, SX_ACTION_ENA_bit = 1 << 28, CP_COHER_SIZE = 0x85f4, CP_COHER_BASE = 0x85f8, CP_COHER_STATUS = 0x85fc, MATCHING_GFX_CNTX_mask = 0xff << 0, MATCHING_GFX_CNTX_shift = 0, STATUS_bit = 1 << 31, // SQ_VTX_CONSTANT_WORD2_0 = 0x00030008, // SQ_VTX_CONSTANT_WORD2_0__DATA_FORMAT_mask = 0x3f << 20, FMT_INVALID=0, FMT_8, FMT_4_4, FMT_3_3_2, FMT_16=5, FMT_16_FLOAT, FMT_8_8, FMT_5_6_5, FMT_6_5_5, FMT_1_5_5_5, FMT_4_4_4_4, FMT_5_5_5_1, FMT_32, FMT_32_FLOAT, FMT_16_16, FMT_16_16_FLOAT=16, FMT_8_24, FMT_8_24_FLOAT, FMT_24_8, FMT_24_8_FLOAT, FMT_10_11_11, FMT_10_11_11_FLOAT, FMT_11_11_10, FMT_11_11_10_FLOAT, FMT_2_10_10_10, FMT_8_8_8_8, FMT_10_10_10_2, FMT_X24_8_32_FLOAT, FMT_32_32, FMT_32_32_FLOAT, FMT_16_16_16_16, FMT_16_16_16_16_FLOAT=32, FMT_32_32_32_32=34, FMT_32_32_32_32_FLOAT, FMT_1 = 37, FMT_GB_GR=39, FMT_BG_RG, FMT_32_AS_8, FMT_32_AS_8_8, FMT_5_9_9_9_SHAREDEXP, FMT_8_8_8, FMT_16_16_16, FMT_16_16_16_FLOAT, FMT_32_32_32, FMT_32_32_32_FLOAT=48, // High level register file lengths SQ_FETCH_RESOURCE = SQ_TEX_RESOURCE_WORD0_0, SQ_FETCH_RESOURCE_ps_num = 176, SQ_FETCH_RESOURCE_vs_num = 160, SQ_FETCH_RESOURCE_gs_num = 160, SQ_FETCH_RESOURCE_hs_num = 160, SQ_FETCH_RESOURCE_ls_num = 160, SQ_FETCH_RESOURCE_cs_num = 176, SQ_FETCH_RESOURCE_fs_num = 32, SQ_FETCH_RESOURCE_all_num = 1024, SQ_FETCH_RESOURCE_offset = 32, SQ_FETCH_RESOURCE_ps = 0, // 0...175 SQ_FETCH_RESOURCE_vs = SQ_FETCH_RESOURCE_ps + SQ_FETCH_RESOURCE_ps_num, // 176...335 SQ_FETCH_RESOURCE_gs = SQ_FETCH_RESOURCE_vs + SQ_FETCH_RESOURCE_vs_num, // 336...495 SQ_FETCH_RESOURCE_hs = SQ_FETCH_RESOURCE_gs + SQ_FETCH_RESOURCE_gs_num, // 496...655 SQ_FETCH_RESOURCE_ls = SQ_FETCH_RESOURCE_hs + SQ_FETCH_RESOURCE_hs_num, // 656...815 SQ_FETCH_RESOURCE_cs = SQ_FETCH_RESOURCE_ls + SQ_FETCH_RESOURCE_ls_num, // 816...991 SQ_FETCH_RESOURCE_fs = SQ_FETCH_RESOURCE_cs + SQ_FETCH_RESOURCE_cs_num, // 992...1023 SQ_TEX_SAMPLER_WORD = SQ_TEX_SAMPLER_WORD0_0, SQ_TEX_SAMPLER_WORD_ps_num = 18, SQ_TEX_SAMPLER_WORD_vs_num = 18, SQ_TEX_SAMPLER_WORD_gs_num = 18, SQ_TEX_SAMPLER_WORD_hs_num = 18, SQ_TEX_SAMPLER_WORD_ls_num = 18, SQ_TEX_SAMPLER_WORD_cs_num = 18, SQ_TEX_SAMPLER_WORD_all_num = 108, SQ_TEX_SAMPLER_WORD_offset = 12, SQ_TEX_SAMPLER_WORD_ps = 0, // 0...17 SQ_TEX_SAMPLER_WORD_vs = SQ_TEX_SAMPLER_WORD_ps + SQ_TEX_SAMPLER_WORD_ps_num, // 18...35 SQ_TEX_SAMPLER_WORD_gs = SQ_TEX_SAMPLER_WORD_vs + SQ_TEX_SAMPLER_WORD_vs_num, // 36...53 SQ_TEX_SAMPLER_WORD_hs = SQ_TEX_SAMPLER_WORD_gs + SQ_TEX_SAMPLER_WORD_gs_num, // 54...71 SQ_TEX_SAMPLER_WORD_ls = SQ_TEX_SAMPLER_WORD_hs + SQ_TEX_SAMPLER_WORD_hs_num, // 72...89 SQ_TEX_SAMPLER_WORD_cs = SQ_TEX_SAMPLER_WORD_ls + SQ_TEX_SAMPLER_WORD_ls_num, // 90...107 SQ_LOOP_CONST = SQ_LOOP_CONST_0, SQ_LOOP_CONST_ps_num = 32, SQ_LOOP_CONST_vs_num = 32, SQ_LOOP_CONST_gs_num = 32, SQ_LOOP_CONST_hs_num = 32, SQ_LOOP_CONST_ls_num = 32, SQ_LOOP_CONST_cs_num = 32, SQ_LOOP_CONST_all_num = 192, SQ_LOOP_CONST_offset = 4, SQ_LOOP_CONST_ps = 0, // 0...31 SQ_LOOP_CONST_vs = SQ_LOOP_CONST_ps + SQ_LOOP_CONST_ps_num, // 32...63 SQ_LOOP_CONST_gs = SQ_LOOP_CONST_vs + SQ_LOOP_CONST_vs_num, // 64...95 SQ_LOOP_CONST_hs = SQ_LOOP_CONST_gs + SQ_LOOP_CONST_gs_num, // 96...127 SQ_LOOP_CONST_ls = SQ_LOOP_CONST_hs + SQ_LOOP_CONST_hs_num, // 128...159 SQ_LOOP_CONST_cs = SQ_LOOP_CONST_ls + SQ_LOOP_CONST_ls_num, // 160...191 SQ_BOOL_CONST = SQ_BOOL_CONST_0, /* 32 bits each */ SQ_BOOL_CONST_ps_num = 1, SQ_BOOL_CONST_vs_num = 1, SQ_BOOL_CONST_gs_num = 1, SQ_BOOL_CONST_hs_num = 1, SQ_BOOL_CONST_ls_num = 1, SQ_BOOL_CONST_cs_num = 1, SQ_BOOL_CONST_all_num = 6, SQ_BOOL_CONST_offset = 4, SQ_BOOL_CONST_ps = 0, SQ_BOOL_CONST_vs = SQ_BOOL_CONST_ps + SQ_BOOL_CONST_ps_num, SQ_BOOL_CONST_gs = SQ_BOOL_CONST_vs + SQ_BOOL_CONST_vs_num, SQ_BOOL_CONST_hs = SQ_BOOL_CONST_gs + SQ_BOOL_CONST_gs_num, SQ_BOOL_CONST_ls = SQ_BOOL_CONST_hs + SQ_BOOL_CONST_hs_num, SQ_BOOL_CONST_cs = SQ_BOOL_CONST_ls + SQ_BOOL_CONST_ls_num, }; #endif xf86-video-ati-7.3.0/src/Makefile.am0000664000175000017500000000670612204666776013772 00000000000000# Copyright 2005 Adam Jackson. # Copyright 2005 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 # 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. ati_drv_la_LIBADD = $(PCIACCESS_LIBS) radeon_drv_la_LIBADD = $(LIBDRM_RADEON_LIBS) $(PCIACCESS_LIBS) RADEON_KMS_SRCS=radeon_dri2.c radeon_kms.c drmmode_display.c radeon_vbo.c \ radeon_bo_helper.c RADEON_EXA_SOURCES = radeon_exa.c r600_exa.c r6xx_accel.c r600_textured_videofuncs.c r600_shader.c radeon_exa_shared.c \ evergreen_exa.c evergreen_accel.c evergreen_shader.c evergreen_textured_videofuncs.c cayman_accel.c cayman_shader.c AM_CFLAGS = \ @LIBDRM_RADEON_CFLAGS@ \ @XORG_CFLAGS@ \ @LIBUDEV_CFLAGS@ if LIBUDEV radeon_drv_la_LIBADD += $(LIBUDEV_LIBS) endif ati_drv_la_LTLIBRARIES = ati_drv.la ati_drv_la_LDFLAGS = -module -avoid-version ati_drv_ladir = @moduledir@/drivers ati_drv_la_SOURCES = \ ati.c atimodule.c radeon_drv_la_LTLIBRARIES = radeon_drv.la radeon_drv_la_LDFLAGS = -module -avoid-version radeon_drv_ladir = @moduledir@/drivers radeon_drv_la_SOURCES = \ radeon_accel.c radeon_video.c \ radeon_misc.c radeon_probe.c \ radeon_textured_video.c radeon_xvmc.c \ $(RADEON_EXA_SOURCES) \ $(RADEON_KMS_SRCS) if GLAMOR AM_CFLAGS += @LIBGLAMOR_CFLAGS@ radeon_drv_la_LIBADD += @LIBGLAMOR_LIBS@ radeon_drv_la_SOURCES += \ radeon_glamor.c endif EXTRA_DIST = \ radeon_textured_videofuncs.c \ r600_reg.h \ r600_reg_auto_r6xx.h \ r600_reg_r6xx.h \ r600_reg_r7xx.h \ r600_shader.h \ r600_state.h \ evergreen_reg.h \ evergreen_reg_auto.h \ evergreen_shader.h \ evergreen_state.h \ cayman_reg.h \ cayman_reg_auto.h \ cayman_shader.h \ compat-api.h \ ati.h \ ativersion.h \ bicubic_table.h \ bicubic_table.py \ radeon_bo_helper.h \ radeon_drm.h \ radeon_exa_render.c \ radeon_exa_funcs.c \ radeon_exa_shared.h \ radeon_glamor.h \ radeon.h \ radeon_probe.h \ radeon_reg.h \ radeon_version.h \ radeon_vbo.h \ radeon_video.h \ simple_list.h \ atipciids.h \ atipcirename.h \ ati_pciids_gen.h \ radeon_chipinfo_gen.h \ radeon_chipset_gen.h \ radeon_pci_chipset_gen.h \ radeon_pci_device_match_gen.h \ pcidb/ati_pciids.csv \ pcidb/parse_pci_ids.pl \ radeon_dri2.h \ drmmode_display.h xf86-video-ati-7.3.0/src/radeon_pci_device_match_gen.h0000644000175000017500000007342112256365422017521 00000000000000/* This file is autogenerated please do not edit */ static const struct pci_id_match radeon_device_match[] = { ATI_DEVICE_MATCH( PCI_CHIP_RV380_3150, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV380_3151, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV380_3152, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV380_3154, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV380_3155, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV380_3E50, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV380_3E54, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS100_4136, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS200_4137, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R300_AD, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R300_AE, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R300_AF, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R300_AG, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R350_AH, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R350_AI, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R350_AJ, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R350_AK, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV350_AP, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV350_AQ, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV360_AR, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV350_AS, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV350_AT, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV350_4155, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV350_AV, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS250_4237, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R200_BB, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS100_4336, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS200_4337, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS250_4437, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV250_If, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV250_Ig, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R420_JH, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R420_JI, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R420_JJ, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R420_JK, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R420_JL, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R420_JM, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R420_JN, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R420_4A4F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R420_JP, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R420_JT, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R481_4B48, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R481_4B49, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R481_4B4A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R481_4B4B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R481_4B4C, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RADEON_LW, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RADEON_LX, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RADEON_LY, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RADEON_LZ, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV250_Ld, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV250_Lf, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV250_Lg, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV280_4C6E, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R300_ND, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R300_NE, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R300_NF, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R300_NG, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R350_NH, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R350_NI, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R360_NJ, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R350_NK, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV350_NP, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV350_NQ, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV350_NR, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV350_NS, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV350_NT, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV350_NV, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RADEON_QD, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RADEON_QE, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RADEON_QF, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RADEON_QG, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R200_QH, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R200_QL, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R200_QM, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV200_QW, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV200_QX, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV100_QY, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV100_QZ, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RN50_515E, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV370_5460, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV370_5462, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV370_5464, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R423_UH, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R423_UI, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R423_UJ, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R423_UK, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R430_554C, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R430_554D, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R430_554E, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R430_554F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R423_5550, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R423_UQ, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R423_UR, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R423_UT, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV410_564A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV410_564B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV410_564F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV410_5652, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV410_5653, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV410_5657, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS300_5834, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS300_5835, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS480_5954, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS480_5955, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV280_5960, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV280_5961, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV280_5962, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV280_5964, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV280_5965, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RN50_5969, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS482_5974, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS485_5975, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS400_5A41, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS400_5A42, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RC410_5A61, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RC410_5A62, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV370_5B60, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV370_5B62, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV370_5B63, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV370_5B64, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV370_5B65, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV280_5C61, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV280_5C63, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R430_5D48, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R430_5D49, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R430_5D4A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R480_5D4C, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R480_5D4D, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R480_5D4E, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R480_5D4F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R480_5D50, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R480_5D52, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R423_5D57, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV410_5E48, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV410_5E4A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV410_5E4B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV410_5E4C, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV410_5E4D, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV410_5E4F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R520_7100, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R520_7101, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R520_7102, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R520_7103, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R520_7104, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R520_7105, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R520_7106, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R520_7108, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R520_7109, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R520_710A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R520_710B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R520_710C, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R520_710E, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R520_710F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_7140, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_7141, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_7142, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_7143, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_7144, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_7145, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_7146, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_7147, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_7149, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_714A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_714B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_714C, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_714D, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_714E, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_714F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_7151, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_7152, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_7153, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_715E, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_715F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_7180, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_7181, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_7183, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_7186, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_7187, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_7188, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_718A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_718B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_718C, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_718D, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_718F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_7193, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_7196, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_719B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_719F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV530_71C0, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV530_71C1, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV530_71C2, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV530_71C3, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV530_71C4, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV530_71C5, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV530_71C6, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV530_71C7, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV530_71CD, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV530_71CE, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV530_71D2, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV530_71D4, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV530_71D5, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV530_71D6, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV530_71DA, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV530_71DE, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_7200, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_7210, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV515_7211, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R580_7240, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R580_7243, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R580_7244, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R580_7245, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R580_7246, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R580_7247, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R580_7248, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R580_7249, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R580_724A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R580_724B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R580_724C, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R580_724D, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R580_724E, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R580_724F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV570_7280, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV560_7281, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV560_7283, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R580_7284, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV560_7287, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV570_7288, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV570_7289, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV570_728B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV570_728C, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV560_7290, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV560_7291, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV560_7293, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV560_7297, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS350_7834, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS350_7835, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS690_791E, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS690_791F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS600_793F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS600_7941, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS600_7942, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS740_796C, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS740_796D, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS740_796E, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS740_796F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R600_9400, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R600_9401, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R600_9402, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R600_9403, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R600_9405, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R600_940A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R600_940B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_R600_940F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV770_9440, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV770_9441, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV770_9442, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV770_9443, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV770_9444, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV770_9446, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV770_944A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV770_944B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV770_944C, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV770_944E, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV770_9450, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV770_9452, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV770_9456, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV770_945A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV770_945B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV770_945E, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV790_9460, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV790_9462, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV770_946A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV770_946B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV770_947A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV770_947B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV730_9480, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV730_9487, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV730_9488, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV730_9489, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV730_948A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV730_948F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV730_9490, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV730_9491, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV730_9495, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV730_9498, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV730_949C, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV730_949E, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV730_949F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV740_94A0, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV740_94A1, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV740_94A3, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV740_94B1, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV740_94B3, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV740_94B4, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV740_94B5, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV740_94B9, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV610_94C0, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV610_94C1, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV610_94C3, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV610_94C4, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV610_94C5, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV610_94C6, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV610_94C7, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV610_94C8, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV610_94C9, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV610_94CB, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV610_94CC, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV610_94CD, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV670_9500, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV670_9501, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV670_9504, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV670_9505, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV670_9506, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV670_9507, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV670_9508, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV670_9509, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV670_950F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV670_9511, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV670_9515, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV670_9517, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV670_9519, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV710_9540, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV710_9541, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV710_9542, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV710_954E, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV710_954F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV710_9552, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV710_9553, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV710_9555, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV710_9557, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV710_955F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV630_9580, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV630_9581, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV630_9583, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV630_9586, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV630_9587, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV630_9588, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV630_9589, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV630_958A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV630_958B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV630_958C, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV630_958D, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV630_958E, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV630_958F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV620_95C0, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV620_95C2, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV620_95C4, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV620_95C5, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV620_95C6, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV620_95C7, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV620_95C9, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV620_95CC, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV620_95CD, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV620_95CE, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV620_95CF, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV635_9590, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV635_9596, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV635_9597, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV635_9598, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV635_9599, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV635_9591, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV635_9593, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV635_9595, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RV635_959B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS780_9610, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS780_9611, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS780_9612, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS780_9613, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS780_9614, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS780_9615, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS780_9616, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_SUMO_9640, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_SUMO_9641, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_SUMO2_9642, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_SUMO2_9643, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_SUMO2_9644, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_SUMO2_9645, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_SUMO_9647, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_SUMO_9648, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_SUMO2_9649, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_SUMO_964A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_SUMO_964B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_SUMO_964C, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_SUMO_964E, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_SUMO_964F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS880_9710, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS880_9711, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS880_9712, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS880_9713, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS880_9714, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_RS880_9715, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_PALM_9802, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_PALM_9803, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_PALM_9804, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_PALM_9805, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_PALM_9806, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_PALM_9807, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_PALM_9808, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_PALM_9809, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_PALM_980A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CYPRESS_6880, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CYPRESS_6888, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CYPRESS_6889, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CYPRESS_688A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CYPRESS_688C, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CYPRESS_688D, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CYPRESS_6898, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CYPRESS_6899, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CYPRESS_689B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CYPRESS_689E, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_HEMLOCK_689C, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_HEMLOCK_689D, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_JUNIPER_68A0, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_JUNIPER_68A1, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_JUNIPER_68A8, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_JUNIPER_68A9, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_JUNIPER_68B0, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_JUNIPER_68B8, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_JUNIPER_68B9, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_JUNIPER_68BA, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_JUNIPER_68BE, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_JUNIPER_68BF, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_REDWOOD_68C0, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_REDWOOD_68C1, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_REDWOOD_68C7, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_REDWOOD_68C8, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_REDWOOD_68C9, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_REDWOOD_68D8, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_REDWOOD_68D9, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_REDWOOD_68DA, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_REDWOOD_68DE, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CEDAR_68E0, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CEDAR_68E1, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CEDAR_68E4, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CEDAR_68E5, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CEDAR_68E8, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CEDAR_68E9, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CEDAR_68F1, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CEDAR_68F2, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CEDAR_68F8, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CEDAR_68F9, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CEDAR_68FA, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CEDAR_68FE, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAYMAN_6700, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAYMAN_6701, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAYMAN_6702, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAYMAN_6703, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAYMAN_6704, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAYMAN_6705, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAYMAN_6706, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAYMAN_6707, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAYMAN_6708, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAYMAN_6709, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAYMAN_6718, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAYMAN_6719, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAYMAN_671C, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAYMAN_671D, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAYMAN_671F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_BARTS_6720, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_BARTS_6721, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_BARTS_6722, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_BARTS_6723, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_BARTS_6724, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_BARTS_6725, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_BARTS_6726, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_BARTS_6727, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_BARTS_6728, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_BARTS_6729, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_BARTS_6738, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_BARTS_6739, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_BARTS_673E, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6740, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6741, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6742, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6743, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6744, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6745, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6746, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6747, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6748, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6749, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_674A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6750, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6751, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6758, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6759, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_675B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_675D, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_675F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6840, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6841, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6842, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6843, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6849, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6850, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6858, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TURKS_6859, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAICOS_6760, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAICOS_6761, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAICOS_6762, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAICOS_6763, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAICOS_6764, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAICOS_6765, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAICOS_6766, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAICOS_6767, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAICOS_6768, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAICOS_6770, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAICOS_6771, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAICOS_6772, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAICOS_6778, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAICOS_6779, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_CAICOS_677B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9900, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9901, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9903, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9904, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9905, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9906, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9907, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9908, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9909, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_990A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_990B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_990C, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_990D, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_990E, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_990F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9910, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9913, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9917, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9918, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9919, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9990, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9991, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9992, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9993, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9994, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9995, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9996, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9997, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9998, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_9999, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_999A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_999B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_999C, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_999D, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_99A0, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_99A2, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_ARUBA_99A4, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TAHITI_6780, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TAHITI_6784, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TAHITI_6788, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TAHITI_678A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TAHITI_6790, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TAHITI_6791, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TAHITI_6792, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TAHITI_6798, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TAHITI_6799, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TAHITI_679A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TAHITI_679B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TAHITI_679E, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_TAHITI_679F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_PITCAIRN_6800, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_PITCAIRN_6801, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_PITCAIRN_6802, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_PITCAIRN_6806, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_PITCAIRN_6808, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_PITCAIRN_6809, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_PITCAIRN_6810, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_PITCAIRN_6811, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_PITCAIRN_6816, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_PITCAIRN_6817, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_PITCAIRN_6818, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_PITCAIRN_6819, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_PITCAIRN_684C, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_VERDE_6820, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_VERDE_6821, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_VERDE_6822, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_VERDE_6823, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_VERDE_6824, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_VERDE_6825, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_VERDE_6826, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_VERDE_6827, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_VERDE_6828, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_VERDE_6829, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_VERDE_682A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_VERDE_682B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_VERDE_682D, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_VERDE_682F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_VERDE_6830, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_VERDE_6831, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_VERDE_6835, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_VERDE_6837, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_VERDE_6838, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_VERDE_6839, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_VERDE_683B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_VERDE_683D, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_VERDE_683F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_OLAND_6600, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_OLAND_6601, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_OLAND_6602, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_OLAND_6603, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_OLAND_6606, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_OLAND_6607, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_OLAND_6610, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_OLAND_6611, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_OLAND_6613, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_OLAND_6620, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_OLAND_6621, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_OLAND_6623, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_OLAND_6631, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_HAINAN_6660, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_HAINAN_6663, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_HAINAN_6664, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_HAINAN_6665, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_HAINAN_6667, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_HAINAN_666F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_BONAIRE_6640, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_BONAIRE_6641, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_BONAIRE_6649, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_BONAIRE_6650, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_BONAIRE_6651, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_BONAIRE_6658, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_BONAIRE_665C, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_BONAIRE_665D, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KABINI_9830, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KABINI_9831, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KABINI_9832, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KABINI_9833, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KABINI_9834, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KABINI_9835, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KABINI_9836, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KABINI_9837, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KABINI_9838, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KABINI_9839, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KABINI_983A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KABINI_983B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KABINI_983C, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KABINI_983D, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KABINI_983E, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KABINI_983F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KAVERI_1304, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KAVERI_1305, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KAVERI_1306, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KAVERI_1307, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KAVERI_1309, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KAVERI_130A, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KAVERI_130B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KAVERI_130C, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KAVERI_130D, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KAVERI_130E, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KAVERI_130F, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KAVERI_1310, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KAVERI_1311, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KAVERI_1312, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KAVERI_1313, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KAVERI_1315, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KAVERI_1316, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KAVERI_1317, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KAVERI_131B, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KAVERI_131C, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_KAVERI_131D, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_HAWAII_67A0, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_HAWAII_67A1, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_HAWAII_67A2, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_HAWAII_67A8, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_HAWAII_67A9, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_HAWAII_67AA, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_HAWAII_67B0, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_HAWAII_67B1, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_HAWAII_67B8, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_HAWAII_67B9, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_HAWAII_67BA, 0 ), ATI_DEVICE_MATCH( PCI_CHIP_HAWAII_67BE, 0 ), { 0, 0, 0 } }; xf86-video-ati-7.3.0/src/radeon_exa_render.c0000664000175000017500000023522012177731114015525 00000000000000/* * Copyright 2005 Eric Anholt * Copyright 2005 Benjamin Herrenschmidt * 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. * * Authors: * Eric Anholt * Zack Rusin * Benjamin Herrenschmidt * Alex Deucher * */ struct blendinfo { Bool dst_alpha; Bool src_alpha; uint32_t blend_cntl; }; static struct blendinfo RadeonBlendOp[] = { /* Clear */ {0, 0, RADEON_SRC_BLEND_GL_ZERO | RADEON_DST_BLEND_GL_ZERO}, /* Src */ {0, 0, RADEON_SRC_BLEND_GL_ONE | RADEON_DST_BLEND_GL_ZERO}, /* Dst */ {0, 0, RADEON_SRC_BLEND_GL_ZERO | RADEON_DST_BLEND_GL_ONE}, /* Over */ {0, 1, RADEON_SRC_BLEND_GL_ONE | RADEON_DST_BLEND_GL_ONE_MINUS_SRC_ALPHA}, /* OverReverse */ {1, 0, RADEON_SRC_BLEND_GL_ONE_MINUS_DST_ALPHA | RADEON_DST_BLEND_GL_ONE}, /* In */ {1, 0, RADEON_SRC_BLEND_GL_DST_ALPHA | RADEON_DST_BLEND_GL_ZERO}, /* InReverse */ {0, 1, RADEON_SRC_BLEND_GL_ZERO | RADEON_DST_BLEND_GL_SRC_ALPHA}, /* Out */ {1, 0, RADEON_SRC_BLEND_GL_ONE_MINUS_DST_ALPHA | RADEON_DST_BLEND_GL_ZERO}, /* OutReverse */ {0, 1, RADEON_SRC_BLEND_GL_ZERO | RADEON_DST_BLEND_GL_ONE_MINUS_SRC_ALPHA}, /* Atop */ {1, 1, RADEON_SRC_BLEND_GL_DST_ALPHA | RADEON_DST_BLEND_GL_ONE_MINUS_SRC_ALPHA}, /* AtopReverse */ {1, 1, RADEON_SRC_BLEND_GL_ONE_MINUS_DST_ALPHA | RADEON_DST_BLEND_GL_SRC_ALPHA}, /* Xor */ {1, 1, RADEON_SRC_BLEND_GL_ONE_MINUS_DST_ALPHA | RADEON_DST_BLEND_GL_ONE_MINUS_SRC_ALPHA}, /* Add */ {0, 0, RADEON_SRC_BLEND_GL_ONE | RADEON_DST_BLEND_GL_ONE}, }; struct formatinfo { int fmt; uint32_t card_fmt; }; /* Note on texture formats: * TXFORMAT_Y8 expands to (Y,Y,Y,1). TXFORMAT_I8 expands to (I,I,I,I) */ static struct formatinfo R100TexFormats[] = { {PICT_a8r8g8b8, RADEON_TXFORMAT_ARGB8888 | RADEON_TXFORMAT_ALPHA_IN_MAP}, {PICT_x8r8g8b8, RADEON_TXFORMAT_ARGB8888}, {PICT_r5g6b5, RADEON_TXFORMAT_RGB565}, {PICT_a1r5g5b5, RADEON_TXFORMAT_ARGB1555 | RADEON_TXFORMAT_ALPHA_IN_MAP}, {PICT_x1r5g5b5, RADEON_TXFORMAT_ARGB1555}, {PICT_a8, RADEON_TXFORMAT_I8 | RADEON_TXFORMAT_ALPHA_IN_MAP}, }; static struct formatinfo R200TexFormats[] = { {PICT_a8r8g8b8, R200_TXFORMAT_ARGB8888 | R200_TXFORMAT_ALPHA_IN_MAP}, {PICT_x8r8g8b8, R200_TXFORMAT_ARGB8888}, {PICT_a8b8g8r8, R200_TXFORMAT_ABGR8888 | R200_TXFORMAT_ALPHA_IN_MAP}, {PICT_x8b8g8r8, R200_TXFORMAT_ABGR8888}, {PICT_r5g6b5, R200_TXFORMAT_RGB565}, {PICT_a1r5g5b5, R200_TXFORMAT_ARGB1555 | R200_TXFORMAT_ALPHA_IN_MAP}, {PICT_x1r5g5b5, R200_TXFORMAT_ARGB1555}, {PICT_a8, R200_TXFORMAT_I8 | R200_TXFORMAT_ALPHA_IN_MAP}, }; static struct formatinfo R300TexFormats[] = { {PICT_a8r8g8b8, R300_EASY_TX_FORMAT(X, Y, Z, W, W8Z8Y8X8)}, {PICT_x8r8g8b8, R300_EASY_TX_FORMAT(X, Y, Z, ONE, W8Z8Y8X8)}, {PICT_a8b8g8r8, R300_EASY_TX_FORMAT(Z, Y, X, W, W8Z8Y8X8)}, {PICT_x8b8g8r8, R300_EASY_TX_FORMAT(Z, Y, X, ONE, W8Z8Y8X8)}, {PICT_b8g8r8a8, R300_EASY_TX_FORMAT(W, Z, Y, X, W8Z8Y8X8)}, {PICT_b8g8r8x8, R300_EASY_TX_FORMAT(W, Z, Y, ONE, W8Z8Y8X8)}, {PICT_r5g6b5, R300_EASY_TX_FORMAT(X, Y, Z, ONE, Z5Y6X5)}, {PICT_a1r5g5b5, R300_EASY_TX_FORMAT(X, Y, Z, W, W1Z5Y5X5)}, {PICT_x1r5g5b5, R300_EASY_TX_FORMAT(X, Y, Z, ONE, W1Z5Y5X5)}, {PICT_a8, R300_EASY_TX_FORMAT(ZERO, ZERO, ZERO, X, X8)}, }; /* Common Radeon setup code */ static Bool RADEONGetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) { switch (pDstPicture->format) { case PICT_a8r8g8b8: case PICT_x8r8g8b8: *dst_format = RADEON_COLOR_FORMAT_ARGB8888; break; case PICT_r5g6b5: *dst_format = RADEON_COLOR_FORMAT_RGB565; break; case PICT_a1r5g5b5: case PICT_x1r5g5b5: *dst_format = RADEON_COLOR_FORMAT_ARGB1555; break; case PICT_a8: *dst_format = RADEON_COLOR_FORMAT_RGB8; break; default: RADEON_FALLBACK(("Unsupported dest format 0x%x\n", (int)pDstPicture->format)); } return TRUE; } static Bool R300GetDestFormat(PicturePtr pDstPicture, uint32_t *dst_format) { switch (pDstPicture->format) { case PICT_a8r8g8b8: case PICT_x8r8g8b8: case PICT_a8b8g8r8: case PICT_x8b8g8r8: case PICT_b8g8r8a8: case PICT_b8g8r8x8: *dst_format = R300_COLORFORMAT_ARGB8888; break; case PICT_r5g6b5: *dst_format = R300_COLORFORMAT_RGB565; break; case PICT_a1r5g5b5: case PICT_x1r5g5b5: *dst_format = R300_COLORFORMAT_ARGB1555; break; case PICT_a8: *dst_format = R300_COLORFORMAT_I8; break; default: RADEON_FALLBACK(("Unsupported dest format 0x%x\n", (int)pDstPicture->format)); } return TRUE; } static uint32_t RADEONGetBlendCntl(int op, PicturePtr pMask, uint32_t dst_format) { uint32_t sblend, dblend; sblend = RadeonBlendOp[op].blend_cntl & RADEON_SRC_BLEND_MASK; dblend = RadeonBlendOp[op].blend_cntl & RADEON_DST_BLEND_MASK; /* If there's no dst alpha channel, adjust the blend op so that we'll treat * it as always 1. */ if (PICT_FORMAT_A(dst_format) == 0 && RadeonBlendOp[op].dst_alpha) { if (sblend == RADEON_SRC_BLEND_GL_DST_ALPHA) sblend = RADEON_SRC_BLEND_GL_ONE; else if (sblend == RADEON_SRC_BLEND_GL_ONE_MINUS_DST_ALPHA) sblend = RADEON_SRC_BLEND_GL_ZERO; } /* If the source alpha is being used, then we should only be in a case where * the source blend factor is 0, and the source blend value is the mask * channels multiplied by the source picture's alpha. */ if (pMask && pMask->componentAlpha && RadeonBlendOp[op].src_alpha) { if (dblend == RADEON_DST_BLEND_GL_SRC_ALPHA) { dblend = RADEON_DST_BLEND_GL_SRC_COLOR; } else if (dblend == RADEON_DST_BLEND_GL_ONE_MINUS_SRC_ALPHA) { dblend = RADEON_DST_BLEND_GL_ONE_MINUS_SRC_COLOR; } } return sblend | dblend; } union intfloat { float f; uint32_t i; }; /* Check if we need a software-fallback because of a repeating * non-power-of-two texture. * * canTile: whether we can emulate a repeat by drawing in tiles: * possible for the source, but not for the mask. (Actually * we could do tiling for the mask too, but dealing with the * combination of a tiled mask and a tiled source would be * a lot of complexity, so we handle only the most common * case of a repeating mask.) */ static Bool RADEONCheckTexturePOT(PicturePtr pPict, Bool canTile) { int w = pPict->pDrawable->width; int h = pPict->pDrawable->height; unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; if ((repeatType == RepeatNormal || repeatType == RepeatReflect) && ((w & (w - 1)) != 0 || (h & (h - 1)) != 0) && !(repeatType == RepeatNormal && !pPict->transform && canTile)) RADEON_FALLBACK(("NPOT repeating %s unsupported (%dx%d), transform=%d\n", canTile ? "source" : "mask", w, h, pPict->transform != 0)); return TRUE; } /* Determine if the pitch of the pixmap meets the criteria for being * used as a repeating texture: no padding or only a single line texture. */ static Bool RADEONPitchMatches(PixmapPtr pPix) { int w = pPix->drawable.width; int h = pPix->drawable.height; uint32_t txpitch = exaGetPixmapPitch(pPix); if (h > 1 && (RADEON_ALIGN(w * pPix->drawable.bitsPerPixel / 8, 32)) != txpitch) return FALSE; return TRUE; } /* We can't turn on repeats normally for a non-power-of-two dimension, * but if the source isn't transformed, we can get the same effect * by drawing the image in multiple tiles. (A common case that it's * important to get right is drawing a strip of a NPOTxPOT texture * repeating in the POT direction. With tiling, this ends up as a * a single tile on R300 and newer, which is perfect.) * * canTile1d: On R300 and newer, we can repeat a texture that is NPOT in * one direction and POT in the other in the POT direction; on * older chips we can only repeat at all if the texture is POT in * both directions. * * needMatchingPitch: On R100/R200, we can only repeat horizontally if * there is no padding in the texture. Textures with small POT widths * (1,2,4,8) thus can't be tiled. */ static Bool RADEONSetupSourceTile(PicturePtr pPict, PixmapPtr pPix, Bool canTile1d, Bool needMatchingPitch) { RINFO_FROM_SCREEN(pPix->drawable.pScreen); unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; info->accel_state->need_src_tile_x = info->accel_state->need_src_tile_y = FALSE; info->accel_state->src_tile_width = info->accel_state->src_tile_height = 65536; /* "infinite" */ if (repeatType == RepeatNormal || repeatType == RepeatReflect) { Bool badPitch = needMatchingPitch && !RADEONPitchMatches(pPix); int w = pPict->pDrawable ? pPict->pDrawable->width : 1; int h = pPict->pDrawable ? pPict->pDrawable->height : 1; if (pPict->transform) { if (badPitch) RADEON_FALLBACK(("Width %d and pitch %u not compatible for repeat\n", w, (unsigned)exaGetPixmapPitch(pPix))); } else { info->accel_state->need_src_tile_x = (w & (w - 1)) != 0 || badPitch; info->accel_state->need_src_tile_y = (h & (h - 1)) != 0; if ((info->accel_state->need_src_tile_x || info->accel_state->need_src_tile_y) && repeatType != RepeatNormal) RADEON_FALLBACK(("Can only tile RepeatNormal at this time\n")); if (!canTile1d) info->accel_state->need_src_tile_x = info->accel_state->need_src_tile_y = info->accel_state->need_src_tile_x || info->accel_state->need_src_tile_y; } if (info->accel_state->need_src_tile_x) info->accel_state->src_tile_width = w; if (info->accel_state->need_src_tile_y) info->accel_state->src_tile_height = h; } return TRUE; } /* R100-specific code */ static Bool R100CheckCompositeTexture(PicturePtr pPict, PicturePtr pDstPict, int op, int unit) { unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; int i; for (i = 0; i < sizeof(R100TexFormats) / sizeof(R100TexFormats[0]); i++) { if (R100TexFormats[i].fmt == pPict->format) break; } if (i == sizeof(R100TexFormats) / sizeof(R100TexFormats[0])) RADEON_FALLBACK(("Unsupported picture format 0x%x\n", (int)pPict->format)); if (pPict->pDrawable && !RADEONCheckTexturePOT(pPict, unit == 0)) return FALSE; if (pPict->filter != PictFilterNearest && pPict->filter != PictFilterBilinear) { RADEON_FALLBACK(("Unsupported filter 0x%x\n", pPict->filter)); } /* for REPEAT_NONE, Render semantics are that sampling outside the source * picture results in alpha=0 pixels. We can implement this with a border color * *if* our source texture has an alpha channel, otherwise we need to fall * back. If we're not transformed then we hope that upper layers have clipped * rendering to the bounds of the source drawable, in which case it doesn't * matter. I have not, however, verified that the X server always does such * clipping. */ if (pPict->transform != 0 && repeatType == RepeatNone && PICT_FORMAT_A(pPict->format) == 0) { if (!(((op == PictOpSrc) || (op == PictOpClear)) && (PICT_FORMAT_A(pDstPict->format) == 0))) RADEON_FALLBACK(("REPEAT_NONE unsupported for transformed xRGB source\n")); } if (!radeon_transform_is_affine_or_scaled(pPict->transform)) RADEON_FALLBACK(("non-affine transforms not supported\n")); return TRUE; } static Bool R100TextureSetup(PicturePtr pPict, PixmapPtr pPix, int unit) { RINFO_FROM_SCREEN(pPix->drawable.pScreen); uint32_t txfilter, txformat, txoffset, txpitch; unsigned int repeatType; Bool repeat; int i, w, h; struct radeon_exa_pixmap_priv *driver_priv; if (pPict->pDrawable) { w = pPict->pDrawable->width; h = pPict->pDrawable->height; repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; } else { w = h = 1; repeatType = RepeatNormal; } repeat = (repeatType == RepeatNormal || repeatType == RepeatReflect) && !(unit == 0 && (info->accel_state->need_src_tile_x || info->accel_state->need_src_tile_y)); txpitch = exaGetPixmapPitch(pPix); txoffset = 0; if ((txpitch & 0x1f) != 0) RADEON_FALLBACK(("Bad texture pitch 0x%x\n", (int)txpitch)); for (i = 0; i < sizeof(R100TexFormats) / sizeof(R100TexFormats[0]); i++) { if (R100TexFormats[i].fmt == pPict->format) break; } txformat = R100TexFormats[i].card_fmt; if (RADEONPixmapIsColortiled(pPix)) txoffset |= RADEON_TXO_MACRO_TILE; if (repeat) { if (!RADEONPitchMatches(pPix)) RADEON_FALLBACK(("Width %d and pitch %u not compatible for repeat\n", w, (unsigned)txpitch)); txformat |= RADEONLog2(w) << RADEON_TXFORMAT_WIDTH_SHIFT; txformat |= RADEONLog2(h) << RADEON_TXFORMAT_HEIGHT_SHIFT; } else txformat |= RADEON_TXFORMAT_NON_POWER2; txformat |= unit << 24; /* RADEON_TXFORMAT_ST_ROUTE_STQX */ info->accel_state->texW[unit] = w; info->accel_state->texH[unit] = h; switch (pPict->filter) { case PictFilterNearest: txfilter = (RADEON_MAG_FILTER_NEAREST | RADEON_MIN_FILTER_NEAREST); break; case PictFilterBilinear: txfilter = (RADEON_MAG_FILTER_LINEAR | RADEON_MIN_FILTER_LINEAR); break; default: RADEON_FALLBACK(("Bad filter 0x%x\n", pPict->filter)); } switch (repeatType) { case RepeatNormal: if (txformat & RADEON_TXFORMAT_NON_POWER2) txfilter |= RADEON_CLAMP_S_CLAMP_LAST | RADEON_CLAMP_T_CLAMP_LAST; else txfilter |= RADEON_CLAMP_S_WRAP | RADEON_CLAMP_T_WRAP; break; case RepeatPad: txfilter |= RADEON_CLAMP_S_CLAMP_LAST | RADEON_CLAMP_T_CLAMP_LAST; break; case RepeatReflect: txfilter |= RADEON_CLAMP_S_MIRROR | RADEON_CLAMP_T_MIRROR; break; case RepeatNone: /* don't set an illegal clamp mode for rects */ if (txformat & RADEON_TXFORMAT_NON_POWER2) txfilter |= RADEON_CLAMP_S_CLAMP_LAST | RADEON_CLAMP_T_CLAMP_LAST; break; } BEGIN_ACCEL_RELOC(5, 1); if (unit == 0) { OUT_RING_REG(RADEON_PP_TXFILTER_0, txfilter); OUT_RING_REG(RADEON_PP_TXFORMAT_0, txformat); OUT_RING_REG(RADEON_PP_TEX_SIZE_0, (pPix->drawable.width - 1) | ((pPix->drawable.height - 1) << RADEON_TEX_VSIZE_SHIFT)); OUT_RING_REG(RADEON_PP_TEX_PITCH_0, txpitch - 32); EMIT_READ_OFFSET(RADEON_PP_TXOFFSET_0, txoffset, pPix); /* emit a texture relocation */ } else { OUT_RING_REG(RADEON_PP_TXFILTER_1, txfilter); OUT_RING_REG(RADEON_PP_TXFORMAT_1, txformat); OUT_RING_REG(RADEON_PP_TEX_SIZE_1, (pPix->drawable.width - 1) | ((pPix->drawable.height - 1) << RADEON_TEX_VSIZE_SHIFT)); OUT_RING_REG(RADEON_PP_TEX_PITCH_1, txpitch - 32); EMIT_READ_OFFSET(RADEON_PP_TXOFFSET_1, txoffset, pPix); /* emit a texture relocation */ } ADVANCE_RING(); if (pPict->transform != 0) { info->accel_state->is_transform[unit] = TRUE; info->accel_state->transform[unit] = pPict->transform; } else { info->accel_state->is_transform[unit] = FALSE; } return TRUE; } static Bool R100CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, PicturePtr pDstPicture) { PixmapPtr pSrcPixmap, pDstPixmap; uint32_t tmp1; /* Check for unsupported compositing operations. */ if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0])) RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op)); pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable); if (pDstPixmap->drawable.width > 2048 || pDstPixmap->drawable.height > 2048) { RADEON_FALLBACK(("Dest w/h too large (%d,%d).\n", pDstPixmap->drawable.width, pDstPixmap->drawable.height)); } if (pSrcPicture->pDrawable) { /* r100 limit should be 2048, there are issues with 2048 * see 197a62704742a4a19736c2637ac92d1dc5ab34ed */ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); if (pSrcPixmap->drawable.width > 2048 || pSrcPixmap->drawable.height > 2048) { RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", pSrcPixmap->drawable.width, pSrcPixmap->drawable.height)); } } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill) RADEON_FALLBACK(("Gradient pictures not supported yet\n")); if (pMaskPicture) { PixmapPtr pMaskPixmap; if (pMaskPicture->pDrawable) { pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); if (pMaskPixmap->drawable.width > 2048 || pMaskPixmap->drawable.height > 2048) { RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", pMaskPixmap->drawable.width, pMaskPixmap->drawable.height)); } } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill) RADEON_FALLBACK(("Gradient pictures not supported yet\n")); if (pMaskPicture->componentAlpha) { /* Check if it's component alpha that relies on a source alpha and * on the source value. We can only get one of those into the * single source value that we get to blend with. */ if (RadeonBlendOp[op].src_alpha && (RadeonBlendOp[op].blend_cntl & RADEON_SRC_BLEND_MASK) != RADEON_SRC_BLEND_GL_ZERO) { RADEON_FALLBACK(("Component alpha not supported with source " "alpha and source value blending.\n")); } } if (!R100CheckCompositeTexture(pMaskPicture, pDstPicture, op, 1)) return FALSE; } if (!R100CheckCompositeTexture(pSrcPicture, pDstPicture, op, 0)) return FALSE; if (!RADEONGetDestFormat(pDstPicture, &tmp1)) return FALSE; return TRUE; } static Bool RADEONPrepareCompositeCS(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, PicturePtr pDstPicture, PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst) { RINFO_FROM_SCREEN(pDst->drawable.pScreen); int ret; info->accel_state->composite_op = op; info->accel_state->dst_pic = pDstPicture; info->accel_state->msk_pic = pMaskPicture; info->accel_state->src_pic = pSrcPicture; info->accel_state->dst_pix = pDst; info->accel_state->msk_pix = pMask; info->accel_state->src_pix = pSrc; radeon_cs_space_reset_bos(info->cs); radeon_add_pixmap(info->cs, pSrc, RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM, 0); if (pMask) radeon_add_pixmap(info->cs, pMask, RADEON_GEM_DOMAIN_GTT | RADEON_GEM_DOMAIN_VRAM, 0); radeon_add_pixmap(info->cs, pDst, 0, RADEON_GEM_DOMAIN_VRAM); ret = radeon_cs_space_check(info->cs); if (ret) RADEON_FALLBACK(("Not enough RAM to hw accel composite operation\n")); return TRUE; } static Bool R100PrepareComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, PicturePtr pDstPicture, PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst) { ScreenPtr pScreen = pDst->drawable.pScreen; RINFO_FROM_SCREEN(pScreen); uint32_t dst_format, dst_pitch, colorpitch; uint32_t pp_cntl, blendcntl, cblend, ablend; int pixel_shift; struct radeon_exa_pixmap_priv *driver_priv; TRACE; if (!RADEONGetDestFormat(pDstPicture, &dst_format)) return FALSE; if (pDstPicture->format == PICT_a8 && RadeonBlendOp[op].dst_alpha) RADEON_FALLBACK(("Can't dst alpha blend A8\n")); pixel_shift = pDst->drawable.bitsPerPixel >> 4; dst_pitch = exaGetPixmapPitch(pDst); colorpitch = dst_pitch >> pixel_shift; if (RADEONPixmapIsColortiled(pDst)) colorpitch |= RADEON_COLOR_TILE_ENABLE; if (!pSrc) { pSrc = RADEONSolidPixmap(pScreen, cpu_to_le32(pSrcPicture->pSourcePict->solidFill.color)); if (!pSrc) RADEON_FALLBACK(("Failed to create solid scratch pixmap\n")); } if (((dst_pitch >> pixel_shift) & 0x7) != 0) RADEON_FALLBACK(("Bad destination pitch 0x%x\n", (int)dst_pitch)); if (!RADEONSetupSourceTile(pSrcPicture, pSrc, FALSE, TRUE)) return FALSE; if (pMaskPicture && !pMask) { pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color)); if (!pMask) { if (!pSrcPicture->pDrawable) pScreen->DestroyPixmap(pSrc); RADEON_FALLBACK(("Failed to create solid scratch pixmap\n")); } } RADEONPrepareCompositeCS(op, pSrcPicture, pMaskPicture, pDstPicture, pSrc, pMask, pDst); /* switch to 3D after doing buffer space checks as the latter may flush */ RADEON_SWITCH_TO_3D(); if (!R100TextureSetup(pSrcPicture, pSrc, 0)) return FALSE; pp_cntl = RADEON_TEX_0_ENABLE | RADEON_TEX_BLEND_0_ENABLE; if (pMask != NULL) { if (!R100TextureSetup(pMaskPicture, pMask, 1)) return FALSE; pp_cntl |= RADEON_TEX_1_ENABLE; } else { info->accel_state->is_transform[1] = FALSE; } BEGIN_ACCEL_RELOC(10, 2); OUT_RING_REG(RADEON_PP_CNTL, pp_cntl); OUT_RING_REG(RADEON_RB3D_CNTL, dst_format | RADEON_ALPHA_BLEND_ENABLE); EMIT_WRITE_OFFSET(RADEON_RB3D_COLOROFFSET, 0, pDst); EMIT_COLORPITCH(RADEON_RB3D_COLORPITCH, colorpitch, pDst); /* IN operator: Multiply src by mask components or mask alpha. * BLEND_CTL_ADD is A * B + C. * If a source is a8, we have to explicitly zero its color values. * If the destination is a8, we have to route the alpha to red, I think. * If we're doing component alpha where the source for blending is going to * be the source alpha (and there's no source value used), we have to zero * the source's color values. */ cblend = RADEON_BLEND_CTL_ADD | RADEON_CLAMP_TX | RADEON_COLOR_ARG_C_ZERO; ablend = RADEON_BLEND_CTL_ADD | RADEON_CLAMP_TX | RADEON_ALPHA_ARG_C_ZERO; if (pDstPicture->format == PICT_a8 || (pMask && pMaskPicture->componentAlpha && RadeonBlendOp[op].src_alpha)) { cblend |= RADEON_COLOR_ARG_A_T0_ALPHA; } else if (pSrcPicture->format == PICT_a8) cblend |= RADEON_COLOR_ARG_A_ZERO; else cblend |= RADEON_COLOR_ARG_A_T0_COLOR; ablend |= RADEON_ALPHA_ARG_A_T0_ALPHA; if (pMask) { if (pMaskPicture->componentAlpha && pDstPicture->format != PICT_a8) cblend |= RADEON_COLOR_ARG_B_T1_COLOR; else cblend |= RADEON_COLOR_ARG_B_T1_ALPHA; ablend |= RADEON_ALPHA_ARG_B_T1_ALPHA; } else { cblend |= RADEON_COLOR_ARG_B_ZERO | RADEON_COMP_ARG_B; ablend |= RADEON_ALPHA_ARG_B_ZERO | RADEON_COMP_ARG_B; } OUT_RING_REG(RADEON_PP_TXCBLEND_0, cblend); OUT_RING_REG(RADEON_PP_TXABLEND_0, ablend); if (pMask) OUT_RING_REG(RADEON_SE_VTX_FMT, (RADEON_SE_VTX_FMT_XY | RADEON_SE_VTX_FMT_ST0 | RADEON_SE_VTX_FMT_ST1)); else OUT_RING_REG(RADEON_SE_VTX_FMT, (RADEON_SE_VTX_FMT_XY | RADEON_SE_VTX_FMT_ST0)); /* Op operator. */ blendcntl = RADEONGetBlendCntl(op, pMaskPicture, pDstPicture->format); OUT_RING_REG(RADEON_RB3D_BLENDCNTL, blendcntl); OUT_RING_REG(RADEON_RE_TOP_LEFT, 0); OUT_RING_REG(RADEON_RE_WIDTH_HEIGHT, (((pDst->drawable.width - 1) << RADEON_RE_WIDTH_SHIFT) | ((pDst->drawable.height - 1) << RADEON_RE_HEIGHT_SHIFT))); ADVANCE_RING(); return TRUE; } static Bool R200CheckCompositeTexture(PicturePtr pPict, PicturePtr pDstPict, int op, int unit) { unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; int i; for (i = 0; i < sizeof(R200TexFormats) / sizeof(R200TexFormats[0]); i++) { if (R200TexFormats[i].fmt == pPict->format) break; } if (i == sizeof(R200TexFormats) / sizeof(R200TexFormats[0])) RADEON_FALLBACK(("Unsupported picture format 0x%x\n", (int)pPict->format)); if (pPict->pDrawable && !RADEONCheckTexturePOT(pPict, unit == 0)) return FALSE; if (pPict->filter != PictFilterNearest && pPict->filter != PictFilterBilinear) RADEON_FALLBACK(("Unsupported filter 0x%x\n", pPict->filter)); /* for REPEAT_NONE, Render semantics are that sampling outside the source * picture results in alpha=0 pixels. We can implement this with a border color * *if* our source texture has an alpha channel, otherwise we need to fall * back. If we're not transformed then we hope that upper layers have clipped * rendering to the bounds of the source drawable, in which case it doesn't * matter. I have not, however, verified that the X server always does such * clipping. */ if (pPict->transform != 0 && repeatType == RepeatNone && PICT_FORMAT_A(pPict->format) == 0) { if (!(((op == PictOpSrc) || (op == PictOpClear)) && (PICT_FORMAT_A(pDstPict->format) == 0))) RADEON_FALLBACK(("REPEAT_NONE unsupported for transformed xRGB source\n")); } if (!radeon_transform_is_affine_or_scaled(pPict->transform)) RADEON_FALLBACK(("non-affine transforms not supported\n")); return TRUE; } static Bool R200TextureSetup(PicturePtr pPict, PixmapPtr pPix, int unit) { RINFO_FROM_SCREEN(pPix->drawable.pScreen); uint32_t txfilter, txformat, txoffset, txpitch; unsigned int repeatType; Bool repeat; int i, w, h; struct radeon_exa_pixmap_priv *driver_priv; if (pPict->pDrawable) { w = pPict->pDrawable->width; h = pPict->pDrawable->height; repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; } else { w = h = 1; repeatType = RepeatNormal; } repeat = (repeatType == RepeatNormal || repeatType == RepeatReflect) && !(unit == 0 && (info->accel_state->need_src_tile_x || info->accel_state->need_src_tile_y)); txpitch = exaGetPixmapPitch(pPix); txoffset = 0; if ((txpitch & 0x1f) != 0) RADEON_FALLBACK(("Bad texture pitch 0x%x\n", (int)txpitch)); for (i = 0; i < sizeof(R200TexFormats) / sizeof(R200TexFormats[0]); i++) { if (R200TexFormats[i].fmt == pPict->format) break; } txformat = R200TexFormats[i].card_fmt; if (RADEONPixmapIsColortiled(pPix)) txoffset |= R200_TXO_MACRO_TILE; if (repeat) { if (!RADEONPitchMatches(pPix)) RADEON_FALLBACK(("Width %d and pitch %u not compatible for repeat\n", w, (unsigned)txpitch)); txformat |= RADEONLog2(w) << R200_TXFORMAT_WIDTH_SHIFT; txformat |= RADEONLog2(h) << R200_TXFORMAT_HEIGHT_SHIFT; } else txformat |= R200_TXFORMAT_NON_POWER2; txformat |= unit << R200_TXFORMAT_ST_ROUTE_SHIFT; info->accel_state->texW[unit] = w; info->accel_state->texH[unit] = h; switch (pPict->filter) { case PictFilterNearest: txfilter = (R200_MAG_FILTER_NEAREST | R200_MIN_FILTER_NEAREST); break; case PictFilterBilinear: txfilter = (R200_MAG_FILTER_LINEAR | R200_MIN_FILTER_LINEAR); break; default: RADEON_FALLBACK(("Bad filter 0x%x\n", pPict->filter)); } switch (repeatType) { case RepeatNormal: if (txformat & R200_TXFORMAT_NON_POWER2) txfilter |= R200_CLAMP_S_CLAMP_LAST | R200_CLAMP_T_CLAMP_LAST; else txfilter |= R200_CLAMP_S_WRAP | R200_CLAMP_T_WRAP; break; case RepeatPad: txfilter |= R200_CLAMP_S_CLAMP_LAST | R200_CLAMP_T_CLAMP_LAST; break; case RepeatReflect: txfilter |= R200_CLAMP_S_MIRROR | R200_CLAMP_T_MIRROR; break; case RepeatNone: /* don't set an illegal clamp mode for rect textures */ if (txformat & R200_TXFORMAT_NON_POWER2) txfilter |= R200_CLAMP_S_CLAMP_LAST | R200_CLAMP_T_CLAMP_LAST; break; } BEGIN_ACCEL_RELOC(6, 1); if (unit == 0) { OUT_RING_REG(R200_PP_TXFILTER_0, txfilter); OUT_RING_REG(R200_PP_TXFORMAT_0, txformat); OUT_RING_REG(R200_PP_TXFORMAT_X_0, 0); OUT_RING_REG(R200_PP_TXSIZE_0, (pPix->drawable.width - 1) | ((pPix->drawable.height - 1) << RADEON_TEX_VSIZE_SHIFT)); OUT_RING_REG(R200_PP_TXPITCH_0, txpitch - 32); EMIT_READ_OFFSET(R200_PP_TXOFFSET_0, txoffset, pPix); } else { OUT_RING_REG(R200_PP_TXFILTER_1, txfilter); OUT_RING_REG(R200_PP_TXFORMAT_1, txformat); OUT_RING_REG(R200_PP_TXFORMAT_X_1, 0); OUT_RING_REG(R200_PP_TXSIZE_1, (pPix->drawable.width - 1) | ((pPix->drawable.height - 1) << RADEON_TEX_VSIZE_SHIFT)); OUT_RING_REG(R200_PP_TXPITCH_1, txpitch - 32); EMIT_READ_OFFSET(R200_PP_TXOFFSET_1, txoffset, pPix); /* emit a texture relocation */ } ADVANCE_RING(); if (pPict->transform != 0) { info->accel_state->is_transform[unit] = TRUE; info->accel_state->transform[unit] = pPict->transform; } else { info->accel_state->is_transform[unit] = FALSE; } return TRUE; } static Bool R200CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, PicturePtr pDstPicture) { PixmapPtr pSrcPixmap, pDstPixmap; uint32_t tmp1; TRACE; /* Check for unsupported compositing operations. */ if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0])) RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op)); pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable); if (pDstPixmap->drawable.width > 2048 || pDstPixmap->drawable.height > 2048) { RADEON_FALLBACK(("Dest w/h too large (%d,%d).\n", pDstPixmap->drawable.width, pDstPixmap->drawable.height)); } if (pSrcPicture->pDrawable) { /* r200 limit should be 2048, there are issues with 2048 * see 197a62704742a4a19736c2637ac92d1dc5ab34ed */ pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); if (pSrcPixmap->drawable.width > 2048 || pSrcPixmap->drawable.height > 2048) { RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", pSrcPixmap->drawable.width, pSrcPixmap->drawable.height)); } } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill) RADEON_FALLBACK(("Gradient pictures not supported yet\n")); if (pMaskPicture) { PixmapPtr pMaskPixmap; if (pMaskPicture->pDrawable) { pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); if (pMaskPixmap->drawable.width > 2048 || pMaskPixmap->drawable.height > 2048) { RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", pMaskPixmap->drawable.width, pMaskPixmap->drawable.height)); } } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill) RADEON_FALLBACK(("Gradient pictures not supported yet\n")); if (pMaskPicture->componentAlpha) { /* Check if it's component alpha that relies on a source alpha and * on the source value. We can only get one of those into the * single source value that we get to blend with. */ if (RadeonBlendOp[op].src_alpha && (RadeonBlendOp[op].blend_cntl & RADEON_SRC_BLEND_MASK) != RADEON_SRC_BLEND_GL_ZERO) { RADEON_FALLBACK(("Component alpha not supported with source " "alpha and source value blending.\n")); } } if (!R200CheckCompositeTexture(pMaskPicture, pDstPicture, op, 1)) return FALSE; } if (!R200CheckCompositeTexture(pSrcPicture, pDstPicture, op, 0)) return FALSE; if (!RADEONGetDestFormat(pDstPicture, &tmp1)) return FALSE; return TRUE; } static Bool R200PrepareComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, PicturePtr pDstPicture, PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst) { ScreenPtr pScreen = pDst->drawable.pScreen; RINFO_FROM_SCREEN(pScreen); uint32_t dst_format, dst_pitch; uint32_t pp_cntl, blendcntl, cblend, ablend, colorpitch; int pixel_shift; struct radeon_exa_pixmap_priv *driver_priv; TRACE; if (!RADEONGetDestFormat(pDstPicture, &dst_format)) return FALSE; if (pDstPicture->format == PICT_a8 && RadeonBlendOp[op].dst_alpha) RADEON_FALLBACK(("Can't dst alpha blend A8\n")); pixel_shift = pDst->drawable.bitsPerPixel >> 4; dst_pitch = exaGetPixmapPitch(pDst); colorpitch = dst_pitch >> pixel_shift; if (RADEONPixmapIsColortiled(pDst)) colorpitch |= RADEON_COLOR_TILE_ENABLE; if (((dst_pitch >> pixel_shift) & 0x7) != 0) RADEON_FALLBACK(("Bad destination pitch 0x%x\n", (int)dst_pitch)); if (!pSrc) { pSrc = RADEONSolidPixmap(pScreen, cpu_to_le32(pSrcPicture->pSourcePict->solidFill.color)); if (!pSrc) RADEON_FALLBACK(("Failed to create solid scratch pixmap\n")); } if (!RADEONSetupSourceTile(pSrcPicture, pSrc, FALSE, TRUE)) return FALSE; if (pMaskPicture && !pMask) { pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color)); if (!pMask) { if (!pSrcPicture->pDrawable) pScreen->DestroyPixmap(pSrc); RADEON_FALLBACK(("Failed to create solid scratch pixmap\n")); } } RADEONPrepareCompositeCS(op, pSrcPicture, pMaskPicture, pDstPicture, pSrc, pMask, pDst); /* switch to 3D after doing buffer space checks as it may flush */ RADEON_SWITCH_TO_3D(); if (!R200TextureSetup(pSrcPicture, pSrc, 0)) return FALSE; pp_cntl = RADEON_TEX_0_ENABLE | RADEON_TEX_BLEND_0_ENABLE; if (pMask != NULL) { if (!R200TextureSetup(pMaskPicture, pMask, 1)) return FALSE; pp_cntl |= RADEON_TEX_1_ENABLE; } else { info->accel_state->is_transform[1] = FALSE; } BEGIN_ACCEL_RELOC(12, 2); OUT_RING_REG(RADEON_PP_CNTL, pp_cntl); OUT_RING_REG(RADEON_RB3D_CNTL, dst_format | RADEON_ALPHA_BLEND_ENABLE); EMIT_WRITE_OFFSET(RADEON_RB3D_COLOROFFSET, 0, pDst); EMIT_COLORPITCH(RADEON_RB3D_COLORPITCH, colorpitch, pDst); OUT_RING_REG(R200_SE_VTX_FMT_0, R200_VTX_XY); if (pMask) OUT_RING_REG(R200_SE_VTX_FMT_1, (2 << R200_VTX_TEX0_COMP_CNT_SHIFT) | (2 << R200_VTX_TEX1_COMP_CNT_SHIFT)); else OUT_RING_REG(R200_SE_VTX_FMT_1, (2 << R200_VTX_TEX0_COMP_CNT_SHIFT)); /* IN operator: Multiply src by mask components or mask alpha. * BLEND_CTL_ADD is A * B + C. * If a picture is a8, we have to explicitly zero its color values. * If the destination is a8, we have to route the alpha to red, I think. * If we're doing component alpha where the source for blending is going to * be the source alpha (and there's no source value used), we have to zero * the source's color values. */ cblend = R200_TXC_OP_MADD | R200_TXC_ARG_C_ZERO; ablend = R200_TXA_OP_MADD | R200_TXA_ARG_C_ZERO; if (pDstPicture->format == PICT_a8 || (pMask && pMaskPicture->componentAlpha && RadeonBlendOp[op].src_alpha)) { cblend |= R200_TXC_ARG_A_R0_ALPHA; } else if (pSrcPicture->format == PICT_a8) cblend |= R200_TXC_ARG_A_ZERO; else cblend |= R200_TXC_ARG_A_R0_COLOR; ablend |= R200_TXA_ARG_A_R0_ALPHA; if (pMask) { if (pMaskPicture->componentAlpha && pDstPicture->format != PICT_a8) cblend |= R200_TXC_ARG_B_R1_COLOR; else cblend |= R200_TXC_ARG_B_R1_ALPHA; ablend |= R200_TXA_ARG_B_R1_ALPHA; } else { cblend |= R200_TXC_ARG_B_ZERO | R200_TXC_COMP_ARG_B; ablend |= R200_TXA_ARG_B_ZERO | R200_TXA_COMP_ARG_B; } OUT_RING_REG(R200_PP_TXCBLEND_0, cblend); OUT_RING_REG(R200_PP_TXCBLEND2_0, R200_TXC_CLAMP_0_1 | R200_TXC_OUTPUT_REG_R0); OUT_RING_REG(R200_PP_TXABLEND_0, ablend); OUT_RING_REG(R200_PP_TXABLEND2_0, R200_TXA_CLAMP_0_1 | R200_TXA_OUTPUT_REG_R0); /* Op operator. */ blendcntl = RADEONGetBlendCntl(op, pMaskPicture, pDstPicture->format); OUT_RING_REG(RADEON_RB3D_BLENDCNTL, blendcntl); OUT_RING_REG(RADEON_RE_WIDTH_HEIGHT, (((pDst->drawable.width - 1) << RADEON_RE_WIDTH_SHIFT) | ((pDst->drawable.height - 1) << RADEON_RE_HEIGHT_SHIFT))); ADVANCE_RING(); return TRUE; } static Bool R300CheckCompositeTexture(PicturePtr pPict, PicturePtr pDstPict, int op, int unit, Bool is_r500) { unsigned int repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; int i; for (i = 0; i < sizeof(R300TexFormats) / sizeof(R300TexFormats[0]); i++) { if (R300TexFormats[i].fmt == pPict->format) break; } if (i == sizeof(R300TexFormats) / sizeof(R300TexFormats[0])) RADEON_FALLBACK(("Unsupported picture format 0x%x\n", (int)pPict->format)); if (pPict->pDrawable && !RADEONCheckTexturePOT(pPict, unit == 0)) { #if 0 struct radeon_exa_pixmap_priv *driver_priv; PixmapPtr pPix; pPix = RADEONGetDrawablePixmap(pPict->pDrawable); driver_priv = exaGetPixmapDriverPrivate(pPix); //TODOradeon_bufmgr_gem_force_gtt(driver_priv->bo); #endif return FALSE; } if (pPict->filter != PictFilterNearest && pPict->filter != PictFilterBilinear) RADEON_FALLBACK(("Unsupported filter 0x%x\n", pPict->filter)); /* for REPEAT_NONE, Render semantics are that sampling outside the source * picture results in alpha=0 pixels. We can implement this with a border color * *if* our source texture has an alpha channel, otherwise we need to fall * back. If we're not transformed then we hope that upper layers have clipped * rendering to the bounds of the source drawable, in which case it doesn't * matter. I have not, however, verified that the X server always does such * clipping. */ if (pPict->transform != 0 && repeatType == RepeatNone && PICT_FORMAT_A(pPict->format) == 0) { if (!(((op == PictOpSrc) || (op == PictOpClear)) && (PICT_FORMAT_A(pDstPict->format) == 0))) RADEON_FALLBACK(("REPEAT_NONE unsupported for transformed xRGB source\n")); } if (!radeon_transform_is_affine_or_scaled(pPict->transform)) RADEON_FALLBACK(("non-affine transforms not supported\n")); return TRUE; } static Bool R300TextureSetup(PicturePtr pPict, PixmapPtr pPix, int unit) { RINFO_FROM_SCREEN(pPix->drawable.pScreen); uint32_t txfilter, txformat0, txformat1, txoffset, txpitch, us_format = 0; int w, h; int i, pixel_shift, out_size = 6; unsigned int repeatType; struct radeon_exa_pixmap_priv *driver_priv; TRACE; if (pPict->pDrawable) { w = pPict->pDrawable->width; h = pPict->pDrawable->height; repeatType = pPict->repeat ? pPict->repeatType : RepeatNone; } else { w = h = 1; repeatType = RepeatNormal; } txpitch = exaGetPixmapPitch(pPix); txoffset = 0; if ((txpitch & 0x1f) != 0) RADEON_FALLBACK(("Bad texture pitch 0x%x\n", (int)txpitch)); /* TXPITCH = pixels (texels) per line - 1 */ pixel_shift = pPix->drawable.bitsPerPixel >> 4; txpitch >>= pixel_shift; txpitch -= 1; if (RADEONPixmapIsColortiled(pPix)) txoffset |= R300_MACRO_TILE; for (i = 0; i < sizeof(R300TexFormats) / sizeof(R300TexFormats[0]); i++) { if (R300TexFormats[i].fmt == pPict->format) break; } txformat1 = R300TexFormats[i].card_fmt; if (IS_R300_3D) { if ((unit == 0) && info->accel_state->msk_pic) txformat1 |= R300_TX_FORMAT_CACHE_HALF_REGION_0; else if (unit == 1) txformat1 |= R300_TX_FORMAT_CACHE_HALF_REGION_1; } txformat0 = ((((w - 1) & 0x7ff) << R300_TXWIDTH_SHIFT) | (((h - 1) & 0x7ff) << R300_TXHEIGHT_SHIFT)); if (IS_R500_3D && ((w - 1) & 0x800)) txpitch |= R500_TXWIDTH_11; if (IS_R500_3D && ((h - 1) & 0x800)) txpitch |= R500_TXHEIGHT_11; if (info->ChipFamily == CHIP_FAMILY_R520) { unsigned us_width = (w - 1) & 0x7ff; unsigned us_height = (h - 1) & 0x7ff; unsigned us_depth = 0; if (w > 2048) { us_width = (0x7ff + us_width) >> 1; us_depth |= 0x0d; } if (h > 2048) { us_height = (0x7ff + us_height) >> 1; us_depth |= 0x0e; } us_format = (us_width << R300_TXWIDTH_SHIFT) | (us_height << R300_TXHEIGHT_SHIFT) | (us_depth << R300_TXDEPTH_SHIFT); out_size++; } /* Use TXPITCH instead of TXWIDTH for address computations: we could * omit this if there is no padding, but there is no apparent advantage * in doing so. */ txformat0 |= R300_TXPITCH_EN; txfilter = (unit << R300_TX_ID_SHIFT); switch (repeatType) { case RepeatNormal: if (unit != 0 || !info->accel_state->need_src_tile_x) txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_WRAP); else txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_GL); if (unit != 0 || !info->accel_state->need_src_tile_y) txfilter |= R300_TX_CLAMP_T(R300_TX_CLAMP_WRAP); else txfilter |= R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_GL); break; case RepeatPad: txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_LAST) | R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_LAST); break; case RepeatReflect: txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_MIRROR) | R300_TX_CLAMP_T(R300_TX_CLAMP_MIRROR); break; case RepeatNone: txfilter |= R300_TX_CLAMP_S(R300_TX_CLAMP_CLAMP_GL) | R300_TX_CLAMP_T(R300_TX_CLAMP_CLAMP_GL); break; } switch (pPict->filter) { case PictFilterNearest: txfilter |= (R300_TX_MAG_FILTER_NEAREST | R300_TX_MIN_FILTER_NEAREST); break; case PictFilterBilinear: txfilter |= (R300_TX_MAG_FILTER_LINEAR | R300_TX_MIN_FILTER_LINEAR); break; default: RADEON_FALLBACK(("Bad filter 0x%x\n", pPict->filter)); } if (repeatType == RepeatNone) out_size++; BEGIN_ACCEL_RELOC(out_size, 1); OUT_RING_REG(R300_TX_FILTER0_0 + (unit * 4), txfilter); OUT_RING_REG(R300_TX_FILTER1_0 + (unit * 4), 0); OUT_RING_REG(R300_TX_FORMAT0_0 + (unit * 4), txformat0); OUT_RING_REG(R300_TX_FORMAT1_0 + (unit * 4), txformat1); OUT_RING_REG(R300_TX_FORMAT2_0 + (unit * 4), txpitch); EMIT_READ_OFFSET((R300_TX_OFFSET_0 + (unit * 4)), txoffset, pPix); if (repeatType == RepeatNone) OUT_RING_REG(R300_TX_BORDER_COLOR_0 + (unit * 4), 0); if (info->ChipFamily == CHIP_FAMILY_R520) OUT_RING_REG(R500_US_FORMAT0_0 + (unit * 4), us_format); ADVANCE_RING(); if (pPict->transform != 0) { info->accel_state->is_transform[unit] = TRUE; info->accel_state->transform[unit] = pPict->transform; /* setup the PVS consts */ if (info->accel_state->has_tcl) { info->accel_state->texW[unit] = 1; info->accel_state->texH[unit] = 1; BEGIN_RING(2*9); if (IS_R300_3D) OUT_RING_REG(R300_VAP_PVS_VECTOR_INDX_REG, R300_PVS_VECTOR_CONST_INDEX(unit * 2)); else OUT_RING_REG(R300_VAP_PVS_VECTOR_INDX_REG, R500_PVS_VECTOR_CONST_INDEX(unit * 2)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, F_TO_DW(xFixedToFloat(pPict->transform->matrix[0][0]))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, F_TO_DW(xFixedToFloat(pPict->transform->matrix[0][1]))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, F_TO_DW(xFixedToFloat(pPict->transform->matrix[0][2]))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, F_TO_DW(1.0/w)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, F_TO_DW(xFixedToFloat(pPict->transform->matrix[1][0]))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, F_TO_DW(xFixedToFloat(pPict->transform->matrix[1][1]))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, F_TO_DW(xFixedToFloat(pPict->transform->matrix[1][2]))); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, F_TO_DW(1.0/h)); ADVANCE_RING(); } else { info->accel_state->texW[unit] = w; info->accel_state->texH[unit] = h; } } else { info->accel_state->is_transform[unit] = FALSE; /* setup the PVS consts */ if (info->accel_state->has_tcl) { info->accel_state->texW[unit] = 1; info->accel_state->texH[unit] = 1; BEGIN_RING(2*9); if (IS_R300_3D) OUT_RING_REG(R300_VAP_PVS_VECTOR_INDX_REG, R300_PVS_VECTOR_CONST_INDEX(unit * 2)); else OUT_RING_REG(R300_VAP_PVS_VECTOR_INDX_REG, R500_PVS_VECTOR_CONST_INDEX(unit * 2)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, F_TO_DW(1.0)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, F_TO_DW(0.0)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, F_TO_DW(0.0)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, F_TO_DW(1.0/w)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, F_TO_DW(0.0)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, F_TO_DW(1.0)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, F_TO_DW(0.0)); OUT_RING_REG(R300_VAP_PVS_VECTOR_DATA_REG, F_TO_DW(1.0/h)); ADVANCE_RING(); } else { info->accel_state->texW[unit] = w; info->accel_state->texH[unit] = h; } } return TRUE; } static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, PicturePtr pDstPicture) { uint32_t tmp1; ScreenPtr pScreen = pDstPicture->pDrawable->pScreen; PixmapPtr pSrcPixmap, pDstPixmap; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); int max_tex_w, max_tex_h, max_dst_w, max_dst_h; TRACE; /* Check for unsupported compositing operations. */ if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0])) RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op)); if (IS_R500_3D) { max_tex_w = 4096; max_tex_h = 4096; max_dst_w = 4096; max_dst_h = 4096; } else { max_tex_w = 2048; max_tex_h = 2048; if (IS_R400_3D) { max_dst_w = 4021; max_dst_h = 4021; } else { max_dst_w = 2560; max_dst_h = 2560; } } pDstPixmap = RADEONGetDrawablePixmap(pDstPicture->pDrawable); if (pDstPixmap->drawable.width > max_dst_w || pDstPixmap->drawable.height > max_dst_h) { RADEON_FALLBACK(("Dest w/h too large (%d,%d).\n", pDstPixmap->drawable.width, pDstPixmap->drawable.height)); } if (pSrcPicture->pDrawable) { pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable); if (pSrcPixmap->drawable.width > max_tex_w || pSrcPixmap->drawable.height > max_tex_h) { RADEON_FALLBACK(("Source w/h too large (%d,%d).\n", pSrcPixmap->drawable.width, pSrcPixmap->drawable.height)); } } else if (pSrcPicture->pSourcePict->type != SourcePictTypeSolidFill) RADEON_FALLBACK(("Gradient pictures not supported yet\n")); if (pMaskPicture) { PixmapPtr pMaskPixmap; if (pMaskPicture->pDrawable) { pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); if (pMaskPixmap->drawable.width > max_tex_w || pMaskPixmap->drawable.height > max_tex_h) { RADEON_FALLBACK(("Mask w/h too large (%d,%d).\n", pMaskPixmap->drawable.width, pMaskPixmap->drawable.height)); } } else if (pMaskPicture->pSourcePict->type != SourcePictTypeSolidFill) RADEON_FALLBACK(("Gradient pictures not supported yet\n")); if (pMaskPicture->componentAlpha) { /* Check if it's component alpha that relies on a source alpha and * on the source value. We can only get one of those into the * single source value that we get to blend with. */ if (RadeonBlendOp[op].src_alpha && (RadeonBlendOp[op].blend_cntl & RADEON_SRC_BLEND_MASK) != RADEON_SRC_BLEND_GL_ZERO) { RADEON_FALLBACK(("Component alpha not supported with source " "alpha and source value blending.\n")); } } if (!R300CheckCompositeTexture(pMaskPicture, pDstPicture, op, 1, IS_R500_3D)) return FALSE; } if (!R300CheckCompositeTexture(pSrcPicture, pDstPicture, op, 0, IS_R500_3D)) return FALSE; if (!R300GetDestFormat(pDstPicture, &tmp1)) return FALSE; return TRUE; } static Bool R300PrepareComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, PicturePtr pDstPicture, PixmapPtr pSrc, PixmapPtr pMask, PixmapPtr pDst) { ScreenPtr pScreen = pDst->drawable.pScreen; RINFO_FROM_SCREEN(pScreen); uint32_t dst_format, dst_pitch; uint32_t txenable, colorpitch; uint32_t blendcntl, output_fmt; uint32_t src_color, src_alpha; uint32_t mask_color, mask_alpha; int pixel_shift; struct radeon_exa_pixmap_priv *driver_priv; TRACE; if (!R300GetDestFormat(pDstPicture, &dst_format)) return FALSE; pixel_shift = pDst->drawable.bitsPerPixel >> 4; dst_pitch = exaGetPixmapPitch(pDst); colorpitch = dst_pitch >> pixel_shift; if (RADEONPixmapIsColortiled(pDst)) colorpitch |= R300_COLORTILE; colorpitch |= dst_format; if (((dst_pitch >> pixel_shift) & 0x7) != 0) RADEON_FALLBACK(("Bad destination pitch 0x%x\n", (int)dst_pitch)); if (!pSrc) { pSrc = RADEONSolidPixmap(pScreen, cpu_to_le32(pSrcPicture->pSourcePict->solidFill.color)); if (!pSrc) RADEON_FALLBACK(("Failed to create solid scratch pixmap\n")); } if (!RADEONSetupSourceTile(pSrcPicture, pSrc, TRUE, FALSE)) return FALSE; if (pMaskPicture && !pMask) { pMask = RADEONSolidPixmap(pScreen, cpu_to_le32(pMaskPicture->pSourcePict->solidFill.color)); if (!pMask) { if (!pSrcPicture->pDrawable) pScreen->DestroyPixmap(pSrc); RADEON_FALLBACK(("Failed to create solid scratch pixmap\n")); } } RADEONPrepareCompositeCS(op, pSrcPicture, pMaskPicture, pDstPicture, pSrc, pMask, pDst); /* have to execute switch after doing buffer sizing check as the latter flushes */ RADEON_SWITCH_TO_3D(); if (!R300TextureSetup(pSrcPicture, pSrc, 0)) return FALSE; txenable = R300_TEX_0_ENABLE; if (pMask != NULL) { if (!R300TextureSetup(pMaskPicture, pMask, 1)) return FALSE; txenable |= R300_TEX_1_ENABLE; } else { info->accel_state->is_transform[1] = FALSE; } /* setup the VAP */ if (info->accel_state->has_tcl) { if (pMask) BEGIN_RING(2*10); else BEGIN_RING(2*9); OUT_RING_REG(R300_VAP_PVS_STATE_FLUSH_REG, 0); } else { if (pMask) BEGIN_RING(2*6); else BEGIN_RING(2*5); } /* These registers define the number, type, and location of data submitted * to the PVS unit of GA input (when PVS is disabled) * DST_VEC_LOC is the slot in the PVS input vector memory when PVS/TCL is * enabled. This memory provides the imputs to the vertex shader program * and ordering is not important. When PVS/TCL is disabled, this field maps * directly to the GA input memory and the order is signifigant. In * PVS_BYPASS mode the order is as follows: * Position * Point Size * Color 0-3 * Textures 0-7 * Fog */ if (pMask) { OUT_RING_REG(R300_VAP_PROG_STREAM_CNTL_0, ((R300_DATA_TYPE_FLOAT_2 << R300_DATA_TYPE_0_SHIFT) | (0 << R300_SKIP_DWORDS_0_SHIFT) | (0 << R300_DST_VEC_LOC_0_SHIFT) | R300_SIGNED_0 | (R300_DATA_TYPE_FLOAT_2 << R300_DATA_TYPE_1_SHIFT) | (0 << R300_SKIP_DWORDS_1_SHIFT) | (6 << R300_DST_VEC_LOC_1_SHIFT) | R300_SIGNED_1)); OUT_RING_REG(R300_VAP_PROG_STREAM_CNTL_1, ((R300_DATA_TYPE_FLOAT_2 << R300_DATA_TYPE_2_SHIFT) | (0 << R300_SKIP_DWORDS_2_SHIFT) | (7 << R300_DST_VEC_LOC_2_SHIFT) | R300_LAST_VEC_2 | R300_SIGNED_2)); } else OUT_RING_REG(R300_VAP_PROG_STREAM_CNTL_0, ((R300_DATA_TYPE_FLOAT_2 << R300_DATA_TYPE_0_SHIFT) | (0 << R300_SKIP_DWORDS_0_SHIFT) | (0 << R300_DST_VEC_LOC_0_SHIFT) | R300_SIGNED_0 | (R300_DATA_TYPE_FLOAT_2 << R300_DATA_TYPE_1_SHIFT) | (0 << R300_SKIP_DWORDS_1_SHIFT) | (6 << R300_DST_VEC_LOC_1_SHIFT) | R300_LAST_VEC_1 | R300_SIGNED_1)); /* load the vertex shader * We pre-load vertex programs in RADEONInit3DEngine(): * - exa * - Xv * - Xv bicubic * Here we select the offset of the vertex program we want to use */ if (info->accel_state->has_tcl) { if (pMask) { /* consts used by vertex shaders */ OUT_RING_REG(R300_VAP_PVS_CONST_CNTL, (R300_PVS_CONST_BASE_OFFSET(0) | R300_PVS_MAX_CONST_ADDR(3))); OUT_RING_REG(R300_VAP_PVS_CODE_CNTL_0, ((0 << R300_PVS_FIRST_INST_SHIFT) | (8 << R300_PVS_XYZW_VALID_INST_SHIFT) | (8 << R300_PVS_LAST_INST_SHIFT))); OUT_RING_REG(R300_VAP_PVS_CODE_CNTL_1, (8 << R300_PVS_LAST_VTX_SRC_INST_SHIFT)); } else { /* consts used by vertex shaders */ OUT_RING_REG(R300_VAP_PVS_CONST_CNTL, (R300_PVS_CONST_BASE_OFFSET(0) | R300_PVS_MAX_CONST_ADDR(3))); OUT_RING_REG(R300_VAP_PVS_CODE_CNTL_0, ((0 << R300_PVS_FIRST_INST_SHIFT) | (4 << R300_PVS_XYZW_VALID_INST_SHIFT) | (4 << R300_PVS_LAST_INST_SHIFT))); OUT_RING_REG(R300_VAP_PVS_CODE_CNTL_1, (4 << R300_PVS_LAST_VTX_SRC_INST_SHIFT)); } } /* Position and one or two sets of 2 texture coordinates */ OUT_RING_REG(R300_VAP_OUT_VTX_FMT_0, R300_VTX_POS_PRESENT); if (pMask) OUT_RING_REG(R300_VAP_OUT_VTX_FMT_1, ((2 << R300_TEX_0_COMP_CNT_SHIFT) | (2 << R300_TEX_1_COMP_CNT_SHIFT))); else OUT_RING_REG(R300_VAP_OUT_VTX_FMT_1, (2 << R300_TEX_0_COMP_CNT_SHIFT)); OUT_RING_REG(R300_TX_INVALTAGS, 0x0); OUT_RING_REG(R300_TX_ENABLE, txenable); ADVANCE_RING(); /* shader output swizzling */ switch (pDstPicture->format) { case PICT_a8r8g8b8: case PICT_x8r8g8b8: default: output_fmt = (R300_OUT_FMT_C4_8 | R300_OUT_FMT_C0_SEL_BLUE | R300_OUT_FMT_C1_SEL_GREEN | R300_OUT_FMT_C2_SEL_RED | R300_OUT_FMT_C3_SEL_ALPHA); break; case PICT_a8b8g8r8: case PICT_x8b8g8r8: output_fmt = (R300_OUT_FMT_C4_8 | R300_OUT_FMT_C0_SEL_RED | R300_OUT_FMT_C1_SEL_GREEN | R300_OUT_FMT_C2_SEL_BLUE | R300_OUT_FMT_C3_SEL_ALPHA); break; case PICT_b8g8r8a8: case PICT_b8g8r8x8: output_fmt = (R300_OUT_FMT_C4_8 | R300_OUT_FMT_C0_SEL_ALPHA | R300_OUT_FMT_C1_SEL_RED | R300_OUT_FMT_C2_SEL_GREEN | R300_OUT_FMT_C3_SEL_BLUE); break; case PICT_a8: output_fmt = (R300_OUT_FMT_C4_8 | R300_OUT_FMT_C0_SEL_ALPHA); break; } /* setup pixel shader */ if (IS_R300_3D) { if (PICT_FORMAT_RGB(pSrcPicture->format) == 0) src_color = R300_ALU_RGB_0_0; else src_color = R300_ALU_RGB_SRC0_RGB; if (PICT_FORMAT_A(pSrcPicture->format) == 0) src_alpha = R300_ALU_ALPHA_1_0; else src_alpha = R300_ALU_ALPHA_SRC0_A; if (pMask) { if (pMaskPicture->componentAlpha) { if (RadeonBlendOp[op].src_alpha) { if (PICT_FORMAT_A(pSrcPicture->format) == 0) src_color = R300_ALU_RGB_1_0; else src_color = R300_ALU_RGB_SRC0_AAA; } else src_color = R300_ALU_RGB_SRC0_RGB; mask_color = R300_ALU_RGB_SRC1_RGB; } else { if (PICT_FORMAT_A(pMaskPicture->format) == 0) mask_color = R300_ALU_RGB_1_0; else mask_color = R300_ALU_RGB_SRC1_AAA; } if (PICT_FORMAT_A(pMaskPicture->format) == 0) mask_alpha = R300_ALU_ALPHA_1_0; else mask_alpha = R300_ALU_ALPHA_SRC1_A; } else { mask_color = R300_ALU_RGB_1_0; mask_alpha = R300_ALU_ALPHA_1_0; } /* setup the rasterizer, load FS */ if (pMask) { BEGIN_RING(2*16); /* 4 components: 2 for tex0, 2 for tex1 */ OUT_RING_REG(R300_RS_COUNT, ((4 << R300_RS_COUNT_IT_COUNT_SHIFT) | R300_RS_COUNT_HIRES_EN)); /* R300_INST_COUNT_RS - highest RS instruction used */ OUT_RING_REG(R300_RS_INST_COUNT, R300_INST_COUNT_RS(1)); OUT_RING_REG(R300_US_CODE_OFFSET, (R300_ALU_CODE_OFFSET(0) | R300_ALU_CODE_SIZE(0) | R300_TEX_CODE_OFFSET(0) | R300_TEX_CODE_SIZE(1))); OUT_RING_REG(R300_US_CODE_ADDR_3, (R300_ALU_START(0) | R300_ALU_SIZE(0) | R300_TEX_START(0) | R300_TEX_SIZE(1) | R300_RGBA_OUT)); } else { BEGIN_RING(2*15); /* 2 components: 2 for tex0 */ OUT_RING_REG(R300_RS_COUNT, ((2 << R300_RS_COUNT_IT_COUNT_SHIFT) | R300_RS_COUNT_HIRES_EN)); OUT_RING_REG(R300_RS_INST_COUNT, R300_INST_COUNT_RS(0)); OUT_RING_REG(R300_US_CODE_OFFSET, (R300_ALU_CODE_OFFSET(0) | R300_ALU_CODE_SIZE(0) | R300_TEX_CODE_OFFSET(0) | R300_TEX_CODE_SIZE(0))); OUT_RING_REG(R300_US_CODE_ADDR_3, (R300_ALU_START(0) | R300_ALU_SIZE(0) | R300_TEX_START(0) | R300_TEX_SIZE(0) | R300_RGBA_OUT)); } OUT_RING_REG(R300_US_CONFIG, (0 << R300_NLEVEL_SHIFT) | R300_FIRST_TEX); OUT_RING_REG(R300_US_CODE_ADDR_0, (R300_ALU_START(0) | R300_ALU_SIZE(0) | R300_TEX_START(0) | R300_TEX_SIZE(0))); OUT_RING_REG(R300_US_CODE_ADDR_1, (R300_ALU_START(0) | R300_ALU_SIZE(0) | R300_TEX_START(0) | R300_TEX_SIZE(0))); OUT_RING_REG(R300_US_CODE_ADDR_2, (R300_ALU_START(0) | R300_ALU_SIZE(0) | R300_TEX_START(0) | R300_TEX_SIZE(0))); OUT_RING_REG(R300_US_PIXSIZE, 1); /* highest temp used */ /* shader output swizzling */ OUT_RING_REG(R300_US_OUT_FMT_0, output_fmt); /* tex inst for src texture */ OUT_RING_REG(R300_US_TEX_INST(0), (R300_TEX_SRC_ADDR(0) | R300_TEX_DST_ADDR(0) | R300_TEX_ID(0) | R300_TEX_INST(R300_TEX_INST_LD))); if (pMask) { /* tex inst for mask texture */ OUT_RING_REG(R300_US_TEX_INST(1), (R300_TEX_SRC_ADDR(1) | R300_TEX_DST_ADDR(1) | R300_TEX_ID(1) | R300_TEX_INST(R300_TEX_INST_LD))); } /* RGB inst * temp addresses for texture inputs * ALU_RGB_ADDR0 is src tex (temp 0) * ALU_RGB_ADDR1 is mask tex (temp 1) * R300_ALU_RGB_OMASK - output components to write * R300_ALU_RGB_TARGET_A - render target */ OUT_RING_REG(R300_US_ALU_RGB_ADDR(0), (R300_ALU_RGB_ADDR0(0) | R300_ALU_RGB_ADDR1(1) | R300_ALU_RGB_ADDR2(0) | R300_ALU_RGB_ADDRD(0) | R300_ALU_RGB_OMASK((R300_ALU_RGB_MASK_R | R300_ALU_RGB_MASK_G | R300_ALU_RGB_MASK_B)) | R300_ALU_RGB_TARGET_A)); /* RGB inst * ALU operation */ OUT_RING_REG(R300_US_ALU_RGB_INST(0), (R300_ALU_RGB_SEL_A(src_color) | R300_ALU_RGB_MOD_A(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_SEL_B(mask_color) | R300_ALU_RGB_MOD_B(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_SEL_C(R300_ALU_RGB_0_0) | R300_ALU_RGB_MOD_C(R300_ALU_RGB_MOD_NOP) | R300_ALU_RGB_OP(R300_ALU_RGB_OP_MAD) | R300_ALU_RGB_OMOD(R300_ALU_RGB_OMOD_NONE) | R300_ALU_RGB_CLAMP)); /* Alpha inst * temp addresses for texture inputs * ALU_ALPHA_ADDR0 is src tex (0) * ALU_ALPHA_ADDR1 is mask tex (1) * R300_ALU_ALPHA_OMASK - output components to write * R300_ALU_ALPHA_TARGET_A - render target */ OUT_RING_REG(R300_US_ALU_ALPHA_ADDR(0), (R300_ALU_ALPHA_ADDR0(0) | R300_ALU_ALPHA_ADDR1(1) | R300_ALU_ALPHA_ADDR2(0) | R300_ALU_ALPHA_ADDRD(0) | R300_ALU_ALPHA_OMASK(R300_ALU_ALPHA_MASK_A) | R300_ALU_ALPHA_TARGET_A | R300_ALU_ALPHA_OMASK_W(R300_ALU_ALPHA_MASK_NONE))); /* Alpha inst * ALU operation */ OUT_RING_REG(R300_US_ALU_ALPHA_INST(0), (R300_ALU_ALPHA_SEL_A(src_alpha) | R300_ALU_ALPHA_MOD_A(R300_ALU_ALPHA_MOD_NOP) | R300_ALU_ALPHA_SEL_B(mask_alpha) | R300_ALU_ALPHA_MOD_B(R300_ALU_ALPHA_MOD_NOP) | R300_ALU_ALPHA_SEL_C(R300_ALU_ALPHA_0_0) | R300_ALU_ALPHA_MOD_C(R300_ALU_ALPHA_MOD_NOP) | R300_ALU_ALPHA_OP(R300_ALU_ALPHA_OP_MAD) | R300_ALU_ALPHA_OMOD(R300_ALU_ALPHA_OMOD_NONE) | R300_ALU_ALPHA_CLAMP)); ADVANCE_RING(); } else { if (PICT_FORMAT_RGB(pSrcPicture->format) == 0) src_color = (R500_ALU_RGB_R_SWIZ_A_0 | R500_ALU_RGB_G_SWIZ_A_0 | R500_ALU_RGB_B_SWIZ_A_0); else src_color = (R500_ALU_RGB_R_SWIZ_A_R | R500_ALU_RGB_G_SWIZ_A_G | R500_ALU_RGB_B_SWIZ_A_B); if (PICT_FORMAT_A(pSrcPicture->format) == 0) src_alpha = R500_ALPHA_SWIZ_A_1; else src_alpha = R500_ALPHA_SWIZ_A_A; if (pMask) { if (pMaskPicture->componentAlpha) { if (RadeonBlendOp[op].src_alpha) { if (PICT_FORMAT_A(pSrcPicture->format) == 0) src_color = (R500_ALU_RGB_R_SWIZ_A_1 | R500_ALU_RGB_G_SWIZ_A_1 | R500_ALU_RGB_B_SWIZ_A_1); else src_color = (R500_ALU_RGB_R_SWIZ_A_A | R500_ALU_RGB_G_SWIZ_A_A | R500_ALU_RGB_B_SWIZ_A_A); } else src_color = (R500_ALU_RGB_R_SWIZ_A_R | R500_ALU_RGB_G_SWIZ_A_G | R500_ALU_RGB_B_SWIZ_A_B); mask_color = (R500_ALU_RGB_R_SWIZ_B_R | R500_ALU_RGB_G_SWIZ_B_G | R500_ALU_RGB_B_SWIZ_B_B); } else { if (PICT_FORMAT_A(pMaskPicture->format) == 0) mask_color = (R500_ALU_RGB_R_SWIZ_B_1 | R500_ALU_RGB_G_SWIZ_B_1 | R500_ALU_RGB_B_SWIZ_B_1); else mask_color = (R500_ALU_RGB_R_SWIZ_B_A | R500_ALU_RGB_G_SWIZ_B_A | R500_ALU_RGB_B_SWIZ_B_A); } if (PICT_FORMAT_A(pMaskPicture->format) == 0) mask_alpha = R500_ALPHA_SWIZ_B_1; else mask_alpha = R500_ALPHA_SWIZ_B_A; } else { mask_color = (R500_ALU_RGB_R_SWIZ_B_1 | R500_ALU_RGB_G_SWIZ_B_1 | R500_ALU_RGB_B_SWIZ_B_1); mask_alpha = R500_ALPHA_SWIZ_B_1; } BEGIN_RING(2*7); if (pMask) { /* 4 components: 2 for tex0, 2 for tex1 */ OUT_RING_REG(R300_RS_COUNT, ((4 << R300_RS_COUNT_IT_COUNT_SHIFT) | R300_RS_COUNT_HIRES_EN)); /* 2 RS instructions: 1 for tex0 (src), 1 for tex1 (mask) */ OUT_RING_REG(R300_RS_INST_COUNT, R300_INST_COUNT_RS(1)); OUT_RING_REG(R500_US_CODE_ADDR, (R500_US_CODE_START_ADDR(0) | R500_US_CODE_END_ADDR(2))); OUT_RING_REG(R500_US_CODE_RANGE, (R500_US_CODE_RANGE_ADDR(0) | R500_US_CODE_RANGE_SIZE(2))); OUT_RING_REG(R500_US_CODE_OFFSET, 0); } else { OUT_RING_REG(R300_RS_COUNT, ((2 << R300_RS_COUNT_IT_COUNT_SHIFT) | R300_RS_COUNT_HIRES_EN)); OUT_RING_REG(R300_RS_INST_COUNT, R300_INST_COUNT_RS(0)); OUT_RING_REG(R500_US_CODE_ADDR, (R500_US_CODE_START_ADDR(0) | R500_US_CODE_END_ADDR(1))); OUT_RING_REG(R500_US_CODE_RANGE, (R500_US_CODE_RANGE_ADDR(0) | R500_US_CODE_RANGE_SIZE(1))); OUT_RING_REG(R500_US_CODE_OFFSET, 0); } OUT_RING_REG(R300_US_PIXSIZE, 1); /* highest temp used */ OUT_RING_REG(R300_US_OUT_FMT_0, output_fmt); ADVANCE_RING(); if (pMask) { BEGIN_RING(2*19); OUT_RING_REG(R500_GA_US_VECTOR_INDEX, R500_US_VECTOR_INST_INDEX(0)); /* tex inst for src texture */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_TEX | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B | R500_INST_ALPHA_WMASK | R500_INST_RGB_CLAMP | R500_INST_ALPHA_CLAMP)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_ID(0) | R500_TEX_INST_LD | R500_TEX_IGNORE_UNCOVERED)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_SRC_ADDR(0) | R500_TEX_SRC_S_SWIZ_R | R500_TEX_SRC_T_SWIZ_G | R500_TEX_DST_ADDR(0) | R500_TEX_DST_R_SWIZ_R | R500_TEX_DST_G_SWIZ_G | R500_TEX_DST_B_SWIZ_B | R500_TEX_DST_A_SWIZ_A)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_DX_ADDR(0) | R500_DX_S_SWIZ_R | R500_DX_T_SWIZ_R | R500_DX_R_SWIZ_R | R500_DX_Q_SWIZ_R | R500_DY_ADDR(0) | R500_DY_S_SWIZ_R | R500_DY_T_SWIZ_R | R500_DY_R_SWIZ_R | R500_DY_Q_SWIZ_R)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); /* tex inst for mask texture */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_TEX | R500_INST_TEX_SEM_WAIT | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B | R500_INST_ALPHA_WMASK | R500_INST_RGB_CLAMP | R500_INST_ALPHA_CLAMP)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_ID(1) | R500_TEX_INST_LD | R500_TEX_SEM_ACQUIRE | R500_TEX_IGNORE_UNCOVERED)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_SRC_ADDR(1) | R500_TEX_SRC_S_SWIZ_R | R500_TEX_SRC_T_SWIZ_G | R500_TEX_DST_ADDR(1) | R500_TEX_DST_R_SWIZ_R | R500_TEX_DST_G_SWIZ_G | R500_TEX_DST_B_SWIZ_B | R500_TEX_DST_A_SWIZ_A)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_DX_ADDR(1) | R500_DX_S_SWIZ_R | R500_DX_T_SWIZ_R | R500_DX_R_SWIZ_R | R500_DX_Q_SWIZ_R | R500_DY_ADDR(1) | R500_DY_S_SWIZ_R | R500_DY_T_SWIZ_R | R500_DY_R_SWIZ_R | R500_DY_Q_SWIZ_R)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); } else { BEGIN_RING(2*13); OUT_RING_REG(R500_GA_US_VECTOR_INDEX, R500_US_VECTOR_INST_INDEX(0)); /* tex inst for src texture */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_TEX | R500_INST_TEX_SEM_WAIT | R500_INST_RGB_WMASK_R | R500_INST_RGB_WMASK_G | R500_INST_RGB_WMASK_B | R500_INST_ALPHA_WMASK | R500_INST_RGB_CLAMP | R500_INST_ALPHA_CLAMP)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_ID(0) | R500_TEX_INST_LD | R500_TEX_SEM_ACQUIRE | R500_TEX_IGNORE_UNCOVERED)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_TEX_SRC_ADDR(0) | R500_TEX_SRC_S_SWIZ_R | R500_TEX_SRC_T_SWIZ_G | R500_TEX_DST_ADDR(0) | R500_TEX_DST_R_SWIZ_R | R500_TEX_DST_G_SWIZ_G | R500_TEX_DST_B_SWIZ_B | R500_TEX_DST_A_SWIZ_A)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_DX_ADDR(0) | R500_DX_S_SWIZ_R | R500_DX_T_SWIZ_R | R500_DX_R_SWIZ_R | R500_DX_Q_SWIZ_R | R500_DY_ADDR(0) | R500_DY_S_SWIZ_R | R500_DY_T_SWIZ_R | R500_DY_R_SWIZ_R | R500_DY_Q_SWIZ_R)); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); OUT_RING_REG(R500_GA_US_VECTOR_DATA, 0x00000000); } /* ALU inst */ /* *_OMASK* - output component write mask */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_INST_TYPE_OUT | R500_INST_TEX_SEM_WAIT | R500_INST_LAST | R500_INST_RGB_OMASK_R | R500_INST_RGB_OMASK_G | R500_INST_RGB_OMASK_B | R500_INST_ALPHA_OMASK | R500_INST_RGB_CLAMP | R500_INST_ALPHA_CLAMP)); /* ALU inst * temp addresses for texture inputs * RGB_ADDR0 is src tex (temp 0) * RGB_ADDR1 is mask tex (temp 1) */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_RGB_ADDR0(0) | R500_RGB_ADDR1(1) | R500_RGB_ADDR2(0))); /* ALU inst * temp addresses for texture inputs * ALPHA_ADDR0 is src tex (temp 0) * ALPHA_ADDR1 is mask tex (temp 1) */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_ADDR0(0) | R500_ALPHA_ADDR1(1) | R500_ALPHA_ADDR2(0))); /* R500_ALU_RGB_TARGET - RGB render target */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGB_SEL_A_SRC0 | src_color | R500_ALU_RGB_SEL_B_SRC1 | mask_color | R500_ALU_RGB_TARGET(0))); /* R500_ALPHA_RGB_TARGET - alpha render target */ OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALPHA_OP_MAD | R500_ALPHA_ADDRD(0) | R500_ALPHA_SEL_A_SRC0 | src_alpha | R500_ALPHA_SEL_B_SRC1 | mask_alpha | R500_ALPHA_TARGET(0))); OUT_RING_REG(R500_GA_US_VECTOR_DATA, (R500_ALU_RGBA_OP_MAD | R500_ALU_RGBA_ADDRD(0) | R500_ALU_RGBA_R_SWIZ_0 | R500_ALU_RGBA_G_SWIZ_0 | R500_ALU_RGBA_B_SWIZ_0 | R500_ALU_RGBA_A_SWIZ_0)); ADVANCE_RING(); } /* Clear out scissoring */ BEGIN_RING(2*2); if (IS_R300_3D) { OUT_RING_REG(R300_SC_SCISSOR0, ((1440 << R300_SCISSOR_X_SHIFT) | (1440 << R300_SCISSOR_Y_SHIFT))); OUT_RING_REG(R300_SC_SCISSOR1, (((pDst->drawable.width + 1440 - 1) << R300_SCISSOR_X_SHIFT) | ((pDst->drawable.height + 1440 - 1) << R300_SCISSOR_Y_SHIFT))); } else { OUT_RING_REG(R300_SC_SCISSOR0, ((0 << R300_SCISSOR_X_SHIFT) | (0 << R300_SCISSOR_Y_SHIFT))); OUT_RING_REG(R300_SC_SCISSOR1, (((pDst->drawable.width - 1) << R300_SCISSOR_X_SHIFT) | ((pDst->drawable.height - 1) << R300_SCISSOR_Y_SHIFT))); } ADVANCE_RING(); BEGIN_ACCEL_RELOC(3, 2); EMIT_WRITE_OFFSET(R300_RB3D_COLOROFFSET0, 0, pDst); EMIT_COLORPITCH(R300_RB3D_COLORPITCH0, colorpitch, pDst); blendcntl = RADEONGetBlendCntl(op, pMaskPicture, pDstPicture->format); OUT_RING_REG(R300_RB3D_BLENDCNTL, blendcntl | R300_ALPHA_BLEND_ENABLE | R300_READ_ENABLE); ADVANCE_RING(); BEGIN_RING(2*1); if (pMask) OUT_RING_REG(R300_VAP_VTX_SIZE, 6); else OUT_RING_REG(R300_VAP_VTX_SIZE, 4); ADVANCE_RING(); return TRUE; } static void RadeonFinishComposite(PixmapPtr pDst) { RINFO_FROM_SCREEN(pDst->drawable.pScreen); ENTER_DRAW(0); if (info->accel_state->draw_header) { if (info->ChipFamily < CHIP_FAMILY_R200) { info->accel_state->draw_header[0] = CP_PACKET3(RADEON_CP_PACKET3_3D_DRAW_IMMD, info->accel_state->num_vtx * info->accel_state->vtx_count + 1); info->accel_state->draw_header[2] = (RADEON_CP_VC_CNTL_PRIM_TYPE_RECT_LIST | RADEON_CP_VC_CNTL_PRIM_WALK_RING | RADEON_CP_VC_CNTL_MAOS_ENABLE | RADEON_CP_VC_CNTL_VTX_FMT_RADEON_MODE | (info->accel_state->num_vtx << RADEON_CP_VC_CNTL_NUM_SHIFT)); } else if (IS_R300_3D || IS_R500_3D) { info->accel_state->draw_header[0] = CP_PACKET3(R200_CP_PACKET3_3D_DRAW_IMMD_2, info->accel_state->num_vtx * info->accel_state->vtx_count); info->accel_state->draw_header[1] = (RADEON_CP_VC_CNTL_PRIM_TYPE_QUAD_LIST | RADEON_CP_VC_CNTL_PRIM_WALK_RING | (info->accel_state->num_vtx << RADEON_CP_VC_CNTL_NUM_SHIFT)); } else { info->accel_state->draw_header[0] = CP_PACKET3(R200_CP_PACKET3_3D_DRAW_IMMD_2, info->accel_state->num_vtx * info->accel_state->vtx_count); info->accel_state->draw_header[1] = (RADEON_CP_VC_CNTL_PRIM_TYPE_RECT_LIST | RADEON_CP_VC_CNTL_PRIM_WALK_RING | (info->accel_state->num_vtx << RADEON_CP_VC_CNTL_NUM_SHIFT)); } info->accel_state->draw_header = NULL; } if (IS_R300_3D || IS_R500_3D) { BEGIN_RING(2*3); OUT_RING_REG(R300_SC_CLIP_RULE, 0xAAAA); OUT_RING_REG(R300_RB3D_DSTCACHE_CTLSTAT, R300_RB3D_DC_FLUSH_ALL); } else BEGIN_RING(2*1); OUT_RING_REG(RADEON_WAIT_UNTIL, RADEON_WAIT_3D_IDLECLEAN); ADVANCE_RING(); LEAVE_DRAW(0); } static void RadeonDoneComposite(PixmapPtr pDst) { ScreenPtr pScreen = pDst->drawable.pScreen; RINFO_FROM_SCREEN(pScreen); struct radeon_accel_state *accel_state = info->accel_state; RadeonFinishComposite(pDst); if (!accel_state->src_pic->pDrawable) pScreen->DestroyPixmap(accel_state->src_pix); if (accel_state->msk_pic && !accel_state->msk_pic->pDrawable) pScreen->DestroyPixmap(accel_state->msk_pix); } #define VTX_OUT_MASK(_dstX, _dstY, _srcX, _srcY, _maskX, _maskY) \ do { \ OUT_RING(F_TO_DW(_dstX)); \ OUT_RING(F_TO_DW(_dstY)); \ OUT_RING(F_TO_DW(_srcX)); \ OUT_RING(F_TO_DW(_srcY)); \ OUT_RING(F_TO_DW(_maskX)); \ OUT_RING(F_TO_DW(_maskY)); \ } while (0) #define VTX_OUT(_dstX, _dstY, _srcX, _srcY) \ do { \ OUT_RING(F_TO_DW(_dstX)); \ OUT_RING(F_TO_DW(_dstY)); \ OUT_RING(F_TO_DW(_srcX)); \ OUT_RING(F_TO_DW(_srcY)); \ } while (0) static inline void transformPoint(PictTransform *transform, xPointFixed *point) { PictVector v; v.vector[0] = point->x; v.vector[1] = point->y; v.vector[2] = xFixed1; PictureTransformPoint(transform, &v); point->x = v.vector[0]; point->y = v.vector[1]; } static void RadeonCompositeTile(ScrnInfoPtr pScrn, RADEONInfoPtr info, PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, int w, int h) { int vtx_count; xPointFixed srcTopLeft, srcTopRight, srcBottomLeft, srcBottomRight; static xPointFixed maskTopLeft, maskTopRight, maskBottomLeft, maskBottomRight; ENTER_DRAW(0); /* ErrorF("RadeonComposite (%d,%d) (%d,%d) (%d,%d) (%d,%d)\n", srcX, srcY, maskX, maskY,dstX, dstY, w, h); */ if (CS_FULL(info->cs)) { RadeonFinishComposite(info->accel_state->dst_pix); radeon_cs_flush_indirect(pScrn); info->accel_state->exa->PrepareComposite(info->accel_state->composite_op, info->accel_state->src_pic, info->accel_state->msk_pic, info->accel_state->dst_pic, info->accel_state->src_pix, info->accel_state->msk_pix, info->accel_state->dst_pix); } srcTopLeft.x = IntToxFixed(srcX); srcTopLeft.y = IntToxFixed(srcY); srcTopRight.x = IntToxFixed(srcX + w); srcTopRight.y = IntToxFixed(srcY); srcBottomLeft.x = IntToxFixed(srcX); srcBottomLeft.y = IntToxFixed(srcY + h); srcBottomRight.x = IntToxFixed(srcX + w); srcBottomRight.y = IntToxFixed(srcY + h); if (info->accel_state->is_transform[0]) { if ((info->ChipFamily < CHIP_FAMILY_R300) || !info->accel_state->has_tcl) { transformPoint(info->accel_state->transform[0], &srcTopLeft); transformPoint(info->accel_state->transform[0], &srcTopRight); transformPoint(info->accel_state->transform[0], &srcBottomLeft); transformPoint(info->accel_state->transform[0], &srcBottomRight); } } if (info->accel_state->msk_pic) { maskTopLeft.x = IntToxFixed(maskX); maskTopLeft.y = IntToxFixed(maskY); maskTopRight.x = IntToxFixed(maskX + w); maskTopRight.y = IntToxFixed(maskY); maskBottomLeft.x = IntToxFixed(maskX); maskBottomLeft.y = IntToxFixed(maskY + h); maskBottomRight.x = IntToxFixed(maskX + w); maskBottomRight.y = IntToxFixed(maskY + h); if (info->accel_state->is_transform[1]) { if ((info->ChipFamily < CHIP_FAMILY_R300) || !info->accel_state->has_tcl) { transformPoint(info->accel_state->transform[1], &maskTopLeft); transformPoint(info->accel_state->transform[1], &maskTopRight); transformPoint(info->accel_state->transform[1], &maskBottomLeft); transformPoint(info->accel_state->transform[1], &maskBottomRight); } } vtx_count = 6; } else vtx_count = 4; if (info->accel_state->vsync) RADEONWaitForVLine(pScrn, pDst, radeon_pick_best_crtc(pScrn, FALSE, dstX, dstX + w, dstY, dstY + h), dstY, dstY + h); if (info->ChipFamily < CHIP_FAMILY_R200) { if (!info->accel_state->draw_header) { BEGIN_RING(3); info->accel_state->draw_header = info->cs->packets + info->cs->cdw; info->accel_state->num_vtx = 0; info->accel_state->vtx_count = vtx_count; OUT_RING(CP_PACKET3(RADEON_CP_PACKET3_3D_DRAW_IMMD, 3 * vtx_count + 1)); if (info->accel_state->msk_pic) OUT_RING(RADEON_CP_VC_FRMT_XY | RADEON_CP_VC_FRMT_ST0 | RADEON_CP_VC_FRMT_ST1); else OUT_RING(RADEON_CP_VC_FRMT_XY | RADEON_CP_VC_FRMT_ST0); OUT_RING(RADEON_CP_VC_CNTL_PRIM_TYPE_RECT_LIST | RADEON_CP_VC_CNTL_PRIM_WALK_RING | RADEON_CP_VC_CNTL_MAOS_ENABLE | RADEON_CP_VC_CNTL_VTX_FMT_RADEON_MODE | (3 << RADEON_CP_VC_CNTL_NUM_SHIFT)); ADVANCE_RING(); } info->accel_state->num_vtx += 3; BEGIN_RING(3 * vtx_count); } else if (IS_R300_3D || IS_R500_3D) { if (!info->accel_state->draw_header) { BEGIN_RING(2); info->accel_state->draw_header = info->cs->packets + info->cs->cdw; info->accel_state->num_vtx = 0; info->accel_state->vtx_count = vtx_count; OUT_RING(CP_PACKET3(R200_CP_PACKET3_3D_DRAW_IMMD_2, 4 * vtx_count)); OUT_RING(RADEON_CP_VC_CNTL_PRIM_TYPE_QUAD_LIST | RADEON_CP_VC_CNTL_PRIM_WALK_RING | (4 << RADEON_CP_VC_CNTL_NUM_SHIFT)); ADVANCE_RING(); } info->accel_state->num_vtx += 4; BEGIN_RING(4 * vtx_count); } else { if (!info->accel_state->draw_header) { BEGIN_RING(2); info->accel_state->draw_header = info->cs->packets + info->cs->cdw; info->accel_state->num_vtx = 0; info->accel_state->vtx_count = vtx_count; OUT_RING(CP_PACKET3(R200_CP_PACKET3_3D_DRAW_IMMD_2, 3 * vtx_count)); OUT_RING(RADEON_CP_VC_CNTL_PRIM_TYPE_RECT_LIST | RADEON_CP_VC_CNTL_PRIM_WALK_RING | (3 << RADEON_CP_VC_CNTL_NUM_SHIFT)); ADVANCE_RING(); } info->accel_state->num_vtx += 3; BEGIN_RING(3 * vtx_count); } if (info->accel_state->msk_pic) { if (IS_R300_3D || IS_R500_3D) { VTX_OUT_MASK((float)dstX, (float)dstY, xFixedToFloat(srcTopLeft.x) / info->accel_state->texW[0], xFixedToFloat(srcTopLeft.y) / info->accel_state->texH[0], xFixedToFloat(maskTopLeft.x) / info->accel_state->texW[1], xFixedToFloat(maskTopLeft.y) / info->accel_state->texH[1]); } VTX_OUT_MASK((float)dstX, (float)(dstY + h), xFixedToFloat(srcBottomLeft.x) / info->accel_state->texW[0], xFixedToFloat(srcBottomLeft.y) / info->accel_state->texH[0], xFixedToFloat(maskBottomLeft.x) / info->accel_state->texW[1], xFixedToFloat(maskBottomLeft.y) / info->accel_state->texH[1]); VTX_OUT_MASK((float)(dstX + w), (float)(dstY + h), xFixedToFloat(srcBottomRight.x) / info->accel_state->texW[0], xFixedToFloat(srcBottomRight.y) / info->accel_state->texH[0], xFixedToFloat(maskBottomRight.x) / info->accel_state->texW[1], xFixedToFloat(maskBottomRight.y) / info->accel_state->texH[1]); VTX_OUT_MASK((float)(dstX + w), (float)dstY, xFixedToFloat(srcTopRight.x) / info->accel_state->texW[0], xFixedToFloat(srcTopRight.y) / info->accel_state->texH[0], xFixedToFloat(maskTopRight.x) / info->accel_state->texW[1], xFixedToFloat(maskTopRight.y) / info->accel_state->texH[1]); } else { if (IS_R300_3D || IS_R500_3D) { VTX_OUT((float)dstX, (float)dstY, xFixedToFloat(srcTopLeft.x) / info->accel_state->texW[0], xFixedToFloat(srcTopLeft.y) / info->accel_state->texH[0]); } VTX_OUT((float)dstX, (float)(dstY + h), xFixedToFloat(srcBottomLeft.x) / info->accel_state->texW[0], xFixedToFloat(srcBottomLeft.y) / info->accel_state->texH[0]); VTX_OUT((float)(dstX + w), (float)(dstY + h), xFixedToFloat(srcBottomRight.x) / info->accel_state->texW[0], xFixedToFloat(srcBottomRight.y) / info->accel_state->texH[0]); VTX_OUT((float)(dstX + w), (float)dstY, xFixedToFloat(srcTopRight.x) / info->accel_state->texW[0], xFixedToFloat(srcTopRight.y) / info->accel_state->texH[0]); } ADVANCE_RING(); LEAVE_DRAW(0); } #undef VTX_OUT #undef VTX_OUT_MASK static void RadeonComposite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, int width, int height) { int tileSrcY, tileMaskY, tileDstY; int remainingHeight; RINFO_FROM_SCREEN(pDst->drawable.pScreen); if (!info->accel_state->need_src_tile_x && !info->accel_state->need_src_tile_y) { RadeonCompositeTile(pScrn, info, pDst, srcX, srcY, maskX, maskY, dstX, dstY, width, height); return; } /* Tiling logic borrowed from exaFillRegionTiled */ modulus(srcY, info->accel_state->src_tile_height, tileSrcY); tileMaskY = maskY; tileDstY = dstY; remainingHeight = height; while (remainingHeight > 0) { int remainingWidth = width; int tileSrcX, tileMaskX, tileDstX; int h = info->accel_state->src_tile_height - tileSrcY; if (h > remainingHeight) h = remainingHeight; remainingHeight -= h; modulus(srcX, info->accel_state->src_tile_width, tileSrcX); tileMaskX = maskX; tileDstX = dstX; while (remainingWidth > 0) { int w = info->accel_state->src_tile_width - tileSrcX; if (w > remainingWidth) w = remainingWidth; remainingWidth -= w; RadeonCompositeTile(pScrn, info, pDst, tileSrcX, tileSrcY, tileMaskX, tileMaskY, tileDstX, tileDstY, w, h); tileSrcX = 0; tileMaskX += w; tileDstX += w; } tileSrcY = 0; tileMaskY += h; tileDstY += h; } } xf86-video-ati-7.3.0/src/radeon.h0000664000175000017500000005502512221374311013331 00000000000000/* * Copyright 2000 ATI Technologies Inc., Markham, Ontario, and * VA Linux Systems Inc., Fremont, California. * * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation on the rights to use, copy, modify, merge, * publish, distribute, 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 * NON-INFRINGEMENT. IN NO EVENT SHALL ATI, VA LINUX SYSTEMS AND/OR * THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ /* * Authors: * Kevin E. Martin * Rickard E. Faith * Alan Hourihane * */ #ifndef _RADEON_H_ #define _RADEON_H_ #include /* For abs() */ #include /* For usleep() */ #include /* For gettimeofday() */ #include "config.h" #include "xf86str.h" #include "compiler.h" /* PCI support */ #include "xf86Pci.h" #include "exa.h" #include "radeon_glamor.h" /* Exa and Cursor Support */ #include "xf86Cursor.h" /* DDC support */ #include "xf86DDC.h" /* Xv support */ #include "xf86xv.h" #include "radeon_probe.h" /* DRI support */ #include "xf86drm.h" #include "radeon_drm.h" #ifdef DAMAGE #include "damage.h" #include "globals.h" #endif #include "xf86Crtc.h" #include "X11/Xatom.h" #include "radeon_bo.h" #include "radeon_cs.h" #include "radeon_dri2.h" #include "drmmode_display.h" #include "radeon_surface.h" /* Render support */ #ifdef RENDER #include "picturestr.h" #endif #include "compat-api.h" #include "simple_list.h" #include "atipcirename.h" #ifndef MAX #define MAX(a,b) ((a)>(b)?(a):(b)) #endif #ifndef MIN #define MIN(a,b) ((a)>(b)?(b):(a)) #endif #if HAVE_BYTESWAP_H #include #elif defined(USE_SYS_ENDIAN_H) #include #else #define bswap_16(value) \ ((((value) & 0xff) << 8) | ((value) >> 8)) #define bswap_32(value) \ (((uint32_t)bswap_16((uint16_t)((value) & 0xffff)) << 16) | \ (uint32_t)bswap_16((uint16_t)((value) >> 16))) #define bswap_64(value) \ (((uint64_t)bswap_32((uint32_t)((value) & 0xffffffff)) \ << 32) | \ (uint64_t)bswap_32((uint32_t)((value) >> 32))) #endif #if X_BYTE_ORDER == X_BIG_ENDIAN #define le32_to_cpu(x) bswap_32(x) #define le16_to_cpu(x) bswap_16(x) #define cpu_to_le32(x) bswap_32(x) #define cpu_to_le16(x) bswap_16(x) #else #define le32_to_cpu(x) (x) #define le16_to_cpu(x) (x) #define cpu_to_le32(x) (x) #define cpu_to_le16(x) (x) #endif /* Provide substitutes for gcc's __FUNCTION__ on other compilers */ #if !defined(__GNUC__) && !defined(__FUNCTION__) # define __FUNCTION__ __func__ /* C99 */ #endif typedef enum { OPTION_NOACCEL, OPTION_SW_CURSOR, OPTION_PAGE_FLIP, OPTION_EXA_PIXMAPS, OPTION_COLOR_TILING, OPTION_COLOR_TILING_2D, #ifdef RENDER OPTION_RENDER_ACCEL, OPTION_SUBPIXEL_ORDER, #endif OPTION_ACCELMETHOD, OPTION_EXA_VSYNC, OPTION_ZAPHOD_HEADS, OPTION_SWAPBUFFERS_WAIT } RADEONOpts; #define RADEON_VSYNC_TIMEOUT 20000 /* Maximum wait for VSYNC (in usecs) */ /* Buffer are aligned on 4096 byte boundaries */ #define RADEON_GPU_PAGE_SIZE 4096 #define RADEON_BUFFER_ALIGN (RADEON_GPU_PAGE_SIZE - 1) #define xFixedToFloat(f) (((float) (f)) / 65536) #define RADEON_LOGLEVEL_DEBUG 4 /* for Xv, outputs */ #define MAKE_ATOM(a) MakeAtom(a, sizeof(a) - 1, TRUE) /* Other macros */ #define RADEON_ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) #define RADEON_ALIGN(x,bytes) (((x) + ((bytes) - 1)) & ~((bytes) - 1)) #define RADEONPTR(pScrn) ((RADEONInfoPtr)(pScrn)->driverPrivate) #define IS_RV100_VARIANT ((info->ChipFamily == CHIP_FAMILY_RV100) || \ (info->ChipFamily == CHIP_FAMILY_RV200) || \ (info->ChipFamily == CHIP_FAMILY_RS100) || \ (info->ChipFamily == CHIP_FAMILY_RS200) || \ (info->ChipFamily == CHIP_FAMILY_RV250) || \ (info->ChipFamily == CHIP_FAMILY_RV280) || \ (info->ChipFamily == CHIP_FAMILY_RS300)) #define IS_R300_VARIANT ((info->ChipFamily == CHIP_FAMILY_R300) || \ (info->ChipFamily == CHIP_FAMILY_RV350) || \ (info->ChipFamily == CHIP_FAMILY_R350) || \ (info->ChipFamily == CHIP_FAMILY_RV380) || \ (info->ChipFamily == CHIP_FAMILY_R420) || \ (info->ChipFamily == CHIP_FAMILY_RV410) || \ (info->ChipFamily == CHIP_FAMILY_RS400) || \ (info->ChipFamily == CHIP_FAMILY_RS480)) #define IS_AVIVO_VARIANT ((info->ChipFamily >= CHIP_FAMILY_RV515)) #define IS_DCE3_VARIANT ((info->ChipFamily >= CHIP_FAMILY_RV620)) #define IS_DCE32_VARIANT ((info->ChipFamily >= CHIP_FAMILY_RV730)) #define IS_DCE4_VARIANT ((info->ChipFamily >= CHIP_FAMILY_CEDAR)) #define IS_DCE41_VARIANT ((info->ChipFamily >= CHIP_FAMILY_PALM)) #define IS_DCE5_VARIANT ((info->ChipFamily >= CHIP_FAMILY_BARTS)) #define IS_EVERGREEN_3D (info->ChipFamily >= CHIP_FAMILY_CEDAR) #define IS_R600_3D (info->ChipFamily >= CHIP_FAMILY_R600) #define IS_R500_3D ((info->ChipFamily == CHIP_FAMILY_RV515) || \ (info->ChipFamily == CHIP_FAMILY_R520) || \ (info->ChipFamily == CHIP_FAMILY_RV530) || \ (info->ChipFamily == CHIP_FAMILY_R580) || \ (info->ChipFamily == CHIP_FAMILY_RV560) || \ (info->ChipFamily == CHIP_FAMILY_RV570)) /* RS6xx, RS740 are technically R4xx as well, but the * clipping hardware seems to follow the r3xx restrictions */ #define IS_R400_3D ((info->ChipFamily == CHIP_FAMILY_R420) || \ (info->ChipFamily == CHIP_FAMILY_RV410)) #define IS_R300_3D ((info->ChipFamily == CHIP_FAMILY_R300) || \ (info->ChipFamily == CHIP_FAMILY_RV350) || \ (info->ChipFamily == CHIP_FAMILY_R350) || \ (info->ChipFamily == CHIP_FAMILY_RV380) || \ (info->ChipFamily == CHIP_FAMILY_R420) || \ (info->ChipFamily == CHIP_FAMILY_RV410) || \ (info->ChipFamily == CHIP_FAMILY_RS690) || \ (info->ChipFamily == CHIP_FAMILY_RS600) || \ (info->ChipFamily == CHIP_FAMILY_RS740) || \ (info->ChipFamily == CHIP_FAMILY_RS400) || \ (info->ChipFamily == CHIP_FAMILY_RS480)) #define IS_R200_3D ((info->ChipFamily == CHIP_FAMILY_RV250) || \ (info->ChipFamily == CHIP_FAMILY_RV280) || \ (info->ChipFamily == CHIP_FAMILY_RS300) || \ (info->ChipFamily == CHIP_FAMILY_R200)) #define CURSOR_WIDTH 64 #define CURSOR_HEIGHT 64 #define CURSOR_WIDTH_CIK 128 #define CURSOR_HEIGHT_CIK 128 struct radeon_exa_pixmap_priv { struct radeon_bo *bo; uint32_t tiling_flags; struct radeon_surface surface; Bool bo_mapped; Bool shared; }; #define RADEON_2D_EXA_COPY 1 #define RADEON_2D_EXA_SOLID 2 struct radeon_2d_state { int op; // uint32_t dst_pitch_offset; uint32_t src_pitch_offset; uint32_t dp_gui_master_cntl; uint32_t dp_cntl; uint32_t dp_write_mask; uint32_t dp_brush_frgd_clr; uint32_t dp_brush_bkgd_clr; uint32_t dp_src_frgd_clr; uint32_t dp_src_bkgd_clr; uint32_t default_sc_bottom_right; uint32_t dst_domain; struct radeon_bo *dst_bo; struct radeon_bo *src_bo; }; #define DMA_BO_FREE_TIME 1000 struct radeon_dma_bo { struct radeon_dma_bo *next, *prev; struct radeon_bo *bo; int expire_counter; }; struct r600_accel_object { uint32_t pitch; uint32_t width; uint32_t height; int bpp; uint32_t domain; struct radeon_bo *bo; uint32_t tiling_flags; struct radeon_surface *surface; }; struct radeon_vbo_object { int vb_offset; int vb_total; uint32_t vb_size; uint32_t vb_op_vert_size; int32_t vb_start_op; struct radeon_bo *vb_bo; unsigned verts_per_op; }; struct radeon_accel_state { /* Saved values for ScreenToScreenCopy */ int xdir; int ydir; /* render accel */ unsigned short texW[2]; unsigned short texH[2]; Bool XInited3D; /* X itself has the 3D context */ int num_gb_pipes; Bool has_tcl; Bool allowHWDFS; /* EXA */ ExaDriverPtr exa; int exaSyncMarker; int exaMarkerSynced; int engineMode; #define EXA_ENGINEMODE_UNKNOWN 0 #define EXA_ENGINEMODE_2D 1 #define EXA_ENGINEMODE_3D 2 int composite_op; PicturePtr dst_pic; PicturePtr msk_pic; PicturePtr src_pic; PixmapPtr dst_pix; PixmapPtr msk_pix; PixmapPtr src_pix; Bool is_transform[2]; PictTransform *transform[2]; /* Whether we are tiling horizontally and vertically */ Bool need_src_tile_x; Bool need_src_tile_y; /* Size of tiles ... set to 65536x65536 if not tiling in that direction */ Bool src_tile_width; Bool src_tile_height; uint32_t *draw_header; unsigned vtx_count; unsigned num_vtx; Bool vsync; struct radeon_vbo_object vbo; struct radeon_vbo_object cbuf; /* where to discard IB from if we cancel operation */ uint32_t ib_reset_op; struct radeon_dma_bo bo_free; struct radeon_dma_bo bo_wait; struct radeon_dma_bo bo_reserved; Bool use_vbos; void (*finish_op)(ScrnInfoPtr, int); // shader storage struct radeon_bo *shaders_bo; uint32_t solid_vs_offset; uint32_t solid_ps_offset; uint32_t copy_vs_offset; uint32_t copy_ps_offset; uint32_t comp_vs_offset; uint32_t comp_ps_offset; uint32_t xv_vs_offset; uint32_t xv_ps_offset; // shader consts uint32_t solid_vs_const_offset; uint32_t solid_ps_const_offset; uint32_t copy_vs_const_offset; uint32_t copy_ps_const_offset; uint32_t comp_vs_const_offset; uint32_t comp_ps_const_offset; uint32_t comp_mask_ps_const_offset; uint32_t xv_vs_const_offset; uint32_t xv_ps_const_offset; //size/addr stuff struct r600_accel_object src_obj[2]; struct r600_accel_object dst_obj; uint32_t src_size[2]; uint32_t dst_size; uint32_t vs_size; uint64_t vs_mc_addr; uint32_t ps_size; uint64_t ps_mc_addr; // solid/copy void *copy_area; struct radeon_bo *copy_area_bo; Bool same_surface; int rop; uint32_t planemask; uint32_t fg; // composite Bool component_alpha; Bool src_alpha; // vline xf86CrtcPtr vline_crtc; int vline_y1; int vline_y2; Bool force; }; typedef struct { EntityInfoPtr pEnt; pciVideoPtr PciInfo; int Chipset; RADEONChipFamily ChipFamily; Bool (*CloseScreen)(CLOSE_SCREEN_ARGS_DECL); void (*BlockHandler)(BLOCKHANDLER_ARGS_DECL); int pix24bpp; /* Depth of pixmap for 24bpp fb */ Bool dac6bits; /* Use 6 bit DAC? */ int pixel_bytes; Bool directRenderingEnabled; struct radeon_dri2 dri2; Bool accelDFS; /* accel */ Bool RenderAccel; /* Render */ Bool allowColorTiling; Bool allowColorTiling2D; struct radeon_accel_state *accel_state; Bool accelOn; Bool use_glamor; Bool exa_pixmaps; Bool exa_force_create; XF86ModReqInfo exaReq; Bool is_fast_fb; /* use direct mapping for fast fb access */ unsigned int xv_max_width; unsigned int xv_max_height; /* general */ OptionInfoPtr Options; DisplayModePtr currentMode; CreateScreenResourcesProcPtr CreateScreenResources; Bool IsSecondary; Bool IsPrimary; Bool r600_shadow_fb; void *fb_shadow; void (*reemit_current2d)(ScrnInfoPtr pScrn, int op); // emit the current 2D state into the IB struct radeon_2d_state state_2d; struct radeon_bo *front_bo; struct radeon_bo_manager *bufmgr; struct radeon_cs_manager *csm; struct radeon_cs *cs; struct radeon_bo *cursor_bo[32]; uint64_t vram_size; uint64_t gart_size; drmmode_rec drmmode; Bool drmmode_inited; /* r6xx+ tile config */ Bool have_tiling_info; uint32_t tile_config; int group_bytes; int num_channels; int num_banks; int r7xx_bank_op; struct radeon_surface_manager *surf_man; struct radeon_surface front_surface; /* Xv bicubic filtering */ struct radeon_bo *bicubic_bo; /* kms pageflipping */ Bool allowPageFlip; /* Perform vsync'ed SwapBuffers? */ Bool swapBuffersWait; /* cursor size */ int cursor_w; int cursor_h; } RADEONInfoRec, *RADEONInfoPtr; /* radeon_accel.c */ extern Bool RADEONAccelInit(ScreenPtr pScreen); extern void RADEONEngineInit(ScrnInfoPtr pScrn); extern void RADEONCopySwap(uint8_t *dst, uint8_t *src, unsigned int size, int swap); extern void RADEONInit3DEngine(ScrnInfoPtr pScrn); extern int radeon_cs_space_remaining(ScrnInfoPtr pScrn); /* radeon_commonfuncs.c */ extern void RADEONWaitForVLine(ScrnInfoPtr pScrn, PixmapPtr pPix, xf86CrtcPtr crtc, int start, int stop); /* radeon_exa.c */ extern unsigned eg_tile_split(unsigned tile_split); extern Bool radeon_transform_is_affine_or_scaled(PictTransformPtr t); /* radeon_exa_funcs.c */ extern Bool RADEONDrawInit(ScreenPtr pScreen); extern Bool R600DrawInit(ScreenPtr pScreen); extern Bool R600LoadShaders(ScrnInfoPtr pScrn); extern Bool EVERGREENDrawInit(ScreenPtr pScreen); /* radeon_exa.c */ extern Bool RADEONGetDatatypeBpp(int bpp, uint32_t *type); extern Bool RADEONGetPixmapOffsetPitch(PixmapPtr pPix, uint32_t *pitch_offset); /* radeon_video.c */ extern void RADEONInitVideo(ScreenPtr pScreen); extern void RADEONResetVideo(ScrnInfoPtr pScrn); extern Bool radeon_load_bicubic_texture(ScrnInfoPtr pScrn); extern xf86CrtcPtr radeon_pick_best_crtc(ScrnInfoPtr pScrn, Bool consider_disabled, int x1, int x2, int y1, int y2); extern void radeon_cs_flush_indirect(ScrnInfoPtr pScrn); extern void radeon_ddx_cs_start(ScrnInfoPtr pScrn, int num, const char *file, const char *func, int line); void radeon_kms_update_vram_limit(ScrnInfoPtr pScrn, uint32_t new_fb_size); extern RADEONEntPtr RADEONEntPriv(ScrnInfoPtr pScrn); drmVBlankSeqType radeon_populate_vbl_request_type(xf86CrtcPtr crtc); #if XF86_CRTC_VERSION >= 5 #define RADEON_PIXMAP_SHARING 1 #endif static inline struct radeon_surface *radeon_get_pixmap_surface(PixmapPtr pPix) { #ifdef USE_GLAMOR RADEONInfoPtr info = RADEONPTR(xf86ScreenToScrn(pPix->drawable.pScreen)); if (info->use_glamor) { struct radeon_pixmap *priv; priv = radeon_get_pixmap_private(pPix); return priv ? &priv->surface : NULL; } else #endif { struct radeon_exa_pixmap_priv *driver_priv; driver_priv = exaGetPixmapDriverPrivate(pPix); return &driver_priv->surface; } return NULL; } uint32_t radeon_get_pixmap_tiling(PixmapPtr pPix); static inline void radeon_set_pixmap_bo(PixmapPtr pPix, struct radeon_bo *bo) { #ifdef USE_GLAMOR RADEONInfoPtr info = RADEONPTR(xf86ScreenToScrn(pPix->drawable.pScreen)); if (info->use_glamor) { struct radeon_pixmap *priv; priv = radeon_get_pixmap_private(pPix); if (priv == NULL && bo == NULL) return; if (priv) { if (priv->bo == bo) return; if (priv->bo) radeon_bo_unref(priv->bo); if (!bo) { free(priv); priv = NULL; } } if (bo) { uint32_t pitch; if (!priv) { priv = calloc(1, sizeof (struct radeon_pixmap)); if (!priv) goto out; } radeon_bo_ref(bo); priv->bo = bo; radeon_bo_get_tiling(bo, &priv->tiling_flags, &pitch); } out: radeon_set_pixmap_private(pPix, priv); } else #endif /* USE_GLAMOR */ { struct radeon_exa_pixmap_priv *driver_priv; driver_priv = exaGetPixmapDriverPrivate(pPix); if (driver_priv) { uint32_t pitch; if (driver_priv->bo) radeon_bo_unref(driver_priv->bo); radeon_bo_ref(bo); driver_priv->bo = bo; radeon_bo_get_tiling(bo, &driver_priv->tiling_flags, &pitch); } } } static inline struct radeon_bo *radeon_get_pixmap_bo(PixmapPtr pPix) { #ifdef USE_GLAMOR RADEONInfoPtr info = RADEONPTR(xf86ScreenToScrn(pPix->drawable.pScreen)); if (info->use_glamor) { struct radeon_pixmap *priv; priv = radeon_get_pixmap_private(pPix); return priv ? priv->bo : NULL; } else #endif { struct radeon_exa_pixmap_priv *driver_priv; driver_priv = exaGetPixmapDriverPrivate(pPix); return driver_priv->bo; } return NULL; } static inline Bool radeon_get_pixmap_shared(PixmapPtr pPix) { #ifdef USE_GLAMOR RADEONInfoPtr info = RADEONPTR(xf86ScreenToScrn(pPix->drawable.pScreen)); if (info->use_glamor) { ErrorF("glamor sharing todo\n"); return FALSE; } else #endif { struct radeon_exa_pixmap_priv *driver_priv; driver_priv = exaGetPixmapDriverPrivate(pPix); return driver_priv->shared; } return FALSE; } #define CP_PACKET0(reg, n) \ (RADEON_CP_PACKET0 | ((n) << 16) | ((reg) >> 2)) #define CP_PACKET1(reg0, reg1) \ (RADEON_CP_PACKET1 | (((reg1) >> 2) << 11) | ((reg0) >> 2)) #define CP_PACKET2() \ (RADEON_CP_PACKET2) #define CP_PACKET3(pkt, n) \ (RADEON_CP_PACKET3 | (pkt) | ((n) << 16)) #define RADEON_VERBOSE 0 #define BEGIN_RING(n) do { \ if (RADEON_VERBOSE) { \ xf86DrvMsg(pScrn->scrnIndex, X_INFO, \ "BEGIN_RING(%d) in %s\n", (unsigned int)n, __FUNCTION__);\ } \ radeon_ddx_cs_start(pScrn, n, __FILE__, __func__, __LINE__); \ } while (0) #define ADVANCE_RING() do { \ radeon_cs_end(info->cs, __FILE__, __func__, __LINE__); \ } while (0) #define OUT_RING(x) do { \ if (RADEON_VERBOSE) { \ xf86DrvMsg(pScrn->scrnIndex, X_INFO, \ " OUT_RING(0x%08x)\n", (unsigned int)(x)); \ } \ radeon_cs_write_dword(info->cs, (x)); \ } while (0) #define OUT_RING_REG(reg, val) \ do { \ OUT_RING(CP_PACKET0(reg, 0)); \ OUT_RING(val); \ } while (0) #define OUT_RING_RELOC(x, read_domains, write_domain) \ do { \ int _ret; \ _ret = radeon_cs_write_reloc(info->cs, x, read_domains, write_domain, 0); \ if (_ret) ErrorF("reloc emit failure %d\n", _ret); \ } while(0) #define FLUSH_RING() \ do { \ if (RADEON_VERBOSE) \ xf86DrvMsg(pScrn->scrnIndex, X_INFO, \ "FLUSH_RING in %s\n", __FUNCTION__); \ radeon_cs_flush_indirect(pScrn); \ } while (0) #define CS_FULL(cs) ((cs)->cdw > 15 * 1024) #define RADEON_SWITCH_TO_2D() \ do { \ uint32_t flush = 0; \ switch (info->accel_state->engineMode) { \ case EXA_ENGINEMODE_UNKNOWN: \ flush = 1; \ break; \ case EXA_ENGINEMODE_3D: \ flush = CS_FULL(info->cs); \ break; \ case EXA_ENGINEMODE_2D: \ flush = CS_FULL(info->cs); \ break; \ } \ if (flush) { \ radeon_cs_flush_indirect(pScrn); \ } \ info->accel_state->engineMode = EXA_ENGINEMODE_2D; \ } while (0); #define RADEON_SWITCH_TO_3D() \ do { \ uint32_t flush = 0; \ switch (info->accel_state->engineMode) { \ case EXA_ENGINEMODE_UNKNOWN: \ flush = 1; \ break; \ case EXA_ENGINEMODE_2D: \ flush = CS_FULL(info->cs); \ break; \ case EXA_ENGINEMODE_3D: \ flush = CS_FULL(info->cs); \ break; \ } \ if (flush) { \ radeon_cs_flush_indirect(pScrn); \ } \ if (!info->accel_state->XInited3D) \ RADEONInit3DEngine(pScrn); \ info->accel_state->engineMode = EXA_ENGINEMODE_3D; \ } while (0); /* Memory mapped register access macros */ #define BEGIN_ACCEL_RELOC(n, r) do { \ int _nqw = (n) + (r); \ BEGIN_RING(2*_nqw); \ } while (0) #define EMIT_OFFSET(reg, value, pPix, rd, wd) do { \ driver_priv = exaGetPixmapDriverPrivate(pPix); \ OUT_RING_REG((reg), (value)); \ OUT_RING_RELOC(driver_priv->bo, (rd), (wd)); \ } while(0) #define EMIT_READ_OFFSET(reg, value, pPix) EMIT_OFFSET(reg, value, pPix, (RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT), 0) #define EMIT_WRITE_OFFSET(reg, value, pPix) EMIT_OFFSET(reg, value, pPix, 0, RADEON_GEM_DOMAIN_VRAM) #define OUT_TEXTURE_REG(reg, offset, bo) do { \ OUT_RING_REG((reg), (offset)); \ OUT_RING_RELOC((bo), RADEON_GEM_DOMAIN_VRAM | RADEON_GEM_DOMAIN_GTT, 0); \ } while(0) #define EMIT_COLORPITCH(reg, value, pPix) do { \ driver_priv = exaGetPixmapDriverPrivate(pPix); \ OUT_RING_REG((reg), value); \ OUT_RING_RELOC(driver_priv->bo, 0, RADEON_GEM_DOMAIN_VRAM); \ } while(0) static __inline__ void RADEON_SYNC(RADEONInfoPtr info, ScrnInfoPtr pScrn) { if (pScrn->pScreen) exaWaitSync(pScrn->pScreen); } enum { RADEON_CREATE_PIXMAP_DRI2 = 0x08000000, RADEON_CREATE_PIXMAP_TILING_MACRO = 0x10000000, RADEON_CREATE_PIXMAP_TILING_MICRO = 0x20000000, RADEON_CREATE_PIXMAP_DEPTH = 0x40000000, /* for r200 */ RADEON_CREATE_PIXMAP_SZBUFFER = 0x80000000, /* for eg */ RADEON_CREATE_PIXMAP_TILING_MICRO_SQUARE = 0x8000000, }; /* Compute log base 2 of val. */ static __inline__ int RADEONLog2(int val) { int bits; #if (defined __i386__ || defined __x86_64__) && (defined __GNUC__) __asm volatile("bsrl %1, %0" : "=r" (bits) : "c" (val) ); return bits; #else for (bits = 0; val != 0; val >>= 1, ++bits) ; return bits - 1; #endif } #endif /* _RADEON_H_ */ xf86-video-ati-7.3.0/src/radeon_exa.c0000664000175000017500000002404212177731114014164 00000000000000/* * Copyright 2005 Eric Anholt * Copyright 2005 Benjamin Herrenschmidt * 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. * * Authors: * Eric Anholt * Zack Rusin * Benjamin Herrenschmidt * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "radeon.h" #include "radeon_reg.h" #include "r600_reg.h" #include "radeon_drm.h" #include "radeon_bo_helper.h" #include "radeon_probe.h" #include "radeon_version.h" #include "radeon_exa_shared.h" #include "xf86.h" /***********************************************************************/ #define RINFO_FROM_SCREEN(pScr) ScrnInfoPtr pScrn = xf86ScreenToScrn(pScr); \ RADEONInfoPtr info = RADEONPTR(pScrn) static struct { int rop; int pattern; } RADEON_ROP[] = { { RADEON_ROP3_ZERO, RADEON_ROP3_ZERO }, /* GXclear */ { RADEON_ROP3_DSa, RADEON_ROP3_DPa }, /* Gxand */ { RADEON_ROP3_SDna, RADEON_ROP3_PDna }, /* GXandReverse */ { RADEON_ROP3_S, RADEON_ROP3_P }, /* GXcopy */ { RADEON_ROP3_DSna, RADEON_ROP3_DPna }, /* GXandInverted */ { RADEON_ROP3_D, RADEON_ROP3_D }, /* GXnoop */ { RADEON_ROP3_DSx, RADEON_ROP3_DPx }, /* GXxor */ { RADEON_ROP3_DSo, RADEON_ROP3_DPo }, /* GXor */ { RADEON_ROP3_DSon, RADEON_ROP3_DPon }, /* GXnor */ { RADEON_ROP3_DSxn, RADEON_ROP3_PDxn }, /* GXequiv */ { RADEON_ROP3_Dn, RADEON_ROP3_Dn }, /* GXinvert */ { RADEON_ROP3_SDno, RADEON_ROP3_PDno }, /* GXorReverse */ { RADEON_ROP3_Sn, RADEON_ROP3_Pn }, /* GXcopyInverted */ { RADEON_ROP3_DSno, RADEON_ROP3_DPno }, /* GXorInverted */ { RADEON_ROP3_DSan, RADEON_ROP3_DPan }, /* GXnand */ { RADEON_ROP3_ONE, RADEON_ROP3_ONE } /* GXset */ }; static __inline__ uint32_t F_TO_DW(float val) { union { float f; uint32_t l; } tmp; tmp.f = val; return tmp.l; } /* Assumes that depth 15 and 16 can be used as depth 16, which is okay since we * require src and dest datatypes to be equal. */ Bool RADEONGetDatatypeBpp(int bpp, uint32_t *type) { switch (bpp) { case 8: *type = ATI_DATATYPE_CI8; return TRUE; case 16: *type = ATI_DATATYPE_RGB565; return TRUE; case 24: *type = ATI_DATATYPE_CI8; return TRUE; case 32: *type = ATI_DATATYPE_ARGB8888; return TRUE; default: RADEON_FALLBACK(("Unsupported bpp: %d\n", bpp)); return FALSE; } } static Bool RADEONPixmapIsColortiled(PixmapPtr pPix) { return FALSE; } static Bool RADEONGetOffsetPitch(PixmapPtr pPix, int bpp, uint32_t *pitch_offset, unsigned int offset, unsigned int pitch) { RINFO_FROM_SCREEN(pPix->drawable.pScreen); if (pitch > 16320 || pitch % info->accel_state->exa->pixmapPitchAlign != 0) RADEON_FALLBACK(("Bad pitch 0x%08x\n", pitch)); if (offset % info->accel_state->exa->pixmapOffsetAlign != 0) RADEON_FALLBACK(("Bad offset 0x%08x\n", offset)); pitch = pitch >> 6; *pitch_offset = (pitch << 22) | (offset >> 10); /* If it's the front buffer, we've got to note that it's tiled? */ if (RADEONPixmapIsColortiled(pPix)) *pitch_offset |= RADEON_DST_TILE_MACRO; return TRUE; } Bool RADEONGetPixmapOffsetPitch(PixmapPtr pPix, uint32_t *pitch_offset) { uint32_t pitch; int bpp; bpp = pPix->drawable.bitsPerPixel; if (bpp == 24) bpp = 8; pitch = exaGetPixmapPitch(pPix); return RADEONGetOffsetPitch(pPix, bpp, pitch_offset, 0, pitch); } /** * Returns whether the provided transform is affine. * * transform may be null. */ Bool radeon_transform_is_affine_or_scaled(PictTransformPtr t) { if (t == NULL) return TRUE; /* the shaders don't handle scaling either */ return t->matrix[2][0] == 0 && t->matrix[2][1] == 0 && t->matrix[2][2] == IntToxFixed(1); } Bool RADEONPrepareAccess_CS(PixmapPtr pPix, int index) { ScreenPtr pScreen = pPix->drawable.pScreen; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_exa_pixmap_priv *driver_priv; uint32_t possible_domains = ~0U; uint32_t current_domain = 0; Bool can_fail = !(pPix->drawable.bitsPerPixel < 8) && pPix != pScreen->GetScreenPixmap(pScreen); Bool flush = FALSE; int ret; #if X_BYTE_ORDER == X_BIG_ENDIAN /* May need to handle byte swapping in DownloadFrom/UploadToScreen */ if (pPix->drawable.bitsPerPixel > 8) return FALSE; #endif driver_priv = exaGetPixmapDriverPrivate(pPix); if (!driver_priv) return FALSE; /* untile in DFS/UTS */ if (driver_priv->tiling_flags & (RADEON_TILING_MACRO | RADEON_TILING_MICRO)) return FALSE; /* if we have more refs than just the BO then flush */ if (radeon_bo_is_referenced_by_cs(driver_priv->bo, info->cs)) { flush = TRUE; if (can_fail) { possible_domains = radeon_bo_get_src_domain(driver_priv->bo); if (possible_domains == RADEON_GEM_DOMAIN_VRAM) return FALSE; /* use DownloadFromScreen */ } } /* if the BO might end up in VRAM, prefer DownloadFromScreen */ if (can_fail && (possible_domains & RADEON_GEM_DOMAIN_VRAM)) { radeon_bo_is_busy(driver_priv->bo, ¤t_domain); if (current_domain & possible_domains) { if (current_domain == RADEON_GEM_DOMAIN_VRAM) return FALSE; } else if (possible_domains & RADEON_GEM_DOMAIN_VRAM) return FALSE; } if (flush) radeon_cs_flush_indirect(pScrn); /* flush IB */ ret = radeon_bo_map(driver_priv->bo, 1); if (ret) { FatalError("failed to map pixmap %d\n", ret); return FALSE; } driver_priv->bo_mapped = TRUE; pPix->devPrivate.ptr = driver_priv->bo->ptr; return TRUE; } void RADEONFinishAccess_CS(PixmapPtr pPix, int index) { struct radeon_exa_pixmap_priv *driver_priv; driver_priv = exaGetPixmapDriverPrivate(pPix); if (!driver_priv || !driver_priv->bo_mapped) return; radeon_bo_unmap(driver_priv->bo); driver_priv->bo_mapped = FALSE; pPix->devPrivate.ptr = NULL; } void *RADEONEXACreatePixmap(ScreenPtr pScreen, int size, int align) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_exa_pixmap_priv *new_priv; if (size != 0 && !info->exa_force_create && info->exa_pixmaps == FALSE) return NULL; new_priv = calloc(1, sizeof(struct radeon_exa_pixmap_priv)); if (!new_priv) return NULL; if (size == 0) return new_priv; new_priv->bo = radeon_bo_open(info->bufmgr, 0, size, align, RADEON_GEM_DOMAIN_VRAM, 0); if (!new_priv->bo) { free(new_priv); ErrorF("Failed to alloc memory\n"); return NULL; } return new_priv; } void *RADEONEXACreatePixmap2(ScreenPtr pScreen, int width, int height, int depth, int usage_hint, int bitsPerPixel, int *new_pitch) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); RADEONInfoPtr info = RADEONPTR(pScrn); struct radeon_exa_pixmap_priv *new_priv; if (width != 0 && height != 0 && !info->exa_force_create && info->exa_pixmaps == FALSE) return NULL; new_priv = calloc(1, sizeof(struct radeon_exa_pixmap_priv)); if (!new_priv) { return NULL; } if (width == 0 || height == 0) { return new_priv; } new_priv->bo = radeon_alloc_pixmap_bo(pScrn, width, height, depth, usage_hint, bitsPerPixel, new_pitch, &new_priv->surface, &new_priv->tiling_flags); if (!new_priv->bo) { free(new_priv); ErrorF("Failed to alloc memory\n"); return NULL; } return new_priv; } void RADEONEXADestroyPixmap(ScreenPtr pScreen, void *driverPriv) { struct radeon_exa_pixmap_priv *driver_priv = driverPriv; if (!driverPriv) return; if (driver_priv->bo) radeon_bo_unref(driver_priv->bo); free(driverPriv); } #ifdef RADEON_PIXMAP_SHARING Bool RADEONEXASharePixmapBacking(PixmapPtr ppix, ScreenPtr slave, void **fd_handle) { struct radeon_exa_pixmap_priv *driver_priv = exaGetPixmapDriverPrivate(ppix); if (!radeon_share_pixmap_backing(driver_priv->bo, fd_handle)) return FALSE; driver_priv->shared = TRUE; return TRUE; } Bool RADEONEXASetSharedPixmapBacking(PixmapPtr ppix, void *fd_handle) { struct radeon_exa_pixmap_priv *driver_priv = exaGetPixmapDriverPrivate(ppix); if (!radeon_set_shared_pixmap_backing(ppix, fd_handle, &driver_priv->surface)) return FALSE; driver_priv->shared = TRUE; driver_priv->tiling_flags = 0; return TRUE; } #endif uint32_t radeon_get_pixmap_tiling(PixmapPtr pPix) { struct radeon_exa_pixmap_priv *driver_priv; driver_priv = exaGetPixmapDriverPrivate(pPix); return driver_priv->tiling_flags; } Bool RADEONEXAPixmapIsOffscreen(PixmapPtr pPix) { struct radeon_exa_pixmap_priv *driver_priv; driver_priv = exaGetPixmapDriverPrivate(pPix); if (!driver_priv) return FALSE; if (driver_priv->bo) return TRUE; return FALSE; } #define ENTER_DRAW(x) TRACE #define LEAVE_DRAW(x) TRACE /***********************************************************************/ #ifdef RENDER #include "radeon_exa_render.c" #endif #include "radeon_exa_funcs.c" xf86-video-ati-7.3.0/Makefile.in0000664000175000017500000006523312270503571013176 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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 = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' 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 = . DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ $(srcdir)/config.h.in COPYING ChangeLog INSTALL README compile \ config.guess config.sub depcomp install-sh missing ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) 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 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)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) 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.bz2 GZIP_ENV = --best DIST_TARGETS = dist-bzip2 dist-gzip 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@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_RADEON_CFLAGS = @LIBDRM_RADEON_CFLAGS@ LIBDRM_RADEON_LIBS = @LIBDRM_RADEON_LIBS@ LIBGLAMOR_CFLAGS = @LIBGLAMOR_CFLAGS@ LIBGLAMOR_EGL_CFLAGS = @LIBGLAMOR_EGL_CFLAGS@ LIBGLAMOR_EGL_LIBS = @LIBGLAMOR_EGL_LIBS@ LIBGLAMOR_LIBS = @LIBGLAMOR_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@ MAINT = @MAINT@ 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@ 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@ 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: @MAINTAINER_MODE_TRUE@ $(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 .PRECIOUS: 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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then rm -f stamp-h1; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi 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: @MAINTAINER_MODE_TRUE@ $(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: $(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) | GZIP=$(GZIP_ENV) gzip -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-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -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*) \ GZIP=$(GZIP_ENV) gzip -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*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(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 \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(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 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 .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-ati-7.3.0/INSTALL0000644000175000017500000002622212270504206012147 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. 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. 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. 4. Type `make install' to install the programs and any data files and documentation. 5. 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. 6. Often, you can also type `make uninstall' to remove the installed files again. 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 `..'. 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'. 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. 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'. Optional Features ================= 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. 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" and if that doesn't work, install pre-built binaries of GCC for HP-UX. 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" 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-ati-7.3.0/missing0000755000175000017500000002557711120403101012512 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2006-05-10.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally 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, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # 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 run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] 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 # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case $1 in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $1 in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: xf86-video-ati-7.3.0/COPYING0000664000175000017500000001532712177731114012165 00000000000000Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org 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 Marc Aurele La France not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. Marc Aurele La France makes no representations about the suitability of this software for any purpose. It is provided "as-is" without express or implied warranty. MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL MARC AURELE LA FRANCE 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. Copyright (C) 2005 Bogdan D. bogdand@users.sourceforge.net Copyright (c) 1995-2003 by The XFree86 Project, 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. Except as contained in this notice, the name of the copyright holder(s) and author(s) shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the copyright holder(s) and author(s). Copyright 2006-2007 Advanced Micro Devices, Inc. Copyright 2007 Egbert Eich Copyright 2007 Matthias Hopf Copyright (C) 1999-2001 Brian Paul All Rights Reserved. Copyright 2007 Luc Verhaegen 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. Copyright 2007 Advanced Micro Devices, Inc. Copyright (C) 2008-2009 Advanced Micro Devices, Inc. Copyright 2004 Eric Anholt Copyright 2005 Eric Anholt Copyright 2000 ATI Technologies Inc., Markham, Ontario, and Copyright 2004 ATI Technologies Inc., Markham, Ontario Copyright (C) 2008-2009 Alexander Deucher Copyright 2008 Jérôme Glisse Copyright 2005 Benjamin Herrenschmidt Copyright 2008 Kristian Høgsberg Copyright (C) 2008-2009 Matthias Hopf Copyright (c) 2006 Itronix Inc. Copyright 2000 Precision Insight, Inc., Cedar Park, Texas. Copyright © 2007 Red Hat, Inc. Copyright © 2009 Red Hat, Inc. Copyright 2007 George Sapountzis Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas. Copyright 2006 Tungsten Graphics, Inc. Copyright 2000 VA Linux Systems, Inc., Fremont, California. 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. Copyright © 2006 Keith Packard 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. xf86-video-ati-7.3.0/man/0000775000175000017500000000000012270504207011750 500000000000000xf86-video-ati-7.3.0/man/ati.man0000664000175000017500000000220712177731114013150 00000000000000.\" shorthand for double quote that works everywhere. .ds q \N'34' .TH ATI __drivermansuffix__ __vendorversion__ .SH NAME ati \- ATI video driver .SH SYNOPSIS .nf .B "Section \*qDevice\*q" .BI " Identifier \*q" devname \*q .B " Driver \*qati\*q" \ \ ... .B EndSection .fi .SH DESCRIPTION .B ati is an __xservername__ wrapper driver for ATI video cards. It autodetects whether your hardware has a Radeon, Rage 128, or Mach64 or earlier class of chipset, and loads the radeon(__drivermansuffix__), r128(__drivermansuffix__), or mach64 driver as appropriate. .SH SUPPORTED HARDWARE The .B ati driver supports Radeon, Rage 128, and Mach64 and earlier chipsets by loading those drivers. See those manpages for specific cards supported. .SH CONFIGURATION DETAILS Please refer to __xconfigfile__(__filemansuffix__) for general configuration details, and the specific card driver for driver configuration details. .SH "SEE ALSO" __xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__), r128(__drivermansuffix__), radeon(__drivermansuffix__) .SH AUTHORS See the individual driver pages for authors. xf86-video-ati-7.3.0/man/radeon.man0000664000175000017500000002321512240725243013642 00000000000000.ds q \N'34' .TH RADEON __drivermansuffix__ __vendorversion__ .SH NAME radeon \- ATI/AMD RADEON video driver .SH SYNOPSIS .nf .B "Section \*qDevice\*q" .BI " Identifier \*q" devname \*q .B " Driver \*qradeon\*q" \ \ ... .B EndSection .fi .SH DESCRIPTION .B radeon is an __xservername__ driver for ATI/AMD RADEON-based video cards with the following features: .PP .PD 0 .TP 2 \(bu Full support for 8-, 15-, 16- and 24-bit pixel depths; .TP \(bu RandR 1.2 and RandR 1.3 support; .TP \(bu Full EXA 2D acceleration; .TP \(bu Textured XVideo acceleration including anti-tearing support (Bicubic filtering only available on R/RV3xx, R/RV/RS4xx, R/RV5xx, and RS6xx/RS740); .TP \(bu 3D acceleration; .PD .SH SUPPORTED HARDWARE The .B radeon driver supports PCI, AGP, and PCIe video cards based on the following ATI/AMD chips (note: list is non-exhaustive): .PP .PD 0 .TP 12 .B R100 Radeon 7200 .TP 12 .B RV100 Radeon 7000(VE), M6, RN50/ES1000 .TP 12 .B RS100 Radeon IGP320(M) .TP 12 .B RV200 Radeon 7500, M7, FireGL 7800 .TP 12 .B RS200 Radeon IGP330(M)/IGP340(M) .TP 12 .B RS250 Radeon Mobility 7000 IGP .TP 12 .B R200 Radeon 8500, 9100, FireGL 8800/8700 .TP 12 .B RV250 Radeon 9000PRO/9000, M9 .TP 12 .B RV280 Radeon 9200PRO/9200/9200SE/9250, M9+ .TP 12 .B RS300 Radeon 9100 IGP .TP 12 .B RS350 Radeon 9200 IGP .TP 12 .B RS400/RS480 Radeon XPRESS 200(M)/1100 IGP .TP 12 .B R300 Radeon 9700PRO/9700/9500PRO/9500/9600TX, FireGL X1/Z1 .TP 12 .B R350 Radeon 9800PRO/9800SE/9800, FireGL X2 .TP 12 .B R360 Radeon 9800XT .TP 12 .B RV350 Radeon 9600PRO/9600SE/9600/9550, M10/M11, FireGL T2 .TP 12 .B RV360 Radeon 9600XT .TP 12 .B RV370 Radeon X300, M22 .TP 12 .B RV380 Radeon X600, M24 .TP 12 .B RV410 Radeon X700, M26 PCIe .TP 12 .B R420 Radeon X800 AGP .TP 12 .B R423/R430 Radeon X800, M28 PCIe .TP 12 .B R480/R481 Radeon X850 PCIe/AGP .TP 12 .B RV505/RV515/RV516/RV550 Radeon X1300/X1400/X1500/X1550/X2300 .TP 12 .B R520 Radeon X1800 .TP 12 .B RV530/RV560 Radeon X1600/X1650/X1700 .TP 12 .B RV570/R580 Radeon X1900/X1950 .TP 12 .B RS600/RS690/RS740 Radeon X1200/X1250/X2100 .TP 12 .B R600 Radeon HD 2900 .TP 12 .B RV610/RV630 Radeon HD 2400/2600/2700/4200/4225/4250 .TP 12 .B RV620/RV635 Radeon HD 3410/3430/3450/3470/3650/3670 .TP 12 .B RV670 Radeon HD 3690/3850/3870 .TP 12 .B RS780/RS880 Radeon HD 3100/3200/3300/4100/4200/4250/4290 .TP 12 .B RV710/RV730 Radeon HD 4330/4350/4550/4650/4670/5145/5165/530v/545v/560v/565v .TP 12 .B RV740/RV770/RV790 Radeon HD 4770/4730/4830/4850/4860/4870/4890 .TP 12 .B CEDAR Radeon HD 5430/5450/6330/6350/6370 .TP 12 .B REDWOOD Radeon HD 5550/5570/5650/5670/5730/5750/5770/6530/6550/6570 .TP 12 .B JUNIPER Radeon HD 5750/5770/5830/5850/5870/6750/6770/6830/6850/6870 .TP 12 .B CYPRESS Radeon HD 5830/5850/5870 .TP 12 .B HEMLOCK Radeon HD 5970 .TP 12 .B PALM Radeon HD 6310/6250 .TP 12 .B SUMO/SUMO2 Radeon HD 6370/6380/6410/6480/6520/6530/6550/6620 .TP 12 .B BARTS Radeon HD 6790/6850/6870/6950/6970/6990 .TP 12 .B TURKS Radeon HD 6570/6630/6650/6670/6730/6750/6770 .TP 12 .B CAICOS Radeon HD 6430/6450/6470/6490 .TP 12 .B CAYMAN Radeon HD 6950/6970/6990 .TP 12 .B ARUBA Radeon HD 7000 series .TP 12 .B TAHITI Radeon HD 7900 series .TP 12 .B PITCAIRN Radeon HD 7800 series .TP 12 .B VERDE Radeon HD 7700 series .TP 12 .B OLAND Radeon HD 8000 series .TP 12 .B HAINAN Radeon HD 8000 series .TP 12 .B BONAIRE Radeon HD 7790 series .TP 12 .B KAVERI KAVERI APUs .TP 12 .B KABINI KABINI APUs .TP 12 .B HAWAII Radeon R9 series .PD .SH CONFIGURATION DETAILS Please refer to __xconfigfile__(__filemansuffix__) for general configuration details. This section only covers configuration details specific to this driver. .PP The following driver .B Options are supported: .TP .BI "Option \*qSWcursor\*q \*q" boolean \*q Selects software cursor. The default is .B off. .TP .BI "Option \*qNoAccel\*q \*q" boolean \*q Enables or disables all hardware acceleration. .br The default is to .B enable hardware acceleration. .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 must 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 \*qColorTiling\*q \*q" "boolean" \*q The framebuffer can be addressed either in linear or tiled mode. Tiled mode can provide significant performance benefits with 3D applications. Tiling will be disabled if the drm module is too old or if the current display configuration does not support it. On R600+ this enables 1D tiling mode. .br The default value is .B on for R/RV3XX, R/RV4XX, R/RV5XX, RS6XX, RS740, R/RV6XX, R/RV7XX, RS780, RS880, EVERGREEN, CAYMAN, ARUBA, and Southern Islands and .B off for R/RV/RS1XX, R/RV/RS2XX, RS3XX, and RS690/RS780/RS880 when fast fb feature is enabled. .TP .BI "Option \*qColorTiling2D\*q \*q" "boolean" \*q The framebuffer can be addressed either in linear, 1D, or 2D tiled modes. 2D tiled mode can provide significant performance benefits over 1D tiling with 3D applications. Tiling will be disabled if the drm module is too old or if the current display configuration does not support it. KMS ColorTiling2D is only supported on R600 and newer chips and requires Mesa 9.0 or newer for R6xx-ARUBA and Mesa 9.2 or newer for Southern Islands. .br The default value is .B on for R/RV6XX, R/RV7XX, RS780, RS880, EVERGREEN, CAYMAN, ARUBA, and Southern Islands. .TP .BI "Option \*qEnablePageFlip\*q \*q" boolean \*q Enable DRI2 page flipping. The default is .B on. Pageflipping is supported on all radeon hardware. .TP .BI "Option \*qAccelMethod\*q \*q" "string" \*q Chooses between available acceleration architectures. Valid values are .B EXA and .B glamor. The default is .B glamor as of TAHITI, otherwise .B EXA. .PP The following driver .B Options are supported for .B EXA : .TP .BI "Option \*qEXAVSync\*q \*q" boolean \*q This option attempts to avoid tearing by stalling the engine until the display controller has passed the destination region. It reduces tearing at the cost of performance and has been known to cause instability on some chips. The default is .B off. .TP .BI "Option \*qEXAPixmaps\*q \*q" boolean \*q Under KMS, to avoid thrashing pixmaps in/out of VRAM on low memory cards, we use a heuristic based on VRAM amount to determine whether to allow EXA to use VRAM for non-essential pixmaps. This option allows us to override the heuristic. The default is .B on with > 32MB VRAM, off with < 32MB or when fast fb feature is enabled for RS690/RS780/RS880. .TP .BI "Option \*qSwapbuffersWait\*q \*q" boolean \*q This option controls the behavior of glXSwapBuffers and glXCopySubBufferMESA calls by GL applications. If enabled, the calls will avoid tearing by making sure the display scanline is outside of the area to be copied before the copy occurs. If disabled, no scanline synchronization is performed, meaning tearing will likely occur. Note that when enabled, this option can adversely affect the framerate of applications that render frames at less than refresh rate. .IP The default value is .B on. .SH TEXTURED VIDEO ATTRIBUTES The driver supports the following X11 Xv attributes for Textured Video. You can use the "xvattr" tool to query/set those attributes at runtime. .TP .BI "XV_VSYNC" XV_VSYNC is used to control whether textured adapter synchronizes the screen update to the monitor vertical refresh to eliminate tearing. It has two values: 'off'(0) and 'on'(1). The default is .B 'on'(1). .TP .BI "XV_CRTC" XV_CRTC is used to control which display controller (crtc) the textured adapter synchronizes the screen update with when XV_VSYNC is enabled. The default, 'auto'(-1), will sync to the display controller that more of the video is on; when this is ambiguous, the display controller associated with the RandR primary output is preferred. This attribute is useful for things like clone mode where the user can best decide which display should be synced. The default is .B 'auto'(-1). .TP .BI "XV_BICUBIC" XV_BICUBIC is used to control whether textured adapter should apply a bicubic filter to smooth the output. It has three values: 'off'(0), 'on'(1) and 'auto'(2). 'off' means never apply the filter, 'on' means always apply the filter and 'auto' means apply the filter only if the X and Y sizes are scaled to more than double to avoid blurred output. Bicubic filtering is not currently compatible with other Xv attributes like hue, contrast, and brightness, and must be disabled to use those attributes. The default is .B 'off'(0). .SH SEE ALSO __xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__) .IP " 1." 4 Wiki page: .RS 4 http://www.x.org/wiki/radeon .RE .IP " 2." 4 Overview about radeon development code: .RS 4 http://cgit.freedesktop.org/xorg/driver/xf86-video-ati/ .RE .IP " 3." 4 Mailing list: .RS 4 http://lists.x.org/mailman/listinfo/xorg-driver-ati .RE .IP " 4." 4 IRC channel: .RS 4 #radeon on irc.freenode.net .RE .IP " 5." 4 Query the bugtracker for radeon bugs: .RS 4 https://bugs.freedesktop.org/query.cgi?product=xorg&component=Driver/Radeon .RE .IP " 6." 4 Submit bugs & patches: .RS 4 https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/Radeon .RE .SH AUTHORS .nf Authors include: Rickard E. (Rik) Faith \fIfaith@precisioninsight.com\fP Kevin E. Martin \fIkem@freedesktop.org\fP Alan Hourihane \fIalanh@fairlite.demon.co.uk\fP Marc Aurele La France \fItsi@xfree86.org\fP Benjamin Herrenschmidt \fIbenh@kernel.crashing.org\fP Michel D\(:anzer \fImichel@daenzer.net\fP Alex Deucher \fIalexdeucher@gmail.com\fP Bogdan D. \fIbogdand@users.sourceforge.net\fP Eric Anholt \fIeric@anholt.net\fP xf86-video-ati-7.3.0/man/Makefile.in0000664000175000017500000004063712270503571013752 00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 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 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 = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' 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 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) 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) 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@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ 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@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ 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_RADEON_CFLAGS = @LIBDRM_RADEON_CFLAGS@ LIBDRM_RADEON_LIBS = @LIBDRM_RADEON_LIBS@ LIBGLAMOR_CFLAGS = @LIBGLAMOR_CFLAGS@ LIBGLAMOR_EGL_CFLAGS = @LIBGLAMOR_EGL_CFLAGS@ LIBGLAMOR_EGL_LIBS = @LIBGLAMOR_EGL_LIBS@ LIBGLAMOR_LIBS = @LIBGLAMOR_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@ MAINT = @MAINT@ 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@ 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 radeon.man driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@) EXTRA_DIST = @DRIVER_NAME@.man radeon.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: @MAINTAINER_MODE_TRUE@ $(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 .PRECIOUS: 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__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(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: $(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 .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-ati-7.3.0/man/Makefile.am0000664000175000017500000000303412177731114013731 00000000000000# # 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 radeon.man driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@) EXTRA_DIST = @DRIVER_NAME@.man radeon.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-ati-7.3.0/compile0000755000175000017500000000727111424631675012512 00000000000000#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. scriptversion=2009-10-06.20; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 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 # . 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 $? ;; esac ofile= cfile= eat= 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 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: xf86-video-ati-7.3.0/aclocal.m40000664000175000017500000150421112270503565012767 00000000000000# generated automatically by aclocal 1.13.4 -*- Autoconf -*- # Copyright (C) 1996-2013 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.69],, [m4_warning([this file was generated for autoconf 2.69. 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'.])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 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) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 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.58])dnl We use AC_INCLUDES_DEFAULT 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_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _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_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 _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which 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 "X${COLLECT_NAMES+set}" != Xset; 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, # which needs '.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 # 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], [[!?.]$], [], [.]) )]) # _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\\"\\\`\\\\\\"" ;; *) 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\\"\\\`\\\\\\"" ;; *) 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 $lt_write_fail = 0 && 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 "$silent" = yes && 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 which 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 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $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. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _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 "X${COLLECT_NAMES+set}" != Xset; 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) _LT_PROG_REPLACE_SHELLFNS 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' TIMESTAMP='$TIMESTAMP' 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 $_lt_result -eq 0; 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 cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru 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 $_lt_result -eq 0 && $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*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; 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 "$lt_cv_ld_force_load" = "no"; 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 "$lt_cv_ld_force_load" = "yes"; 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*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; 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 "$lt_cv_apple_cc_single_mod" != "yes"; 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 "${lt_cv_aix_libpath+set}" = 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 which will find a shell with a builtin # printf (which 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], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --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 "$GCC" = yes; 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 in which 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 "x$enable_libtool_lock" != xno && 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 which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file 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* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|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" ;; ppc*-*linux*|powerpc*-*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 x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-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} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [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 "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; 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 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" # 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 x"[$]$2" = xyes; 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 x"[$]$2" = xyes; 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; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # 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"; 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 $i != 17 # 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 "$cross_compiling" = yes; 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 -fvisbility=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 "x$enable_dlopen" != xyes; 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 ]) ;; *) 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 "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && 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 "x$lt_cv_dlopen_self" = xyes; 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 "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; 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 "$hard_links" = no; 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 in which 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 "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # 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 "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; 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 "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; 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 -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _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 AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; 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` 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" else 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 "$host_cpu" = ia64; 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 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # 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}' else # 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' fi 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%'\''`; test $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*) # Native MSVC 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 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}${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 .so || 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*) # 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 version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; 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 ;; 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' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; 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=yes 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 "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; 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 "$lt_cv_prog_gnu_ld" = yes; 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 ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-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 # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents 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="$sys_lib_dlsearch_path_spec $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*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac 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 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; 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 "$with_gnu_ld" = yes; 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=freebsd-elf 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 "$with_gnu_ld" = yes; 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 "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _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], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which 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 which 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 "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; 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 "$with_gnu_ld" = yes; 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 /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*) 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=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file 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) 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=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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 ;; 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 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) 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 "$lt_cv_path_NM" != "no"; 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 /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) 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 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 "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # 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 "$GCC" = yes; 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 "$host_cpu" = ia64; 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 # 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 -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$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 -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/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 # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # 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};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print 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 con'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* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$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 "$pipe_works" = yes; 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_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_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 "$GXX" = yes; 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 "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; 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']) ;; 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 "$host_cpu" = ia64; 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*) # 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 "$host_cpu" != ia64; 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) 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 "$GCC" = yes; 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 "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; 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']) ;; 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 "$host_cpu" = ia64; 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 ;; 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']) ;; 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) 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' ;; 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 which 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 AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". 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) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _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++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) 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 "$with_gnu_ld" = yes; 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 "$lt_use_gnu_ld_interface" = yes; 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 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 "$host_cpu" != ia64; 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 (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; 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 ;; 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 "$host_os" = linux-dietlibc; 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 "$tmp_diet" = no 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' ;; 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 "x$supports_anon_versioning" = xyes; 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 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 "x$supports_anon_versioning" = xyes; 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 can not *** 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 "$_LT_TAGVAR(ld_shlibs, $1)" = no; 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 "$GCC" = yes && 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 "$host_cpu" = ia64; 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 AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". 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) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | 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 # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; 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,' if test "$GCC" = yes; 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 "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; 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 "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi 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_use_runtimelinking" = yes; 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 "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; 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 "$with_gnu_ld" = yes; 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 # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 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++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _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~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $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 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*) _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 "$GCC" = yes; 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 $output_objdir/$soname = $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 $output_objdir/$soname = $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 "$GCC" = yes && test "$with_gnu_ld" = no; 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 "$with_gnu_ld" = no; 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 "$GCC" = yes && test "$with_gnu_ld" = no; 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 "$with_gnu_ld" = no; 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 "$GCC" = yes; 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 "$lt_cv_irix_exported_symbol" = yes; 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 ;; 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*) 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__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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 case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _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' ;; esac 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 _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; 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 "$GCC" = yes; 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 "$GCC" = yes; 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 "$GCC" = yes; 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 "x$host_vendor" = xsequent; 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 "$GCC" = yes; 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 can NOT 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 "$GCC" = yes; 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 x$host_vendor = xsni; 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 "$_LT_TAGVAR(ld_shlibs, $1)" = no && 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 "$enable_shared" = yes && test "$GCC" = yes; 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 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 which 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 "$can_build_shared" = "no" && 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 "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no 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 "$enable_shared" = yes || 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 "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; 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 "$_lt_caught_CXX_error" != yes; 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 "$GXX" = yes; 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 "$GXX" = yes; 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 "$with_gnu_ld" = yes; 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 "$host_cpu" = ia64; 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 # need to do runtime linking. 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 ;; 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,' if test "$GXX" = yes; 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 "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; 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 "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi 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_use_runtimelinking" = yes; 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 "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; 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 "$with_gnu_ld" = yes; 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 # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 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*) # Native MSVC # 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~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $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 (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; 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) ;; 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*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; 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 $output_objdir/$soname = $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 "$GXX" = yes; 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 $output_objdir/$soname = $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 $with_gnu_ld = no; 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 "$GXX" = yes; then if test $with_gnu_ld = no; 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 "$GXX" = yes; then if test "$with_gnu_ld" = no; 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) 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 "x$supports_anon_versioning" = xyes; 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 ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) 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__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; 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 "$GXX" = yes && test "$with_gnu_ld" = no; 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 "$GXX" = yes && test "$with_gnu_ld" = no; 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 $LDFLAGS $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 -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 $LDFLAGS $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 -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 can NOT 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 "$_LT_TAGVAR(ld_shlibs, $1)" = no && 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 "$_lt_caught_CXX_error" != yes 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 ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; 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 $p = "-L" || test $p = "-R"; 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 "$pre_test_object_deps_done" = no; 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 "$pre_test_object_deps_done" = no; 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)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; 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 "X$F77" = "Xno"; 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 "$_lt_disable_F77" != yes; 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 "$can_build_shared" = "no" && 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 "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no 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 "$enable_shared" = yes || 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 "$_lt_disable_F77" != yes 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 "X$FC" = "Xno"; 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 "$_lt_disable_FC" != yes; 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 "$can_build_shared" = "no" && 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 "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no 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 "$enable_shared" = yes || 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 "$_lt_disable_FC" != yes 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 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 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 "x${GCJFLAGS+set}" = xset || 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_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 $lt_ac_count -gt 10 && 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], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 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_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which 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 # Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 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 7 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_SET_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_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=default]) test -z "$pic_mode" && 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], []) 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])]) # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 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 ]) # ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 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 3337 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2' macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 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])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # 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 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # 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. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- 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[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # 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]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- 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 ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- 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 ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # 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 $1]) _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 ])# PKG_CHECK_MODULES # PKG_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable pkgconfigdir as the location where a module # should install pkg-config .pc files. By default the directory is # $libdir/pkgconfig, but the default can be changed by passing # DIRECTORY. The user can override through the --with-pkgconfigdir # 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 # PKG_NOARCH_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable noarch_pkgconfigdir as the location where a # module should install arch-independent pkg-config .pc files. By # default the directory is $datadir/pkgconfig, but the default can be # changed by passing DIRECTORY. The user can override through the # --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 xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 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.18.0]) 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_PROGS(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 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) ]) # 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]) 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 $host_os in solaris*) 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 $host_os in solaris*) 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 $host_os in solaris*) 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 $host_os in solaris*) 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 flexibilty 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 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], [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 flexibilty 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 flexibilty 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 flexibilty 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 flexibilty 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_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 flexibilty 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 flexibilty 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 flexibilty 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 flexibilty 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], [ 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 appeneded 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], [ 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 accidently 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_OPTIONS # -------------------- # Minimum version: 1.3.0 # # Defines default options for X.Org modules. # AC_DEFUN([XORG_DEFAULT_OPTIONS], [ AC_REQUIRE([AC_PROG_INSTALL]) XORG_COMPILER_FLAGS XORG_CWARNFLAGS XORG_STRICT_OPTION 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_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; touch \$(top_srcdir)/INSTALL; \ echo 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly 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 && \ mv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ || (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ echo 'git directory not found: installing possibly 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 -I`$PKG_CONFIG --variable=sdkdir 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-2013 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.13' 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.13.4], [], [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.13.4])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-2013 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], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2013 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-2013 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-2013 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. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _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. FIXME. This creates each '.P' file that we will # 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" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2013 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. # 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 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_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([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. 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 ]) 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 ]) 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-2013 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}" != 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-2013 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])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996-2013 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_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless 'enable' is passed literally. # For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], am_maintainer_other[ make rules and dependencies not useful (and sometimes confusing) to the casual installer])], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2013 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 to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Copyright (C) 1999-2013 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. AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != 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 dnl Make sure AC_PROG_CC is never called again, or it will override our dnl setting of CC. m4_define([AC_PROG_CC], [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2013 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 case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac 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-2013 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])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2013 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-2013 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-2013 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-2013 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-2013 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 xf86-video-ati-7.3.0/config.sub0000755000175000017500000010115311120403074013070 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2008-01-16' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # 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 2 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, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # 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. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # 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. # 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. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -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 (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 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" 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 # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # 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) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -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 ;; -mvs* | -opened*) vendor=ibm ;; -os400*) 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 basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: xf86-video-ati-7.3.0/install-sh0000755000175000017500000003246411120403074013121 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2006-12-25.00 # 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. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # 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_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= 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 the last 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. -s $stripprog installed files. -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 " 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 *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done 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 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 trap '(exit $?); exit' 1 2 13 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 starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? 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 # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # 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 case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/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-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or 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 eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && 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=$dstdir/_inst.$$_ rmtmp=$dstdir/_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 && $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` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # 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 -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$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 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: xf86-video-ati-7.3.0/ChangeLog0000664000175000017500000320537112270504206012701 00000000000000commit 0333f5bda27dc0ec2edc180c7a4dc9a432f13f97 Author: Alex Deucher Date: Fri Jan 24 10:19:49 2014 -0500 radeon: bump version for release Signed-off-by: Alex Deucher commit fc4167f2a85d9cba65078d8fc6f08c7a619ad66e Author: Alex Deucher Date: Fri Jan 24 10:17:08 2014 -0500 Require glamor 0.6.0 This is required for Xv support and a number of important performance improvements. Signed-off-by: Alex Deucher commit f2a0a5cf6c5a21e2a02280e110a4eb8e6609dace Author: Michel Dänzer Date: Wed Jan 22 11:04:42 2014 +0900 Don't require the glamoregl module to be pre-loaded with xserver >= 1.15 The issues with loading it on demand have been fixed in xserver 1.15. Inspired by Jérôme Glisse on IRC. commit 3213df16d61302148be0088c8f93c6a5a88558f1 Author: Michel Dänzer Date: Wed Jan 8 11:30:59 2014 +0900 dri2: Make last_vblank_seq local unsigned to match dpms_last_seq Without this, I was occasionally running into gnome-shell hangs due to wildly off vblank sequence values. Doesn't seem to happen anymore with this change. Reviewed-by: Alex Deucher commit bcc454ea2fb239e13942270faec7801270615b9c Author: Alex Deucher Date: Mon Jan 6 09:52:50 2014 -0500 radeon/exa: Always use a scratch surface for UTS to vram If we don't, we may hit a buffer that crosses the visible vram boundary resulting in a sigbus when the CPU accesses the buffer beyond the PCI aperture. This will introduce an extra copy in certain cases. This is based on Michel's patch from bug 44099 updated for all asic families. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=44099 Signed-off-by: Alex Deucher Reviewed-by: Michel Dänzer commit 04ef035c9315b4a6fbf1b14720be87cee4099a9f Author: Alex Deucher Date: Tue Dec 24 15:14:35 2013 -0500 drm/radeon: fix SUMO2 pci id 0x9649 is sumo2, not sumo. Signed-off-by: Alex Deucher commit bfbff3b246db509c820df17b8fcf5899882ffcfa Author: Robert Millan Date: Fri Dec 20 11:03:14 2013 +0000 radeon: Restore kernel module load on FreeBSD. Since the introduction of a call to drmCheckModesettingSupported() in radeon_kernel_mode_enabled(), with abort condition if such call fails, the drmOpen() call in radeon_open_drm_master() no longer takes the responsibility of loading the radeon kernel module. However at least on FreeBSD (and GNU/kFreeBSD), X is still relied on to load the modules it needs. This commit restores the old behaviour of loading kernel modules on these systems. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72852 Signed-off-by: Robert Millan commit 796c9a0cb587f528326bede11fa3f3eb7d3edaf1 Author: Robert Millan Date: Fri Dec 20 10:55:09 2013 +0000 radeon: Set first parameter of drmOpen() to NULL Since the introduction of a call to drmCheckModesettingSupported() in radeon_kernel_mode_enabled(), with abort condition if such call fails, the first argument to drmOpen() call in radeon_open_drm_master() has become a no-op red herring. Such argument (a kernel module name) is supposed to result in load of specified kernel module. However, this will never happen. The problem is that if the code containing drmOpen() call is reached, it means that drmCheckModesettingSupported() check has previously succeeded, which implies the module is already loaded. So, drmOpen() will never load a kernel module. But it gives the impression that it will. In order to avoid this confusion, this commit replaces it with NULL, like xf86-video-intel driver does. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=72849 Signed-off-by: Robert Millan commit d571d6af70ef27efd1ed6420eb892bdde963ed7a Author: Alex Deucher Date: Tue Sep 24 11:39:10 2013 -0400 radeon/kms: add Hawaii pci ids Signed-off-by: Alex Deucher commit e38a92e00d015a6b80a1f3a16d58c61f084b066f Author: Alex Deucher Date: Tue Sep 24 11:35:00 2013 -0400 radeon: add support for Hawaii Disabled by default until the acceleration code stablizes. Signed-off-by: Alex Deucher commit e4cd0f4392ea11c93088ad429f36eaaf9bcbf505 Author: Alex Deucher Date: Wed Oct 30 15:21:26 2013 -0400 radeon: enable tiling on SI by default (v2) Now that mesa 9.2 is out with support for tiling on SI asics, we can enable it here. Tiling improves memory bandwidth utilization. V2: update man page Signed-off-by: Alex Deucher commit 3b38701a72fa1cad1e4610a2f4330b3da4cc6391 Author: Vadim Girlin Date: Fri Nov 1 10:36:39 2013 -0400 radeon: disable 2D tiling on buffers < 128 pixels Seems to run into alignment problems with certain card configurations. bug: https://bugs.freedesktop.org/show_bug.cgi?id=70675 Signed-off-by: Alex Deucher commit 0c921edf0162fed616cea9d02e168b719243bcd2 Author: Jerome Glisse Date: Wed Oct 30 13:01:02 2013 -0400 radeon/glamor: with new pixmap for dri2 drawable no need to create new texture When creating a new pixmap/bo for dri2 drawable there is no need to create a new texture, instead the texture associated with the new pixmap should be use otherwise there is a missmatch between the bo backing the texture for the drawable and the bo used by dri2 client. Signed-off-by: Jerome Glisse Reviewed-by: Alex Deucher commit f1dc677e79cd7a88d7379a934ebc7d87a3b18805 Author: Christopher James Halse Rogers Date: Mon Sep 23 12:25:29 2013 -0700 EXA/evergreen: Paranoia around linear tiling. (v2) The last two bytes of tiling_mode contain the actual tiling mode; the rest are extra tiling configuration bits. These configuration bits are not necessarily zero for a linear buffer, so mask them out before checking for linearity v2: Also fix up evergreen_textured_videofuncs.c agd5f: remove trailing whitespace Signed-off-by: Christopher James Halse Rogers Signed-off-by: Alex Deucher commit 67fb82a3f0759b171fea21b475a70fa825693570 Author: Alex Deucher Date: Tue Oct 1 09:35:30 2013 -0400 radeon: fix the non-glamor build harder... I need to stop pushing patches first thing in the morning. Signed-off-by: Alex Deucher commit afc0374fdec3e24ece25805724459463e9a19f5e Author: Alex Deucher Date: Tue Oct 1 09:32:02 2013 -0400 drm/radeon: fix non-glamor build Signed-off-by: Alex Deucher commit 2d791370dfc5570eb74d7a1fb3baf4d4c8ecf243 Author: Dave Airlie Date: Mon Sep 23 07:57:15 2013 +0100 radeon: use glamor Xv support if present. This creates adaptors using glamor if possible. Signed-off-by: Dave Airlie Signed-off-by: Alex Deucher commit cbb99f659ee7b18ded0008a606e41ded38c1a194 Author: Alex Deucher Date: Mon Sep 30 08:55:16 2013 -0400 Revert "radeon: add glamor Xv support (v2)" This causes problems if glamor doesn't have Xv support enabled. I just noticed that Dave has a better version, so use that instead. This reverts commit 4fc1fa920584ace2c84d75af82d06962d0c84ec8. commit 4fc1fa920584ace2c84d75af82d06962d0c84ec8 Author: Alex Deucher Date: Thu Sep 26 11:02:55 2013 -0400 radeon: add glamor Xv support (v2) v2: guard new glamor Xv bits with USE_GLAMOR Signed-off-by: Alex Deucher Reviewed-by: Michel Dänzer commit 41dfe327ac8740ac2cd84def96b5947224e422e7 Author: Alex Deucher Date: Thu Sep 26 11:00:49 2013 -0400 radeon: fix limit handling for cards with >4G of ram We can overflow the 32-bit limit. Signed-off-by: Alex Deucher Reviewed-by: Michel Dänzer commit c45e728107269c6f51599dad4f6a02ccfef703f1 Author: Michel Dänzer Date: Wed Sep 18 10:57:52 2013 +0200 DRI2: Install client callback only once Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60182 Acked-by: Alex Deucher commit b955ddd0d41801e4ca0c30a70a5d0b27c3f366c8 Author: Alex Deucher Date: Mon Sep 16 10:58:22 2013 -0400 glamor: require 0.5.1 or newer 0.5.1 fixes a number of issues. Signed-off-by: Alex Deucher commit 282587cd0709850e7bacb1d8307065d95dc2c97d Author: Alex Deucher Date: Mon Sep 16 09:41:13 2013 -0400 radeon: enable glamor by default (v4) It's required for newer asics, so enable it by default. v2: update the autoconf help. Require --disable-glamor to build without glamor support. v3: default to yes rather than auto v4: fix help text Signed-off-by: Alex Deucher Reviewed-by: Michel Dänzer commit fdb7563a5cbc736b09c2864b67a93b475c98b2bd Author: Alex Deucher Date: Thu Jan 24 21:17:11 2013 -0500 radeon/kms: add berlin pci ids Signed-off-by: Alex Deucher commit 8927d33f76ee12bc618fecfc59fc7ff1fcedcd5e Author: Mark Kettenis Date: Thu Aug 22 10:32:46 2013 -0400 Fix shadowfb on big-endian machines For shadowfb, the framebuffer needs to have the RADEON_TILING_SURFACE flag set, otherwise the appropriate byte swapping won't happen. See https://bugs.freedesktop.org/show_bug.cgi?id=66663 Signed-off-by: Mark Kettenis Signed-off-by: Alex Deucher commit fa83d3d1636c315bc43dd622d407eb058e3ef976 Author: Alex Deucher Date: Tue Aug 20 09:29:23 2013 -0400 radeon: disallow glamor on pre-R600 asics I'm not sure they can handle the shaders properly, especially only older parts like r300. This will avoid display corruption problems reported by people using glamor on older asics by falling back to EXA if they try and enable glamor. Signed-off-by: Alex Deucher Reviewed-by: Michel Dänzer commit d0323622ee9b97a5f246baffbb2c65930a78ed14 Author: Maarten Lankhorst Date: Wed Aug 7 11:27:07 2013 +0200 bump version post release Signed-off-by: Maarten Lankhorst commit 9c97cca5c24409ca8447c99f051a12fd2d494e79 Author: Maarten Lankhorst Date: Wed Aug 7 10:48:17 2013 +0200 radeon: bump version for release Signed-off-by: Maarten Lankhorst commit 16270cfb202ab67dd152644ef019b2f1ee4d0341 Author: Maarten Lankhorst Date: Wed Aug 7 10:29:33 2013 +0200 add bicubic_table.py to EXTRA_DIST Signed-off-by: Maarten Lankhorst commit 2cb9197ca7a337c911f38b5de562a2364b922b86 Author: Maarten Lankhorst Date: Wed Aug 7 10:28:52 2013 +0200 kill unused radeon_driver.c Signed-off-by: Maarten Lankhorst commit c5cbfcf575b0b4aea6f797558ae974c1453c8e07 Author: Alex Deucher Date: Tue Jul 30 10:08:25 2013 -0400 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 dGPU to be used with the iGPU doing the rendering. Ported from Dave's nouveau patch. Signed-off-by: Alex Deucher commit 429d5b797769895eb4f5fef816ce4e2f3a342031 Author: Dave Airlie Date: Tue Jan 8 15:56:37 2013 +1000 radeon: add support for reverse prime (v2) This adds support for reverse prime configurations v2: fix compilation with older xservers Signed-off-by: Alex Deucher commit 4de9356a2900ae0fb380a2350791ef045629cd05 Author: Alex Deucher Date: Mon Aug 5 17:57:16 2013 -0400 radeon: fix naming clashes with multiple GPUs (v3) The compat naming code for UMS causes problems with multiple GPU as you may end up with the same output name on multiple GPUs. Adjust the naming on secondary GPUs to avoid conflicts. v2: integrate Dave's fixes for nouveau v3: keep compat with existing naming on primary GPU Signed-off-by: Alex Deucher commit 2ae6bb18fefddb309920fa69c9b56c3a7f3db7b4 Author: Grigori Goronzy Date: Wed Jul 31 12:01:20 2013 +0200 EXA/evergreen/ni: replace magic number Signed-off-by: Alex Deucher commit 6a278369c05a298a4367306d986467a9ceacae8c Author: Raul Fernandes Date: Tue Jul 30 09:26:05 2013 -0400 EXA/6xx/7xx: optimize non-overlapping Copy In case dst and src rectangles of a Copy operation in the same surface don't overlap, it is safe to skip the scratch surface. This is a common case. Based on evergreen/ni patch from Grigori Goronzy. Signed-off-by: Alex Deucher commit 4375a6e75e5d41139be7031a0dee58c057ecbd07 Author: Grigori Goronzy Date: Mon Jul 22 02:30:28 2013 +0200 EXA/evergreen/ni: accelerate PictOpOver with component alpha Subpixel text rendering is typically done with a solid src and a pixmap mask. Traditionally, this cannot be accelerated in a single pass and requires two passes [1]. However, we can cheat a little with a constant blend color. We can use: const.A = src.A / src.A const.R = src.R / src.A const.G = src.G / src.A const.B = src.B / src.A dst.A = const.A * (src.A * mask.A) + (1 - (src.A * mask.A)) * dst.A dst.R = const.R * (src.A * mask.R) + (1 - (src.A * mask.R)) * dst.R dst.G = const.G * (src.A * mask.G) + (1 - (src.A * mask.G)) * dst.G dst.B = const.B * (src.A * mask.B) + (1 - (src.A * mask.B)) * dst.B This only needs a single source value. src.A is cancelled down in the right places. [1] http://anholt.livejournal.com/32058.html commit 94d0d14914a025525a0766669b556eaa6681def7 Author: Grigori Goronzy Date: Thu Jul 18 16:06:23 2013 +0200 EXA/evergreen/ni: fast solid pixmap support Solid pixmaps are currently implemented with scratch pixmaps, which is slow. This replaces the hack with a proper implementation. The Composite shader can now either sample a src/mask or use a constant value. commit 5bb04351c43a91a1d60348b7293544da05d75e72 Author: Grigori Goronzy Date: Fri Jul 27 17:31:53 2012 +0200 EXA/evergreen/ni: optimize non-overlapping Copy In case dst and src rectangles of a Copy operation in the same surface don't overlap, it is safe to skip the scratch surface. This is a common case. commit c08e09b7bec441c4bf93b4cae4de1260754bf940 Author: Grigori Goronzy Date: Sat May 18 13:46:03 2013 +0200 Fix RADEON_FALLBACK logging commit c16c59f8f9b6aa7a4a6a6465582ad98f02a3606a Author: Mark Kettenis Date: Sun Jul 7 13:44:13 2013 +0200 Always go through DFS/UTS when byte swapping is needed. Before commit ef9bfb262db7004bef3704e5d914687e50d3fca4 and e5bd99faa3b6629a55168386d5dfa936ee4e97ae, byte swapping for the front buffer used to be done in hardware. Now that this no longer happens we need to let DFS/UTS ihandle the byte swapping. See https://bugs.freedesktop.org/show_bug.cgi?id=66663 . Signed-off-by: Mark Kettenis commit 1239dbbd8c8d9b55756c1de52cad353171a06522 Author: Alex Deucher Date: Sun Jul 7 20:22:10 2013 -0400 radeon: bump libdrm requirement to 2.4.46 for CIK support Signed-off-by: Alex Deucher commit 869e0b187b2d07e637c4482fe50d9f1b0c09f4e4 Author: Alex Deucher Date: Thu Jan 24 21:12:28 2013 -0500 radeon/kms: add kabini pci ids Signed-off-by: Alex Deucher commit 0edcefc4c97e4572431c38fe170032470e22e0b7 Author: Alex Deucher Date: Fri Jun 7 14:56:26 2013 -0400 radeon/kms: add bonaire pci ids Signed-off-by: Alex Deucher commit ebc32b27af25b23604e725eb50d844a8d26116bb Author: Alex Deucher Date: Fri Aug 31 18:17:24 2012 -0400 radeon: update cursor handling for CIK CIK asics have 128x128 hw cursors Signed-off-by: Alex Deucher commit 4adaea996454b1ad5185f9c0f37667dbfc266495 Author: Alex Deucher Date: Fri Jun 7 14:47:36 2013 -0400 radeon: add family ids for CIK Signed-off-by: Alex Deucher commit 3626ab147b6749a355e7d21710447f13b9796c77 Author: Leo Liu Date: Fri Jun 14 10:27:20 2013 -0400 radeon: fix a memory leak in get_modes() callback. leak happens when looping xrandr prop. Signed-off-by: Leo Liu Signed-off-by: Alex Deucher commit c0f7d03cb29166c6c00dd6fb698ba3f70c59dbdf Author: Alex Deucher Date: Mon Jun 17 11:38:27 2013 -0400 man: fix up previous commit Signed-off-by: Alex Deucher commit 03b5edc9dd3859eed2504155970613aaf88df852 Author: Eric S. Raymond Date: Fri Jun 7 13:23:14 2013 -0400 Fix some incomplete list entries. This necessarily involved adding some content, which I was able to Google for. Please review, correct, and make more specific. Bodiless .TP entries screw up doclifter's page parsing. Please don't do that anymore. commit 7ce43639a8e53eefb94e5255a39c1232b6bdbf66 Author: Michel Dänzer Date: Thu Jun 6 09:58:27 2013 +0200 autogen.sh: Restore passing --enable-maintainer-mode to configure Looks like this was accidentally dropped when the GNOME Build API was implemented. commit 365e571d9de0b5979425c34210789afca4ea5f68 Author: Samuel Li Date: Wed Mar 20 11:59:58 2013 -0400 radeon: use direct mapping for fast fb access. Signed-off-by: Samuel Li commit bd2557ea5ef84b975060e929d5ece53ec464336f Author: Ilija Hadzic Date: Wed May 8 22:39:48 2013 -0400 DRI2: add interpolated blanks to frame number in event handlers The 'frame' argument passed to event handlers is the plain CRTC vblank counter that stops progressing when the associated display is in DPMS-off mode. If we have a DPMS-off period the frame counter and MSC will diverge, which can cause some higher-level functions to return incorrect values. This patch fixes the problem by adding interpolated vblanks to the frame counter before using it in handler functions. Signed-off-by: Ilija Hadzic Reviewed-by: Alex Deucher commit 385a92b4fbe8f53b359ef6c463704414d00476fa Author: Ilija Hadzic Date: Wed May 8 22:39:47 2013 -0400 DRI2: support scheduling emulated events with zero delay Now that we fully emulating a running CRTC through DPMS-off state it is possible to come up with a zero delay when scheduling a swap or MSC-wait (e.g., if a call into respective wait function was entered very late). This patch wraps the TimerSet function into our own radeon_dri2_schedule_event such that the latter calls the event right away if zero delay is specified. Signed-off-by: Ilija Hadzic Reviewed-by: Alex Deucher commit e87b52e6ad41ad7a87e43b818d80e7d522d9c68d Author: Ilija Hadzic Date: Wed May 8 22:39:46 2013 -0400 DRI2: make wait_msc and get_msc work on disabled CRTCs Now that the running CRTC is emulated through DPMS-off states, wait_msc and get_msc must also work on disabled CRTCs. When CRTC is disabled, we must extrapolate the MSC count from present time and last MSC when CRTC was running and also use timers facility in wait_msc. v2: CRTC-private now stores frame rate instead of nominal vblank period. Signed-off-by: Ilija Hadzic Reviewed-by: Alex Deucher commit f1584152bbeda98cc1907359f1c7954a84c8837d Author: Ilija Hadzic Date: Wed May 8 22:39:45 2013 -0400 DRI2: move rename and rework radeon_dri2_deferred_swap radeon_dri2_deferred_swap will be used to generate real events (not just fallbacks) so now it needs to generate real timestamp and frame counter. Also this function will be used both by schedule_swap and wait_msc, so give it a more generic name: radeon_dri2_deferred_event v2: - Extrapolate the frame number from the time of actual execution of the function instead of using the MSC calculated (extrapolated) at event scheduling time. - CRTC-private now stores frame rate instead of nominal vblank period. Signed-off-by: Ilija Hadzic Reviewed-by: Alex Deucher commit 84bce7943b735aee19e26be4d47fdf140564f3f5 Author: Ilija Hadzic Date: Wed May 8 22:39:44 2013 -0400 DRI2: track CRTC in event record Tracking the CRTC associated with an event will save us some lookups later in event handlers. Signed-off-by: Ilija Hadzic Reviewed-by: Alex Deucher commit e40d5390b3efdea3e02267413350410d8e6a2970 Author: Ilija Hadzic Date: Wed May 8 22:39:43 2013 -0400 DRI2: hook up vblank extrapolation to schedule_swap This patch hooks up swap-scheduling function with vblank-extrapolation function. Rather than waiting for fixed time, we calculate exactly how much we should wait and what we should update target_msc to using radeon_dri2_extrapolate_msc_delay helper function and schedule the swap completion using DIX's timer facility. Signed-off-by: Ilija Hadzic Reviewed-by: Alex Deucher commit ffaa5abf207415159cdb28e90da49b95f497ef61 Author: Ilija Hadzic Date: Wed May 8 22:39:42 2013 -0400 DRI2: add vblank extrapolation function Implement a helper function that will be called when emulating the running CRTC. The function should be called only when CRTC is in DPMS-off state. It will look at the vblank count and the time that was recorded last time the CRTC was running and calculate how long one must wait (from present time) until the target_msc is reached if the CRTC were running. v2: - CRTC-private now stores frame rate instead of nominal vblank period. - DIX's timer facility can sometimes wake up the scheduled functions more than a millisecond earlier. To avoid generating an old MSC, we have to add more margin when converting the delay in microseconds to milliseconds. Signed-off-by: Ilija Hadzic Reviewed-by: Alex Deucher commit 80ae2291d082b57c70d27a80182f00d760fb3d3a Author: Ilija Hadzic Date: Wed May 8 22:39:41 2013 -0400 DRI2: adjust MSC by the number of interpolated vblanks Normally, MSC value equals the vblank count of the CRTC on which the drawable resides. However, we are now interpolating vblanks through DPMS-off state, so if the CRTC is turned off at some point, the vlbank count does not change, but MSC does change by the amount that equals the cumulative number of interpolated vblanks. So each time we interact with the CRTC's vblank facility, we have to adjust the vblank counter: in the request, we have to subtract the number of interpolated vblanks from MSC and in the reply we have to add the number of interpolated vblanks to the MSC. This patch only makes the MSC correct when CRTC is on. The subsequent patch will construct the MSC when CRTC is not running. Signed-off-by: Ilija Hadzic Reviewed-by: Alex Deucher commit 5fd2eb5d12cea32927a9e6c6ce4afd18aa7d046a Author: Ilija Hadzic Date: Wed May 8 22:39:40 2013 -0400 drmmode: calculate interpolated vblanks while in dpms-off state This adds provisions for interpolating vblanks while the CRTC is in DPMS-off state. When entering DPMS-off state, we record the last vblank time, sequence number and frame rate in CRTC-private structure. When going back to DPMS-on state we read the current time and calculate how long we have been off. Then we derive how many vblanks that would have been had the CRTC remained running. These are the interpolated vblanks. Finally, we accumulate the number of interpolated vblanks in CRTC-private structure to get the number of interpolated vblanks over the system lifetime. v2: Track frame rate instead of vblank period. The former eliminates some roundoff errors. Signed-off-by: Ilija Hadzic Reviewed-by: Alex Deucher commit e41ad30d09be4962cfb1942b0b9f63875dbb2d2a Author: Ilija Hadzic Date: Wed May 8 22:39:39 2013 -0400 drmmode: remove dead code from drmmode_crtc_dpms We are about to modify this function, so let's clean it up first. Signed-off-by: Ilija Hadzic Reviewed-by: Alex Deucher commit 373671d2eed30e30b3bdee7e40426cf58c127234 Author: Ilija Hadzic Date: Wed May 8 22:39:38 2013 -0400 drmmode: add drmmode_get_current_ust function The new helper function retrieves current time in the format that is compatible with vblank timestamps. v2: - fix an incorrect statement in a comment - add a #define so that don't depend on libdrm patches that have not yet been accepted upstream Signed-off-by: Ilija Hadzic Reviewed-by: Alex Deucher commit 006fbbd1d38a089b50ab3197d32815689ed249fa Author: Ilija Hadzic Date: Wed May 8 22:39:37 2013 -0400 DRI2: make populate_vbl_request_type external We'll need to use this function in other .c files so remove static annotation from it. Also, add radeon_ prefix because this function is now part of global namespace, so it would be nice to know where it is coming from. Signed-off-by: Ilija Hadzic Reviewed-by: Alex Deucher commit 34660d8757ff16acd1686ff2872f4600d92a68bf Author: Ilija Hadzic Date: Wed May 8 22:39:36 2013 -0400 DRI2: change signature of populate_vbl_request_type This function no longer uses info argument, so nuke it. Signed-off-by: Ilija Hadzic Reviewed-by: Alex Deucher commit ab6e85d1f5dd4657591b314b85fd2453f99c3712 Author: Michel Dänzer Date: Fri Mar 22 10:51:05 2013 +0100 glamor: Keep old private in radeon_pixmap_set_bo commit 0a84f2760eccf07781ae6c3f55d2d246c155c9ce Author: Alex Deucher Date: Mon May 13 17:06:00 2013 -0400 radeon: add Hainan pci ids Signed-off-by: Alex Deucher commit 6cee1eaebfcef2b2d2c51ec30c31260fd98b564e Author: Alex Deucher Date: Mon May 13 17:01:30 2013 -0400 radeon: add hainan chip family Signed-off-by: Alex Deucher commit 8a9e9b21cbb44c23d37bf18c983e2c3f0fe33e87 Author: Michel Dänzer Date: Thu Apr 25 17:10:12 2013 +0200 glamor: Fix build against xserver < 1.13 Those didn't define CREATE_PIXMAP_USAGE_SHARED. commit 6216b5aa3793abe71b864170bc9d4d745f027328 Author: Alex Deucher Date: Thu Apr 25 14:19:37 2013 -0400 radeon: add new richland pci ids Signed-off-by: Alex Deucher commit fd5903f15b36555bf1ccc1c3865c9fffd499128a Author: Alex Deucher Date: Thu Apr 25 14:17:51 2013 -0400 radeon: add new SI pci ids Signed-off-by: Alex Deucher commit b2826580e4d246d45871b413e4deecb070162577 Author: Jerome Glisse Date: Mon Apr 8 13:45:18 2013 -0400 radeonsi: add 2d tiling support Signed-off-by: Jerome Glisse commit 6e74aacc5e5da3b51744153dad1645caa6ea4ce3 Author: Michel Dänzer Date: Wed Mar 27 11:57:29 2013 +0100 glamor: Only enable for depth >= 24 It can't handle lower depths yet. Reported-by: Igor Vagulin commit 33d8408eec806355c2e55726679ec50ef3b769f1 Author: Michel Dänzer Date: Tue Mar 12 19:03:06 2013 +0100 glamor: Enable by default on SI We should now handle its major initialization failure cases gracefully. Reviewed-by: Jerome Glisse commit ad1d8874fab30257ba8ec8bee8ffa42a8fa9b5c0 Author: Michel Dänzer Date: Fri Mar 15 18:28:27 2013 +0100 glamor: Initial PRIME pixmap sharing hooks. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57200 Reviewed-by: Alex Deucher Tested-by: Christoph Haag Tested-by: linedot commit 35b384a00a0c76ea556f55787fccc95ecd51bc0c Author: Maarten Lankhorst Date: Thu Mar 21 15:34:21 2013 +0100 drmmode: handle failure of drmModeGetConnector Signed-off-by: Maarten Lankhorst commit 751c7259cf23a29fdd2653881e2db63ce3cf1ca5 Author: Maarten Lankhorst Date: Thu Mar 21 10:40:42 2013 +0100 Move fd cleanup to correct place. Oops, just after previous commit I realized that it needs to be done from RADEONFreeRec, because when preinit fails info pointer can be null in FreeScreen. Signed-off-by: Maarten Lankhorst commit 1643b8cd2dc53ed36916e11003590c7037b4ddd6 Author: Maarten Lankhorst Date: Thu Mar 21 10:33:19 2013 +0100 radeon: add refcounts to fix up zaphod open/close. Oops, turns out my previous commits were buggy. Adding proper refcounts will handle this correctly. Signed-off-by: Maarten Lankhorst commit a4d1bc43d4d10e2ca1e512c1010e962c587d6c16 Author: Maarten Lankhorst Date: Wed Mar 20 17:13:44 2013 +0100 Cleanup drmmode in CloseScreen. Prevents a use-after-free. Signed-off-by: Maarten Lankhorst commit 3cb3ab8704813d7c14b9e547a30e37598d70c85a Author: Maarten Lankhorst Date: Wed Mar 20 17:12:29 2013 +0100 Close drm_fd in CloseScreen. This prevents a small fd leak. Signed-off-by: Maarten Lankhorst commit 462d8d3b86038438ab854072e546cc7a9efacdd7 Author: Michel Dänzer Date: Tue Mar 12 18:59:19 2013 +0100 glamor: Bail if the glamoregl module wasn't loaded early Trying to initialize glamor in that case crashes. Reviewed-by: Jerome Glisse commit 3e5350bedf50a1a140e0eba08c39ed2451fb9115 Author: Alex Deucher Date: Fri Mar 8 14:07:42 2013 -0500 radeon: add Richland pci ids Signed-off-by: Alex Deucher commit bdbf766d8170f6ea6c16b9780ef5a4007730588b Author: Alex Deucher Date: Fri Mar 8 14:00:09 2013 -0500 radeon: mark trinity APUs with IGP flag Was missing on trinity. Signed-off-by: Alex Deucher commit 5ac335eaae135c0e66cc4643908f41174e2f1123 Author: Michel Dänzer Date: Fri Mar 8 17:37:41 2013 +0100 Only parse Option "AccelMethod" if glamor was enabled at build time Will hopefully make it more obvious when it wasn't. commit f1059e3f0934ccf1ae183099dbd4de700a7c81ac Author: Colin Walters Date: Wed Jan 4 17:37:06 2012 -0500 autogen.sh: Implement GNOME Build API http://people.gnome.org/~walters/docs/build-api.txt Signed-off-by: Adam Jackson commit 343b01c9bf35b125cd0c3df8db7c01a5fb227bda Author: Alex Deucher Date: Thu Jan 24 19:57:23 2013 -0500 radeon/kms: add oland pci ids Signed-off-by: Alex Deucher commit 9980f1e0e0a5df5fb0c791687e5c98c13089d7d1 Author: Alex Deucher Date: Thu Jan 24 19:52:04 2013 -0500 radeon: add oland chip family Signed-off-by: Alex Deucher commit d89e545826969910226cb96e73b64f18e92d2064 Author: Maarten Lankhorst Date: Wed Jan 30 17:21:05 2013 +0100 bump version post release Signed-off-by: Maarten Lankhorst commit 21a4f3eaca98c1c54bffcdf3926c631cec9c409d Author: Maarten Lankhorst Date: Wed Jan 30 16:55:27 2013 +0100 radeon: bump version for release And fixup distcheck.. Signed-off-by: Maarten Lankhorst commit 102ee4a24e4c9ba0c0b65d3ca8599dc7e0216c1e Author: Alex Deucher Date: Fri Jan 11 09:52:32 2013 -0500 radeon/r200: program RE_WIDTH_HEIGHT properly Values are inclusive. Mesa already sets these correctly. Also bump EXA/Xv limits from 2047 to 2048. Signed-off-by: Alex Deucher commit 47689ef8b878a56ea094e21a6090b228e67d605e Author: Michel Dänzer Date: Fri Jan 11 15:41:48 2013 +0100 Make radeon_glamor_create_textured_pixmap() return TRUE without USE_GLAMOR. Otherwise rotation won't work when glamor support isn't built in. Signed-off-by: Michel Dänzer commit 1a8c05fd5559be842d8a038df73de34d4b261c15 Author: Michel Dänzer Date: Fri Jan 11 13:22:24 2013 +0100 Make CRTC shadow pixmaps usable by glamor. Fixes rotation with glamor. Signed-off-by: Michel Dänzer commit e5e22d788b103c04d3460a221a3b9dc3be69e0a4 Author: Michel Dänzer Date: Thu Jan 10 17:00:16 2013 +0100 DRI2/r[345]xx: 16 bit depth buffers use square micro tiling. Fixes piglit sanity.tests (with 3D drivers which allocate depth buffers from the X server). Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer commit f5d2682584c74587890a9795ece7a8917214a83f Author: Michel Dänzer Date: Thu Jan 10 17:00:15 2013 +0100 DRI2: Properly use buffer depth passed in by client. Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer commit 4e35b2f530e2ca8c7b7220cacd05c661de43d20d Author: Michel Dänzer Date: Thu Jan 10 12:10:52 2013 +0100 Drop support for X servers older than 1.7. The main purpose is to drop DRI2 compatibility code paths which are getting awkward to deal with and at this point are probably only tested lightly if at all. xserver 1.7 was released more than 3 years ago, and 1.6.2 was already required before. Mostly mechanical, there's probably potential for more cleanups. Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer commit 857d729eb3672443f89c0516f8226eacb37dad2b Author: Dave Airlie Date: Mon Jan 7 14:13:33 2013 +1000 radeon: fix damage reporting for slave pixmaps This is definitely more correct, not sure if it'll fix any bugs. Signed-off-by: Dave Airlie commit 6981a5c087165b126c15ba0025cffdba218ab652 Author: Ilija Hadzic Date: Wed Dec 19 10:35:43 2012 -0500 DRI2: limit the swap rate when CRTC is in DPMS-off state If drawable is displayed on a CRTC and relevant CRTC is in DPMS off state, defer the swap by a fixed (hard-coded) time. This patch fixes a bug that caused an application to render at uncontrolled rate when CRTC goes into DPMS "off" state, thus thrashing the GPU and CPU and likely offsetting the power savings achieved by shutting off the display. Signed-off-by: Ilija Hadzic Reviewed-by: Michel Dänzer commit 3657672207322be651cdb94a811337b7c5668c84 Author: Ilija Hadzic Date: Wed Dec 19 10:35:42 2012 -0500 DRI2: change signature of radeon_dri2_drawable_crtc Return pointer to the CRTC instead of CRTC ID and expose consider_disabled option in arguments of this function. Signed-off-by: Ilija Hadzic Reviewed-by: Michel Dänzer commit 61d0aec40e2521488c2fe43e7a6823e5c87d94d7 Author: Ilija Hadzic Date: Wed Dec 19 10:35:41 2012 -0500 video: add option to include disabled CRTCs in best CRTC search This patch adds an option called consider_disabled to radeon_pick_best_crtc function. If this option is set and searching for best-fit CRTC yields nothing, the search will be widened to include CRTCs in DPMS "off" state. The new option is not used yet; it will be in the patches to follow. v2: Do not look at the CRTC mode, we only care about its box. Signed-off-by: Ilija Hadzic Reviewed-by: Michel Dänzer commit a60d2152e928a7011fc7c44a885a34c3cdd4f0fe Author: Michel Dänzer Date: Thu Dec 27 12:13:57 2012 +0100 glamor: Enable full 2D acceleration for SI as well. Signed-off-by: Michel Dänzer commit 04ebe14fe775d18b534e89b50b90ee293ae1910e Author: Michel Dänzer Date: Thu Dec 27 11:54:27 2012 +0100 glamor: Release the drawable after passing to glamor_push_pixels Ported from xf86-video-intel commit ca5c028c2b4d9bf02002acd484054fe427ea8d09 . Signed-off-by: Michel Dänzer commit cee7d61b144162974238b282d76a70aa2f14cc0d Author: Alex Deucher Date: Tue Dec 18 15:49:47 2012 -0500 exa/Xv: fix coordinate limits on AVIVO IGPs RS6xx asics are r4xx derived, but seem to have r3xx limitations as far as clipping is concerned. Spotted by Michel on IRC. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=58469 Signed-off-by: Alex Deucher commit 3c7d024c2671dac541b8f2daed55040f4fd5d62d Author: Michel Dänzer Date: Wed Dec 12 10:43:55 2012 +0100 Remove dead option definitions. These were only used with UMS. Signed-off-by: Michel Dänzer commit bdbd84a6c99943f4e012c92ad9cb920cbd676621 Author: Michel Dänzer Date: Mon Dec 10 23:35:41 2012 +0100 Remove local variables total_size_bytes. Not actually used for anything. Refactoring gone wrong? Also remove a comment that doesn't seem to make sense anymore. Stumbled over this due to a warning by clang: ../../src/radeon_kms.c:1562:6: warning: variable 'total_size_bytes' is uninitialized when used here [-Wuninitialized] total_size_bytes += (64 * 4 * 64); ^~~~~~~~~~~~~~~~ ../../src/radeon_kms.c:1557:25: note: initialize the variable 'total_size_bytes' to silence this warning int total_size_bytes; ^ = 0 Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer commit cf0a81547bcde32bdd2b080c0a546a49dd2eb628 Author: Michel Dänzer Date: Tue Dec 11 11:48:33 2012 +0100 Remove unused local variable 'path'. ../../src/radeon_probe.c: In function 'radeon_platform_probe': ../../src/radeon_probe.c:270:11: error: unused variable 'path' [-Werror=unused-variable] Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer commit d268038a5bdd1655f7533c8dd2edf74fbc82bbee Author: Michel Dänzer Date: Mon Jul 2 09:07:14 2012 +0200 Remove dead code flagged by gcc -Wunused-but-set-variable. Reviewed-by: Alex Deucher Signed-off-by: Michel Dänzer commit 793e1b0ea579cce7489aee57a95f20384d6ecce8 Author: Alex Deucher Date: Thu Dec 6 09:21:19 2012 -0500 radeon: fix ring count in R300PrepareTexturedVideo Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=31364 Signed-off-by: Alex Deucher commit f402805b22e4f4f735924d59c69474b24e623a25 Author: Jerome Glisse Date: Fri Nov 30 10:07:51 2012 -0500 radeon: avoid copying over itself ddx fb In some rare case it seems that the old fb could already be the ddx fb. As copying from the same bo will trigger a ttm deadlck detection which will result in infinite kernel/userspace loop. Avoid doing any copy as anyway it's useless. Signed-off-by: Jerome Glisse Reviewed-by: Michel Dänzer commit 60cd6ceaf44b506433aebf6b3a639a17604dfddd Author: Alex Deucher Date: Wed Nov 21 18:42:56 2012 -0500 radeon: add new SI pci id Signed-off-by: Alex Deucher commit 53af6aa99dfb67b5223c28d5129a79694165048d Author: Jerome Glisse Date: Wed Nov 14 12:15:47 2012 -0500 radeon: avoid segfault when pixmap exceed GPU capabilities We might get a request for a pixmap/drawable that is too big for GPU capabilities in the dri2 get buffer path. In face of such things just return NULL to dri2 get buffer request. The GL driver should then use something like transparent black to avoid something too ugly on the screen. Signed-off-by: Jerome Glisse Reviewed-by: Michel Dänzer commit 71eeb0833489ece745f1e5dc41379ec63161ee81 Author: Alex Deucher Date: Tue Nov 6 09:43:55 2012 -0500 bump verion post release Signed-off-by: Alex Deucher commit cf377c991f4c1cd4eee1a8530ba9fdf6f9f63301 Author: Alex Deucher Date: Tue Nov 6 09:12:39 2012 -0500 radeon: bump version for release 7.0.0, RIP UMS Signed-off-by: Alex Deucher commit 20bfc652ce40008ea561db2984bccf137409c7fd Author: Ilija Hadzic Date: Mon Sep 24 17:19:09 2012 -0400 radeon/radeon_platform_probe: fix Zaphod mode breakage Using radeon_platform_probe function breaks the Zaphod mode because it attempts to call xf86AddEntityToScreen multiple times, but nobody calls xf86SetEntityShared prior to that. Consequently, calls for all but first device instance fail. Prior to introduction of platform bus, the logic was that the Probe function would make the entity sharable, which would cause Xserver to later make it shared prior to adding it to screen. With the platform bus loading, add to screen happens in the probe function so we have to make it shared there. v2: do not make the entity shared if it was not previously marked sharable. Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=56680 https://bugs.freedesktop.org/show_bug.cgi?id=56663 Signed-off-by: Ilija Hadzic commit b2807b53083af5db0b85645666b0127be16623c7 Author: Alex Deucher Date: Fri Nov 2 17:57:18 2012 -0400 man: note that 2D tiling requires Mesa 9.0 or newer Signed-off-by: Alex Deucher commit 1038e29162d869e2ce37f9b8f5f7c8ea37c3e53d Author: Alex Deucher Date: Fri Nov 2 10:04:46 2012 -0400 Revert "radeon/radeon_platform_probe: fix Zaphod mode breakage" This reverts commit 39eac3104c2f08b4d78aab3f88fd104301eb4711. This breaks non-zaphod configurations with xserver 1.13. See: https://bugs.freedesktop.org/show_bug.cgi?id=56680 https://bugs.freedesktop.org/show_bug.cgi?id=56663 commit d748894c84e891662cde6d7a5748f74a5aa5175e Author: Alex Deucher Date: Fri Nov 2 08:50:16 2012 -0400 man: update man pages for trinity (ARUBA) Signed-off-by: Alex Deucher commit 6740e8e90b934611c3bb0f9e8732d66e25b8c727 Author: Andreas Boll Date: Fri Nov 2 13:30:44 2012 +0100 radeon/man: ColorTiling2D is by default on for r6xx-cayman Signed-off-by: Andreas Boll commit 39eac3104c2f08b4d78aab3f88fd104301eb4711 Author: Ilija Hadzic Date: Mon Sep 24 17:41:32 2012 -0400 radeon/radeon_platform_probe: fix Zaphod mode breakage Using radeon_platform_probe function breaks the Zaphod mode because it attempts to call xf86AddEntityToScreen multiple times, but nobody calls xf86SetEntityShared prior to that. Consequently, calls for all but first device instance fail. Prior to introduction of platform bus, the logic was that the Probe function would make the entity sharable, which would cause Xserver to later make it shared prior to adding it to screen. With the platform bus loading, add to screen happens in the probe function so we have to make it shared there. Signed-off-by: Ilija Hadzic commit 2e96aa641bc8a5c263a5b643961383cdf530d044 Author: Marek Olšák Date: Sun Oct 28 12:50:49 2012 -0400 radeon: turn on 2D tiling by default on r6xx-cayman Signed-off-by: Alex Deucher commit e830c039479539735d0836082abef24f6841c803 Author: Marek Olšák Date: Sun Oct 28 12:49:15 2012 -0400 radeon: log if 2D tiling is enabled Signed-off-by: Alex Deucher commit ce1b745dcb60dc516ad999756240b78e72a7aa54 Author: Alex Deucher Date: Tue Oct 16 13:05:46 2012 -0400 radeon: add new pci ids for SI Signed-off-by: Alex Deucher commit e3519be285bdab50ef2193f98826a351a4414fae Author: Dave Airlie Date: Tue Oct 16 16:09:23 2012 +1000 radeon/dri2: fix the window->pixmap math properly. Okay kwin did things different, and I really hope this time this is the correct transformation operation. It works here with gears under kwin and under mutter and under xcompmgr. Signed-off-by: Dave Airlie commit bd9e2c064d93afbe4ab84febb2a43ae6a95ab17b Author: Dave Airlie Date: Thu Oct 11 14:36:11 2012 +1000 radeon/dri2: fix damage reporting on pageflip when you use MPX or slave usb devices, the damage posting was incorrect, and resulted in misrendered boxes on the screen. Fix it by reporting damage correctly. Signed-off-by: Dave Airlie commit e8cb0b721e6ea251f85c799ca0563bfa59a2d37c Author: Adam Jackson Date: Wed Sep 26 09:27:54 2012 -0400 Remove mibstore.h Signed-off-by: Adam Jackson commit 8637f772347c958fa3beea6c0dc9c22255db70e5 Author: Michel Dänzer Date: Thu Sep 13 19:50:35 2012 +0200 glamor: Force acceleration for DRI2 copies. Improves performance of non-pageflipped 3D apps on SI. Signed-off-by: Michel Dänzer commit 40b87f0e9db2642ca8a70e994fb4d3742e199640 Author: Michel Dänzer Date: Wed Sep 12 18:44:10 2012 +0200 glamor: Fix DRI2 crash introduced by PRIME changes. Signed-off-by: Michel Dänzer commit 646ffd49d2cf0d3130301e8ad2f49f620bd9ef1b Author: Dave Airlie Date: Mon Sep 10 15:31:06 2012 +1000 radeon: fix build against old servers Fixes https://bugs.freedesktop.org/show_bug.cgi?id=54711 Reported-by: wolput@onsneteindhoven.nl Signed-off-by: Dave Airlie commit 7c7f2775604da61537c24c249884aaa220e06e13 Author: Dave Airlie Date: Mon Sep 10 11:27:45 2012 +1000 radeon: don't fail to load if we have no modes and gpu driver. This ensures radeon loads on output less GPUs as a GPU driver. There are server bugs that also need to be fixed. Signed-off-by: Dave Airlie commit 7fe16dd037ac688726869816888bd77fe4356f8e Author: Dave Airlie Date: Wed Sep 5 10:41:51 2012 +1000 radeon: fix typo in glamor paths Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54519 Reported-By: scaty@dcinformatique.com Signed-off-by: Dave Airlie commit cdc985e9190ce54dc6274ebc0e87ab954b15bb0d Author: Dave Airlie Date: Tue Sep 4 18:18:50 2012 +1000 radeon: fix build against older servers Another silly one. Signed-off-by: Dave Airlie commit bd0e9c51407cb99f1fe4f0acfedc37ee0c354040 Author: Dave Airlie Date: Tue Sep 4 18:17:06 2012 +1000 radeon/dri2: fix build against older servers. Older servers won't have DRI2UpdatePrime, so fix build. bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54433 Signed-off-by: Dave Airlie commit 75c1f62f44d7b3709c1fa103d59733866967b841 Author: Dave Airlie Date: Mon Sep 3 13:09:02 2012 +1000 radeon: add capability and provider support Signed-off-by: Dave Airlie commit ca8b61e916998458203dfa4b9d0c997fa7d90ba9 Author: Dave Airlie Date: Mon Sep 3 13:08:37 2012 +1000 radeon: allocated shared pixmaps as untiled gtt. Signed-off-by: Dave Airlie commit 8c1bf9d8fe3948b72795984e625ef46b2f0bf654 Author: Dave Airlie Date: Mon Sep 3 13:08:05 2012 +1000 radeon: add pixmap sharing hooks. This hooks into EXA and the dirty tracking to add sharing and output offload support. Signed-off-by: Dave Airlie commit 3add8df8122697acfe126d4857f3946ce44b8305 Author: Dave Airlie Date: Mon Sep 3 13:07:07 2012 +1000 radeon: add dri2 offload support. This adds the new dri2 interfaces required for radeon to be offloaded to. Signed-off-by: Dave Airlie commit f7502a11c8ef9c453ceb40d26109977116df88c2 Author: Dave Airlie Date: Mon Sep 3 12:56:56 2012 +1000 radeon: add shared support to pixmaps. this just adds the interface and shared support to the pixmap. Signed-off-by: Dave Airlie commit f71139a2afe8fffb628331402bf829a6d67c9fff Author: Dave Airlie Date: Mon Sep 3 12:37:22 2012 +1000 radeon: add platform bus loading support. This allows the radeon driver to be loaded via the platform bus mechanism. Signed-off-by: Dave Airlie commit 9911e72ea79e000ee0492d19a434aa98b83b5066 Author: Dave Airlie Date: Fri Aug 17 17:02:51 2012 +1000 radeon: damage full screen after pageflip in order for offload to work we need to cause a full screen damage to be registered after pageflip. Signed-off-by: Dave Airlie commit 0873b8cef21abf1e7286731758f0db1e7f2e7c97 Author: Dave Airlie Date: Fri Aug 3 16:45:50 2012 +1000 ati: fix stub driver loader to load all drivers properly Signed-off-by: Dave Airlie commit cdf522f5992adf7b76f9153c777e6dddcf7758a6 Author: Adam Jackson Date: Wed Aug 15 13:38:28 2012 -0400 Implement ->driverFunc Copied from fbdev, makes it so we can run without iopl. Signed-off-by: Adam Jackson commit 763f387ccac2399f1d58ec112c8bed45196bea5e Author: Adam Jackson Date: Wed Aug 15 12:49:10 2012 -0400 Don't bother to include vbe.h The only VBE code here went away when we dropped UMS. Signed-off-by: Adam Jackson commit aabcf5ea30195274c79ae94c0fe6edc965f5c123 Author: Tomas Chvatal Date: Mon Aug 13 22:58:18 2012 +0200 Add switch for udev to disable automagic detection. Signed-off-by: Tomas Chvatal commit aef90993621331f01d17b95a751d4924d77eed0c Author: Alex Deucher Date: Mon Aug 6 11:00:45 2012 -0400 radeon: add some new SI pci ids Signed-off-by: Alex Deucher commit 6ef1ad6a46348d3aecd8d1f5e94431ca2298853c Author: Michel Dänzer Date: Fri Jul 13 11:15:25 2012 +0200 Deal more gracefully with DRI2 being unavailable at build or run time. Signed-off-by: Michel Dänzer commit ef8a404391036d8aa814dbda2407c789b8a64b92 Author: Michel Dänzer Date: Thu Jul 5 20:14:48 2012 +0200 Initial SI support. Defaults to shadowfb. 3D acceleration is available with glamor. 2D acceleration is disabled until the radeonsi driver can handle glamor's shaders. v2: add chip flags (Alex Deucher) Signed-off-by: Michel Dänzer Signed-off-by: Alex Deucher commit e9edd2f5002c642b59f028b3ec076d604ae8ce9d Author: Michel Dänzer Date: Wed Jun 20 08:40:07 2012 +0200 Initial glamor support. Enable at build time with --enable-glamor and runtime with Option "AccelMethod" "glamor" The most notable lack of functionality is XVideo. Use something like VDPAU for now. Signed-off-by: Michel Dänzer commit 9eac8021f3d33a63156f9f5d43a220e88bb3f8db Author: Michel Dänzer Date: Wed Jun 27 14:48:47 2012 +0200 EXA: Factor out pixmap BO allocation into a helper function. Signed-off-by: Michel Dänzer commit 060c7836e7f7777bacca4e23f57c5985beab33bc Author: Michel Dänzer Date: Wed Jul 4 11:49:18 2012 +0200 Some cosmetic fixups for the radeon manpage. ATI -> ATI/AMD PCIE -> PCIe Signed-off-by: Michel Dänzer commit c3a9f64fe40c78331b9340c3832d344f38b11564 Author: Michel Dänzer Date: Wed Jul 4 11:46:30 2012 +0200 Drop UMS specific parts from the radeon manpage. Signed-off-by: Michel Dänzer commit 5ebebfdb4fadada157d1369f35a8610c0fa72e02 Author: Dave Airlie Date: Fri Jun 29 15:03:43 2012 +0100 radeon: fix conflict with fix in master. Signed-off-by: Dave Airlie commit ff12ddf613ad42e4566d6e10fc6cf33a4e445736 Author: Dave Airlie Date: Fri Jun 29 15:00:44 2012 +0100 configure: bump to 6.99.99 this is in prep for 7.0 release. Signed-off-by: Dave Airlie commit 50689ec8dbd4a68527b2ac16cecac298b8d441d0 Merge: 6a60fcd ae682a6 Author: Dave Airlie Date: Fri Jun 29 14:59:47 2012 +0100 Merge remote-tracking branch 'origin/kms-only' This merges the removal of the UMS code and subsequent simplifications. Hell yes. * origin/kms-only: (24 commits) radeon: fix radeonchipsets properly radeon: fix RADEONChipsets radeon: migrate remainder of radeon_driver.c to rest of driver radeon: avoid including large static struct twice. radeon: drop some more unused macros/inlines radeon: drop another unused struct member. radeon: more unused stuff radeon: drop cardType shouldn't matter to userspace. radeon: drop radeonGetPixmapOffset radeon: move more functions into texture video radeon: drop legacy memory, merge into radeon video radeon: drop unused txoffset vars. radeon: drop vb_mc_addr, not needed anymore radeon: drop offset member of r600 accel object radeon: move macros into radeon.h radeon: drop more wrapper macros. radeon: further macro cleanups. radeon: make exa copy funcs static. radeon: drop FUNC_NAME macro and ONCE_ONLY stuff radeon: drop radeon_commonfuncs. ... Conflicts: configure.ac commit 6a60fcdf060a0f553d8d4f7939c2a05aa04bedfa Author: Dave Airlie Date: Fri Jun 29 14:57:58 2012 +0100 configure: bump version after release. Signed-off-by: Dave Airlie commit 008eb209d506ed7195fd544dfa91be9783946fd5 Author: Dave Airlie Date: Fri Jun 29 14:46:55 2012 +0100 configure: bump version number to 6.14.6 pre-release Signed-off-by: Dave Airlie commit 72fea2635a56c4f572c07fc50fc58f703a21eb4f Author: Dave Airlie Date: Fri Jun 29 14:46:17 2012 +0100 radeon: require libdrm 2.4.36 for KMS support. This is due to some commits to the surface manager that fix bugs. Signed-off-by: Dave Airlie commit 179b035835bfa99283d44ba2d5ee17e686196535 Author: Michel Dänzer Date: Wed Jun 27 19:26:51 2012 +0200 Fix up displayWidth vs. virtualX confusion in radeon_setup_kernel_mem(). It was using the pitch (displayWidth) for the virtual width (virtualX). This prevented using page flipping in some cases, as displayWidth was already overaligned for virtualX, so the DRI2 front and back buffers ended up having a different pitch. Signed-off-by: Michel Dänzer Reviewed-by: Jerome Glisse commit 5dc5012320536f7b1e86a81ed3b823e3626828e1 Author: Dave Airlie Date: Mon Jun 25 09:23:04 2012 +0100 radeon: dixPrivateKeyRegistered is only in server 1.9 just fallback to the old behaviour on older servers. should fix: https://bugs.freedesktop.org/show_bug.cgi?id=51388 Review-over-irc: Michel Dänzer Signed-off-by: Dave Airlie commit ae682a6a1781ab023ab36e3154d6b3e88da63d64 Author: Dave Airlie Date: Mon Jun 18 13:11:31 2012 +0100 radeon: fix radeonchipsets properly commit 6514bcdc0fc199b4f3a8b4273bd29e0fe255d232 Author: Dave Airlie Date: Mon Jun 18 13:02:03 2012 +0100 radeon: fix RADEONChipsets reported on irc by okias. Signed-off-by: Dave Airlie commit dd4ab5aba9047d522dbcfe8a341c368312e1a471 Author: Dave Airlie Date: Sat Jun 16 08:47:32 2012 +0100 radeon: migrate remainder of radeon_driver.c to rest of driver This helps make a few more things static and the driver generally smaller. Signed-off-by: Dave Airlie commit a19237fad2492d70777167c631f4e6e1fae0e908 Author: Dave Airlie Date: Sat Jun 16 08:19:35 2012 +0100 radeon: avoid including large static struct twice. Just extern this in the one file that needs access. Signed-off-by: Dave Airlie commit c8a5c5a0dd9adc46b03b898c9c1719dbbde05ba1 Author: Dave Airlie Date: Fri Jun 15 19:52:14 2012 +0100 radeon: drop some more unused macros/inlines These are no longer used anywhere. Signed-off-by: Dave Airlie commit 3097f273443b5b8fce097e2b1e09a17b02d06a40 Author: Dave Airlie Date: Fri Jun 15 19:45:15 2012 +0100 radeon: drop another unused struct member. Signed-off-by: Dave Airlie commit cb97e75acab84b67b7b7358860788638efc9b344 Author: Dave Airlie Date: Fri Jun 15 19:38:45 2012 +0100 radeon: more unused stuff Remove all CurrentLayout stuff. Signed-off-by: Dave Airlie commit 81593e7deb688fa3108a0589c1418459ec0df4de Author: Dave Airlie Date: Fri Jun 15 18:52:52 2012 +0100 radeon: drop cardType shouldn't matter to userspace. Signed-off-by: Dave Airlie commit 997b0dddfeb180043ece5eff0ac0d6a1a751f9b5 Author: Dave Airlie Date: Fri Jun 15 18:43:01 2012 +0100 radeon: drop radeonGetPixmapOffset no longer needed. Signed-off-by: Dave Airlie commit 639061edb3ac35a24e4d6633c9b6384434dcac64 Author: Dave Airlie Date: Fri Jun 15 18:38:48 2012 +0100 radeon: move more functions into texture video make more thing static. Signed-off-by: Dave Airlie commit 85711a0a6a553232b603dbbb2b2d234c35391578 Author: Dave Airlie Date: Fri Jun 15 17:26:50 2012 +0100 radeon: drop legacy memory, merge into radeon video This merges these two functions into textured video code. Signed-off-by: Dave Airlie commit 445ca1d66ce7b37762731fe67407cc1b978bb129 Author: Dave Airlie Date: Fri Jun 15 17:13:48 2012 +0100 radeon: drop unused txoffset vars. These vars aren't being used anymore. Signed-off-by: Dave Airlie commit 832244de9e6d7aa1b8fbeb29c9a6a86923744d60 Author: Dave Airlie Date: Fri Jun 15 17:09:00 2012 +0100 radeon: drop vb_mc_addr, not needed anymore This field is totally unused now, so drop it. Signed-off-by: Dave Airlie commit 6559b6e28bf111b64c3aeb5ec1260acfeb3e0b7f Author: Dave Airlie Date: Fri Jun 15 17:05:54 2012 +0100 radeon: drop offset member of r600 accel object This is always 0 now. Signed-off-by: Dave Airlie commit 857179e538c9752fab239a21312d0fcc80022151 Author: Dave Airlie Date: Fri Jun 15 16:55:23 2012 +0100 radeon: move macros into radeon.h Drop separate header file, there isn't many separate macros now. Signed-off-by: Dave Airlie commit 148e889149f5ecc3dc2473f2a9e01572eeb037d3 Author: Dave Airlie Date: Fri Jun 15 16:52:24 2012 +0100 radeon: drop more wrapper macros. Signed-off-by: Dave Airlie commit ad8629e3323efe484dd1421d94dd934e1bfafe56 Author: Dave Airlie Date: Fri Jun 15 16:49:13 2012 +0100 radeon: further macro cleanups. drop some more of the wrapper macros. Signed-off-by: Dave Airlie commit 96644f96f1a2df1d7d1ca8cbdc9a105affdb4f32 Author: Dave Airlie Date: Fri Jun 15 16:34:53 2012 +0100 radeon: make exa copy funcs static. These are no longer used outside this area. Signed-off-by: Dave Airlie commit 83904b820b81d226940ec6d663246f243f92e7ba Author: Dave Airlie Date: Fri Jun 15 16:30:41 2012 +0100 radeon: drop FUNC_NAME macro and ONCE_ONLY stuff Drop all the CP vs MMIO macros that name functions. Signed-off-by: Dave Airlie commit b422d8085aab4e01a1ac4ffb247c73fe51aafa0d Author: Dave Airlie Date: Fri Jun 15 16:14:54 2012 +0100 radeon: drop radeon_commonfuncs. modify all the macros and drop it into radeon_accel.c Signed-off-by: Dave Airlie commit 29dd3f84eecd2892a438f004403521de8986a91d Author: Dave Airlie Date: Fri Jun 15 16:11:03 2012 +0100 radeon: misc cleanups. Signed-off-by: Dave Airlie commit 678c1f3425c0fa7e98795c8e351da77d04652e02 Author: Dave Airlie Date: Fri Jun 15 16:06:27 2012 +0100 make pci chipsets static Signed-off-by: Dave Airlie commit 95cbbe999418c72dc407069d31e759d70f49ab16 Author: Dave Airlie Date: Fri Jun 15 16:01:53 2012 +0100 drop RING_LOCALS/ACCEL_PREAMBLE these were unused now. Signed-off-by: Dave Airlie commit 18d5ae3bd9075ac1a2ee21b071ac133e2e634b62 Author: Dave Airlie Date: Fri Jun 15 10:05:03 2012 +0100 radeon: drop all UMS/DRI1/XAA/overlay support. This overhauls the radeon driver and removes all the old UMS-only code, it drops all the UMS, DRI1, XAA, overlay Xv, video capture, tv tuners There are probably a lot more cleanups that will fall out of this afterwards. So far this is compile/build tested. Signed-off-by: Dave Airlie commit 248e912c487636d7352cfad43c03fc9f19fc2215 Author: Michel Dänzer Date: Fri Jun 8 12:18:48 2012 +0200 UMS: Fix CRTC DPMS state check. Signed-off-by: Michel Dänzer commit 58883711136fa6671d4f3250d4ee973e2953ebb4 Author: Alex Deucher Date: Thu Jun 7 11:47:21 2012 -0400 configure: bump version post release Signed-off-by: Alex Deucher commit 3a9103f855c67bbcd7b97ee2e96836353e0d789d Author: Alex Deucher Date: Thu Jun 7 11:27:08 2012 -0400 configure: bump for release Signed-off-by: Alex Deucher commit f1693ee09e9b251eb75e3e5fe0ee7699fec6fb98 Author: Alex Deucher Date: Thu Jun 7 11:23:31 2012 -0400 configure: bump libdrm_radeon requirement Signed-off-by: Alex Deucher commit 77a056c1725c9c44a328ed324687bdf35144e9e2 Author: Michel Dänzer Date: Wed Jun 6 12:29:37 2012 +0200 Don't page-flip or wait on a CRTC while we're VT-switched away. We don't know what the CRTC state is. Signed-off-by: Michel Dänzer commit 1d9f1eb7e65c57c52759ccbfa51e8bdd5a10acac Author: Michel Dänzer Date: Wed Jun 6 12:16:08 2012 +0200 Don't wait on a CRTC which has been disabled via DPMS (bug #49761). Fixes https://bugs.freedesktop.org/show_bug.cgi?id=49761 . Signed-off-by: Michel Dänzer commit 4603285aa8efaf2614f15a38254465cec2075f11 Author: Alex Deucher Date: Tue Jun 5 09:48:59 2012 -0400 radeon: add new PCI ids Signed-off-by: Alex Deucher commit 9307609420b4b209767d2057b4803bcb16cc1455 Author: Dave Airlie Date: Sat Jun 2 17:16:34 2012 +0100 radeon: improve smooth startup fallbacks. If we can't handover the framebuffer, memset it to black. mostly ported from nouveau. Signed-off-by: Dave Airlie commit 89a4c79a43a2b6963e41d7812e8fe5beedb556af Author: Dave Airlie Date: Sat Jun 2 17:14:14 2012 +0100 radeon: fix smooth startup with tiling enabled. We need to use the surface we worked out when we allocated the front bo, not work out a new surface from scratch. This fixes smooth handover from plymouth to gdm on F17. Signed-off-by: Dave Airlie commit c1b9b2c9d71a87a0b98ccdb542da8a30c8c4d99a Author: Dave Airlie Date: Fri Jun 1 12:22:06 2012 +0100 radeon: fix compat api for newest planned API. Signed-off-by: Dave Airlie commit 68c51d148b22ee8cbe98b5d5441e3494804ee808 Author: Dave Airlie Date: Fri Jun 1 12:21:34 2012 +0100 drmmode: drop flags arg to adjust frame. Signed-off-by: Dave Airlie commit b1e9c3081d2b975682a62389aa29063b79f9655c Author: Dave Airlie Date: Thu May 24 17:54:41 2012 +0100 radeon: move include down further fixes tinderbox build. Signed-off-by: Dave Airlie commit 5ed959585f35a4eff2cd803ae222b46d164f210d Author: Dave Airlie Date: Thu May 24 08:17:11 2012 +0100 radeon: update compat-api.h for block handler + enable/disable fb. This updates the compat stuff for the latest block handler code, and the enable/disable interface. Signed-off-by: Dave Airlie commit 2de17efdcb502f91fb145130c12be3cb164f03c5 Author: Dave Airlie Date: Thu May 24 08:16:39 2012 +0100 radeon/xvmc: fix build with new API. This was missing the compat include. Signed-off-by: Dave Airlie commit a1f47768309aa8b14b13f05ba01bb490024c4cbc Author: Dave Airlie Date: Thu May 24 07:55:14 2012 +0100 radeon: fix a few more RHDAtomBiosFunc uses I missed these in my initial search/replace for some reason. Signed-off-by: Dave Airlie commit c26e40cf60eb6a2bffb5ec7cba1f1bbffcbf1d53 Author: Dave Airlie Date: Wed May 23 12:12:54 2012 +0100 radeon/atombios: rewrite atombios parser code to not use xf86Screens. Just pass the ScrnInfoPtr around instead. Signed-off-by: Dave Airlie commit 14122214edabd2a574b66577289a7c8732f4e953 Author: Dave Airlie Date: Wed May 23 11:57:35 2012 +0100 radeon/generic_bus: stop passing scrnIndex Just pass a pointer to the screen, removes usage of xf86Screens lookup Signed-off-by: Dave Airlie commit 2101e485480e3ffd6a17ed12f5287b8b1e4e0223 Author: Dave Airlie Date: Tue May 22 16:17:55 2012 +0100 compat for new server API commit 9d2549057ffced996bfaeb8df4901ef57da636c7 Author: Dave Airlie Date: Wed May 16 15:45:53 2012 +0100 ati: convert to new screen conversion APIs The compat header takes care of the old server vs new server. this commit was autogenerated from util/modular/x-driver-screen-scrn-conv.sh Signed-off-by: Dave Airlie commit 80a45bfc26e20d1d481f13cb15c0720d165a8306 Author: Dave Airlie Date: Wed May 16 15:42:59 2012 +0100 radeon: add compat-api.h commit 84c3900b5179a8d2cc5f925e94ed5b2bbdee1ad9 Author: Dave Airlie Date: Wed May 23 08:49:45 2012 +0100 radeon/xaa: drop scrnIndex parameter to some functions This isn't needed, and makes api changes later easier. Signed-off-by: Dave Airlie commit 3fb694b308ebadd1b849836059b6b56bb19385f7 Author: Thierry Vignaud Date: Wed May 16 14:43:53 2012 +0200 UMS/EXA: Add reminder for potential solid picture performance issue. commit 4b9bad959438725e4434e2aa4f142542d8dcc260 Author: Roland Scheidegger Date: Fri May 11 05:25:32 2012 +0200 radeon: use GB_GR and BG_RG formats for packed yuv video for r600+ Those formats were invented for exactly that purpose so use them. This saves some code and also some hw resources (only need one sampler instead of two for packed yuv). Only tested on EG. commit 37786e9027b8c8d1f9ec9928915784dd28853766 Author: Roland Scheidegger Date: Fri May 11 05:25:33 2012 +0200 radeon: avoid rounding errors in texture coords for textured xv on EG+ make sure the division is done with floats, otherwise the coordinate can be wrong up to 1 texel. Particularly visible with clipping and small source scaled up (since one texel can be a shift of several pixels) but could be seen even unscaled. Should provide more accurate coords without clipping too depending on the scale factor probably. This is a straight port of 688c8a54a00b01e73a11970ad2abe858f8c7c5c4 when I apparently forgot the eg code... commit faea3aafa8c9a7c1bc866ffcd847972c5569c8bc Author: Anisse Astier Date: Thu May 10 17:22:59 2012 +0200 Fail more gracefully when drm surface manager can't be initialized Should make bugs like https://bugs.freedesktop.org/show_bug.cgi?id=48138 easier to diagnose. [ Michel Dänzer: Appended newline to error message. ] Signed-off-by: Anisse Astier Singed-off-by: Michel Dänzer commit b0b7d8d26fd107df342b5c87b0a38e5bb08101a9 Author: Michel Dänzer Date: Wed May 9 11:08:49 2012 +0200 EXA/UMS: Synchronize to the GPU before writing solid colour to scratch pixmap. UMS doesn't do this automagically. It's a big hammer that will probably suck for performance, but I don't have any better ideas right now. Signed-off-by: Michel Dänzer commit 6bda7ceda645e838723883d133d614def1511d16 Author: Michel Dänzer Date: Thu May 3 15:07:30 2012 +0200 EXA: Attempt to fix solid picture acceleration with UMS. Only compile tested, but should fix https://bugs.freedesktop.org/show_bug.cgi?id=49182 . Signed-off-by: Michel Dänzer commit b33cf9cf9dce5add8aaccab10ba5aaa64247c8ce Author: Alex Deucher Date: Wed May 2 09:55:16 2012 -0400 radeon: add MacModel entry for SAM440ep embedded board Signed-off-by: Alex Deucher commit 0bda305f7ab2a4720b3fea3f318ab2a73be151e5 Author: Alex Deucher Date: Fri Apr 13 13:28:10 2012 -0400 EXA: Support acceleration of solid pictures on R2xx. Signed-off-by: Alex Deucher Reviewed-by: Michel Dänzer commit a7754b076e355fef3aea082b6e2d3aefbb8e7a9b Author: Alex Deucher Date: Fri Apr 13 13:24:46 2012 -0400 EXA: Support acceleration of solid pictures on R1xx. Signed-off-by: Alex Deucher Reviewed-by: Michel Dänzer commit cac2d7ed54918579418fc762558497d3ec547fad Author: Alex Deucher Date: Sat Apr 14 08:53:39 2012 -0400 EXA: Support acceleration of solid pictures on Evergreen/NI. Signed-off-by: Alex Deucher Reviewed-by: Michel Dänzer commit d88b9700137ee407c483f263bb55c77cd6f92fef Author: Michel Dänzer Date: Fri Apr 13 09:35:38 2012 +0200 EXA: Support acceleration of solid pictures on R3xx-R7xx. Allocate 1x1 scratch pixmaps to hold the solid picture colours. This works around https://bugs.freedesktop.org/show_bug.cgi?id=47266 and might improve performance in other cases as well. Signed-off-by: Michel Dänzer commit 66b586b9b9cdaf70f0fcd547b5a04f044d848d44 Author: Michel Dänzer Date: Mon Apr 16 15:33:36 2012 +0200 RADEONCopySwap: Fix RADEON_HOST_DATA_SWAP_16BIT case. It was the same code as for RADEON_HOST_DATA_SWAP_32BIT. This caused bus errors on FreeBSD/PPC, but I'm not sure how it could not cause problems anywhere... Reported-by: Andreas Tobler Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher commit 1e656cd5973bbcf85b63406638ede0bccd65e28f Author: Michel Dänzer Date: Mon Apr 16 15:44:01 2012 +0200 Make radeon_setup_kernel_mem failures more graceful and verbose. So that bugs like https://bugs.freedesktop.org/show_bug.cgi?id=48138 can be diagnosed more easily. Signed-off-by: Michel Dänzer commit d282719a9c2fb0ee32830aa75b8dfbb9392954ed Author: Jerome Glisse Date: Wed Apr 4 17:08:30 2012 -0400 r6xx-r9xx: force 1D tiling for buffer with height < 64 Due to some old kernel issue, height is 8 aligned insided the ddx For buffer with height btw 57 & 63 this lead ddx to believe it can allocate a 2D tiled surface while mesa will not align height and will assume 1D tiled leading to disagreement and rendering issue. This patch force buffer with height < 64 to be 1D tiled. Signed-off-by: Jerome Glisse commit de2419e5509398328903ca61f4ea80852cba6bc4 Author: Alex Deucher Date: Thu Mar 29 00:28:39 2012 -0400 configure: bump version post release Signed-off-by: Alex Deucher commit 9425c50e93903fb64d9e569cfdc1e2c35d16ce25 Author: Alex Deucher Date: Thu Mar 29 00:19:12 2012 -0400 configure: bump version for release Signed-off-by: Alex Deucher commit dc18d771713ecd893c7d5833da6e0661093161dc Author: Alex Deucher Date: Wed Mar 28 17:32:53 2012 -0400 configure: bump libdrm requirement for TN support Signed-off-by: Alex Deucher commit 03535904a3e1542b3924d0a062c4b022ca196888 Author: Alex Deucher Date: Tue Mar 27 09:48:28 2012 -0400 radeon: man page updates Signed-off-by: Alex Deucher commit 6ed191c33caa33c12c2c6dafcba3a5ab1bf4a02f Author: Alex Deucher Date: Tue Mar 20 19:57:53 2012 -0400 radeon/kms: add TN pci ids Signed-off-by: Alex Deucher commit 55d65fcf33eb383e3fbc7a1d469ab68a70a7ab37 Author: Alex Deucher Date: Tue Mar 20 19:54:57 2012 -0400 radeon/kms: add support for TN (trinity) APUs - KMS only - Includes full EXA/Xv support Signed-off-by: Alex Deucher commit b5cf9bd693cf4090956add4c33c4fae9c3069a03 Author: Marek Olšák Date: Wed Mar 7 11:01:40 2012 -0500 r6xx: initialize SX_MISC If Mesa set it to 1, the DDX would not render anything = the monitor would basically freeze. agd5f: update emit count as well. Signed-off-by: Alex Deucher commit 355dc4295912c153f5333421594fa90aa119a056 Author: Michel Dänzer Date: Tue Mar 6 15:52:40 2012 +0100 DRI2: Unreference buffers immediately when event wait info is invalidated. Deferring this could result in trying to unreference buffers from a previous server generation, i.e. accessing freed memory. Signed-off-by: Michel Dänzer Tested-by: Christian König commit fe51469b2e02e4d565050bab077985270fb58a9b Author: Michel Dänzer Date: Tue Mar 6 15:52:40 2012 +0100 Re-register DRM FD wakeup handler for each server generation. Fixes hang when trying to use DRI2 swap scheduling after a server reset. Signed-off-by: Michel Dänzer Tested-by: Christian König commit 878454ae8d8e96dd27a19d0b30940d014c4cd7e2 Author: Hans Verkuil Date: Fri Feb 24 09:35:39 2012 -0500 Fix ConnectorTable crash in radeon_output.c The sam440ep PPC board requires a ConnectorTable xorg.conf option, but putting in that option causes the radeon driver to crash. I finally traced it to a copy-and-paste bug in radeon_output.c as a result of a major rework in commit 82f12e5a40c1fbcb91910a0f8b725c34fff02aae. The actual crash occurred in RADEONPrintPortMap(). Signed-off-by: Hans Verkuil Signed-off-by: Alex Deucher commit 688c8a54a00b01e73a11970ad2abe858f8c7c5c4 Author: Roland Scheidegger Date: Sat Feb 18 21:12:34 2012 +0100 radeon: avoid rounding errors in texture coords for textured xv make sure the division is done with floats, otherwise the coordinate can be wrong up to 1 texel. Particularly visible with clipping and small source scaled up (since one texel can be a shift of several pixels) but could be seen even unscaled. Should provide more accurate coords without clipping too depending on the scale factor probably. Changed for r100-r600, though only tested on r300. commit 2778b56252124ef6f636a493d2e1457b43911c37 Author: Jerome Glisse Date: Mon Feb 13 20:42:57 2012 -0500 radeon: r6xx-eg use linear general when using scratch bo In path where we need to use scratch bo as temporary area, consider it as linear buffer. Not linear aligned. Fix some case such as in bugs: https://bugs.freedesktop.org/show_bug.cgi?id=45827 Signed-off-by: Jerome Glisse commit c66ae235700f5efe64eb168327551b8f1d153c9c Author: Michel Dänzer Date: Mon Feb 13 10:43:58 2012 +0100 Handle new xorg_list API. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=45937 Signed-off-by: Michel Dänzer commit 7ff277e22c629308915307bbee96eb25ff77f8b9 Author: Alex Deucher Date: Fri Feb 10 13:04:59 2012 -0500 radeon: fix crash in drmmode_create_bo_pixmap() Only init surface on r6xx+. Return NULL rather than FALSE. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=45829 Signed-off-by: Alex Deucher commit 60b949f34df5db05e0e102cc3daa33469aa50cfc Author: Alex Deucher Date: Fri Feb 10 13:11:26 2012 -0500 radeon/kms: reusing fd message is not an error It's standard behavior. Signed-off-by: Alex Deucher commit e20284409937d784847339b5d466a95012d85940 Author: Michel Dänzer Date: Fri Feb 3 12:21:59 2012 +0100 EXA/r6xx+: Only set write domain or read domains, not both. (Bug #43893) Avoids an accounting bug in libdrm_radeon 2.4.31 or older. See https://bugs.freedesktop.org/show_bug.cgi?id=43893 Signed-off-by: Michel Dänzer commit 5a7f64c5170ca424c9dca739662018e30df13413 Author: Michel Dänzer Date: Wed Feb 8 11:35:35 2012 +0100 Fix UMS build failure. And some UMS specific warnings. Signed-off-by: Michel Dänzer commit 87f776b966f4200c97a989536d4b71822ae4c0b3 Author: Michel Dänzer Date: Wed Feb 8 11:10:27 2012 +0100 Remove unused local variable 'height'. Pointed out by gcc -Wunused-variable. Signed-off-by: Michel Dänzer commit f63262e2f112a348c45f0dcecd891c8b6d9c5ee8 Author: Michel Dänzer Date: Wed Feb 8 10:28:45 2012 +0100 evergreen: Initialize source surface member for textured video. Fixes crash reported by Ole Salscheider on IRC. Signed-off-by: Michel Dänzer commit c8f104d38870f14049402bbc14f662c151caeeef Author: Jerome Glisse Date: Tue Feb 7 15:04:37 2012 -0500 radeon: fix tiling for weird resolution Should also fix xv for some case. Signed-off-by: Jerome Glisse commit 615033f2b5e3817e335e9d022fc9fdcf8ac8b11a Author: Jerome Glisse Date: Tue Dec 13 11:08:19 2011 -0500 r600-evergreen: use common surface allocator for tiling v11 Use libdrm common surface code so mesa,ddx have same idea about tiling surface and what their pitch should be and the alignment constraint. v2 fix remaining issue add new option to conditionaly enable v3 fix fbcon copy and r600 exa copy path v4 fix non tiled path 2D tiling on GPU >= R600, set it to false as default v5 adapt to pixel/element size split of libdrm/radeon v6 update to properly handle falling back to 1d tiled v6 final fix to tile split value on evergreen and newer v7 fix default array mode on r6xx, fix height alignment issue on evergreen v8 fix tile split value v9 add stencil tile split support, simplify dri2 for stencil with evergreen v10 Try to fix xv path regarding tiling. Adapt to libdrm API change. Try to fix case where there is no surface which means non tiled bo. v11 check for proper libdrm Signed-off-by: Jerome Glisse commit 36c190671081967bac6fff48aaf66d67b639a48c Author: Michel Dänzer Date: Wed Feb 1 13:21:02 2012 +0100 Fix vline range calculations. The range passed in is in pixmap coordinates, so the CRTC offset needs to be added to the clamping limits and subtracted from the clamped range for pre-AVIVO display engines. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher commit bb0e1531ac6949d38025d7dcb19234fee33b2acf Author: Michel Dänzer Date: Wed Feb 1 13:07:11 2012 +0100 Check for empty vline ranges after clamping. The clamping could turn a previously non-empty range into an empty one. Also, start == stop means the range is empty. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher commit 13b3aed4ef9afbcbaea1dcf0ed1acb162b240a3f Author: Alex Deucher Date: Tue Jan 10 09:35:09 2012 -0500 EXA/r6xx+: fix rop setting for overlapping copies Need to use GXCopy for the src to temp copy, then the original rop for the temp to dest copy. Noticed by: Frank Huang Signed-off-by: Alex Deucher commit eb6d769a087b2ed5952f477fc3f0b0625810a287 Author: Egbert Eich Date: Tue Nov 15 18:50:56 2011 +0100 DPMS: Split non-modeset CRTC DPMS function. RADEONRestore() calls crtc->funcs->dpms() after most of the mode setting subsystems have been restored. This function enables the CRTCs but does more: it calls DRM pre- and post-modeset ioctls and sets up the palettes (LUTs). None of these two things are needed. Accessing the palette registers after restoring the PLLs can even lead to lockups. Thus the CRTC DPMS function is split into two parts: one that just enables /disables the CRTC and one which wraps this function and does the rest. Now the inner function can be called directly from RADEONRestore() as there is no need to go thru the RandR hooks in this function while the RandR hook uses the wrappering function so the full functionality is preserved from an RandR point of view. Signed-off-by: Egbert Eich Reviewed-by: Alex Deucher commit ac51e331895b216d288bc7bd108a38b362214668 Author: Egbert Eich Date: Mon Nov 14 19:10:01 2011 +0100 UMS: Fix lockups in palette save/restore on pre-AVIVO chips. The reintroduction of palette save/restore in 5efdf514 causes some pre-AVIVO chips to lock up. An investigation revealed that accessing palette registers when the associated PLL is not running is causing this. With UMS the PLL setup that is saved has been done by the BIOS typically. A similar issue was observed when VGA palette save/restore had been reinitroduced with 80eee856: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=480312 and has been worked around for Linux without further investigation by 87e66ce7. To fix the issue we now a. introduce 'on-demand' palette saving (ie the palette is saved before it is first altered). This guarantees that the palette register are only associated when the associated CRTC is active and thus the PLLs are powered up and running. b. move palette restore before PLL restore. c. eliminate generic VGA palette save/restore which seems to be unneeded when the palette is restored natively. It is believed that this caused the behavior described in https://bugs.freedesktop.org/show_bug.cgi?id=18407#c27 Signed-off-by: Egbert Eich Reviewed-by: Alex Deucher commit 0a8d04eeac95f4db9d03ee31070bd825a7feb0b2 Author: Matthieu Herrb Date: Sun Jan 1 18:27:54 2012 +0100 Update for new vgaHW API. Signed-off-by: Matthieu Herrb Reviewed-by: Mark Kettenis Signed-off-by: Alex Deucher commit ae45d7e6d8e6844cd4586c9ee97c21b257fa788f Author: Michel Dänzer Date: Wed Dec 28 11:48:36 2011 +0100 DRI2: Can't use page flipping for pixmaps. (bug #42913) Fixes https://bugs.freedesktop.org/show_bug.cgi?id=42913 . Signed-off-by: Michel Dänzer commit aacbd629b02cbee3f9e6a0ee452b4e3f21376bd3 Author: Alex Deucher Date: Mon Dec 12 09:32:30 2011 -0500 radeon: add some new pci ids fixes: https://bugs.freedesktop.org/show_bug.cgi?id=43739 Signed-off-by: Alex Deucher commit bc54e415e2fd344939c5c788ea0686133a7e2c69 Author: Dave Airlie Date: Tue Dec 6 15:47:45 2011 +0000 radeon: add original radeon to always tiled. and actually enable it for M7, previous commit only did one function. Signed-off-by: Dave Airlie commit ba46c7b0cf72d157748981eb3224d5eefb6200aa Author: Dave Airlie Date: Tue Dec 6 13:42:49 2011 +0000 radeon: refine always tiled depth check So it appears the M7 family always tiles its depth buffer also. Signed-off-by: Dave Airlie commit 98b2d5fe1722a43c4bbe7711ed7180a3fb65305f Author: Dave Airlie Date: Mon Dec 5 18:44:28 2011 +0000 radeon: r200 depth buffers are always tiled When we do the allocations we need to make sure the always tiled nature is taken into account. Signed-off-by: Dave Airlie commit 7dcefc69d9fbceae27cd03083c815e01a19b527e Author: Alex Deucher Date: Mon Dec 5 09:21:48 2011 -0500 Xv: Evergreen+ asics support 16k surfaces Signed-off-by: Alex Deucher commit 72e386d42516e7cd3c2cbf2fffc9174cd3ec8451 Author: Alex Deucher Date: Wed Nov 30 19:38:35 2011 -0500 radeon: add some new pci ids Signed-off-by: Alex Deucher commit 3853c3020d05175ae180b9a188dec7c425bdd0b8 Author: Dave Airlie Date: Mon Nov 28 18:38:30 2011 +0000 fixup xinerama since 9151f3b1c2ebcc34e63195888ba696f2183ba5e2 since the driver would call RRFirstOutput without checking if randr has been enabled, and it would crash in privates code. reported by vereteran on #radeon Signed-off-by: Dave Airlie Acked-on-irc-by: Michel Dänzer commit d669c34f140c000f88c4b4e464e44e6c8694f581 Author: Benjamin Herrenschmidt Date: Mon Nov 21 11:35:40 2011 +1100 ddx/evergreen: Fix endian of ALU constants The constants are written directly into a buffer object shared with the card and we "forget" to swap them. This patch fixes it by doing the swap in evergreen_set_alu_consts() in-place (ie, it modifies the buffer), which should be fine with the way we use it in the ddx. This makes everything work fine on my caicos card on a G5 including some quik tests with Xv, gnome3 shell, etc... Thanks a lot to Jerome Glisse for holding my hand through debugging that (and finding the actual bug). Signed-off-by: Benjamin Herrenschmidt Signed-off-by: Alex Deucher commit 422bdd4fe6cb728e1dd08a56f6ee2d0f009cbfcb Author: Alex Deucher Date: Mon Nov 14 09:39:16 2011 -0500 radeon: add missing FireMV pci id Signed-off-by: Alex Deucher commit 534fb6e413a909a9d1afd57d1c711844b7c5ddf4 Author: Dave Airlie Date: Fri Nov 11 10:26:51 2011 +0000 ati: enable bg none when fbcon succeeds and we are built against ABI after 10. One less patch to keep carrying in Fedora. Signed-off-by: Dave Airlie commit 89452c08048c98fb5cc3dc551b3824be40d52cf2 Author: Michel Dänzer Date: Tue Nov 8 11:23:11 2011 +0100 UMS: Guard references to PCITAG / pciTag with XSERVER_LIBPCIACCESS (bug #42690) Should fix https://bugs.freedesktop.org/show_bug.cgi?id=42690 . Signed-off-by: Michel Dänzer commit 5ec34ed95948f7164184551615c1fc4c3eef3b98 Author: Ilija Hadzic Date: Thu Nov 3 20:16:47 2011 -0400 DRI/DRI2: remove hard-coded limitation to 6 crtcs DRM's hard limit to the number of CRTCs is 32. ATI DDX unnecessarily clips this limit to 6 by hard coding initial assumption for output->possible_crtcs mask to 0x7f (before it gets trimmed down to what's really possible for a given output) and by allocating only 6 entries for for cursor_bo[] array in RADEONInfoRec. Fix this and thus allow the ATI DDX to deal with as many CRTCs as the DRM allows (32), so it is ready if anything with >6 CRTCs comes out. Signed-off-by: Ilija Hadzic commit 4853ab2cdc3b97948c7cd69eaf4fff54f59774fc Author: Michel Dänzer Date: Fri Nov 4 12:15:53 2011 +0100 Turn compile time check into runtime check. Signed-off-by: Michel Dänzer commit bcdb54fe16ebf2e239b84eebf20e8adfe5094bff Author: Alex Deucher Date: Thu Oct 20 11:11:35 2011 -0400 check for xserver 1.9.4.901 to enable tiling by default Previous xservers had a bug in the EXA code which caused display corruption in some cases. See: https://bugs.freedesktop.org/show_bug.cgi?id=33929 Signed-off-by: Alex Deucher commit edde94cba5321e6e51e7fd4d79dde5abc4944495 Author: Michel Dänzer Date: Wed Nov 2 13:40:05 2011 +0100 Bump version post release. commit 93459f842c2d8dc178a1954b8e05150fcb96ac9a Author: Michel Dänzer Date: Wed Nov 2 12:51:15 2011 +0100 Bump version for 6.14.3 release. commit fe3ce559b7f07d39ded39abb38576846d6eb185b Author: Jeremy Huddleston Date: Tue Nov 1 20:27:03 2011 -0700 Build fix for -Werror=int-to-pointer-cast Signed-off-by: Jeremy Huddleston commit d3d6a5da07aaec5961e51c9a8f90c1490ee101b6 Author: Tormod Volden Date: Sat Oct 29 23:08:46 2011 +0200 radeon: do not include xf86PciInfo.h We already use atipciids.h instead most places. Signed-off-by: Tormod Volden commit 70da7001e81363ed6ef2c4727c512daf53ae29fe Author: Jeremy Huddleston Date: Sat Oct 29 20:15:09 2011 -0700 Use malloc/calloc/realloc/free directly Signed-off-by: Jeremy Huddleston commit a3bb07efb1757c33d70e2e1928219d12a4dd6498 Author: Michel Dänzer Date: Tue Oct 25 17:43:58 2011 +0200 EXA >= R6xx / KMS: Avoid running out of CS space at inconvenient times. Otherwise we may end up with things not properly set up at the beginning of the next CS. Fixes http://bugs.debian.org/645007 . In contrast to the Composite code for < R6xx, this isn't necessary with UMS, as the draw packet only uses constant space in the indirect buffer, and nothing else can mess with the 3D state between indirect buffers. Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher commit 23788c4a5e3b6affb9b183e1393edd0e5ca4550e Author: Michel Dänzer Date: Thu Oct 27 19:12:22 2011 +0200 EXA < R6xx: Make sure 2D state is re-emitted after running out of CS space. Otherwise it's basically luck what the 2D state ends up being at the beginning of the next CS. Signed-off-by: Michel Dänzer commit 6e0e1a821accc6ca95f4134e49b66a6b168c1934 Author: Michel Dänzer Date: Tue Oct 25 17:39:57 2011 +0200 Make radeon_dri2_create_buffer(s) more robust. (Bug #30047) In particular, handle and propagate failure to allocate GPU accessible memory, instead of crashing. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=30047 . Also take care not to leak resources in error paths. Signed-off-by: Michel Dänzer commit 856583dbca9319c77fed40daa9956e81a0068f9e Author: Jerome Glisse Date: Thu Oct 20 14:17:14 2011 -0400 radeon/kms: fallback to vesa if GPU is not supported by UMS For GPU not supported by UMS, test in probe so that we properly fallback to vesa. Signed-off-by: Jerome Glisse Reviewed-by: Alex Deucher commit f6f1b4f7789cfef763c063e671b76b60be8bdd8e Author: Maarten Lankhorst Date: Tue Oct 18 14:30:39 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. Allows use of libvdpau_rx00 without having to set things up separately, similar to the patch to xf86-video-nouveau. Signed-off-by: Maarten Lankhorst Reviewed-by: Christian König Reviewed-by: Michel Dänzer Tested-by: Michel Dänzer commit a6b2bd2d184f10d4c56c4ee17186aedb238a36ec Author: Alex Deucher Date: Wed Sep 21 17:00:16 2011 -0400 UMS: fix DDIA enable on some rs690 systems DVOOutputControl checks the value of of bios scratch reg 3 on some tables and assumes the encoder is already enabled if the DFP2_ACTIVE bit is set. Clear that bit so the table sets the DDIA enable bit properly. Signed-off-by: Alex Deucher commit d78860ba53d9bfcf6c28e1cfd2d970709b5e20fa Author: Michel Dänzer Date: Fri Aug 12 11:21:33 2011 +0200 Only call radeon_dri2_close_screen() if DRI2 was enabled. Signed-off-by: Michel Dänzer commit 11330ca5dc61a70fe4507e63230f9133ca22d891 Author: Michel Dänzer Date: Fri Aug 12 11:21:32 2011 +0200 Remove dead variable remain_size_bytes. Signed-off-by: Michel Dänzer commit fcf0cca9c0ab0f692b222f619aee8f1cdad3b519 Author: Michel Dänzer Date: Tue Sep 20 12:34:05 2011 +0200 KMS Color Tiling requires xserver which supports EXA_MIXED_PIXMAPS. Signed-off-by: Michel Dänzer commit c96e6fb8a5f5be2319fdb4c431c1ba5279997fe8 Author: Alex Deucher Date: Sat Sep 17 08:26:12 2011 -0400 man: note that the list of marketing names is non-exhaustive Signed-off-by: Alex Deucher commit 1a51fce6f6ab169c882a86b936909c0820f27a68 Author: Alex Deucher Date: Thu Sep 15 17:52:25 2011 -0400 update man page with new marking names Note that the driver support all currently shipping asics and the names in the man page are just a sampling. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=40808 Signed-off-by: Alex Deucher commit 64f237a4cf3ef5bcb3163e88e1447ff275a1eefa Author: Michel Dänzer Date: Thu Aug 18 19:11:08 2011 +0200 Convert register ranges for >= r6xx from enums to defines. Avoids lots of "comparison between 'enum ' and 'enum '" warnings with newer versions of gcc. See https://bugs.freedesktop.org/show_bug.cgi?id=38238 . Signed-off-by: Michel Dänzer commit 95991fcce45f0dd904f76b9f98f9c7ed5708e4fa Author: Michel Dänzer Date: Wed Aug 17 11:10:34 2011 +0200 Bail if we're trying to start up in UMS mode on KMS. Ideally, the display manager will start the X server again, and everything will be fine and dandy. But in the worst case, at least we won't hit the hardware behind the KMS driver's back. (This change intentionally makes (ab)use of the fact that Bool is defined as int). Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher commit f95a41b7851565c282d22f8d679db1377428f165 Author: Michel Dänzer Date: Thu Aug 11 11:22:57 2011 +0200 video: Don't round up bottom/right edge for clipping source width/height. It's not necessary: If the top/left edge was rounded down, this will be compensated by the subtraction. Worse, if the original source width/height is odd, rounding up may result in reading past the end of the source data. Fixes http://bugs.debian.org/637258 . Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher commit 93fc0843a1e31dc9237433bc2bf17df79e956d26 Author: Michel Dänzer Date: Wed Aug 10 17:44:37 2011 +0200 Change my e-mail address to something that still works, and always will, I hope. commit 9151f3b1c2ebcc34e63195888ba696f2183ba5e2 Author: Michel Dänzer Date: Tue Aug 9 19:13:26 2011 +0200 Prefer the CRTC of the primary output for synchronization. See https://bugs.freedesktop.org/show_bug.cgi?id=39696 . Signed-off-by: Michel Dänzer commit 3b9fdc807dd7e52af0576299cefba596040f6f2f Author: Alex Deucher Date: Wed Aug 3 16:20:13 2011 -0400 r5xx+: Fix vline setup with crtc offsets On r5xx+, vline is relative to to the viewport, not the scanlines. Based on initial patch and investigation from Herbert Pötzl (Bertl) on IRC. Signed-off-by: Alex Deucher commit 104b2d7c071f29266b1bc4184a74e9714d14febc Author: Alex Deucher Date: Mon Aug 1 10:05:30 2011 -0400 kms: fix possible leak in pageflip code Signed-off-by: Alex Deucher commit d29bab632e9ecccba518d4107d52620bf75eb1cf Author: Ville Syrjala Date: Wed May 4 23:51:27 2011 +0300 kms: Move flip_count and co. to a per swap structure If multiple drawables are doing page flipping, the global drmmode structure can't be used to keep per swap information. For example flip_count can increase prematurely due to another swap request, and then the previous swap request never gets completed, leading to a stuck client. Move the relevant pieces of data to a strucuture that gets allocated once per swap request and shared by all involved CRTCs. Signed-off-by: Ville Syrjala commit 9493563c1ef4b51af0ee8a44cb4e7c5bb280347e Author: Ville Syrjala Date: Wed May 4 23:51:26 2011 +0300 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. Signed-off-by: Ville Syrjala commit 8c9266ed2da22a510243f9a952c14d4423f48a2b Author: Alex Deucher Date: Fri Jul 15 10:44:57 2011 -0400 radeon: add some new NI pci ids Signed-off-by: Alex Deucher commit f59c3b294b0f715fc96e2bbe25893f2b31aa488b Author: Christian König Date: Thu Jul 14 11:49:06 2011 +0200 Register XvMC video decoding acceleration commit e8d0d437957b15252dfad775796a3949ed50dbcf Author: Dave Airlie Date: Tue Jul 12 11:43:25 2011 -0400 evergreen: Emit SQ_LDS_RESOURCE_MGMT Avoids rendering problems when compute changes this reg. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=39119 Signed-off-by: Alex Deucher commit 9bb31158466e6168116d841d12c8b4303f11c4a6 Author: Alex Deucher Date: Wed Jun 22 12:24:28 2011 -0400 evergreen: fix num_banks for 2D tiling config The field is encoded. Signed-off-by: Alex Deucher commit 122b471f734aa07427b01d4bec35ff1ac28290b5 Author: Alex Deucher Date: Fri Jun 17 04:02:16 2011 -0400 dri2: fix copy pasto in a6154c00c64932332e8f6e334661ffd579cfd894 Reported-by: Nils Wallménius Signed-off-by: Alex Deucher commit 122bedcbcf45cb583cf51b2fd04ed2805e0ca60b Author: Alex Deucher Date: Thu Jun 16 12:57:11 2011 -0400 dri2: missing bit from a6154c00c64932332e8f6e334661ffd579cfd894 Signed-off-by: Alex Deucher commit a6154c00c64932332e8f6e334661ffd579cfd894 Author: Alex Deucher Date: Thu Jun 16 12:48:43 2011 -0400 dri2/eg+: fix size and alignment of depth/stencil buffers Base alignment may be 256B or 512B depending on the group size. Also need to check against front size for virtualX. Signed-off-by: Alex Deucher commit 41eb1fbb3d9da64feb4a96df7c575e44136b1538 Author: Alex Deucher Date: Mon Jun 13 12:50:39 2011 -0400 kms/man: update ColorTiling info Signed-off-by: Alex Deucher commit 481baa5c74271cd7ce38bae3965d2bc4b8809058 Author: Alex Deucher Date: Mon Jun 13 12:44:07 2011 -0400 kms: enable ColorTiling by default on r6xx-cayman asics Currently only 1D tiling as 2D tiling still has some corner cases to fix up. Signed-off-by: Alex Deucher commit cbcc57b0fa6f581be777bef648f2bf3efe7443ee Author: Alex Deucher Date: Mon Apr 4 12:52:00 2011 -0400 radeon: add llano pci ids Signed-off-by: Alex Deucher commit 36afd1e1055eeadb2396dadcc68b214655bd90a9 Author: Alex Deucher Date: Tue May 31 16:03:36 2011 -0400 radeon: add support for llano APUs - KMS only - Includes full EXA/Xv support Signed-off-by: Alex Deucher commit 557f46dc2f18734ecf1f18dee7e951e0bf062e63 Author: Dave Airlie Date: Fri May 27 07:22:08 2011 +1000 bump version after release commit 2fca40ea65d9f2a6f8451c324bb4b82786f34f76 Author: Dave Airlie Date: Thu May 26 12:52:21 2011 +1000 radeon: bump version for release of 6.14.2 commit fab868c5f7d8cafdb0176d2751f216819a5ba66a Author: Alex Deucher Date: Wed May 25 01:09:12 2011 -0400 EXA: make evergreen_fix_scissor_coordinates static Signed-off-by: Alex Deucher commit fe5c42f5155361006b687da824181418f688809f Author: Alex Deucher Date: Tue May 24 22:32:01 2011 -0400 cayman: endian fixes for shaders Signed-off-by: Alex Deucher commit 470ecd02347c32e79316046d01a7d5dad0e2fe99 Author: Alex Deucher Date: Tue May 24 18:31:47 2011 -0400 EXA/Xv: add workarounds for eg/cayman scissors bugs Signed-off-by: Alex Deucher commit b913e7ba2b60d47a6660699210cc3cf6f5dc52c2 Author: Alex Deucher Date: Tue May 24 18:02:52 2011 -0400 Revert "cayman: add scissors workaround." Needs a proper workaround for a hw bug. This reverts commit b77d374b0d11f48c33cfffdb4157c4ec4b05ea15. commit 82cb33c3f0e1ba802d7a94f3159b3c5c86cd4043 Author: Dave Airlie Date: Wed May 18 14:49:17 2011 +1000 cayman: enable all accel commit b77d374b0d11f48c33cfffdb4157c4ec4b05ea15 Author: Dave Airlie Date: Tue May 24 15:53:58 2011 +1000 cayman: add scissors workaround. wasted a lot of time getting to this. commit ffeab7a7058298e15294a3b2c740c731e36dda1d Author: Alex Deucher Date: Mon Apr 18 18:16:51 2011 -0400 cayman: fix dword counts default state Signed-off-by: Alex Deucher commit 3cbfae361bf5e779d3364f0f31cfd25bd0f59e65 Author: Alex Deucher Date: Wed Mar 2 20:48:19 2011 -0500 cayman: add spi state to default state changed in e3145801b80fd4be4cf770128876e86e89bda66f Signed-off-by: Alex Deucher commit b8ade97c9d0fa5aacb0e3166868bb72e9bc679a6 Author: Alex Deucher Date: Wed Mar 2 20:44:19 2011 -0500 cayman: first pass at exa/Xv shaders Main differences with evergreen: - 4-way rather than 5-way - END_OF_PROGRAM bit removed from CF istructions, use CF_INST_END instead. - MEGA_FETCH* fields removed from VTX commands - no more VC, all fetches go through the TC Signed-off-by: Alex Deucher commit 01b646ed800732985c1638b147716641a99082f9 Author: Alex Deucher Date: Wed Mar 2 20:39:38 2011 -0500 cayman: add a default state function The rest of the state functions can be shared with evergreen. I've noted where there are differences. Signed-off-by: Alex Deucher commit 42eecc6f4fb1570769490bdaeac06817c6c36a7e Author: Alex Deucher Date: Wed Mar 2 20:20:56 2011 -0500 cayman: add 3D register headers Signed-off-by: Alex Deucher commit e1d28e011f4a5139cbc778973c63158ed2746716 Author: Alex Deucher Date: Wed Mar 2 20:13:50 2011 -0500 kms/cayman: stub out exa support Just fallbacks for now. Signed-off-by: Alex Deucher commit 21e44a20b8b1b64079ee77f45aaa5010206ed7b6 Author: Michel Dänzer Date: Thu May 12 09:23:38 2011 +0200 UMS: Fix comparison of unsigned variable against < 0. Pointed out by clang: ../../src/radeon_crtc.c:242:18: error: comparison of unsigned expression < 0 is always false [-Werror,-Wtautological-compare] error = error < 0 ? 0xffffffff : error; ~~~~~ ^ ~ If a UMS regression is bisected to this commit, the assignment should probably just be removed, as it's a no-op in the current form. commit 3b893d81982c9381393c92625e308541e0071b05 Author: Michel Dänzer Date: Fri May 13 09:10:02 2011 +0200 KMS: Fix output properties logic error. Pointed out by clang: ../../src/drmmode_display.c:1023:30: error: use of logical && with constant operand; switch to bitwise & or remove constant [-Werror,-Wconstant-logical-operand] if (props && (props->flags && DRM_MODE_PROP_ENUM)) { ^ ~~~~~~~~~~~~~~~~~~ Reviewed-by: Alex Deucher commit f83d58cf5b33686139067f8f898b8e566ba5c253 Author: Nicolas Kaiser Date: Fri May 13 00:56:31 2011 +0200 man: fix typos Signed-off-by: Nicolas Kaiser commit 90abffbd30f44b9cf76a6e28103ddcb5419b4522 Author: Ilija Hadzic Date: Fri May 6 09:45:23 2011 -0400 DRI2: fix high-crtc/vblank oversight/bug improvements to high-crtc handling done in f0b7d7b449cc77bb2b281d81108507f8bc2e6018 introduced a bug that caused the populate_vbl_request_type to never use the high-crtc field even when it should. The reason is that the offending patch put the code under #ifdef DRM_VBLANK_HIGH_CRTC_MASK which is not visible outside the enum type, so #else was always taken in compilation type. This patch fixes it by basing #ifdef on (pre-processor visible) DRM_VBLANK_HIGH_CRTC_SHIFT constant Signed-off-by: Ilija Hadzic commit 62a4cd180fe884dca24586d453395472516e6496 Author: Alex Deucher Date: Wed May 4 01:13:55 2011 -0400 fusion: fix tiling enable logic Signed-off-by: Alex Deucher commit 76638ca687b02d3b1494b9868f817fd4fd892c64 Author: Alex Deucher Date: Wed May 4 01:06:22 2011 -0400 fusion: enable tiling if DFS works Signed-off-by: Alex Deucher commit a6d2dba6573a3512d550d7e442bf42ea03012bbc Author: Dave Airlie Date: Wed May 4 10:44:43 2011 +1000 radeon: add add hw DFS support for fusion Fusion had a bug setting up the VM on earlier kernels so we need to work around that and only enable accel on a new enough kernel. Signed-off-by: Dave Airlie commit 859e052af49e68a826b77a9135c7f067dc331a06 Author: Alex Deucher Date: Tue May 3 15:15:04 2011 -0400 radeon: add some new pci ids Signed-off-by: Alex Deucher commit 8f8bbf628c6eed037f57bc8c155f0ecdacbebad1 Author: Alex Deucher Date: Sun May 1 13:19:15 2011 -0400 man: add cayman to man page Signed-off-by: Alex Deucher commit 903e90c31cf0319be9297529aa7b8daa1756cf63 Author: Alex Deucher Date: Wed Apr 20 03:10:08 2011 -0400 EXA/Xv: used cached bo tiling flags for accel setup on 6xx+ This avoids calling into the kernel for each bo in the accel code. This is a follow on to: cc7d1fa39da40a532fcdbe6c7924ca47a879e66a Signed-off-by: Alex Deucher commit 982c22f16c8eeee9be81779fbfe17d8d3f9b6897 Author: Adam Jackson Date: Thu Apr 14 16:04:50 2011 -0400 R520: Fix textures larger than 2k Ported from the equivalent fix in Mesa. commit cc7d1fa39da40a532fcdbe6c7924ca47a879e66a Author: Michel Dänzer Date: Mon Apr 4 17:37:12 2011 +0200 EXA: Cache BO tiling flags. Calling into the kernel every time is quite expensive, and nobody else should ever change the tiling flags. There's still more to do along the same lines for >= R6xx. commit f0b7d7b449cc77bb2b281d81108507f8bc2e6018 Author: Michel Dänzer Date: Tue Apr 5 13:36:01 2011 +0200 DRI2: Some cleanups for the scheduling mess. * Fix build against libdrm that doesn't define *_VBLANK_HIGH_CRTC*. * If we have more than two CRTCs but can't use DRM_VBLANK_HIGH_CRTC_MASK, don't enable scheduling in the first place rather than relying on DRM_VBLANK_SECONDARY magically doing something sensible for higher CRTCs. * Only set up client state tracking when scheduling is enabled. * Only declare pRADEONEnt when it's needed, and break long lines. commit 7acf9bc833de539fa2259a051c66a99445a54bc4 Author: Alex Deucher Date: Mon Apr 4 11:08:37 2011 -0400 radeon: add some additional ontario pci ids Signed-off-by: Alex Deucher commit 0af6386f85a0f1ba14864a3334164733a10a6cb8 Author: Ilija Hadzic Date: Thu Mar 24 13:33:27 2011 -0400 xf86-video-ati: (revised #2) add support for vblank on crtc > 1 Hi Alex, Enclosed is a revised version of two patches sent on Mar 18 and Mar 22, respectively. Details summarized in these two threads: http://lists.freedesktop.org/archives/dri-devel/2011-March/009463.html http://lists.freedesktop.org/archives/dri-devel/2011-March/009582.html This patch reconciles the DDX with the change in libdrm sent to this list earlier today. Specifically, it refers to a symbol that has been renamed from DRM_CAP_HIGH_CRTC to DRM_CAP_VBLANK_HIGH_CRTC. It *supersedes* the previous patch (i.e. apply it to the master branch as it exists at the time of this writing, not as an incremental patch to the one sent previously). Regards, Ilija Signed-off-by: Ilija Hadzic Signed-off-by: Alex Deucher commit fe2e0ad3ffa58f40311319c950b842e2928a5740 Author: matthew green Date: Mon Mar 21 12:17:58 2011 -0400 bug fix for r6xx/r7xx UMS Signed-off-by: Alex Deucher commit 83978ad5fe37581e2b2f3fbd9c073d91b2ae1d50 Author: Alex Deucher Date: Thu Mar 17 19:07:43 2011 -0400 bump version post release Signed-off-by: Alex Deucher commit 38d9368e59b2990bf32a028ece2132451b402350 Author: Alex Deucher Date: Thu Mar 17 18:59:55 2011 -0400 bump for release Signed-off-by: Alex Deucher commit cdfc007eccc9b130fc08012deef304488eb6e469 Author: Dave Airlie Date: Wed Mar 16 10:40:42 2011 +1000 radeon/exa: correct function name this corrects the function name so it matches the contents. Signed-off-by: Dave Airlie commit b93d7658f669f6dc1cfacebcfe955a1e113a537c Author: Dave Airlie Date: Wed Mar 16 10:37:22 2011 +1000 radeon/exa: fix scaling check This caused a regression in firefox, as these numbers are xFixed values hence 1 is actually 65536. Should fix: https://bugzilla.redhat.com/show_bug.cgi?id=685084 Signed-off-by: Dave Airlie commit 8567b8cd9e136ef69906e02286b3752db2404741 Author: Alex Deucher Date: Tue Mar 15 13:13:06 2011 -0400 APU: no tiling yet Signed-off-by: Alex Deucher commit 4d350497012fa31a417ada662006e2d64db2a4b5 Author: Dave Airlie Date: Tue Mar 15 10:32:19 2011 +1000 radeon: exa shaders don't handle scaling either. rendercheck tsrccoords test fails. Signed-off-by: Dave Airlie commit 6319a33cb7bd8dba1eaf47bee1e2608cee5d7600 Author: Alex Deucher Date: Wed Mar 2 19:38:04 2011 -0500 kms: add cayman pci ids Signed-off-by: Alex Deucher commit fd65def45a57e3242596274d270791df8abc8e29 Author: Alex Deucher Date: Thu Jan 13 17:02:31 2011 -0500 kms: no accel yet for cayman Signed-off-by: Alex Deucher commit 585e2a3b803b6d3e070f2427e9cb49bab0949239 Author: Alex Deucher Date: Thu Jan 13 16:58:01 2011 -0500 kms: add cayman chip family KMS only. No UMS support for cayman. Signed-off-by: Alex Deucher commit 6835e22256ba7a74c02504383f63baaba7e87156 Author: Alex Deucher Date: Wed Mar 2 12:20:45 2011 -0500 r6xx+: truncate point sampled coordinates By default the hardware rounds texcoords. However, for point sampled textures, the expected behavior is to truncate. When we have point sampled textures, set the truncate bit in the sampler. Signed-off-by: Alex Deucher commit 8a8862e4165dc5be779bce5e327a31da4826db3b Author: Sedat Dilek Date: Sat Feb 26 21:04:22 2011 +0100 kms: Fix warning XNFprintf is deprecated (v2) The first take of my patch missed the breakage against pre-1.10 xservers and now I know XNFasprintf() is not a 1:1 replacement for XNFprintf(). The idea for the fix seemed to be so obvious, but as usual "really" test the patch you are sending to any ML. I am awfully sorry for the overhasty bad hack. Thanks to Alan and Alex for the help to fix it correctly, now. Tested-By: Sedat Dilek Signed-off-by: Sedat Dilek commit 88304fe9c0ce69012d44a77a5368c35236511dac Author: Alex Deucher Date: Mon Feb 28 11:29:19 2011 -0500 kms: don't rotate if acceleration is not enabled Signed-off-by: Alex Deucher commit 99141761e947e2153ed1a3bc485dc5716a22acb1 Author: Alex Deucher Date: Mon Feb 28 11:20:44 2011 -0500 kms: don't enable tiling if accel is off Signed-off-by: Alex Deucher commit 7928c120fb629a782846bcd5734d9fa14cbb099d Author: Dave Airlie Date: Mon Feb 28 14:11:57 2011 +1000 xv: fix height alignments for U/V planes The kernel CS checks showed we were incorrectly aligning the U/V allocations for when we used them as texture sources. This should fix https://bugs.freedesktop.org/show_bug.cgi?id=34567 Signed-off-by: Dave Airlie commit e55520c0e582f2a500b3b01c2cb78750e15256ca Author: Michel Dänzer Date: Sat Feb 26 15:27:59 2011 +0100 Revert "kms: Fix warning XNFprintf is deprecated" This reverts commit cb4dc7ab66016d0c980800f8dbf71bbe993889d3. Looks like this caused https://bugs.freedesktop.org/attachment.cgi?id=43852 , but even if it didn't, the following needs to be addressed first: cc1: warnings being treated as errors ../../src/radeon_kms.c: In function ‘radeon_open_drm_master’: ../../src/radeon_kms.c:413: error: passing argument 1 of ‘XNFasprintf’ from incompatible pointer type /usr/local/include/xorg/Xprintf.h:57: note: expected ‘char **’ but argument is of type ‘char *’ ../../src/radeon_kms.c:413: error: passing argument 2 of ‘XNFasprintf’ makes pointer from integer without a cast /usr/local/include/xorg/Xprintf.h:57: note: expected ‘const char * restrict’ but argument is of type ‘uint16_t’ ../../src/radeon_kms.c:413: error: assignment makes pointer from integer without a cast make[2]: *** [radeon_kms.lo] Error 1 commit cb4dc7ab66016d0c980800f8dbf71bbe993889d3 Author: Sedat Dilek Date: Fri Feb 25 17:21:52 2011 -0500 kms: Fix warning XNFprintf is deprecated Noticed when building ati/radeon ddx against xserver 1.10-rc3. [ build.log ] ../../src/radeon_kms.c:412:5: warning: 'XNFprintf' is deprecated (declared at /usr/include/xorg/os.h:273) agd5f: don't break the build against pre-1.10 xservers. Signed-off-by: Sedat Dilek Signed-off-by: Alex Deucher commit ecfdb209afe2aafc378baab8c511f5df7b000270 Author: Sedat Dilek Date: Fri Feb 25 21:48:14 2011 +0100 UMS: Fix build against xserver 1.10-rc3 This issue was introduced due to last minute backout of RandR-1.4 in xserver 1.10-rc3. Switch to "#ifdef RANDR_14_INTERFACE" as suggested by Keith Packard. See also . Note: The ddx needs a rebuild as the X video driver ABI changed to version 10.0. Reported-by: Alex Deucher CC: Keith Packard Signed-off-by: Sedat Dilek commit 04293a3a84acd96ccdf8e5e865cf973325ca43a1 Author: Alex Deucher Date: Thu Feb 24 02:33:41 2011 -0500 dri2: disable pageflipping for transformed displays Based on Ben's nouveau patch. Signed-off-by: Alex Deucher commit 91070cfd75d5607c4a72ace780f830f0ddb40e84 Author: Alex Deucher Date: Wed Feb 23 00:55:28 2011 -0500 Xv: use aligned height to calculate Xv buffer size Make sure it's large enough for the tiling mode so the CS checker doesn't complain. Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=34567 Signed-off-by: Alex Deucher commit acd54a48a6680956ed903fc890204c0c910b6712 Author: Mark Kettenis Date: Sun Feb 20 22:51:04 2011 +0100 Properly restore CLOCK_CNTL_INDEX register RADEONRestore() restores the CLOCK_CNTL_INDEX register before calling RADEONRestorePLLRegisters(), which modifies the CLOCK_CNTL_INDEX register to access the PLL registers. As a result we may end up with the wrong clock being selected when exiting X. This happens on platforms where the driver doesn't save and restore the VGA state. Signed-off-by: Mark Kettenis commit d7c2ba4286ea32401c0026cb92ec167f7b5753d8 Author: Alex Deucher Date: Wed Feb 16 18:30:34 2011 -0500 man: add btc chips to the list Signed-off-by: Alex Deucher commit d0f8bffbbc26818eccdd305ef142387dc4975bba Author: Alex Deucher Date: Wed Feb 16 15:09:20 2011 -0500 kms: add tiling support for evergreen/NI - requires 2.6.37 or newer - 1D only at the moment - disabled by default Signed-off-by: Alex Deucher commit 0471d8412acd82e281a35fc4c6bb2d53b1ff5802 Author: Alex Deucher Date: Wed Feb 16 15:07:35 2011 -0500 kms: EXA/Xv tiling fixes - properly set tiling flags for temp surfaces - fix CB non_disp_tiling bits on evergreen Signed-off-by: Alex Deucher commit 4d7e1498f7d9eb50e2eddabca193fc27bde24f0e Author: Alex Deucher Date: Tue Feb 15 11:24:23 2011 -0500 fix Xv on pre-r6xx asics broken by: a9c1358099:"Xv: fix textured video alignment" Reported by: Artur Skawina Signed-off-by: Alex Deucher commit a9a59717d11af37a2dda5555f6a83c5b65449527 Author: Alex Deucher Date: Sat Feb 12 05:34:50 2011 -0500 kms: use worst case base/pitch align if we don't have drm tiling info To avoid CS rejection. Signed-off-by: Alex Deucher commit 5f9b7fdb4ce27f8c6a64134bb4d5ebeb1c958cca Author: Alex Deucher Date: Sat Feb 12 05:19:12 2011 -0500 kms: always get the tiling info even if we aren't tiling We need the proper group size to calculate alignment so the ddx and drm agree. Signed-off-by: Alex Deucher commit 355f0f7a67ce239b7fd2f2e81bcaaa88b2a09f03 Author: Alex Deucher Date: Sat Feb 12 04:52:52 2011 -0500 kms: fix rotate pitch align Signed-off-by: Alex Deucher commit f1dc419c989addc4737aed06ec8b8acdb4d40063 Author: Alex Deucher Date: Fri Feb 11 17:21:10 2011 -0500 kms: evergreen/ni big endian accel support Based on 6xx/7xx patches from Cédric Cano. Signed-off-by: Alex Deucher commit e8dc728a549323f1babe337b9d42ad504af1ca39 Author: Cédric Cano Date: Fri Feb 11 17:06:47 2011 -0500 ums: atombios endian fixes agd5f: fix a few more cases. Signed-off-by: Alex Deucher commit 48ffad957f1dbca909515ffa00629f4caa68706b Author: Cédric Cano Date: Fri Feb 11 17:00:31 2011 -0500 kms: 6xx/7xx big endian accel support agd5f: minor cleanups Signed-off-by: Alex Deucher commit 151b22bd7c3b1002a7261538611fb2b468815c86 Author: Cédric Cano Date: Fri Feb 11 16:33:16 2011 -0500 kms/6xx+: endian swap cursor uploads agd5f: remove kms surface for cursor since we now do the swap in the cursor load to avoid breaking pre-6xx cards with BE. Signed-off-by: Alex Deucher commit 309fac041f998e20338d320aabaeda5cc1bb6348 Author: Alex Deucher Date: Fri Feb 11 14:32:45 2011 -0500 kms/exa/xv: fix alignment checking in accel state setup Signed-off-by: Alex Deucher commit 25fe3ec4c6dfcdf6ba72a032bc9cb2c84d84029a Author: Alex Deucher Date: Fri Feb 11 14:03:56 2011 -0500 kms/exa: UTS/DFS base alignment fixes Signed-off-by: Alex Deucher commit 3d10278ce511f5dabb68ed86ee43eaaf43585983 Author: Alex Deucher Date: Fri Feb 11 13:51:11 2011 -0500 Xv: fix textured video alignment harder Signed-off-by: Alex Deucher commit a9c135809945fb372ce390f06918b9fd8e455b3f Author: Alex Deucher Date: Fri Feb 11 13:21:43 2011 -0500 Xv: fix textured video alignment Signed-off-by: Alex Deucher commit e5bd99faa3b6629a55168386d5dfa936ee4e97ae Author: Alex Deucher Date: Fri Feb 11 12:14:55 2011 -0500 kms: remove RADEON_TILING_SURFACE flag on front bo Should have been removed in: ef9bfb262db7004bef3704e5d914687e50d3fca4 Signed-off-by: Alex Deucher commit 92ffce1892d24a98d789aad57a4230cadb0c812a Author: Alex Deucher Date: Fri Feb 11 03:12:43 2011 -0500 EXA/r6xx+: properly account for height alignment in copy temp buffer Signed-off-by: Alex Deucher commit 39104c6e8461cf49c1bb03a18858ad75a9d98b46 Author: Alex Deucher Date: Thu Feb 10 14:31:43 2011 -0500 remove EVERGREENSetAccelState() It was a duplicate of the R600 variant. Signed-off-by: Alex Deucher commit 7ac3a2e0bcdadff7c7172a9f833f526b526da16b Author: Alex Deucher Date: Thu Feb 10 14:24:50 2011 -0500 6xx+: switch to linear aligned rather than linear general linear aligned is supposedly more performant, but more importantly, linear general only works on the CB without slices. The texture blocks technically don't support linear general although, I think linear general gets upgraded to linear aligned in the hw which is why it currently works. Signed-off-by: Alex Deucher commit e3145801b80fd4be4cf770128876e86e89bda66f Author: Alex Deucher Date: Thu Feb 10 14:14:55 2011 -0500 evergreen/NI: consolidate spi setup Signed-off-by: Alex Deucher commit be67ded05621aff9c85525372fd119071d3278ec Author: Alex Deucher Date: Thu Feb 10 14:06:38 2011 -0500 6xx/7xx: consolidate spi setup Signed-off-by: Alex Deucher commit 2c5ae1724307e0dba5d0306fe27c1e15a7390a2f Author: Alex Deucher Date: Thu Feb 10 13:47:53 2011 -0500 evergreen/ni: consolidate CB state handling Signed-off-by: Alex Deucher commit c52d817b51e13447802fe338be2d247ffba2a669 Author: Alex Deucher Date: Thu Feb 10 13:35:02 2011 -0500 6xx/7xx: consolidate remaining CB state Signed-off-by: Alex Deucher commit 5f9bc127d302404432b631e3e774192950f57b42 Author: Alex Deucher Date: Thu Feb 10 03:28:01 2011 -0500 kms/r6xx+: clean up pitch/height alignment in EXA UTS/DFS commit a4899db96029acde6cd400fc0541693a487898e7 Author: Alex Deucher Date: Sat Feb 5 14:11:42 2011 -0500 UMS: fix spelling in error message Noticed by: Warren Block Signed-off-by: Alex Deucher commit 84450ea9221f32296c1f786a6aa126a08bb9756f Author: Alex Deucher Date: Sat Feb 5 14:05:48 2011 -0500 UMS/DCE3.2: fix segfault atombios_pick_dig_encoder() needs to be called with a valid crtc assigned. Signed-off-by: Alex Deucher commit a27b5dbd9fba689f1814c0888d1b7459b6c6b1a1 Author: Alex Deucher Date: Thu Feb 3 19:06:22 2011 -0500 Bump version post release Signed-off-by: Alex Deucher commit 0a1a0513a61f392580bde39cca4880f2c19abc8d Author: Alex Deucher Date: Thu Feb 3 18:09:17 2011 -0500 bump version for release Signed-off-by: Alex Deucher commit ef9bfb262db7004bef3704e5d914687e50d3fca4 Author: Alex Deucher Date: Tue Feb 1 19:24:44 2011 -0500 kms/pre-6xx: fix pageflipping with tiling Use UTS/DFS to tile/untile as appropriate for sw access on pre-6xx. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=33738 Signed-off-by: Alex Deucher commit bb16dd77321e5a64a3cb2d2ca9982117799ac1a8 Author: Alex Deucher Date: Tue Feb 1 19:20:00 2011 -0500 kms/r6xx+: fix tiling and pageflipping harder Thanks for Michel for final fix. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=33738 for r6xx+ asics. A similar approach for pre-r6xx asics is pending. Signed-off-by: Alex Deucher commit 9c124f781049ef11a8b19894a29b7f62975b3011 Author: Alex Deucher Date: Tue Feb 1 18:59:40 2011 -0500 radeon: remove device 0x4243 0x4243 is a PCI bridge, not a gpu. See: https://bugs.freedesktop.org/show_bug.cgi?id=33815 Signed-off-by: Alex Deucher commit 66eb81b62e5ae8e1d7bd44ed8a179e5ec1ca69af Author: Michel Dänzer Date: Mon Jan 31 12:26:20 2011 +0100 UMS: Slightly improve xserver version check. This will ensure the xserver definitions necessary to compile the new code are there. xf86CrtcSetMode will be unresolved at runtime with a few xserver commits, but I'm afraid this is the best we can do. See https://bugs.freedesktop.org/show_bug.cgi?id=33719 . commit 3dc28c86eb57cac819e4ed650acfe1f7df6ef565 Author: Alex Deucher Date: Thu Jan 27 13:09:26 2011 -0500 ums: fix build against xserver >= 1.10 xf86CrtcSetMode was removed in: http://cgit.freedesktop.org/xorg/xserver/commit/?id=8b35118c03590a7ad3786d3284bafb3f40fcb8cc commit f58e1354b78bf6b70120bddfe1566da3b0723f72 Author: Jerome Glisse Date: Wed Jan 26 16:13:30 2011 -0500 dp: fix displayport support by syncing with KMS code Warning the dp clock value are divided by 10 in ddx (10 times bigger than kernel value) this is somethings very picky. Signed-off-by: Jerome Glisse commit 0f90133ac61c5e1d80b6fa9256e079349940029f Author: Alex Deucher Date: Mon Jan 24 12:40:22 2011 -0500 vbo: warn if we add a bo with a pointer to the wait list commit 42529603ecf86fcfd0a8f3495d9db9ce1ee9b4c3 Author: Alex Deucher Date: Mon Jan 24 12:30:56 2011 -0500 vbo: always flush the cbuf bo in flush_indirect() Always flush the cbuf in case we end up with a cbuf mapped in Prepare*(), but never end up issuing a draw call since the cbuf may be in use by multiple ops. The CS check for the cbuf bo is no longer necessay because the cbuf bo is NULL at this point due to the radeon_vbo_put() just prior. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=32188 commit 9b0e03e98ab739efb4031f81cc4a1a50b3d87a42 Author: Alex Deucher Date: Mon Jan 24 00:13:25 2011 -0500 vbo: avoid extra cs revalidation in vbo alloc Make sure we have a valid bo before revalidating. commit fadee0409a8e13b78bbccb83dd70f590fee23d57 Author: Alex Deucher Date: Fri Jan 21 17:30:28 2011 -0500 vbo: balance radeon_vbo_get() and radeon_vbo_put() bo_ref() and bo_map() in radeon_vbo_get() bo_unmap() and bo_unref() in radeon_vbo_put() rather than doing the bo_map() separately in radeon_vbo_space(). commit af7d81625a8cf873e6efc881489b3eda9861bd03 Author: Alex Deucher Date: Fri Jan 21 17:01:25 2011 -0500 evergreen: use vb_offset rather than vb_start_op for cbuf offset commit 4817fac5f728b777939e2e2bee16b842c9e1367b Author: Alex Deucher Date: Fri Jan 21 15:59:32 2011 -0500 vbo: remove useless radeon_vb_discard() We already reset vb_start_op to -1 in the UMS/KMS ib discard functions. commit 0a03f03a65aad925ba2d9c76b1d3356184607bf9 Author: Alex Deucher Date: Thu Jan 20 17:07:32 2011 -0500 evergreen/ni: fix Xv artifacts Port of the 6xx/7xx fix to evergreen. Bad texture size for texture cache flush. commit f41cf83750ba9a2e0797fdb21ea9104b85ce53aa Author: Marton Balint Date: Thu Jan 20 17:04:56 2011 -0500 r6xx/7xx: fix Xv artifacts bad textures size for cache flushes. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=22007 commit 57fbddfc21d8c6794f378489b764cc2a0ad4a48c Author: Michel Dänzer Date: Tue Jan 18 16:07:52 2011 +0100 Fix crash freeing KMS video memory. Where's that brown paper bag? :} commit 6548bb9836253c586023ffe5ad1497ddabaa50fc Author: Michel Dänzer Date: Tue Jan 18 10:23:41 2011 +0100 Fix KMS textured video leaks (bug #33193). v2: Fix radeon_legacy_free_memory() argument type error pointed out by Marton Balint, refactor video memory freeing logic into helper function. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=33193 . commit edc3496b55577ee8509ddd9188e6f2bcdf7169a1 Author: Dave Airlie Date: Mon Jan 17 07:55:29 2011 +1000 radeon: add back flush in block handler. this is also needed for certain things like stipple rendering. Signed-off-by: Dave Airlie commit 63d7dece3f4be8b14012b3a2bedd850831c0437b Author: Alex Deucher Date: Thu Jan 13 11:24:26 2011 -0500 rs880 fix typo in HD 4250 string Noticed by Nigel Taylor Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=33057 commit c5b3db18d888552328e9718ea022794fc5bde352 Author: Alex Deucher Date: Tue Jan 11 16:21:18 2011 -0500 kms: fix pitch aligment for scanout Display has slightly stricter pitch alignment requirements than other blocks. Factor that in when aligning pitch. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=32997 commit bbd7adce889359b5eb3239b73e904b3ede283e12 Author: Alex Deucher Date: Tue Jan 11 15:41:03 2011 -0500 radeon: fix yet another pitch align commit af2e6d7d2f1b3d8f8f6b0acfb2b7b0cfaff7bcdb Author: Alex Deucher Date: Tue Jan 11 14:42:17 2011 -0500 radeon: fix pitch align in pageflip code commit e5d0a400d08da2358fac9c2ad12042f125525736 Merge: 0e432df e27e9b4 Author: Alex Deucher Date: Mon Jan 10 18:16:49 2011 -0500 Merge branch 'kms-pflip' of git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-ati commit 0e432dff9e06a183acaeb20db29cbd03ff0f4b82 Author: Alex Deucher Date: Thu Jan 6 20:56:45 2011 -0500 NI: add pci ids commit 34d61785b9bc13287bd7ab8bdd8a1b99a3df4440 Author: Alex Deucher Date: Tue Nov 23 20:54:57 2010 -0500 Add EXA/Xv acceleration support for NI chips commit 97322c00faf08461b941edf97efe86d8b082a0ce Author: Alex Deucher Date: Wed Nov 24 12:18:04 2010 -0500 Bail on NI cards with UMS NI cards require KMS. commit c678b79f99238473df6ff1bedbae840950cdf88c Author: Alex Deucher Date: Tue Nov 23 20:45:25 2010 -0500 add NI family ids commit e27e9b4e50ad42885ad2e25be897cdf29aa59712 Author: Mario Kleiner Date: Sun Dec 19 03:56:17 2010 +0100 ddx/ati: Bugfix for pageflip consistency check. target_msc wasn't passed from vblank event handler to pageflip routine, due to a missing initalization. Now fixed. Signed-off-by: Mario Kleiner commit 30c5f217f91ed1ee15b5fff0002521d98682efb7 Author: Alex Deucher Date: Fri Dec 17 13:40:40 2010 -0500 exa/dfs/ontario: always use the CPU for DFS for now There are issues with rendering to gart memory that haven't been sorted out completely yet. commit e97079c1b621433b4aa3ecfdd2aa0884aac5df76 Author: Alex Deucher Date: Thu Dec 16 18:49:55 2010 -0500 DCE4.1: fix DIGx routing Works more like DCE4.0. With only two DIGx blocks the routing is hardcoded based on link. This fixes blank screen issues when changing crtc routing due to incorrect crtc to dig mapping. Signed-off-by: Alex Deucher commit 3b1fb12dec7df4e9434b2c51568ac8d997638922 Author: Alex Deucher Date: Sun Dec 12 19:16:47 2010 -0500 man: minor formatting fixes commit b1af52e522158788a9613d6f1a2309a3987ad59f Author: Alex Deucher Date: Tue Dec 7 19:17:09 2010 -0500 man: add rs880 info commit f9bbb26dd97254b66de11bb2abd821aa293ecba5 Author: Matt Turner Date: Thu Dec 2 17:00:11 2010 -0500 Add missing call to vbeFree (bug 4417) Also kill unneeded vbe.h include from radeon_bios.c. Signed-off-by: Matt Turner commit 9fc16ff3f8806971cb495e8838af1e5f9149d34f Author: Alex Deucher Date: Fri Dec 3 02:04:28 2010 -0500 radeon: remove duplicated define xfixedtofloat macro was defined several times commit f074762fff4253a457cb48519bb33a2e2c90f8b9 Author: Alex Deucher Date: Fri Dec 3 01:25:41 2010 -0500 radeon/exa: fallback for non-affine transforms We need to implement a texture lookup with perspective divide for non-affine transforms. For now just fallback. Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=31799 although it appears either EXA or the xserver gets this wrong too. commit 774b114baa932078f8bf91ea302850a8c54c2c07 Author: Nicolas Joly Date: Thu Dec 2 16:02:44 2010 -0500 ati: remove leftover word in ati.man fixes: https://bugs.freedesktop.org/show_bug.cgi?id=28297 commit 69639ef377a9d6701cdef902f8a1c5e0b58cf833 Author: Alex Deucher Date: Thu Dec 2 02:12:24 2010 -0500 radeon/kms: pageflipping man page updates commit f48af8a6cfa1ac665f07b8f9712e94b77bc4f5e9 Author: Mario Kleiner Date: Tue Nov 23 04:41:53 2010 +0100 ddx/ati: Fix reporting of pageflip completion events on multi-head. When a drawable is page-flipped on multiple crtc's (fullscreen drawable on mirror-mode or multi-head x-screen), only one pageflip event is finally delivered, after the last participating crtc signals flip completion, this to avoid visual corruption. Old code returned vblank count and timestamps of flip completion of this last crtc, instead of the values of the "master crtc", the one that was used for initially scheduling/triggering the pagflip via vblank events. (master = radeon_dri2_drawable_crtc(drawable)) This patch makes sure that the pageflip completion values of the "master" crtc are returned, otherwise client applications will get confused by the random (msc, ust) values returned by whichever crtc was the last to complete its flip. Without this, the returned values change randomly and jump forward and backward in time and count. The patch also implements a consistency check on returned vblank count values of pageflip completion. Impossible values are detected, a x-warning is logged and returned (msc,ust) values are marked invalid, so clients could perform error handling. Such a warning would indicate bugs in the pageflip completion routine of future kms drivers or the ddx to aid driver debugging. Signed-off-by: Mario Kleiner commit 122536ee0aeb1eef1a9d80d5e464dcb423dc2837 Author: Mario Kleiner Date: Mon Nov 22 04:11:07 2010 +0100 ddx/ati: Add option "SwapbuffersWait" to control vsync of DRI2 swaps. A new optional kms driver option "SwapbuffersWait" is defined for xorg.conf, which defaults to "on". If "on", DRI2 bufferswaps will be synchronized to vsync, otherwise not. This currently only affects copy-swaps, not pageflipped swaps. It also requires a swap_interval setting of zero by the OpenGL client. Ideally, we'd provide a way for dri2 to pass the current swap interval to the ddx so we could change this dynamically. Signed-off-by: Mario Kleiner commit 0de680730294bd623f6b3e189faa7b88a09d3a2a Author: Alex Deucher Date: Wed Nov 17 17:39:39 2010 -0500 radeon/kms: add pageflip support requires radeon drm 2.8.0 or higher Signed-off-by: Alex Deucher Signed-off-by: Jerome Glisse commit fccdca8db34010f566bd068c74cdef0f4a8cb7f5 Author: Alex Deucher Date: Wed Nov 17 17:37:25 2010 -0500 radeon/kms: allow tiled front buffer on 6xx/7xx Use UTS/DFS to tile/untile as appropriate for sw access. Also enables pageflipping with tiling enabled. commit 035f7f3ab529ca19b853066792af8a23d08a0f53 Author: Dave Airlie Date: Wed Dec 1 10:23:14 2010 +1000 radeon: add some missing math.h and assert.h includes commit 0f924e83d7be6fca7e024acdf973089efdf3b627 Author: Dave Airlie Date: Wed Dec 1 10:23:33 2010 +1000 radeon: make sure EXA is off when EXA is disabled with --disable-exa commit e142e55c56d8440d7185b594c696ec9eeb699cda Author: Alex Deucher Date: Tue Nov 30 15:51:21 2010 -0500 evergreen: set default group_bytes to 256 512 seems to cause issues on certain cards. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=31724 commit 90f831361844f1b80b3f6bb718ff5ac584d73d48 Author: Alex Deucher Date: Mon Nov 29 18:09:05 2010 -0500 evergreen: use dot4 for transforms commit 3cae361d0448b6e231c80f53d64bdbbdd74dc4cf Author: Alex Deucher Date: Mon Nov 29 17:44:47 2010 -0500 6xx/7xx: clean up gpr/const handling in shaders commit d9bcac516f2a810acb300b29169e56a2df0b47ac Author: Alex Deucher Date: Mon Nov 29 17:23:30 2010 -0500 r6xx/r7xx use dot4 for transforms commit 5d3f33729be0639cef17372345b2dab6127e39d9 Author: Alex Deucher Date: Wed Nov 24 10:59:09 2010 -0500 radeon/kms: fix output enumeration If a system has a mix of DVI-I, and DVI-D connectors, or a mix of HDMI-A and HDMI-B connectors, the enumeration was per connector type, but the naming was the same for multiple connectors (DVI-[0-n] for DVI-I, -D, -A, and HDMI-[0-n] for HDMI-A, and -B), you'd end up with multiple connectors with the same name. Fix this by tracking the number of connectors across similar connector types. commit dc470b5382ffa27bd4a673b21fb6b978d3716ca0 Author: Alex Deucher Date: Tue Nov 23 01:46:15 2010 -0500 radeon/man: divide driver options into UMS and KMS commit 4cbb7100df4b983d77c20a77431cf2f5101bde36 Author: Alex Deucher Date: Tue Nov 23 01:22:04 2010 -0500 update man page to include ontario commit 718dfd443897d70d97fc19afddfbcfe1e39a9c59 Author: Alex Deucher Date: Mon Nov 22 13:11:50 2010 -0500 Ontario: add workaround for small pixmap issues with DFS On past asics these kind a problems were usually due to a bad backend map config. I suspect in this case, and the previous cases it may be related to using linear buffers rather than tiled. Signed-off-by: Alex Deucher commit 61c97b0812c820564c7bc9d64a998c109bcd46b3 Author: Alex Deucher Date: Mon Nov 22 13:10:16 2010 -0500 Add EXA/Xv acceleration support for Ontario Fusion APUs Signed-off-by: Alex Deucher commit 0659f35dfbeda7dd3ff58da1deb6484fabadc332 Author: Alex Deucher Date: Mon Nov 22 13:07:00 2010 -0500 Add Ontario fusion APU pci ids Signed-off-by: Alex Deucher commit fa0cec331e6c94cebf82270dcd6c179b15851c5e Author: Alex Deucher Date: Mon Nov 22 12:56:45 2010 -0500 ontario: add UMS modesetting support Accel not enabled yet. Signed-off-by: Alex Deucher commit 7ad1f01573e930aa6238eaeb0e11708ae548dfce Author: Jerome Glisse Date: Fri Nov 19 10:27:40 2010 -0500 evergreen: fix typo for fetch resource offset Signed-off-by: Jerome Glisse commit 3455a3b58532ea3ad901a317126968ab6cbb21b7 Author: Alex Deucher Date: Wed Nov 17 17:32:41 2010 -0500 radeon/kms: fix buffer base alignment for tiling On r6xx+, 2D tiling can require larger than 4k base alignment. commit beb7fecd0191e38fb238134ba612985062cf9770 Author: Dave Airlie Date: Mon Nov 15 11:59:58 2010 +1000 dce4: improve the VT switching code. add in lots more blocks of regs to save/restore commit 51e51f864a691e51b5193d102398ced667e0beb1 Author: Dave Airlie Date: Thu Nov 11 18:48:40 2010 +1000 evergreen: remove warnings since last commit commit abbf73ee990512ac16ca77e8bb23288495e1f9f4 Author: Dave Airlie Date: Thu Nov 11 09:38:15 2010 +1000 evergreen: add UMS VT switch support. This isn't perfect, but it brings back text VTs here on the DAC and DVI outputs. commit e1dfaf93d06bc5eafdbc2e1823d19204ce8f242c Author: Dave Airlie Date: Thu Nov 11 09:15:27 2010 +1000 avivo: use arrays to store the crtc/pll info for save/restore this is just prep work for evergreen VT save/restore commit 0c2834e67df6e143a7d15f373faaddca1dda6b18 Author: Michel Dänzer Date: Fri Nov 5 09:30:40 2010 +0100 Fix incorrect CS size in one textured video path. (Bug #31364) Fixes https://bugs.freedesktop.org/show_bug.cgi?id=31364 . commit 2a7b080727f61559cf8444c93a5088f4155a8fdf Author: Alex Deucher Date: Fri Oct 29 16:56:45 2010 -0400 radeon/kms: more alignment fixes commit bf60af579382a0d48f7a65a4cec88759cc8b683c Author: Dave Airlie Date: Thu Oct 28 13:06:54 2010 +1000 dri2: reference count the client privates key/callback This lets multi-screen work better, but still having issues after server recycle, but it doesn't crash at least. commit fb22d0c06a7dc42216230e198ff443d8035e9d21 Author: Dave Airlie Date: Thu Oct 28 11:10:03 2010 +1000 radeon: only register block handler once per fd. should fix https://bugs.freedesktop.org/show_bug.cgi?id=29726 the problem is of course the second head instance tries to access the fd and fails, however I think this might break syncing on the second head but not sure, but its better than just hanging up the X server commit 040140b5d7cbeaf5d83687bc87e4a236ff9f0cbd Author: Alex Deucher Date: Wed Oct 27 20:16:17 2010 -0400 drm/radeon: unify fb bo alignment harder More duplicated paths discoved... commit f07f9b7b61c05f2de1d61bb0e2f71bd017c8d36a Author: Alex Deucher Date: Wed Oct 27 12:37:42 2010 -0400 kms/radeon: unify fb bo alignment handling Previously there were 3 different paths with what should have had duplicated code: - EXACreatePixmap2 - Initial front buffer creation - Randr resize This patch attempts to unify the alignment across all 3. This may fix tiling issues in some cases and should make buffer pitches match for pageflipping. commit d31046ba6c8eee9b7decc3875697d37c38bc38f3 Author: Michel Dänzer Date: Wed Oct 27 12:12:04 2010 +0200 Re-use result of GetScreenPixmap call. Fixes compile warning due to local variable ppix being unused when building against current xserver Git. commit 4dd7f835c17b00707f1d8d4e36a24380ba52761e Author: Michel Dänzer Date: Wed Oct 27 12:09:03 2010 +0200 Fix another stray xfree() call. commit f815e9c3c61b1ed73e7dd9383587efcdd8dfc07f Author: Michel Dänzer Date: Wed Oct 27 11:29:12 2010 +0200 Don't try to delete DRI2 event list entries that were never added. (Bug #31086) Fixes https://bugs.freedesktop.org/show_bug.cgi?id=31086 . commit df92245e1fd0ead2581b675cd96ac8bcc8cb65d7 Author: Alex Deucher Date: Sun Oct 24 14:27:27 2010 -0400 r100: add some missing bits in SE_COORD_FMT Texture coordinates work fine with or without these, but this should be more correct I think although I don't think it matters since we aren't sending w anyway. commit fc7aa6e3bbb86eaa2f34b827629f7e82cde65ac7 Author: Alex Deucher Date: Sun Oct 24 11:56:48 2010 -0400 UMS/radeon: fix typo in restore palette commit 5efdf514ab0e5439114e8dd7a49105812155eb69 Author: Alex Deucher Date: Sun Oct 24 11:45:19 2010 -0400 UMS/radeon: fix screen dimming on VT switch Save and restore the palettes on VT switch. The restore has to be done after the vga restore to work properly as determined by Jonathan Kollasch. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=18407 commit 1e3ede62c39307d0210cb2044badd619a4f44fec Author: Alex Deucher Date: Sun Oct 24 11:24:07 2010 -0400 UMS/atom: default to DVI mode if we don't have monitor hdmi info Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=30330 commit 51f26a7f01b68e373867c03881868ca8830664d6 Author: Mark Schreiber Date: Sat Apr 10 10:55:08 2010 -0700 Correct spelling and grammar commit 0f575984594e6977b4a7cb794dad8c6e56c850f1 Author: Alex Deucher Date: Tue Oct 19 19:21:39 2010 -0400 Xv: limit overlay to 2047x2047 Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=15391 commit 0f184630cd4760199430320215e4280438fc4ce5 Author: Alex Deucher Date: Tue Oct 19 17:13:06 2010 -0400 radeon: fix compilation on xserver >= 1.10 Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=30451 Signed-off-by: Alex Deucher commit 179b0e15924ae2757efaece6488ae835ba6436e3 Author: Dave Airlie Date: Tue Oct 19 13:37:22 2010 +1000 r600: for 2d tiles we need to align to channels no banks. commit 809cacbc23ab37aa7952665f9b2e37c03a34f173 Author: Adam Jackson Date: Mon Oct 18 12:32:11 2010 -0400 kms: Let the server know if we got more than 1 EDID block Otherwise things like xf86MonitorIsHDMI() won't work right. Signed-off-by: Adam Jackson commit 042037e485396981cf4a420c247104ba5d016ca0 Author: Alex Deucher Date: Thu Oct 14 17:00:51 2010 -0400 evergreen: requires same cursor fix as avivo chips commit 0f37458c253aec46d98db6661c4def711df8fc17 Author: Adam Jackson Date: Thu Oct 14 14:37:34 2010 -0400 Don't allow the config file to override BIOS location Signed-off-by: Adam Jackson commit 2918df3a312fc600e83f84c298b9653d2eb3a8d5 Author: Alex Deucher Date: Wed Oct 13 17:16:04 2010 -0400 evergreen: increase XV_CRTC Xv attribute range Cover all 6 possible crtcs. commit 0d1f9fd03d0196dda5c1ce34b2e68b007c1874f2 Author: Alex Deucher Date: Sun Oct 10 12:06:22 2010 -0400 DCE3+: UMS modesetting fixes - add mising LVTMA case statement for DCE3.0 dig encoder - some DCE4 systems have EN/DISABLE_OUTPUT actions commit acf4024aa0ef192355b2bd8281507b1c2e6b7de4 Author: Alex Deucher Date: Fri Oct 8 16:30:36 2010 -0400 ATOM DDC fixes for UMS - Header size was already subtraced from table size - Only hw capable ddc pads are shared with aux commit 74fd2b91477106a26a2d9fb4b11c885910996041 Author: Alex Deucher Date: Thu Oct 7 17:33:00 2010 -0400 DCE3.2 UMS: fix duallink Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=30686 commit 8c544272f218fd8bd93a898b96afedc2498b27bb Author: Alex Deucher Date: Thu Oct 7 17:25:47 2010 -0400 fix the non-kms build Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=30685 commit 81360adffb2a66b9a95a38671f9227a9718c9841 Author: OldÅ™ich JedliÄka Date: Mon Sep 6 21:14:52 2010 +0200 radeon: proper DRI2 pending events handling when client gone. (v6) Properly handle asynchronous DRI2 events for disconnected clients. Track client's pending requests and mark them as invalid when the client disconnects. This is based on the version from Alban Browaeys in bug #29065. v1 (Alban Browaeys): Based upon a detailed explanation from OldÅ™ich JedliÄka and comments from Christopher James Halse Rogers. on http://lists.x.org/archives/xorg-driver-ati/2010-August/016780.html . v2: Updated version to apply on master. Removed unnecessary client_index field from _DRI2FrameEvent. Added freeing/removing from list to failed paths of radeon_dri2_schedule_wait_msc and radeon_dri2_schedule_swap. v3: Adopt to older xorg-server that doesn't have dixRegisterPrivateKey. v4: Conditional include of list.h, unreachable return removed. v5: Distribute list.h as xorg_list.h, remove xorg-server version check. Use the version from xorg-server when available (checked in configure.ac). v6: Removed xorg_list.h, made DRI2 scheduling features dependent on list.h presence. commit adee138f007e26307f1aab7f8fe066150c12e55d Author: Jesse Adkins Date: Tue Sep 28 13:29:50 2010 -0700 Purge cvs tags. Signed-off-by: Jesse Adkins Signed-off-by: Alan Coopersmith commit f1bf9cbb471d60ee4b0422bc4e896e3b86f4d75f Author: Alex Deucher Date: Wed Oct 6 11:44:42 2010 -0400 radeon: man page updates - tv-out is not supported on carding using the rage theatre chip for tv-out - add evergreen cards to the list commit 0921ecc1c751df0dd56e0b1d0b78ab53d7164904 Author: Alex Deucher Date: Mon Oct 4 12:34:47 2010 -0400 evergreen: use EXACreatePixmap2 if available commit 5bdb6434975584eef90eb9e5955b9c2a14b7f327 Author: Alex Deucher Date: Mon Oct 4 12:31:51 2010 -0400 evergreen: port Karl's UTS/DFS changes to evergreen commit be8f45cbd313b68ad663f303c64edb4525b8f981 Merge: e843faf ff5f466 Author: Alex Deucher Date: Mon Oct 4 12:36:56 2010 -0400 Merge branch 'evergreen_accel' of git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-ati commit ff5f466e6ca0ee541a255facff6c9198976dfd52 Author: Alex Deucher Date: Fri Oct 1 15:46:43 2010 -0400 evergreen/dri2: fix depth allocation for depth+stencil evergreen uses separate allocations for depth and stencil, so to handle that, create a depth buffer large enough to handle both. This is required for using the stencil buffer in mesa. commit e843faf355c864beab81e74f0e39f8ad53d4c2bf Author: Alex Deucher Date: Thu Sep 30 19:30:35 2010 -0400 radeon: fix fbLocation for >32 bit MC addresses If the fbLocation was at an address >32 bits, we'd fail. Change fbLocation to uint64_t and properly cast when needed. commit 886febc882053e09294225e85b102f965041b62b Author: Alex Deucher Date: Thu Sep 30 19:20:17 2010 -0400 r6xx: fix bad mask when setting up HDP_NONSURFACE_BASE This fails for MC addresses >32 bits commit 16589b862feb796e15dc6e471d25604a4f5e7c1c Author: Alex Deucher Date: Mon Sep 27 18:28:43 2010 -0400 bump version post release commit cc5005af61f45a3552f7358dc5aa711e42f5af54 Author: Alex Deucher Date: Mon Sep 27 18:20:53 2010 -0400 bump version for release commit 7f8820fcec8c90bf2f823170bd08a23e8b4ff7af Author: Michael Cree Date: Mon Sep 27 13:39:12 2010 -0400 Fix some unaligned 32bit accesses in the AtomBios code. On the Alpha architecture unaligned 32bit accesses incur a software trap to the kernel and pollute the kernel logs. Fixed by use of the ldl_u() interface. Signed-off-by: Michael Cree commit c4f834cdfbe96aa47ac5fb039f9dd7aa9730c8a3 Author: Nicolas Reinecke Date: Mon Sep 27 13:33:55 2010 -0400 radeon: Convert remaining x(c)alloc/xfree to m/calloc/free. Fixes deprecation warnings missed out by f7a91ece264af9f3fd2fc18e99aefcda93ce9f5c commit f8fb9312d791af1f77020e8c2d35bb30841ed9aa Author: Karl Tomlinson Date: Sun Aug 22 22:46:33 2010 +1200 RADEONPrepareAccess_CS: fallback to DFS when pixmap is in VRAM This avoids costly CPU VRAM reads and lets EXA manage a system memory cache of the portions of pixmaps needed for unaccelerated operations. https://bugs.freedesktop.org/show_bug.cgi?id=27139 commit 35c4ff936601ee083f51510a5192fb97d622a483 Author: Karl Tomlinson Date: Sun Aug 22 22:28:06 2010 +1200 radeon: complete UTS and DFS even when a scratch BO is not necessary Turns on the big-endian paths even for little-endian systems, and adds similar paths to the r6xx/r7xx functions. This makes UTS and DFS reliable, which will let PrepareAccess (with mixed pixmaps) choose to fail based on whether the pixmap is in VRAM (to avoid CPU reads). commit d46381a3a6bf10903803f5acaa7aa0ce06373b96 Author: Karl Tomlinson Date: Sun Aug 22 21:02:45 2010 +1200 radeon: complete big endian UTS and DFS even when scratch allocation fails. On big endian systems, PrepareAccess will fail when byte-swapping is required so UploadToScreen and DownloadFromScreen cannot rely on fallback to PrepareAccess. When scratch BO space allocation fails, this patch merely adds simple fallback to direct CPU access without any GPU blit. This sometimes requires a CS flush even in UploadToScreen. (No allocation retry after a flush is added here.) commit 4ced4e1eff67946e306c0c67c9ed59dd5f3c4ba9 Author: Karl Tomlinson Date: Sun Aug 22 20:04:42 2010 +1200 RADEONDownloadFromScreenCS: flush CS writes before mapping BO for read If unflushed CS operations write to the pixmap BO, then these need to be flushed before mapping the BO for read. This currently only affects big endian systems and only when the operation writes to the GTT domain. commit a4eef8faffbb1ea2f742273ee855f4e6f992e5c8 Author: Karl Tomlinson Date: Sat Aug 21 22:29:34 2010 +1200 FinishAccess_CS: set bo_mapped to FALSE on unmap This is actually only necessary when PrepareAccess may behave differently on different calls with the same pixmap, which currently doesn't happen. However resetting bo_mapped is necessary to let PrepareAccess (with mixed pixmaps) choose to fail based on whether the pixmap is in VRAM (to avoid CPU reads). commit bfebe039af0c0282d04eb6234b6e6d1e02097146 Author: Karl Tomlinson Date: Sat Aug 21 21:44:39 2010 +1200 DownloadFromScreenCS: download via a scratch BO if pixmap domain is unknown radeon_bo_is_busy() may return without setting the domain out-parameter. If this happens, then download via a scratch GTT BO to avoid CPU VRAM read. commit e26a59e9db8067882327f872e3d2d760ce4c66f3 Author: Mathieu Bérard Date: Thu Sep 9 19:32:38 2010 -0400 Fix NULL possible deref in evergreen_cp_wait_vline_sync commit b90cb61ccb0f4f80e0627141f223354a9371d47d Author: Alex Deucher Date: Tue Sep 7 11:51:16 2010 -0400 radeon: set interlaced and doublescan enabled for randr outputs interlaced used to work without setting these parameters. Changes in the xserver seem to require them now. Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=29591 commit 7cc0d3311f23ad569af004e0e4a0e2efbac107e5 Author: Alex Deucher Date: Fri Sep 3 00:32:27 2010 -0400 evergreen: fix Xv VS const buffer offset was wrong. fixes: https://bugs.freedesktop.org/show_bug.cgi?id=29788 commit 7c6ce4e62693f446d7d3c8a86502ccc03c0e55b0 Author: Alex Deucher Date: Thu Sep 2 20:34:56 2010 -0400 evergreen: add additional default state Note, you also need a drm patch to fix the GPU hangs: drm/radeon/kms/evergreen: fix gpu hangs in userspace accel code Signed-off-by: Alex Deucher commit 2b98ec1f7e931019a4ab699a56d5dfaa395946fb Author: Alex Deucher Date: Wed Sep 1 13:24:19 2010 -0400 r6xx/r7xx: fix typos some stray - signs commit 966ac1be81da76c8aa4ea46b63f3ca5358a2c021 Author: Alex Deucher Date: Fri Aug 27 18:22:21 2010 -0400 evergreen: work around bad data in some i2c tables The 7th entry in a lot of evergreen i2c gpio tables is partially zeroed. Fix the entry. Signed-off-by: Alex Deucher commit 91f707d308d4bbf16c3d62d046cf280fef5a8f4c Author: Heikki Lindholm Date: Fri Aug 27 02:26:24 2010 -0400 xv: fix non-kms/non-dri Xv column ordering on big endian systems Column order is wrong on big endian systems, primarly because of a bits / bytes mix up with the bpp variable. Fix tested with r100 and r300, screen depth 16 and 32 with YV12 and YUY2 (overlay, textured video), RGBA and RGBT (overlay). Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=29041 Signed-off-by: Heikki Lindholm commit 6a2c8587a4e05a8be2a2e975a6660942cfe115d6 Author: Christopher James Halse Rogers Date: Fri Aug 27 13:14:33 2010 +1000 dri2: Reference count DRI2 buffers When a client calls ScheduleSwap we set up a kernel callback when the relevent vblank event occurs. However, it's possible for the client to go away between calling ScheduleSwap and the vblank event, resulting in the buffers being destroyed before they're passed to radeon_dri2_frame_event_handler. Add reference-counting to the buffers and take a reference in radeon_dri2_schedule_swap to ensure the buffers won't be destroyed before the vblank event is dealt with. This parallels the approach taken by the Intel DDX in commit 0d2392d44aae95d6b571d98f7ec323cf672a687f. Fixes: http://bugs.freedesktop.org/show_bug.cgi?id=29065 v2: Don't write completion events to the client if it has quit. v3: Don't try to unref the NULL buffers from a DRI2_WAITMSC event. Take a ref in schedule_swap earlier, so the offscreen fallback doesn't incorrectly destroy the buffers. Signed-off-by: Christopher James Halse Rogers Signed-off-by: Dave Airlie commit e9928fe036e9382fd7bc353f3f05531445f08977 Author: Dave Airlie Date: Wed Aug 25 10:42:39 2010 +1000 remove explicit buffer submit from copy region port of 0be3e95c844247746742805830860ace9f546d99 from intel driver. Remove explicit batchbuffer submit in DRI2 copyregion Now that we submit from the flush callback chain, we know we'll always submit before the client receives the reply or event that blocks it from rendering the next frame. Signed-off-by: Dave Airlie commit 9f13049ddf06f6f2138851a548cfb82f12a52f42 Author: Dave Airlie Date: Wed Aug 25 08:56:37 2010 +1000 radeon: add correct flushing for direct rendered this is a port of 69d65f9184006eac790efcff78a0e425160e95aa from the Intel driver. 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: Dave Airlie commit 141cbc283fddeb67c2a6c47a0f0f5c2aa2bfb430 Author: Alex Deucher Date: Tue Aug 24 18:01:05 2010 -0400 evergreen Xv: remove stray line that caused a segfault fixes: https://bugs.freedesktop.org/show_bug.cgi?id=29788 commit f170dddd3538a587f2363ef5fa10a4b484e762da Author: Alex Deucher Date: Mon Aug 23 18:58:12 2010 -0400 evergreen: use vbo pool for constant buffers commit eede93b057bbdddcde5da3220a3f8c6f73784a7e Author: Alex Deucher Date: Mon Aug 23 13:16:27 2010 -0400 radeon: move vbo data to a separate struct this way we can share the vbo code with const buffers commit d8abf27dbd14f5eb746c5e8b8b1436ad292d8ec6 Author: Alex Deucher Date: Mon Aug 23 01:31:27 2010 -0400 evergreen: fix dword counts in default state commit 5a7c9d94733a0db1d3565447acc9f0e751db5950 Author: Alex Deucher Date: Mon Aug 23 00:43:48 2010 -0400 radeon: fix legacy lvds dpms sequence Take from my kms commit. Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=19459 Signed-off-by: Alex Deucher commit 6930d2c981221757b1e11ef194809f085753a611 Author: Alex Deucher Date: Fri Aug 20 16:55:21 2010 -0400 Add initial EXA and Xv support for evergreen Based on the r6xx/r7xx code updated for evergreen. Still causes GPU hangs in some cases. We haven't tracked down why yet. Might be related to constant buffer persistence. Signed-off-by: Alex Deucher commit bdd41fecdb19c83c6c7b793016b61d38065dcd13 Author: Alex Deucher Date: Fri Aug 20 01:17:13 2010 -0400 evergreen: set encoder type to DVI for HDMI Fixes: http://bugs.freedesktop.org/show_bug.cgi?id=27452 Signed-off-by: Alex Deucher commit ad8ea1f6e5fcb4f163622cf5eab953ea812b5829 Author: Alex Deucher Date: Thu Aug 19 17:04:35 2010 -0400 DCE3+: switch pads to ddc mode when doing i2c The pins for ddc and aux are shared so you need to switch the mode when doing ddc. The ProcessAuxChannel table already sets the pin mode to DP. This should fix unreliable ddc issues on DP ports using non-DP monitors. Signed-off-by: Alex Deucher commit fd686668289258ffaf6b81057545e50612aac6a8 Author: Dave Airlie Date: Thu Aug 12 12:59:18 2010 +1000 radeon: fixup non-kms build commit 5a9865d90c23c4ce0f46d380ea9119eac87a99eb Author: Dave Airlie Date: Thu Aug 12 11:18:06 2010 +1000 evergreen: fix multi-head cursor support commit 8351bb9f085fde5dc47b115375efcc61adc23859 Author: Dave Airlie Date: Tue Aug 10 15:05:45 2010 +1000 radeon: take 8/10 encoding into a/c on displayport link commit b91e0efcb24eea32e6978c146c5409eeeeac0a62 Author: Dave Airlie Date: Tue Aug 10 15:05:25 2010 +1000 dce32: remove rmx workaround commit 94bc1b7156cd0866566dc44a823c7e051bb45175 Author: Dave Airlie Date: Tue Aug 10 13:24:52 2010 +1000 atombios: fixup set crtc source like KMS This removes a bunch of strict aliasing warnings and fixes the codepaths up like the latest KMS code, including a workaround for a bug on evergreen. commit 9bc716eb62d4e0eed2902b92437a42634eef6ba1 Author: Dave Airlie Date: Tue Aug 10 13:23:21 2010 +1000 atombios: move adjust pixel clock around to follow KMS code flow This reworks the pixel clock adjusting code to follow the KMS style, also fixes warnings in this code. commit 31de43bf9d9eb93cc2b2150474ea7404beabe49d Author: Dave Airlie Date: Tue Aug 10 13:21:39 2010 +1000 displayport: retry on timeout this is ported from KMS commit 9ef67335583d36080d227e8bce1966afe08e0486 Author: Dave Airlie Date: Tue Aug 10 13:21:01 2010 +1000 evergreen: don't call YUV table on evergreen commit 1cce55e8ba43e7958cb67147aeaeb068826ab99f Author: Dave Airlie Date: Tue Aug 10 13:20:13 2010 +1000 evergreen: add support to parse firmware info for ext dp clk commit bbffd67d3296344e8735b007cdee83146d38369c Author: Dave Airlie Date: Tue Aug 10 13:14:54 2010 +1000 atombios: realign digital transmitter/encoder setup with kms commit 6244153467665f5007e2fc7786b4bcc4b0b96030 Author: Dave Airlie Date: Tue Aug 10 12:57:22 2010 +1000 update atombios.h to latest from kernel commit bb7c77ca75e857f90791b0dd1c04c8e2f19d0e3c Author: Alex Deucher Date: Mon Aug 9 22:18:53 2010 -0400 atom: upstream parser update fixes digital output problems on evergreen asics commit cc0a167ff2db9b097891883ded147af1d67e4407 Author: Alex Deucher Date: Tue May 25 18:17:15 2010 -0400 r6xx/r7xx: default to micro (1D) tiling for now SW de-tiling used in the r600c 3D driver has issues with certain configurations. Signed-off-by: Alex Deucher commit b5bfdbd70d9671250957ccd41dfc8818850d257e Author: Alex Deucher Date: Thu Aug 5 17:26:28 2010 -0400 r6xx/r7xx: add support for tiling with kms (v3) Requires radeon drm 2.6.0 and updated mesa. v2: - fix lockup due to not emiting DB_DEPTH_INFO https://bugs.freedesktop.org/show_bug.cgi?id=28342 - fix drm minor version to deal with evergreen accel v3: rebase on current ddx git Signed-off-by: Alex Deucher commit a3c59c6f6be7067421e348142da0ca13428dcd57 Author: Alex Deucher Date: Wed Aug 4 12:07:36 2010 -0400 radeon: add new pci ids commit a456587b77ae357750179a50f8db2a17c0f2738e Author: Alex Deucher Date: Mon Aug 2 14:24:41 2010 -0400 r6xx/r7xx: move syrface sync emit to the functions that emit surface info reduces code duplication. commit 8eba977cab1878ba247da8160771d41194d8014f Author: Alex Deucher Date: Thu Jun 10 13:34:59 2010 -0400 EXA: move more common helpers to exa_shared commit 71c1a2704af23b61439cee5ce784f7fe267a8a26 Author: Alex Deucher Date: Thu Jun 10 11:52:43 2010 -0400 remove unused reg headers from radeon_exa_shared.c commit d73aef78919005369af1b60df138439b4b6105c3 Author: Alex Deucher Date: Mon Aug 2 13:27:12 2010 -0400 r6xx/r7xx: set VGT_MAX_VTX_INDX to a larger value commit dacaf5d827b58c39f9e5a7ac0530f9ea6e257347 Author: Dave Airlie Date: Mon Aug 2 08:33:51 2010 +1000 fix make distcheck commit c79ce215a01b45fc63b483da167ae37ec7aefad6 Author: Dave Airlie Date: Sun Aug 1 16:51:48 2010 +1000 radeon/r600: restructure exa + vbo to provide more sharing This is a precursor for r300/500 vbo support. Signed-off-by: Dave Airlie commit 82254b59268140c4102ae3cd713743ae2be15c00 Author: Alex Deucher Date: Fri Jul 30 17:15:05 2010 -0400 r6xx/r7xx: unify composite mask and non-mask pixel shader commit 1c17f3a192f644e8e38b5cfb1470f49434bfba27 Author: Alex Deucher Date: Fri Jul 30 16:34:54 2010 -0400 r6xx/r7xx: clean up composite vertex shader keep CF, ALU, Fetch instructions in separate groups commit f9d6c0de231357f96e2e0de71e6c9221bcb36bd4 Author: Gaetan Nadon Date: Fri Jul 23 13:28:42 2010 -0400 The local copy of the modes code is no longer required. The server 1.2 as shipped in the tarball on the web does not contain the modes code. It was added just after and found in git branch server-1.2-branch. The modes code was initially included in version ati 6.8.0 and fails to compile with server 1.2 as it requires randr 1.2. The modes code is included in server versions 1.3 and later, so there is no need to provide an unknown version of the modes code in the ati driver tarball. It will never be used. This patch makes the ati driver requiring server 1.3 or later. Version 6.8.0 configures and builds ok on server 1.3 Master branch post 6.13.1 configures and builds ok on server 1.3 Signed-off-by: Gaetan Nadon commit 0028419acb0762eeb950de5fe702c93e70301612 Author: Gaetan Nadon Date: Sat Jul 24 10:51:18 2010 -0400 config: add AM_PROG_CC_C_O for per-target compilation flags Per-target compilation flags (theatre200_drv_la_CFLAGS) are required when multiple targets which require different compiler flags, are build in the same makefile. Automake issues a command with -c and -o flags which not all compilers support. The object fles are prefixed with theatre200_drv_la. The macro AM_PROG_CC_C_O must then be used to provide this feature on compilers that do not have it. If not, a warning is issued at make time. This macros checks for compiler support and if missing, uses a "compile" script it generates in the package root directory. Signed-off-by: Gaetan Nadon commit aca0a8669b538d58f018f95c9b22e6b3ec1ffe50 Author: Gaetan Nadon Date: Wed Jul 21 16:49:04 2010 -0400 config: add comments for main statements commit 66e614f7115efeec237b3b916d9637e8b3e8985c Author: Gaetan Nadon Date: Wed Jul 21 16:07:00 2010 -0400 config: replace deprecated use of AC_OUTPUT with AC_CONFIG_FILES Signed-off-by: Gaetan Nadon commit 16e5510c90ef1ba2bbaab78d18943f080b86d809 Author: Gaetan Nadon Date: Wed Jul 21 14:37:41 2010 -0400 config: replace deprecated AC_HELP_STRING with AS_HELP_STRING Signed-off-by: Gaetan Nadon commit b36d8c09e91382f4cfa71635374ec88f5b676d1c Author: Gaetan Nadon Date: Wed Jul 21 14:05:22 2010 -0400 config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS Signed-off-by: Gaetan Nadon commit cd9351b04c2d6982b28c647a63d550eb3e1937eb Author: Alex Deucher Date: Wed Jul 21 13:48:24 2010 -0400 r6xx/r7xx: group op variable state Group the op variable state into one emit block, re-order to reduce dwords emitted. commit 5f838c664e8010f4e51afecd4100d73a96fe1209 Author: Gaetan Nadon Date: Wed Jul 21 09:27:42 2010 -0400 config: complete AC_INIT m4 quoting Signed-off-by: Gaetan Nadon commit 48ec2e65c268b426ab9a3e214d174447cf5b5936 Author: Gaetan Nadon Date: Wed Jul 21 08:33:38 2010 -0400 config: remove unrequired AC_SUBST for LIBDRM and LIBUDEV These macros are called by the PKG_CHECK_MODULES macro. Signed-off-by: Gaetan Nadon commit 1aabb7eb7d8f06c7481151145db3b9a722ce4ef0 Author: Gaetan Nadon Date: Tue Jul 20 21:54:11 2010 -0400 config: remove unrequired AC_SUBST([DRI_CFLAGS]) This macro is called by PKG_CHECK_MODULES Signed-off-by: Gaetan Nadon commit 8f92b349821a3ee5ed8df55273d905b9605385aa Author: Gaetan Nadon Date: Tue Jul 20 21:44:57 2010 -0400 config: remove unrequired AC_SUBST([XORG_CFLAGS]) This macro is called by PKG_CHECK_MODULES Signed-off-by: Gaetan Nadon commit 5b483b832f9c4a5b92ffb7f72a470669201f1fba Author: Gaetan Nadon Date: Tue Jul 20 20:24:42 2010 -0400 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". Signed-off-by: Gaetan Nadon commit 6574e3a16eb3631ee7e00ee60a8c9ba95c8b84ef Author: Gaetan Nadon Date: Tue Jul 20 19:41:30 2010 -0400 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: Gaetan Nadon commit 593eff2924c2ad161d8b490fbf6d7e433fbe2a80 Author: Gaetan Nadon Date: Tue Jul 20 18:45:18 2010 -0400 config: update AC_PREREQ statement to 2.60 Unrelated to the previous patches, the new value simply reflects the reality that the minimum level for autoconf to configure all x.org modules is 2.60 dated June 2006. ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz Signed-off-by: Gaetan Nadon commit c2ab6ffc25aa6759cbbb4c1fbbd4a136b38983bf Author: Gaetan Nadon Date: Tue Jul 20 16:15:29 2010 -0400 config: upgrade to 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. commit cdeb1949c820242f05a8897d3ddd0718f204dacf Author: Jerome Glisse Date: Thu Jul 15 16:21:41 2010 -0400 kms: don't call cursor helper if using software cursor Fix : https://bugzilla.redhat.com/show_bug.cgi?id=601713 https://bugzilla.redhat.com/show_bug.cgi?id=598358 Signed-off-by: Jerome Glisse commit 06691376b1ee963c711420edaf5a03eab6f5658f Author: Dave Airlie Date: Wed Jul 7 13:15:03 2010 +1000 fix build on non-kms commit 052cf0169ae70d5448af6dc4db840b2fc195569b Author: Dave Airlie Date: Wed Jul 7 11:10:46 2010 +1000 configure.ac: bump version post release commit ad999e633ff41d27eed9d2c6535e163a7181b0bd Author: Dave Airlie Date: Wed Jul 7 10:49:22 2010 +1000 set version for release commit 37b348059b1c15d7b381cd3df3db52bd9ee6613e Author: Alex Deucher Date: Wed Jun 30 12:56:48 2010 -0400 remove rv100 quirk Some RV100 cards with 2 VGA ports show up with DVI+VGA, however some boards with DVI+VGA have the same subsystem ids. Better to have a VGA port show up as DVI than having a non-useable DVI port. reported by DHR in irc. Signed-off-by: Alex Deucher commit c8ea942bd0e9d1c055d50b94440aa4dae425f20b Author: Cooper Yuan Date: Tue Jun 29 20:34:57 2010 +0800 Remove HDP_SOFT_RESET function, there is no need to reset HDP block. This commit can fix an issue reported on DELL server, system gets hang during soft resetting while another application tries to access PCI configuration space. commit 139b38bf67ec10d876cc56df833541d497ae4fa4 Author: Alex Deucher Date: Thu Jun 24 14:55:09 2010 -0400 r6xx shader: use ADDR() for CF_DWORD0 no change in functionality commit 801e83227a59a29eea425ea612083bbf2b536c30 Author: Wolfram Date: Mon Jun 21 18:59:19 2010 -0400 r6xx/r7xx: fix ums cmd buffer leak Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=27957 commit b13d719080b75fc6db4d15d2d323b8fce8b7ad06 Author: Alex Deucher Date: Mon Jun 21 18:49:44 2010 -0400 r6xx/r7xx: fix miscount in state emit commit c3c5c8e2cc91b51a24effdffb85281216eed731d Author: Alex Deucher Date: Mon Jun 21 14:30:17 2010 -0400 r6xx/r7xx accel: add back some additional default state This adds back everything removed in c29157bbf5b0dd26857675282ab094082fbaed0d except CB_FOG_*, CB_CLEAR_* and the VPORT transforms. Those shouldn't be needed as we aren't using fog or viewport transforms. We probably don't need all the state that was added back either but I can't reproduce any problems here, so it's hard to say which parts are problematic. Should fix: https://bugs.freedesktop.org/show_bug.cgi?id=28629 and several corruption reports on #radeon. Signed-off-by: Alex Deucher commit 800cb2088fec698d0626063a9ab198ff534938c0 Author: Michel Dänzer Date: Mon Jun 21 08:15:14 2010 +0200 DRI2: Fix up confusion between windows and pixmaps. Fixes crashes with xserver master, where looking up a pixmap private on a window no longer happens to work. commit f7a91ece264af9f3fd2fc18e99aefcda93ce9f5c Author: Michel Dänzer Date: Mon Jun 14 08:52:16 2010 +0200 Convert x(c)alloc/xfree to m/calloc/free. Fixes deprecation warnings with xserver master and should also work with older xservers. commit ea37d24b1b6d4cbcf73e680846de25b72af216e3 Author: Dave Airlie Date: Mon Jun 21 13:55:15 2010 +1000 radeon: fix support for 1.9 server master. This moves pixmap and mode set into CSR where its allowed. Should work fine on old servers also. Signed-off-by: Dave Airlie commit fdd8ecafd054f65842351aee6ee6fba7af6613b2 Author: Alex Deucher Date: Wed Jun 16 19:02:10 2010 -0400 r6xx/r7xx: macro safety fixes commit 4651d77211b508cb6b76931807780e317f232220 Author: Alex Deucher Date: Wed Jun 16 12:28:36 2010 -0400 radeon: fix depth 16 with ums Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=28494 https://bugzilla.redhat.com/show_bug.cgi?id=554967 Signed-off-by: Alex Deucher commit 1e1d6a515428b6884fea586d180346fc74ef75a1 Author: Alex Deucher Date: Wed Jun 16 12:20:03 2010 -0400 r3xx-r5xx Xv: disable bicubic filtering by default - makes Xv more consistent with r1xx/r2xx/r6xx/r7xx - Xv attributes like brightness, contrast, hue, etc. only work when bicubic is disabled. - avoids performance issues on some systems when sampling from textures in GART with kms. - It can be re-enabled with using xvattr Signed-off-by: Alex Deucher commit c29157bbf5b0dd26857675282ab094082fbaed0d Author: Alex Deucher Date: Tue Jun 15 19:39:42 2010 -0400 r6xx/r7xx: remove unnecessary state emit No need to emit state that doesn't impact that we use for EXA/Xv. Signed-off-by: Alex Deucher commit 35280545fcfb911f189d7657bd1040a28450fe7b Author: Alex Deucher Date: Tue Jun 15 19:21:32 2010 -0400 r6xx/r7xx: reorg default and clipping state emit Group ordered registers to save command buffer space. Reduces the default and clipping state from 256 to 160 dwords. Signed-off-by: Alex Deucher commit a2528a734c1d4e8639c49e5d222e3630a93ffbfd Author: Alex Deucher Date: Tue Jun 15 17:00:34 2010 -0400 r6xx/r7xx accel: remove some duplicate emits and minor clean up Signed-off-by: Alex Deucher commit 5f093357f18eb9bea641394ab86a92a1766d8f2e Author: Gaetan Nadon Date: Sat Jun 12 15:11:46 2010 -0400 COPYING: replace stub file with actual copyright notices Signed-off-by: Gaetan Nadon commit 0c2118586d3edeecc2473b5d685472df4b5e70fa Author: Dave Airlie Date: Fri Jun 11 15:53:18 2010 +1000 radeon: fixup last fix, use CURSOR_WIDTH not RADEON_CURSOR_WIDTH. commit 9a117f768cb8261327fd3c324da9c98875785cc1 Author: Dave Airlie Date: Fri Jun 11 14:28:24 2010 +1000 radeon: set proper stride for cursor in tiling flags. definitely incorrect, but hope it doesn't break anything. Signed-off-by: Dave Airlie commit b6346ede94f0d0b11ee04770cf52508cb0a5e6c6 Author: Dave Airlie Date: Thu Jun 10 20:13:58 2010 -0400 drmmode: fix big endian issue with properties. On a power machine with an rn50, this was causing load detection to be turned off after the first X run, subsequent X runs would find nothing connected. Signed-off-by: Dave Airlie commit 1971dc6d758dea13b9fb6d1c8f516c165628b5e5 Author: Alex Deucher Date: Tue Jun 8 11:18:28 2010 -0400 radeon: fix rn50 cloning with kms Since they only have one crtc sometimes the xserver doesn't assign a crtc to one of the outputs even though both outputs have common modes which results in only one monitor being enabled. Assign a crtc in preinit so that both outputs light up. Signed-off-by: Alex Deucher commit 426114b4a99d37b394efe3336968bb0ab9b6e9ae Author: Dave Airlie Date: Tue Jun 8 11:34:35 2010 +1000 xv: fix Xv on M6/RV100 under KMS. pRADEONEnt->HasCRTC2 wasn't setup under KMS. Signed-off-by: Dave Airlie commit f64bf0de8e2de7c1bf9cc0c614603dd23c9060ad Author: Alex Deucher Date: Thu Jun 3 14:48:21 2010 -0400 evergreen: explicitly disable accel on evergreen Previously we relied on the drm not having accel enabled to make sure evergreen used shadowfb, now we when we enable accel in the drm, we need to make sure the ddx doesn't try and use it until it's implemented. Signed-off-by: Alex Deucher commit 428125c095b18c2a2864c1aef24ac0f384b6be54 Author: Marek Olšák Date: Sun May 16 20:11:17 2010 +0000 r3xx-r5xx: enable color tiling by default on KMS Signed-off-by: Marek Olšák commit 6712ce4f4715c8ce7c2fcddb52ca9b103bdd634c Author: Marek Olšák Date: Sun May 16 20:09:31 2010 +0000 rs740: follow macro-switch too Signed-off-by: Marek Olšák commit 842fa162e9d3bbad2bc44d3732bbc8e5a54402ea Author: Alex Deucher Date: Tue May 18 11:21:01 2010 -0400 dri2: use radeon_pick_best_crtc() It's already exposed and used by exa and Xv and has the same functionality. radeon_covering_crtc() can be dropped eventually. commit 64e6858aaf5d0e39ecc9f9804689012f3a38660a Author: Alex Deucher Date: Mon May 17 12:50:44 2010 -0400 r2xx exa: fix typo in 27c3326863deae36bc35e2c3b73fffd400208ff1 Signed-off-by: Alex Deucher commit 27c3326863deae36bc35e2c3b73fffd400208ff1 Author: Alex Deucher Date: Mon May 17 09:53:32 2010 -0400 r1xx/r2xx EXA: handle RepeatNone properly with transforms Fallback with unsupported ops like r3xx, r6xx. Should fix fdo bug 28142. Signed-off-by: Alex Deucher commit 30591320ec46e491ba20904cc64f3405b51c6505 Author: Jerome Glisse Date: Fri May 7 17:35:09 2010 +0200 kms: add support for the MSC swap & sync API This patch is mostly a port over of Intel ddx code for MSC support. It needs a radeon KMS module with version 2.4 which has the query for hw crtc id. Signed-off-by: Jesse Barnes Signed-off-by: Jerome Glisse commit 766024dcc61c83490540910ce752f9bfe6dddba4 Author: Marek Olšák Date: Mon May 3 22:56:27 2010 +0200 r3xx-r5xx: fix texturing with small macrotiled pixmaps Pixmaps smaller than a macrotile cannot be used as textures because hardware automatically switches to macro-linear and therefore sampled pixels are messed up. This behavior is known as MACRO_SWITCH. The only sane workaround seems to be not using macrotiling for small pixmaps. The function RADEONMacroSwitch has been ported from r300g and implements MACRO_SWITCH the same way it's implemented in hardware. It's been well tested in r300g. This commit also fixes blit-based framebuffer reads, which are used for tiled surfaces in r300g, when ColorTiling is enabled. Signed-off-by: Marek Olšák commit 6aedd57f6c2f08d0151a8bd1c5893d40d3db709a Author: Alex Deucher Date: Tue May 4 14:30:52 2010 -0400 radeon: fix pll_out_min default for pre-avivo Fixes fdo bug 27960 commit b2ecd1bb507ed4e0d9ba6ebd498c51da2e8136fa Author: Michel Dänzer Date: Fri Apr 23 18:28:22 2010 +0200 FB/MMIO_cnt should be ints, not pointers. Pointed out by compiler warnings. https://bugs.freedesktop.org/show_bug.cgi?id=27817 commit 1ad41054989f7c3edec373ccf09dceda6d7c94b4 Author: Alex Deucher Date: Thu Apr 22 16:48:21 2010 -0400 r3xx: fix gb pipe setup for SE cards Noticed by Tormod Volden commit 59e287d7c484b4addd4a06d013670577639c7ae2 Author: Alex Deucher Date: Thu Apr 22 02:05:40 2010 -0400 r3xx-r5xx: fix vertex units Noticed by Tormod Volden. RV3xx is 2, RV560,RV570 is 8 commit 2a6b409496f26da0436972b5feae6ea035dde08d Author: Owain Ainsworth Date: Mon Apr 19 14:37:33 2010 +0100 Reference count shared driver mappings. With MMIO it wasn't *such* a bit deal if we leaked the smallish mapping. with FB it could be a larger deal. So instead of worrying about this, reference count the mappings in the entity structure and unmap them when no one cares anymore. Prompted by a discussion with airlied Signed-off-by: Dave Airlie commit 761f0de5556e46f166280476185977f720efe586 Author: Owain G. Ainsworth Date: Mon Apr 19 04:05:36 2010 +0100 Make consistent use of fbOffset and share fb mappings. What we were doing previously was mapping the framebuffer for zaphod for only this driver instances chunk, however, fbOffset was (rightly) set to the offset into the whole framebuffer we were using. Since in some cases we did operations on the FB virtual address + fbOffset (for example zeroing the framebuffer on entervt) we were actually pissing all over ourselves in those cases. Fix this by implementing shared fb mappings like we do for MMIO already, and whenever we wish to refer to our area of FB space we always use fbOffset. Fixes zaphod for some users on r600 chipsets, my 4870 is still behaving strangely on screen 0, but I suspect that is another bug. Once calculation (in PreInitAccel) is now wrong because of this, however dri on zaphod does now happen so this is irrelavent, add a comment to that effect. Signed-off-by: Dave Airlie commit 2059d628c5fb03222a62502cc1b5724bf296a7b3 Author: Owain G. Ainsworth Date: Mon Apr 19 04:05:35 2010 +0100 Kill per-context SAREA support. It has never been used, and since the world is changing it almost certainly never will be. Good riddance. Signed-off-by: Dave Airlie commit c4b46f56279cc18c8114235ca41cfb41ffede67f Author: Owain G. Ainsworth Date: Mon Apr 19 04:05:34 2010 +0100 Remove remnants of the ShowCache option. The rest of it died a long time ago. Signed-off-by: Dave Airlie commit 03b34c5fb12c4df180d4df113d2b654f6afd7230 Author: Dave Airlie Date: Mon Apr 19 17:58:07 2010 +1000 radeon: add FireMV 2400 pci id. From RH#581927 - thanks to Carsten Clasohm Signed-off-by: Dave Airlie commit 6c07816025f70e522986614c29c300ea13e5d932 Author: Alex Deucher Date: Fri Apr 16 18:50:17 2010 -0400 r5xx texvid: deal with large numbers of verts should fix fdo bug 25884 commit 5ee320a6b1b4c65fe592c8ac4d1981799242d59e Author: Alex Deucher Date: Fri Apr 16 18:42:56 2010 -0400 r3xx texvid: deal with large numbers of verts should fix fdo bug 25884 commit 47af3f4f266232517486238917d82fc5ca9c82e6 Author: Alex Deucher Date: Fri Apr 16 20:50:18 2010 -0400 r2xx texvid: deal with large numbers of verts should fix fdo bug 25884 commit 57577d5cd0641b7cad02242478699bcfece59227 Author: Alex Deucher Date: Fri Apr 16 20:40:56 2010 -0400 r1xx texvid: deal with large numbers of verts should fix fdo bug 25884 commit 31a888e78fa403f2bddacee098a29f36eaa969cb Author: Alex Deucher Date: Fri Apr 16 15:52:59 2010 -0400 r5xx textured video: split into prepare and draw functions commit f7ebe4a127965bb9e46d20c60331bcc4dab76fc5 Author: Alex Deucher Date: Fri Apr 16 15:46:24 2010 -0400 r3xx textured video: split into prepare and draw functions commit 10799b4ce0c18c5a7d92d688549e8e777344f111 Author: Alex Deucher Date: Fri Apr 16 15:38:49 2010 -0400 r2xx textured video: split into prepare and draw functions commit bd1cf42201a1f918080bf34786a6de327cb31b5f Author: Alex Deucher Date: Fri Apr 16 15:31:40 2010 -0400 r1xx textured video: split into prepare and draw functions commit c1136f94b80346065893f8a43c0fbf60c8c9b057 Author: Alex Deucher Date: Fri Apr 16 15:23:14 2010 -0400 Xv: track vtx_count, is_planar in port priv commit 2f680b631357661511456f07b7b4ba1aa2cbf30c Author: Alex Deucher Date: Fri Apr 16 13:43:41 2010 -0400 radeon/kms: fix possible crtc mask for evergreen commit 4656f5dff1ed72fa2c7a1484305f2aef7b65ff2b Author: Alex Deucher Date: Fri Apr 16 13:36:25 2010 -0400 radeon/kms: fix crash when using more than two heads fixes fdo bug 27692 commit a69e749d0562887af6bd236c38802472e54640c4 Author: Dave Airlie Date: Fri Apr 16 13:58:54 2010 +1000 kms: add uevent support. When we get a hotplug event from the kernel we should notify the client side to reconfigure displays. based on work by ajax in intel driver. Signed-off-by: Dave Airlie commit 22a46dddd375b2b9399e12fdf168fa5292ff17a4 Author: Alex Deucher Date: Tue Apr 13 11:08:59 2010 -0400 radeon: add support for pll algo selection tv-out on atom systems is very particular about it's dividers. force it to use the old algo. Should fix fdo bug 27593. commit c1b817c45477c21234abaaebe78feb7ea4fd92b1 Author: Alex Deucher Date: Mon Apr 12 16:32:04 2010 -0400 atom: disable TV encoder when VGA is in use Switching between TV and VGA caused problems on some systems since the TV encoder was left enabled. Should fix fdo bug 25520. commit 878814aeab7031ff6169fcaf2be869b7595c8699 Author: Alex Deucher Date: Mon Apr 12 11:16:14 2010 -0400 Xv overlay: set scalerwidth to 1920 on r3xx/r4xx chips reported on phoronix forums. commit 276fe739f1caa95778213054375a65288b80f320 Author: Alex Deucher Date: Fri Apr 9 20:03:09 2010 -0400 radeon: add some new pci ids commit eb5665688ef9b52f03f61546351d0848cab54740 Author: Alex Deucher Date: Thu Apr 8 00:31:52 2010 -0400 radeon: don't setup Xv on rn50 It has no overlay or 3D engine. fixes fdo bug 27528 commit 3c6c6afcbfc6f2c582e13a7c37fe2014b0875b22 Author: Alex Deucher Date: Mon Apr 5 12:12:56 2010 -0400 change version post release commit fb7911912e60b2cdbc2152b96847775b767ca3ef Author: Alex Deucher Date: Mon Apr 5 11:59:24 2010 -0400 bump version for release commit 476a1c6e8b42807b897b8c6f8550ec42b2d5c10e Author: Alex Deucher Date: Thu Apr 1 12:42:56 2010 -0400 radeon: fix possible gpio i2c table overrun GPIO_I2C_INFO does not always have ATOM_MAX_SUPPORTED_DEVICE entries. Should fix Novell bug 589022. commit 6baa96c44ca93b88acf5233335cee233e59d5af4 Author: Dave Airlie Date: Thu Apr 1 11:24:32 2010 +1000 r600/exa: further cleanup, use the object struct in the accel state. This cleans up the accel state objects as well. Signed-off-by: Dave Airlie commit 87f49a24019967552c5478d6af89ba438b4261c8 Author: Dave Airlie Date: Thu Apr 1 10:52:58 2010 +1000 r600: cleanup wasteful variables. Just assign directly to the structs. Signed-off-by: Dave Airlie commit 478319e55d52fce241d040912fea952071e3b742 Author: Dave Airlie Date: Thu Apr 1 10:45:52 2010 +1000 r600: reduce function call overhead. Create a small accel object that can be used to reduce the amount of parameters passed to SetAccelState. This can be cleaned up a lot more. Signed-off-by: Dave Airlie commit bc93395b3eb5e3511c1b62af90693269f4fa6e13 Author: Alex Deucher Date: Wed Mar 31 22:30:24 2010 -0400 r6xx+ EXA: fix swapped domains in kms UTS Noticed by Dave. Should fix fdo bug 27284 commit 3a33b1a92c328b690bdc1aafa0011e4326109815 Author: Owain G. Ainsworth Date: Tue Mar 30 17:14:02 2010 +0100 Add support for MacModel autodetection on OpenBSD. This allows radeon-equipped macs to work without an xorg.conf on openbsd. Patch originally written by Mark Kettenis (kettenis@openbsd.org) commit c7eeda8c3f3514ba95ebf2893fbe124bf526b3df Author: Alex Deucher Date: Fri Mar 26 01:38:36 2010 -0400 radeon: add support eDP connectors with and LCD device tag should fix fdo bug 27322 commit ff323e11485fa5030ac278c836bf80a535c22249 Author: Alex Deucher Date: Fri Mar 26 01:24:16 2010 -0400 radeon: fix name string for eDP commit 53ac06161eb2b8cffb1b88e24a9a21cfd12e5883 Author: Alex Deucher Date: Tue Mar 23 13:34:38 2010 -0400 r6xx+ EXA/Xv: add a R600SetAccelState function This moves CS bo checking and alignment checks into a central location. It also cleans up the code. commit 7a044472dfea7cf05ba4c2b87be30e94e2ae0b62 Author: Alex Deucher Date: Tue Mar 23 01:27:22 2010 -0400 r6xx+ EXA: always use a temp surface for overlapping copies The scanline based fallback code was complex and added a lot of overhead. It also didn't work with kms. commit d33bddaedae81126ab7f0023af1c6443bb0b4c4f Author: Alex Deucher Date: Mon Mar 22 18:15:23 2010 -0400 r6xx+ EXA: always use the accel_state state in DoPrepareCopy commit dda3f5a99e7a2dc5d57860f4d07df3498e1e21df Author: Alex Deucher Date: Mon Mar 22 18:05:36 2010 -0400 r6xx EXA/Xv: track src/dst domains Much of the code is shared, so track the src/dst domains so we make sure the uses consistent domains for each bo. commit 5c256808cb5fea955eea96ffe9196473715156aa Author: Alex Deucher Date: Wed Mar 17 23:47:50 2010 -0400 XAA: disable render accel It's been reported broken for a while. Should fix fdo bug 27151, others. commit a0683be5cc082bdbdd3bc4e9b52f39f423650946 Author: Dave Airlie Date: Thu Mar 18 12:36:25 2010 +1000 radeon: avoid using DRI1 init path on DRI2 driver. I was playing with multi-seat and found this code, fixed it up to be sane and more DRI2 like. Signed-off-by: Dave Airlie commit 080a5414593e9b59ed923f26aa6057747b0c868f Author: Alex Deucher Date: Tue Mar 16 12:33:39 2010 -0400 kms: fix ums naming compat for DisplayPort commit 819b4015349b5d8c5ffa5f979097599774fce5bb Author: Alex Deucher Date: Mon Mar 15 13:47:29 2010 -0400 dump version for rc release commit d3482a947e3731be4ed0b00b4e3079470700dc4c Author: Michael Cree Date: Fri Mar 12 22:23:31 2010 +1300 Fix some word accesses in AtomBios to work on all architectures. The UINT16LE_TO_CPU(), etc., macros are used in the AtomBios code to fix up endian issues but they do not address bad alignment or assist architectures that cannot perform hardware byte or word accesses. This patch inserts use of the ldw_u(), etc., interface of the Xserver into certain AtomBios accesses to address alignment issues. This resolves Debian bug 572311, namely that the driver when compiled for generic Alpha architecture (i.e. doesn't use the byte-word extension) resulted in no display output on certain Radeon cards. Signed-off-by: Michael Cree commit 488c9fd8300505cc6c0c2f8f0f00849f27cc5d63 Author: Alex Deucher Date: Mon Mar 15 12:25:57 2010 -0400 r6xx/r7xx: fix domain handling in accel code Noticed by Pauli and Michel on IRC. Improves GetImage performace by a factor of ~10. commit 2ace2591d92fb6d3ce7a6453edb04b36a6c49a32 Author: Alex Deucher Date: Mon Mar 15 12:03:58 2010 -0400 radeon: remove some leftover debugging output commit 67e81c8f17ddde6eba633d2a5aef528e1d598d89 Author: Andrzej Hajda Date: Wed Mar 10 18:19:35 2010 -0500 radeon: add support for pal on legacy IGP chips Based on my initial non-working patch. Fixes some element of fdo bug 12007 commit 3a44f1cb0d2bb748692b1024003de8ee88ca77a5 Author: Alex Deucher Date: Tue Mar 9 09:44:01 2010 -0500 atom: i2c gpio fixes Basically a port of my kms patch. This allows us to remove some quirks. commit d85cb40f516c67305e818302bec7ee817df4144c Author: Matt Turner Date: Sun Mar 7 14:24:35 2010 -0500 Don't check for Xinerama. It doesn't seem to be used anywhere, so don't require it. CC: Jerome Glisse CC: Alex Deucher CC: Dave Airlie Signed-off-by: Matt Turner commit e7b41f8cb082ed462d29bf3fc440072424cbd852 Author: Alex Deucher Date: Fri Mar 5 19:16:11 2010 -0500 radeon: disable frac fb div with new pll code fixes fdo bug 26897 commit 14aff767490c253cbcdd411f812e50b91673119e Author: Alex Deucher Date: Wed Mar 3 13:31:19 2010 -0500 radeon: add new RS880 pci id commit e6dc886634b38e4a36af7b5f0b23299d5acd7244 Author: Dave Airlie Date: Tue Mar 2 10:25:15 2010 +1000 radeon: bump configure.ac commit 4975658f05c387b39b3e96a292a7683f17645c2c Author: Dave Airlie Date: Sat Feb 27 16:47:19 2010 +1000 pciids: hopefully fix HP commit e76b90b399c3cc0f0998c0209300c46f97505498 Author: Alex Deucher Date: Fri Feb 26 15:01:28 2010 -0500 rv740: disable dfs workaround for drm 1.32+ rv740 pipe setup was fixed in 2.6.33 commit 2de0af5f5b806f9dbfdb1e9b6a5cf96d9433961d Author: Matt Turner Date: Wed Feb 24 22:46:28 2010 -0500 Use RADEON_ALIGN instead of open coding it. Also fix some RADEON_ALIGN(x, 63), which would return incorrect results for odd x. Though this shouldn't happen, it's still not right. You wouldn't ever write (x + 62) & ~62 which is clearly wrong (and what it expands to). CC: Jerome Glisse CC: Alex Deucher CC: Dave Airlie Signed-off-by: Matt Turner commit c7e81d2f3a372e0d5f751dd0c5091aec2b56d936 Author: Matt Turner Date: Wed Feb 24 22:46:27 2010 -0500 Use/define RADEON_GPU_PAGE_SIZE instead of sprinkling 4096 everywhere. Also, define RADEON_BUFFER_ALIGN in terms of it, and replace some RADEON_ALIGN(x, RADEON_BUFFER_ALIGN) with RADEON_ALIGN(x, RADEON_GPU_PAGE_SIZE) since this is really what was intended. CC: Jerome Glisse CC: Alex Deucher CC: Dave Airlie Signed-off-by: Matt Turner commit c0a5c9403dff254e1669df606a4193794270aeff Author: Dave Airlie Date: Fri Feb 26 19:17:28 2010 +1000 pci: add HP vendor id commit 3970cc5563900f08ba5236b23f765c926616c345 Author: Cooper Yuan Date: Fri Feb 26 16:14:12 2010 +0800 add more triple-head server ID commit b499eee7506f7478649e0000e9f8fcd00ac9d88d Author: James Le Cuirot Date: Thu Feb 25 21:13:18 2010 -0500 clean up kms zaphod handling Taken from James patch on bug 24523 agd5f: adapt to the current code commit 433c8617341f5768255826435a2b09afba684f02 Author: Alex Deucher Date: Thu Feb 25 21:03:13 2010 -0500 update ZaphodHeads option Now that the screen section mapping is fixed, Make the option per-instance and allow multiple outputs to be specified; e.g., DVI-0 and HDMI-0 associated with instance 0 and LVDS and VGA-0 associated with instance 1. commit f3e20b01c77f02bdf3483ceee27a1f00d240c33d Author: James Le Cuirot Date: Thu Feb 25 19:10:19 2010 -0500 zaphod: Fix entity instance assignment. Each screen needs to have a pointer back to its device's entity instance, Currently Screen1 is pointing to Screen0's instance so when it comes to match up the screen sections with the detected screens, Screen0 gets chosen in both cases. See bug 24523 commit 1b7e9a2e50f77819b3aff4e37ba39eaec69ff932 Author: Alex Deucher Date: Tue Feb 23 11:39:55 2010 -0500 radeon: fixes for zaphodheads option Needed for systems with more than two outputs. Both KMS and non-KMS zaphod work on systems with more than two outputs now. commit bd83e5f1c75b8c00b43846c7225568917fc9a8ce Author: Dave Airlie Date: Tue Feb 23 19:27:24 2010 +1000 zaphod: hopefully fix kms + zaphod commit 0c3468d812e3790ce03d9e76779ae81e7b7b82d5 Author: Alex Deucher Date: Mon Feb 22 17:34:51 2010 -0500 AVIVO: set frac fb divider pll flag matches previous behavior commit 212e152536c4325e6799018891d9aee132681f48 Author: Alex Deucher Date: Mon Feb 22 17:27:24 2010 -0500 radeon: update new pll algo - add support for pre-avivo chips - add support for fixed post/ref dividers - add support for non-fractional fb dividers By default avivo chips use the new algo and pre-avivo chips use the old algo. Use the "NewPLL" option to toggle between them (set to TRUE for the new algo, FALSE for the old). commit e68d3a3890fc81c51f2006b5548da1e8756ad2fd Author: Alex Deucher Date: Thu Feb 18 14:02:00 2010 -0500 RS600: add connector quirk System lists DVI port as HDMI. fixes fdo bug 26605 commit a3b730eceb522c7ac1ef3dd6f6c7d773118d03f7 Author: Jerome Glisse Date: Thu Feb 18 14:13:48 2010 +0100 r6xx/kms: when reseting BO force default state emission In KMS world each cs need to fully initialize the 3D engine when we were erasing cs in IBDiscard for r6xx we weren't forcing reemission of default state. This patch force this emission. Fix : http://bugs.freedesktop.org/show_bug.cgi?id=26603 http://bugzilla.kernel.org/show_bug.cgi?id=15284 commit 579cdcf9b4e38c791a497b747a055fc0a07d8dd6 Author: Alex Deucher Date: Wed Feb 17 12:22:48 2010 -0500 radeon: add ZaphodHeads option Allows users that want to use zaphod mode to select which xrandr outputs are assigned to which head. E.g., Option "ZaphodHeads" "LVDS,VGA-0" will assign LVDS to the first zaphod driver instance and VGA-0 to the second instance. commit 47136fa347d1756523239746b4c74cd5278a1118 Author: Michel Dänzer Date: Mon Feb 15 16:44:39 2010 +0100 EXA: Fix order of coordinates passed to radeon_pick_best_crtc(). The wrong order prevented tearing avoidance from working with EXA/DRI2. commit 6e95905f759b844373be62ec513c78153ed00222 Author: Michel Dänzer Date: Mon Feb 15 17:02:16 2010 +0100 Allocate BOs for 'video offscreen surfaces' and 'TV-in' in VRAM. I think these can only really work in VRAM, though right now there's probably nothing to prevent them from getting evicted... commit 78e7047c5235b09858b66dd3688d39aaa27d7589 Author: Pauli Nieminen Date: Mon Feb 15 13:40:37 2010 +0200 Allocate Xv buffers to GTT. KMS doesn't have acceleration for upload to vram. memcpy/memmove to VRAM directly is very slow (40M/s in benchmark) which causes visible problems to video. Allocating video buffer in GTT will give good performance (350-450M/s) for memmove operation. This is nice performance boost for Xv under KMS. Signed-off-by: Pauli Nieminen commit 3ec25e59854b6b03ad763bc374d3475a50f562d8 Author: Pauli Nieminen Date: Mon Feb 15 13:45:28 2010 +0200 Use memcpy instead of memove for RADEONSwapCopy. memcpy has about 25% better performance than memmove when destination is GTT (wc caching). Changing memmove to memcpy in SwapCopy will reduce CPU time spent moving data between host and GPU. memcpy will specially help Xv when playing high resolution videos. The swap path doesn't support overlapping memory copies either so extra safety is not worth the performance hit in commonly used code path. Signed-off-by: Pauli Nieminen [ Michel Dänzer: Fixed up whitespace ] commit 221ef11b31756deb7134801730e76c040e841f5c Author: Alex Deucher Date: Fri Feb 12 14:15:10 2010 -0500 r6xx/r7xx: implement EXA vline support commit 8ad4025affe1fb2f417e3a3031d74f83be5df253 Author: Alex Deucher Date: Fri Feb 12 11:34:47 2010 -0500 radeon: consolidate crtc selector for vline wait Use the Xv version as it takes into account the area covered by the op rather than just picking the largest crtc area. commit 4f9d1714a7382594b834d446bbe502663f6a2778 Author: Alex Deucher Date: Fri Feb 5 12:27:51 2010 -0500 r500: fix relocs for Xv planar video fixes fdo bug 26445 commit b7ca1ab11ac0e4e4be5a1e7789ae8633b460a2d4 Author: Dave Airlie Date: Fri Feb 5 13:37:20 2010 +1000 rs400/rs480: mc idle bit is bit 2 like original radeon backport from a KMS fix, the rs400/480 mc idle is bit 2 not bit 4. Signed-off-by: Dave Airlie commit 97c387e269672b146a95b45fbef5c8c18e473e36 Author: Gaetan Nadon Date: Fri Jan 29 16:08:17 2010 -0500 config: remove dead LINUXDOC macro usage This module does not generate LINUXDOC documentation. Signed-off-by: Gaetan Nadon commit 05fa2dee0c63d56fd523ee1ebab479bcb9f5e89d Author: Alex Deucher Date: Thu Feb 4 13:13:58 2010 -0500 evergreen: minor clean up in transmitter setup both link and encoder must be set for linkb commit 76eea5e02776f7beeb8f4491a374bd36792eda92 Author: Alex Deucher Date: Thu Feb 4 10:52:14 2010 -0500 r600: reduce number of cache flushes We don't need to flush so often. Next step would be to move the flushing to the drm and only flush after each command buffer rather than each draw. commit 8d63d70f7ebaf9d250f0449d3720ef47516c05df Author: Alex Deucher Date: Wed Feb 3 15:22:22 2010 -0500 evergreen: use external clock source for DP PHY DP CRTC clock always comes from DCPLL. This frees up PPll1/2 for non-DP-mode PHYs and CRTCs commit ecbc26431914216a8b207e81451282ea07c8b92f Author: Alex Deucher Date: Wed Feb 3 03:52:07 2010 -0500 evergreen: blank/unblank DP in dpms calls commit 710a2fd07235349f084ec40626cc28fbae523d27 Author: Alex Deucher Date: Wed Feb 3 03:00:24 2010 -0500 evergreen: pll fixes SetPixelClock needs to be called for DP outputs with a valid PLL. commit 9ab2377ee23c5dc360ba135a77aa6b181a1862e6 Author: Alex Deucher Date: Tue Feb 2 15:15:36 2010 -0500 evergreen: DP requires coherent mode commit 634da80056525a48ec17ffb81e2fb59b168bea9e Author: Alex Deucher Date: Tue Feb 2 15:09:57 2010 -0500 evergreen: fix units on frac_fb_div commit a887818f491f6c7315c56c4e0d0b702c4c6aa4ac Author: Alex Deucher Date: Mon Feb 1 11:01:47 2010 -0500 evergreen: add pci ids commit cb2772b69480268c059766c4f6b209ce590ede0e Author: Alex Deucher Date: Fri Jan 29 12:59:46 2010 -0500 evergreen: add atombios crtc/pll functions commit bd8e04cb7b39f38b6958273582a9b324a9f0759a Author: Alex Deucher Date: Mon Feb 1 10:07:43 2010 -0500 evergreen: add atom support for digital outputs analog is already supported by the existing code. commit 8ad40d3c32ad5b91725bd37fcade6bed504df421 Author: Alex Deucher Date: Tue Jan 26 15:39:44 2010 -0500 evergreen: add crtc set base/format support commit 2c9cf0a07ff9e5a4989861bc2fdfd71d841013a8 Author: Alex Deucher Date: Thu Dec 10 15:29:14 2009 -0500 evergreen: add lut support commit 65246545c3dd9bfef73e8a0f200bd5909b89a167 Author: Alex Deucher Date: Tue Jan 26 12:10:02 2010 -0500 evergreen: add hw cursor support commit c05cad56b69d239fa2e69905d15f4f08b9db4c55 Author: Alex Deucher Date: Thu Jan 28 01:28:52 2010 -0500 evergreen: add base asic support commit ed63e1b1abe8810b5da6b4140892337eef08a9ea Author: Alex Deucher Date: Fri Jan 29 12:42:33 2010 -0500 evergreen: add register and utility defines commit 019260ec4a9f9fbf2ac63a2ca3314aa308471f7e Author: Alex Deucher Date: Thu Dec 10 14:57:39 2009 -0500 evergreen: add chip enums commit e86ae564d8b94d2cc8d3c7cceb452a197ab6387a Author: Alex Deucher Date: Mon Feb 1 12:03:23 2010 -0500 atom: update to the latest upstream atombios.h changes commit 77b13a02c70842a58e0590d0243f0ae016c5a640 Author: Alex Deucher Date: Mon Feb 1 12:16:20 2010 -0500 r500: fix CS section size missmatch in Xv code commit 5c11264517d1b9808415d47e9dedc345610f0f86 Author: Dave Airlie Date: Fri Jan 29 15:10:33 2010 +1000 radeon: further digital encoder cleanups. this just cleans up a few more bits of the digital encoder setup. Signed-off-by: Dave Airlie commit 872a11fa9efb0b76cef83089ea1bb80792b94930 Author: Alex Deucher Date: Thu Jan 28 01:19:23 2010 -0500 radeon: clean up dig encoder handling - switch the var name to dig_encoder - quiet coherent messages - clean up dig encoder selection Signed-off-by: Alex Deucher commit c1a73ff51b371ecc6f57a81a33f644344b4e3f70 Author: Dave Airlie Date: Thu Jan 28 12:58:29 2010 +1000 radeon: add support for picking the digitial encoder Testing on a W500 laptop found the LVDS + DisplayPort would conflict over the choice of digital encoder, and only one would work. This patch fixes the DCE3 case where LVTMA requires the second digital encoder and lets DP/DVI use the first in most cases. Signed-off-by: Dave Airlie commit 95b56275d80dcee48a7927df124602c34cd72235 Author: Alex Deucher Date: Wed Jan 27 15:48:25 2010 -0500 avivo: add some hotplug detect regs commit 5a4327f7784361933484895c9af751ccfa242d48 Author: Alex Deucher Date: Tue Jan 26 16:06:00 2010 -0500 radeon: minor pll updates add new fixed post divider option commit cbd642af7c76469d701471daea0c8d167567ccf8 Author: Alex Deucher Date: Tue Jan 26 12:03:45 2010 -0500 radeon: use mmio bar size rather than hardcoded number for register ops newer asics have larger mmio bars commit e5933fd74923a07aa401bdb4ecd8d1d641148440 Author: Alex Deucher Date: Mon Jan 25 13:18:47 2010 -0500 KMS: fix no accel option NO_ACCEL wasn't handled correctly with KMS. fixes fdo bug 26198 commit ba99a82ced1a6101365876723d22bcfec4607537 Author: Dave Airlie Date: Mon Jan 25 13:50:13 2010 +1000 radeon/kms: only enable EXA pixmaps under kms if we support render accel I've seen RN50s with 64MB of RAM that are slow as molasses, this should fix them. RH bug 556400 Signed-off-by: Dave Airlie commit de40d36264364434541377c7f65f3836dc514fc0 Author: Kusanagi Kouichi Date: Fri Jan 22 17:18:51 2010 +0900 Remove unnecessary checks. Signed-off-by: Kusanagi Kouichi commit 30a19b75cc82b8e04c45e6684b84f9a4ccc0505b Author: Alan Coopersmith Date: Tue Jan 19 14:54:04 2010 -0800 Fix configure with --disable-dri AM_CONDITIONAL calls can't be made inside if statements, since automake won't know what to do when the if isn't true. Signed-off-by: Alan Coopersmith commit bd011784c0609f1fd03dcb784744c8f5cdef33da Author: Alex Deucher Date: Tue Jan 19 11:59:38 2010 -0500 ATOM: Upstream parser updates commit 95d63e408cc88b6934bec84a0b1ef94dfe8bee7b Author: Jerome Glisse Date: Mon Jan 18 10:46:50 2010 +0100 r6xx/r7xx: emit relocation for FRAG & TILE buffer FRAG & TILE buffer are unused but still they need to be associated with a valid relocation so that userspace can't try to abuse them to overwritte GART and then try to write anywhere in system memory. commit bbaf71fb46e3e0acdadcb91e9b1c73396bd9aa8e Author: Alan Coopersmith Date: Fri Jan 15 15:09:27 2010 -0800 Update Sun license notices to current X.Org standard form Signed-off-by: Alan Coopersmith commit 3d158716a60d5a113a541ea2f680b81a1be41ad2 Author: Dave Airlie Date: Thu Jan 14 11:21:33 2010 +1000 displayport: fix DDC on DVI->DP convertors. Seems we have to not do auxch DDC if we aren't talking to a DP sink. commit 6a363f68415d37c302151581f2a86855dba39b67 Author: Alex Deucher Date: Mon Jan 11 15:13:45 2010 -0500 rv100: fix typo in fix for bug 25992 Noticed by Maarten Maathuis. commit 7b01e1ee29f681bf1735ecded6445d12beeb52d8 Author: Alex Deucher Date: Mon Jan 11 12:40:06 2010 -0500 rv100: reject modes >135 Mhz with DVI Due to heat issues. fixes bug 25992 Signed-off-by: Alex Deucher commit 74da9a66a420a40bb5d562f07e97ce6ac2eb010f Author: Alex Deucher Date: Fri Jan 8 16:51:43 2010 -0500 radeon/kms: add new strings for eDP and TV commit 61977f61f516b54d1fd9df34d0f0892fbf5227d7 Author: Alex Deucher Date: Thu Jan 7 02:15:31 2010 -0500 radeon: fallback to i2c for edid if aux fails In case of a DP->DVI adapter for example. commit 958d073869404f60e56dc0cc70b3e7de85904694 Author: Alex Deucher Date: Thu Jan 7 02:12:00 2010 -0500 radeon: add initial support for eDP (embedded DisplayPort) Should fix fdo bug 25931 commit 944ae73f7cd5f9a1622b38e06a58565812cb102f Author: Alex Deucher Date: Thu Jan 7 01:52:35 2010 -0500 radeon: updated ObjectID.h commit 48aa5064aff4b9adf768e480df2312d4375e9c40 Author: Alex Deucher Date: Mon Jan 4 11:05:44 2010 -0500 radeon: fix LVDS power sequence on Mac cards Noticed by John R. Dunning. Fix taken from radeonfb. I'm not sure if this sequence would be useful on any PC laptops or not so make it mac specific for now. commit 36bd69affc996c92c40b7360a7fbaa1a3a46abfd Author: Gaetan Nadon Date: Wed Dec 16 15:52:18 2009 -0500 configure.ac: remove unused sdkdir=$(pkg-config...) statement The sdkdir variable isn't use, so remove the statement. Acked-by: Dan Nicholson Signed-off-by: Gaetan Nadon commit 9d0f3af7278dc939fd4e6f3ea69d9f488a9fbed7 Author: Alex Deucher Date: Tue Dec 22 08:45:27 2009 -0500 radeon: add cvt timing if we only have panel w/h fixes mac laptops without an edid Signed-off-by: Alex Deucher commit 6e1f5553c6d7e3b5d089af2e3d587efe95936855 Author: Alex Deucher Date: Mon Dec 21 17:32:40 2009 -0500 ATOM: add new power table defs commit 4b05c47ac657f9a93d76221269761ed64c81f716 Author: Dave Airlie Date: Thu Dec 17 14:30:23 2009 +1000 radeon: use new libdrm api commit 1d620800bd79290967fa487decf798e318c45f25 Author: Ingmar Vanhassel Date: Sun Dec 20 21:04:56 2009 +0100 Replace shave with automake silent-rules Which are enabled by default in Xorg's util-macros 1.3 if automake-1.11 is used. Signed-off-by: Ingmar Vanhassel commit 52f6a2ff682ad1f8e26ef1cd7d380493dcd57752 Author: Gaetan Nadon Date: Wed Dec 16 15:29:53 2009 -0500 src/Makefile.am: missing 3 header files in tarball radeon_dummy_bufmgr.h radeon_vbo.h simple_list.h Replace leading spaces with tab for radeon_atomwrapper.h Signed-off-by: Gaetan Nadon commit 3a30210d50b27f8772fc5045133940246764fce9 Author: Matthias Hopf Date: Tue Dec 15 10:53:48 2009 -0500 fix 200M freezes on VT switch if CRTC is disabled It appears that RS4xx chips need to have the crtc enabled when the timing is programmed. agd5f: minor fixes/cleanup of the original patch commit 299d395bd3f294239dee58ab7d607d7d2c657f61 Author: Corbin Simpson Date: Sun Dec 13 14:51:17 2009 -0800 dri: be more useful if disabling DRI due to KMS/UMS mismatch. It's only fair. Compile-tested only. Signed-off-by: Dave Airlie commit 0e5c9d87b5d7e0751df71cc8958ca5ccaed25104 Author: Alex Deucher Date: Thu Dec 10 14:27:43 2009 -0500 ATOM: split set base/format into separate functions Signed-off-by: Alex Deucher commit 46630da5fd6f45bb8ea150b870162997480d69c7 Author: Alex Deucher Date: Wed Dec 9 12:55:25 2009 -0500 AVIVO: add new PLL code This should hopefully help the problems with flickering and blinking monitors reported on some systems. If there are problems, the old PLL algorithm can be selected with: Option "NewPLL" "FALSE" in the device section of your X config. Signed-off-by: Alex Deucher commit f082b1693d6f7f763ccf5a8436a89890ca2c6129 Author: Matthijs Kooijman Date: Thu Dec 3 12:10:14 2009 -0500 radeon: fix crtc2 dpms noticed by Matthijs Kooijman on fdo bug 22140 commit 3a96fbf3b84522cf1ba1b176e82b662222331c14 Author: Alex Deucher Date: Wed Dec 2 18:02:33 2009 -0500 radeon: only read RADEON_PPLL_REF_DIV for ref div on pre-avivo Signed-off-by: Alex Deucher commit f03450796d2e9247a1228c4e2abb1dfad7aecddf Author: Kusanagi Kouichi Date: Wed Dec 2 01:36:37 2009 -0500 radeon: Lift hardcoded limit from RADEONQueryImageAttributes The dimension of an XvImage is limited to 2048 x 2048 even if an adaptor supports larger image. XvCreateImage and XvShmCreateImage lower the width or height of an image. XvPutImage and XvShmPutImage return BadValue. The cause is that 2048 is hardcoded in RADEONQueryImageAttributes. commit efbc2c80ab02879edf3b7b3d65b16c45ddce5017 Merge: 88a50a3 a612813 Author: Dave Airlie Date: Wed Dec 2 14:30:36 2009 +1000 Merge remote branch 'origin/displayport' commit 88a50a30df11a06263209340a42251851f8e2334 Author: Dave Airlie Date: Mon Nov 30 15:32:12 2009 +1000 r600: fix multi-operation in single batch support. This ports the mesa DMA buffer handling with the 3 lists, Signed-off-by: Dave Airlie commit b2597deea3a3953ff50d54ff37e3c043eac409f4 Author: Kusanagi Kouichi Date: Mon Nov 30 11:10:50 2009 -0500 R600: fix some warnings commit 4d90dc3cb248e9d61c0c490bba80f6727fafd318 Author: Alex Deucher Date: Mon Nov 30 11:05:38 2009 -0500 atom: pull misc mode info for lvds panel mode from bios tables sync polarity, etc. This will likely fix LVDS problems on some laptops. Signed-off-by: Alex Deucher commit a612813c5f329f00a9271e7bb69abd2630a49403 Author: Alex Deucher Date: Fri Nov 27 17:20:30 2009 -0500 radeon: clean up DP code Signed-off-by: Alex Deucher commit a8dbf7c23481501987971a9c0b6cb0760f86127f Author: Dave Airlie Date: Fri Nov 27 10:16:00 2009 +1000 r600/accel: cleanup and merge a lot of the accel functions All of the drawing ops were the exact same modulo the vtx size, this along with the vertex buffer wrapping code could all be consolidated into a smaller set of functions. This also adds 2 VBO which we switch between, and merges a #define to enable the multiple operations in one CS under KMS mode. Multi-operation still isn't working though. Signed-off-by: Dave Airlie commit 971e463b2cfdc1ba1c78a24fb439d33dd9155dfc Author: Alex Deucher Date: Thu Nov 26 12:45:15 2009 -0500 dce3: CV1/TV1OutputControl tables didn't go away until dce3.2 Signed-off-by: Alex Deucher commit 95385f0906f371a1ed6e60eb3e597e699c7a3222 Author: Jerome Glisse Date: Thu Nov 26 12:21:21 2009 +0100 kms: Fix resizing when acceleration is disabled When acceleration is disabled we need to reallocate a new shadow framebuffer and we should also avoid calling any EXA function as EXA is disabled in such case. commit 8195385d3cedf70d89ca576371af6bca5045bbd2 Author: Dave Airlie Date: Thu Nov 26 15:43:54 2009 +1000 dce3: no CV1 or TV1 Output Control tables anymore. According to the DCE3 docs we should only use DAC1/2 not CV1/TV OutputControl, also my rv730 bios doesn't have any CV1/TV tables. Signed-off-by: Dave Airlie commit 381b14d5422131ea8ff942ab06a328f6beca0d3f Author: Dave Airlie Date: Thu Nov 26 15:28:15 2009 +1000 atombios: CV mode retrival was broken. a) crev and frev are reversed b) my rv730 bios only has one mode in it, so bounds check the table size. commit a67a13c315a9235be052662e2a3270686cccc0f0 Author: Dave Airlie Date: Thu Nov 26 13:41:36 2009 +1000 radeon: fix typo in unused as of yet CV code commit cd9bfb5892eebef6dff14ac414dff074db5ddee4 Author: Dave Airlie Date: Thu Nov 26 06:43:13 2009 +1000 fixes displayport for me here commit 256de862a3c017dcb4ed0d8689294a552eda0d18 Author: Dave Airlie Date: Thu Nov 26 06:35:39 2009 +1000 displayport: cleanup call dp from dpms on instead. commit 05551295c5e0946745163f17e5c1d3d41b94bcbf Author: Kristian Høgsberg Date: Tue Nov 24 21:09:03 2009 -0500 dri2: Use drmGetDeviceNameFromFd() instead of open coded loop. commit 0061c4db1d3aecdca13efb5133ab8784dc37df95 Author: Dave Airlie Date: Wed Nov 25 15:39:10 2009 +1000 Revert "r600: enable multiple operations in one CS" turn this off for now, on my rv635 desktop, I started getting blanks in places in firefox and the odd bit of font corruption, need to track that down. This reverts commit 985a065518b1d33599de33f7fe082d3302db58a6. commit 8b28534bcf877557a5681fa3b4f107c74615d3de Author: Dave Airlie Date: Wed Nov 25 13:24:44 2009 +1000 radeon/exa: change option to determine exa pixmap usage. This moves to a boolean instead of using VRAM sizing. as per Michel's suggestions on list. Signed-off-by: Dave Airlie commit f0acb16fa19844453adc6db3399977fba7c8a0db Author: Dave Airlie Date: Wed Nov 25 12:04:47 2009 +1000 r600/xv: drop inited 3d false in xv code commit 985a065518b1d33599de33f7fe082d3302db58a6 Author: Dave Airlie Date: Wed Nov 25 11:54:08 2009 +1000 r600: enable multiple operations in one CS This switches on multiple ops in a single CS under KMS/DRI2. It gets for on a Pentium D 3 + rv740 from 330,000 to 500,000 with x11perf -aa10text. It also knocks a couple of seconds of gtkperf -a Signed-off-by: Dave Airlie commit af816ac752820255f245793b53a7cca5a4a49cd4 Author: Dave Airlie Date: Wed Nov 25 11:53:07 2009 +1000 r600: fixup problems with EXA operation reset for multiple ops To put multiple ops into one CS, you can't just discard the whole IB. This add supports for reset the CS cdw to the correct place after an op discards. Still doesn't enable the final accel bits. commit 3d8dcbc29323a3c644100bec13aa93f024653bd3 Author: Dave Airlie Date: Wed Nov 25 11:43:57 2009 +1000 kms: flush cs on close screen. this is needed for server recycle. Signed-off-by: Dave Airlie commit 19f1a357944f9d8f4567a2691a68067ec033ccb7 Author: Dave Airlie Date: Wed Nov 25 11:41:52 2009 +1000 radeon: fix check for no work in operation commit 3a460a14b9603159f10d89da27b559c36a184e27 Author: Dave Airlie Date: Wed Nov 25 10:33:17 2009 +1000 r600: refactor code to help future acceleration speedups. This changes the vertex buffer index to be an offset, and records the start of the vb for each operation and uses that to set the operations up. This still flushes after each operation to make sure we have no regressions in non-kms/kms cases. Signed-off-by: Dave Airlie commit 797a3f0c71c94477eec565ea2c95553c6f66d9fd Author: Dave Airlie Date: Wed Nov 25 10:07:59 2009 +1000 kms: allow prepare copy to fail without dying commit ba76acc76e0d0a51a1c488e4d5494a71e155a05b Author: Dave Airlie Date: Tue Nov 24 15:38:47 2009 +1000 radeon/kms: drop special r600 indirect flush This just merges it with the main kms cs flush commit 3c527d752d3cced219c6113acb932511b16e35fb Author: Dave Airlie Date: Tue Nov 24 15:11:12 2009 +1000 r600: enable mixed pixmaps commit b9eb2380df5145c85b2ef694a04628c055c47429 Author: Alex Deucher Date: Mon Nov 23 12:12:02 2009 -0500 DCE3.2: fix uniphy2 dvi issues In some cases the atom transmitter table sets the golden value of this reg differently which some monitors don't like. I haven't had time to dig further, so this works around it for now. Fixes fdo bug 24313 Signed-off-by: Alex Deucher commit d0dd5122d8d75b7c4a72df07dc7f562b2e75dd5e Author: Gaetan Nadon Date: Mon Nov 23 09:25:05 2009 -0500 Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES Now that the INSTALL file is generated. Allows running make maintainer-clean. commit 3d7888aa0493f46d826f4d80dea36f1f642f3c6b Author: Dave Airlie Date: Mon Nov 23 15:26:15 2009 +1000 radeon: fix warning in printf commit 3a1a8b7b73424a769baf917bba2223ea6515b596 Author: Dave Airlie Date: Mon Nov 23 15:07:10 2009 +1000 radeon: surround mixed pixmaps usage with ifdef check for old servers commit e20af9c94982ec6487dae42c141d33cf6a7a2eb4 Author: Dave Airlie Date: Fri Nov 20 12:15:02 2009 +1000 radeon: avoid using hw pixmaps when we have little VRAM. This patch returns NULL for pixmap creation when we are using mixed pixmaps and the pixmap has a size. The size check is necessary for the front buffer. We add a flag to force pixmap creation for certain pixmaps that need to be hw, like the DRI2 and Xv ones. Idea from Michel and workarounds from Ben Skeggs. v2: add Option "EXALowVRAM" to allow configuring this, value in MBs. Signed-off-by: Dave Airlie commit 543338842ba7fe7da4902947d386ea1cabd1cdf0 Author: Alex Deucher Date: Fri Nov 20 16:38:43 2009 -0500 dp fix timing aux channel atom command table delay is 10 usec units this gets the link training working, but alas, no image. commit dd3eab848cf352bb96c3d01fe6028d8a4a8e451e Author: Alex Deucher Date: Fri Nov 20 01:06:49 2009 -0500 r300: render target limit is 2560 limit was increased to 4021 in r4xx. fixes fdo bug 25191. Signed-off-by: Alex Deucher commit df35d40d4ec260cdab57a9b36e4e96b2a6c2a827 Author: Alex Deucher Date: Thu Nov 19 20:01:42 2009 -0500 DP: hack that makes DP work. Something's wrong with the status check. commit f42412ec4dbd21f562a7fe4239c0a1f17ef1b8f2 Author: Alex Deucher Date: Thu Nov 19 19:40:54 2009 -0500 wip commit eb9bc133fc426e67b397e661bfd22bf62009d9d3 Author: Dave Airlie Date: Fri Nov 20 09:23:31 2009 +1000 kms: recalculate the flush limits after screen resize. When we resize the front buffer we need to reduce the flush limits appropriately. Signed-off-by: Dave Airlie commit f7f58ef4c042e492618665a6c5555e8e67387ab3 Author: Dave Airlie Date: Fri Nov 20 09:22:39 2009 +1000 radeon: r100/r200 have a 2047 scissor limit We were overflowing this in my case with a 2704 width desktop, so videos were stopping around 700 bytes across the screen. can I haz shatter already? Signed-off-by: Dave Airlie commit 54c09778d79de1516ee511d6d7d5b54dd4bf9130 Author: Alex Deucher Date: Thu Nov 19 13:32:30 2009 -0500 DP wip - use coherent - fix up lane/clock numbers commit 02d017a0552db2c8a48506c5b26c48a1a2ab75b6 Author: Gaetan Nadon Date: Wed Oct 28 14:41:41 2009 -0400 INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206 Automake 'foreign' option is specified in configure.ac. Remove from Makefile.am commit 396ee9b7e7e3b1dd64532270c4e32cdb33857596 Author: Gaetan Nadon Date: Wed Oct 28 14:09:09 2009 -0400 INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206 Add missing INSTALL file. Use standard GNU file on building tarball README may have been updated Remove AUTHORS file as it is empty and no content available yet. Remove NEWS file as it is empty and no content available yet. commit 1dcda0c4d5d506e18a7989ff05f2ad8569a73f23 Author: Gaetan Nadon Date: Mon Oct 26 12:54:21 2009 -0400 Several driver modules do not have a ChangeLog target in Makefile.am #23814 The git generated ChangeLog replaces the hand written one. Update configure.ac to xorg-macros level 1.3. Use XORG_DEFAULT_OPTIONS which replaces four XORG_* macros Update Makefile.am to add ChangeLog target if missing Remove ChangeLog from EXTRA_DIST or *CLEAN variables This is a pre-req for the INSTALL_CMD commit 5b517bcc353e7111d2365a213505f27cfae30924 Author: Gaetan Nadon Date: Thu Oct 22 12:34:16 2009 -0400 .gitignore: use common defaults with custom section # 24239 Using common defaults will reduce errors and maintenance. Only the very small or inexistent custom section need periodic maintenance when the structure of the component changes. Do not edit defaults. commit 605c869076985b69350c893cf2bbcc90de8dc6bf Author: Alex Deucher Date: Wed Nov 18 01:51:12 2009 -0500 more dp cleanup - clean up handling of linkb, etc. - add support for ATOM_TRANSMITTER_ACTION_SETUP_VSEMPH to existing transmitter control function - fix lots of warnings commit bce1911f66f446b793125ac8cd5463bf6292629e Author: Alex Deucher Date: Wed Nov 18 00:04:33 2009 -0500 radeon: pull previous displayport work into master commit 437113124bbd6fb166825169eabec4dfde900dd9 Author: Alex Deucher Date: Tue Nov 17 14:16:22 2009 -0500 radeon: deal with connectors sourced to the same encoder Some systems have multiple connectors connected to the same encoder; e.g., DVI and HDMI connected to the same encoder with the same ddc line. Since we expose connectors as xrandr outputs, randr treats them separately which results in it trying to source the same encoder to different crtcs. If we have an HDMI and DVI-D port on the same encoder, pick the one to be considered connected based on the edid (HDMI if edid indicates HDMI, DVI otherwise). Also, don't turn off (dpms) encoders that are shared. Fixes fdo bug 21767. Signed-off-by: Alex Deucher commit 9b8605d4e2bf7703c7848f3e2022a8c7328a3acd Author: Alex Deucher Date: Tue Nov 17 11:45:09 2009 -0500 radeon: fix potential memory leak in ddc code Signed-off-by: Alex Deucher commit ce8299962003de572122561a6f7f61eaccf633b2 Author: Dave Airlie Date: Tue Nov 17 15:23:30 2009 +1000 kms: check for 0 mask for cloned outputs. Signed-off-by: Dave Airlie commit 06d68f7fa3870f9601e837e1834d33e8395008b1 Author: Dave Airlie Date: Tue Nov 17 15:10:04 2009 +1000 kms: add cloning support. We have to translate from the kernel encoder cloning to the randr connector cloning, we do this by constructing an encoder mask per output and an encoder cloning mask per output then comparing them. Signed-off-by: Dave Airlie commit 7587ce16ab0380337fe801f457c1d1d9b4141cc5 Author: Alex Deucher Date: Mon Nov 16 19:16:03 2009 -0500 r600: remove un-needed format conversions we do the normalization and xforms in the vertex shader. Signed-off-by: Alex Deucher commit ba605b5c9ff48765f2b66960aa4cc81b6235d012 Author: Alex Deucher Date: Mon Nov 16 19:00:52 2009 -0500 r600: fix num format in vtx fetch Signed-off-by: Alex Deucher commit 0c4710c67a2fee2061fc3da43c9f908585693cfa Author: Alex Deucher Date: Thu Nov 12 11:11:17 2009 -0500 radeon: man page updates commit 2af2744c80f3307e6d84edba9479be5bd36e1d03 Author: Alex Deucher Date: Wed Nov 11 13:12:24 2009 -0500 radeon: fix support for external tmds on some legacy chips Should fix bug 11801. Signed-off-by: Alex Deucher commit f17657fdc83d8f4c0386d2c7dade98de5b94acbe Author: Alex Deucher Date: Mon Nov 9 16:59:11 2009 -0500 r600/r700: typo, fix mask of DB_ALPHA_TO_MASK noticed by glisse. commit 0ee7763fb33bf7fbc4ae1e8372cbc74578bfb720 Author: Alex Deucher Date: Mon Nov 9 15:09:34 2009 -0500 IGP: some IGP chips report as AGP Set bus type appropriately. fixes bug 25002 Signed-off-by: Alex Deucher commit da1fcddaade58e371c7bee555ce32944c689f810 Author: Alex Deucher Date: Thu Nov 5 14:13:49 2009 -0500 radeon: properly fix unused label warnings commit 6e496f46fdc90d0a6cef41e9d45a6458aaed1eca Author: Alex Deucher Date: Thu Nov 5 14:11:55 2009 -0500 Revert "Fix warning about unused defined labels in radeon_exa_funcs.c." This reverts commit b6ac42cce2156880ac18b32e15acbff40b2f53e9. This patch is very broken. commit b6ac42cce2156880ac18b32e15acbff40b2f53e9 Author: Tomáš Chvátal Date: Sat Oct 31 23:07:07 2009 +0100 Fix warning about unused defined labels in radeon_exa_funcs.c. Signed-off-by: Tomáš Chvátal commit 87d7235790866f9c19ef08972d5237f09d940cd9 Author: Alex Deucher Date: Thu Nov 5 10:23:03 2009 -0500 EXA: fallback if no pMaskPicture->pDrawable A solid or gradient mask could be used for blending the source picture onto the destination picture. Fixes fdo bug 24838 Signed-off-by: Alex Deucher commit 873897c54429e230a23011a9dd2f1069f4eb7752 Author: Alex Deucher Date: Thu Nov 5 00:51:11 2009 -0500 DCE3+: call transmitter init on mode set Generally this is done at post, but might not always be done with softboot or for connectors on docking stations. Signed-off-by: Alex Deucher commit 3028374488cc0f34942ac372c8d05cf15898a613 Author: Alex Deucher Date: Wed Nov 4 18:48:03 2009 -0500 ATOM/DCE3+: fix up usPixelClock calculation for Transmitter tables Signed-off-by: Alex Deucher commit 52973e8f2c4104de60d00c0e5c29a31f77bf3de7 Author: Alex Deucher Date: Sun Nov 1 13:58:03 2009 -0500 radeon/atom: fix tv-out on r5xx fixes bug 24796 Signed-off-by: Alex Deucher commit 19b4f5f9b647cd470616b8ec1d34f1e4afa357ad Author: Alex Deucher Date: Tue Oct 27 11:55:20 2009 -0400 ATOM: fix up DVO for DCE 3.x AdjustDisplayPll takes care of this for us. commit 5a0019126a57138ee506d9a66738c9e8b75cbb96 Author: Alex Deucher Date: Tue Oct 27 11:39:06 2009 -0400 radeon: fix DVO on AVIVO chips DVO generally requires 2x ppll on AVIVO cards due to the way the tmds chip is wired up. Because of this, disable cloning of DVO outputs. fixes fdo bug 21857. Signed-off-by: Alex Deucher commit 2a6eeec72d6bb04a32225883f431c1d2e8cff123 Author: Alex Deucher Date: Tue Oct 27 11:18:44 2009 -0400 atom: loosen pll min output limits Limiting the pll output range is a good thing generally as it limits the number of possible pll combinations for a given frequency presumably to the ones that work best on each card. That's why the limits are in the bios tables. However, certain duallink DVI monitors seem to like pll combinations that would be limited by this at least on pre-DCE 3.0 r6xx hardware. This might need to be adjusted per family or per clock range in the future. Fixes fdo bug 24727. Signed-off-by: Alex Deucher commit f0d9d80fee4176eaba9435a9539f29d0eefe2a87 Author: Luca Tettamanti Date: Sat Oct 24 16:45:23 2009 -0400 Disable color tiling on r600/r700 Not supported yet. commit ac499c3c0ea92f83ebd8127bb8cb5de625de6c94 Author: Alex Deucher Date: Fri Oct 23 10:48:55 2009 -0400 radeon: clamp the internal FB map to the aperture size v2 We don't use the invisible memory yet and on cards with large amounts of vram this can cause the top of GART calculation to overflow. Fixes bug fdo bug 24301: http://bugs.freedesktop.org/show_bug.cgi?id=24301 v2: only clamp cards with more than 512 MB. This seems to cause problems on some older cards due to the way the drm and ddx set up the internal memory map. commit e57b54daf318ff59315a1c9ed21934f288c5c782 Author: Alex Deucher Date: Thu Oct 22 16:07:58 2009 -0400 R7xx: program additional CUR/GRPH regs for 40 bit addresses The *_HIGH regs are reversed. The secondary ones are in the primary block and vice versa. commit 4cf06dfba617529291ce4b4c306c4fc1bba110ee Author: Alex Deucher Date: Thu Oct 22 02:08:45 2009 -0400 ATOM: use indirect addressing for regs >= 0x10000 commit 66b194a78c470cb3978f310828dd96c3f3e96944 Author: Alex Deucher Date: Wed Oct 21 15:58:18 2009 -0400 ATOM: fix up get clock info Newer revisions of the atom firmware table have changed. This helps select better pll dividers in some cases. Noticed by Mathias Froehlich. commit bd89b7501f294ac645390ef144df569953c81dc4 Author: Alex Deucher Date: Sun Oct 18 16:21:36 2009 -0400 radeon: fixup CustomEDID option - add support for analog option to force edid to analog mode - fix compilation on older xservers - updated man page commit 255ac8d54e3dc12e579e05edb41b40946a00eab8 Author: Alex Deucher Date: Tue Oct 13 12:27:52 2009 -0400 radeon: add XV_CRTC attribute for textured video This attribute allows the user to override which crtc is synced with when XV_VSYNC is enabled. This is useful for clone modes where the user can might want to override the default. commit 801d900add4731f3c424ebb780ad2dbd7a1c6a25 Author: Alex Deucher Date: Mon Oct 12 10:00:57 2009 -0400 ATOM: minor cleanups to pll setup commit f4407962cd7b272e0860319f11f6a6583ef226c2 Author: Csillag Kristof Date: Fri Oct 9 18:00:09 2009 -0400 Fix some issues with CustomEDID support - Fixes a memory allocation problem introduced with the previous version of the CustomEDID patch (now in GIT), and - Enhances the syntax of the CustomEDID option so that I can force digital output, even if the EDID was acquired over an analog link. commit de55995e82c3875f70b6394fff440d695d062113 Author: Alex Deucher Date: Fri Oct 9 11:07:30 2009 -0400 r600 EXA: fix up mask reg mixup commit a168caf5349b757873ad89d977772feaa7fb6e58 Author: Alex Deucher Date: Fri Oct 9 10:32:26 2009 -0400 r600 EXA: fix some compile warnings commit fb8dda2928bd0def2b34c8c8e414129e650d6eb5 Author: Alex Deucher Date: Fri Oct 9 10:30:21 2009 -0400 r600 EXA: properly check planemask We only support per-component masks. commit 1b25bad2d8ebe481ffb4b0fd3a85ab636bd4fec2 Author: Dave Airlie Date: Fri Oct 9 20:09:52 2009 +1000 Revert "radeon: clamp the internal FB map to the aperture size" This reverts commit 5f846360c46f5a989f5d0fde6d251cdbd61d4968. Numerous reports of system hangs since this, I'm guessing some sort of conflict with the drm memory setup. This code has always been fragile between kernel/userspace drivers. commit a956d478043b44c49aed39c7aa3d576ef32cadc5 Author: Dave Airlie Date: Fri Oct 9 20:08:31 2009 +1000 Revert "kms: setup colormap and gamma correctly." This reverts commit 60d9685abddccec17c1a9a5ec48cbe9c92543e0f. which breaks colormap on 1.6 X server Conflicts: src/drmmode_display.c commit a493feb94c0d84aaf5bfd84c6940d7f03974dd86 Author: Dave Airlie Date: Fri Oct 9 15:05:25 2009 +1000 kms: don't use scratch pixmaps at all use our own wrapper to allocate a pixmap for wrapping a bo in. commit 0caffbd6fd6b356b9b7d715c015285eaa91e3e36 Author: Dave Airlie Date: Fri Oct 9 15:04:56 2009 +1000 drmmode: reload cursors on modeset commit 02e12ae6be7bc1976f63848fa2854d320d5ab36e Author: Alex Deucher Date: Wed Oct 7 19:56:58 2009 -0400 ATOM: rework crtc modeset - clean up tv timing handling - unify SetCRTCTiming and SetCRTCDTDTiming interfaces commit d499eeaf22f77a1294e99aa38a50aa6810bb684a Author: Alex Deucher Date: Wed Oct 7 17:43:11 2009 -0400 ATOM: reorder crtc dpms based on bios recommendations commit 4ccd2a21f9c50515b4246f35454f76ef49006c76 Author: Alex Deucher Date: Wed Oct 7 16:30:03 2009 -0400 ATOM: add support for AdjustDisplayPll table Depending on the output and clock, this table will adjust the pixelclock accordingly. commit 5f846360c46f5a989f5d0fde6d251cdbd61d4968 Author: Alex Deucher Date: Wed Oct 7 17:01:55 2009 -0400 radeon: clamp the internal FB map to the aperture size We don't use the invisible memory yet and on cards with large amounts of vram this can cause the top of GART calculation to overflow. Fixes bug fdo bug 24301: http://bugs.freedesktop.org/show_bug.cgi?id=24301 commit 186bf719c394116341abff471fb4b4803650da9a Author: Dave Airlie Date: Wed Oct 7 17:23:36 2009 +1000 radeon: fix rotation since mixed pixmaps. Passing null in here stops the mixed pixmap code doing it wrong, but I'm not 100% sure how it is meant to work, we have the same issue with the real front bo by the looks of it. commit e08411af1aa8c7d4233ba593b84360397cdbb307 Author: Roel Kluin Date: Tue Oct 6 18:31:17 2009 -0400 radeon: Fix duplicated bit settings [agd5f: adapted from kms patch] Signed-off-by: Alex Deucher commit e59ae08270711512e64b70f79b6476cc2c52d230 Author: Michel Dänzer Date: Tue Oct 6 00:13:09 2009 +0200 Don't call radeon_cs_flush_indirect() without KMS. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=24316 . commit 457646d734558672402b6bcd15cadb66741edbed Author: Jerome Glisse Date: Mon Oct 5 15:52:42 2009 +0200 kms: assume accel is working is info ioctl return -EINVAL -EINVAL should only happen if the info ioctl doesn't support the get accel query. This patch assume that on such case accel is working. commit 9d596562496863d65850306d2126d8df98464de4 Author: Dave Airlie Date: Mon Oct 5 18:35:20 2009 +1000 kms: only touch gamma stuff on 1.7 for correct colormap operation you probably want 1.7 commit 876f43d4682df4d47d3e158f75e0ca6040f41c70 Author: Alex Deucher Date: Mon Oct 5 02:23:03 2009 -0400 R1/2xx EXA: Minimise number of draw primitives used for Composite operations. commit 86cafb8affea448bdf58300044e755201b822d2a Author: Dave Airlie Date: Mon Oct 5 14:17:25 2009 +1000 kms: don't use scratch pixmaps when copying fbcon. scratch pixmaps seem to interact badly with mixed pixmaps, it appears some state may be getting left around in the privates somewhere, since scratch pixmap headers don't get destroyed. commit f8471512ea9f1d38140dfe98a0f832e9f935f51b Author: Csillag Kristof Date: Sun Oct 4 18:18:56 2009 -0400 radeon: add support for Custom EDID Allows you to specify an edid per output from a file to override what is detected by DDC. Useful for problematic monitors or KVM switches that block DDC. Specifying an EDID that is not compatible with your monitor could damage your monitor so use with caution. agd5f: cache the custom edid at startup so we don't have to read it from file every time the output is queried. commit 60d9685abddccec17c1a9a5ec48cbe9c92543e0f Author: Dave Airlie Date: Mon Oct 5 12:41:30 2009 +1000 kms: setup colormap and gamma correctly. We need to program the gamma at modeset. no need to use old cmap interface at all. commit b0b10e548fd69b3ff67a0f9b71456b89c61cb4d6 Author: Alex Deucher Date: Sun Oct 4 17:07:32 2009 -0400 R6/7xx EXA: Add support for BGRA picture formats. Also add mysteriously missing case statements for ABGR destination formats. commit 8404c37b2ff95aba31db97676f106ec2f30fda7f Author: Dave Airlie Date: Sun Oct 4 18:18:51 2009 +1000 radeon: fix build without kms commit 9460ea864b12ec1fbd11c5d9a20bb5a4279d9d3d Author: Michel Dänzer Date: Sat Oct 3 16:33:33 2009 +0200 Fix KMS on big endian machines. Requires at least xserver 1.7 to work properly. Also make sure the front buffer is and stays tiled if colour tiling is enabled. commit aee6b6f2c120baf477b4845ddc1a94637c31db2f Author: Michel Dänzer Date: Sat Oct 3 16:33:33 2009 +0200 EXA: Bail earlier from PrepareCopy hook on trivially unsupportable conditions. commit 30031b169def5caadb394225919a6079a0957142 Author: Michel Dänzer Date: Sat Oct 3 16:33:33 2009 +0200 R3/5xx EXA: Add support for BGRA picture formats. Also add mysteriously missing case statements for ABGR destination formats. commit 4b4ce36081ca151c24e028c54b59986f41731a73 Author: Michel Dänzer Date: Sat Oct 3 16:33:32 2009 +0200 R3/5xx EXA: Minimise number of draw primitives used for Composite operations. This should reduce the kernel CS checker overhead, if nothing else. I'll leave porting this to other chipset families to others who can test it. commit eade1e5be159c9f2965d611925596d33cab11d6d Author: Michel Dänzer Date: Sat Oct 3 16:33:32 2009 +0200 EXA: Don't always flush when switching between 2D/3D engines with KMS. This seems to work fine here now and help 2D performance quite a bit, let's see if it breaks anybody else's setup... commit 926e414fc835ace141c066830d11d8ce32dbb06c Author: Michel Dänzer Date: Sat Oct 3 16:33:32 2009 +0200 KMS: Double-buffer textured video source image upload. In order to avoid stalling on previous frame. OTOH without KMS we can't do this but have to wait for the previous frame to finish rendering. commit 6a3b75fae4147244212298ff55c7ab36c3d80d30 Author: Michel Dänzer Date: Sat Oct 3 16:33:31 2009 +0200 KMS: Don't hide HW cursor when it's updated. Inspired by the intel driver; might avoid/reduce HW cursor flicker in some cases. commit c4ba15b4871c70cced7f1761e24be692cdb28d2b Author: Michel Dänzer Date: Sat Oct 3 16:33:31 2009 +0200 Fix some compiler warnings. commit cc45856a18dd3e6f7e44d9eb507b31419da70977 Author: Kenneth Graunke Date: Fri Oct 2 14:31:36 2009 -0400 radeon: Remove gatos message from driver startup Remove a message on driver startup which directs people to the old GATOS website; said site contains highly out of date software which is no longer necessary. commit d302481493ff61eb7f8648b7afe7407b6b653cf7 Author: Jerome Glisse Date: Wed Sep 16 15:18:40 2009 +0200 radeon/kms: fallback to shadowfb if kernel report acceleration is off This will fallback to shadowfb is GPU accel failed somewhere during KMS kernel init. commit 7968e1fb89f6b59d1654df48249bf4b81990c008 Author: Alex Deucher Date: Fri Sep 25 19:05:38 2009 -0400 radeon: fix segfault in MMIO path in RADEONInit3DEngine fixes fdo bug 24158. Signed-off-by: Alex Deucher commit 0380a9cf98d34e88dd81370ade5525680ec89c02 Author: Alex Deucher Date: Fri Sep 25 16:46:43 2009 -0400 kms/r600: add support for vline relocs Signed-off-by: Alex Deucher commit 3efecebb10de7f7bacf9f8c57ae20fd508097294 Author: Alex Deucher Date: Fri Sep 25 14:44:41 2009 -0400 radeon: fix vline handling for kms drm crtc ids do not correspond to actual hw crtcs, as such the vline stuff was never enabled for Xv. Signed-off-by: Alex Deucher commit 9733dcde0a21b7503aa20254724f2910b541b990 Author: Dave Airlie Date: Sat Sep 26 06:15:58 2009 +1000 r600: fix build commit ff18595eace42ddfc931f4f948cb5adf59ebcf52 Author: Dave Airlie Date: Sat Sep 26 06:04:51 2009 +1000 r600/xv: fix dst bo write domain commit 718a611f3cc7f5eea95cd73a9dcc7913c922fcbc Author: Dave Airlie Date: Sat Sep 26 06:03:51 2009 +1000 radeon: fix zaphod commit 86c367be517e992aabc1bcfea2a2dde1a1ae520c Author: Alex Deucher Date: Fri Sep 25 13:03:44 2009 -0400 r600: fix bo accounting for Xv fixes Xv after changes in: 8f80e37eed3ec028718b4e71bbb9b598847fd94e Signed-off-by: Alex Deucher commit 8f80e37eed3ec028718b4e71bbb9b598847fd94e Author: Dave Airlie Date: Fri Sep 25 11:37:38 2009 +1000 r600: space check wasn't correct. the r6xx space check code was incorrect for the DFS case, since the dst bo was in GTT but the hardcoded cp_start function assumed the bos were where it thought. Ripped out assumptions and replaced with code more like other radeons. commit 90669f6cb5ada9067d6fccc7f54c69b367862f42 Author: Alex Deucher Date: Thu Sep 24 10:40:40 2009 -0400 radeon: remove old pre-randr rotation cruft leftover from the randr 1.2 conversion. Signed-off-by: Alex Deucher commit 97a4e747bfac14f34646c55ddf639e8fe22f2f55 Author: Michael Olbrich Date: Sun Sep 20 14:19:41 2009 +0200 use AC_CHECK_HEADER instead of AC_CHECK_FILE AC_CHECK_FILE is not possible when cross-compiling. Use AC_CHECK_HEADER / AC_PREPROC_IFELSE instead. [ Michel Dänzer: Shuffled things around slightly to make it work on my setup ] Signed-off-by: Michael Olbrich Signed-off-by: Michel Dänzer commit 579070ed9f0218a975e840331b6fe9fa8fd05789 Author: Alex Deucher Date: Sat Sep 19 19:15:14 2009 -0400 kms: disable dga Can be dangerous with kms: http://lists.freedesktop.org/archives/xorg-devel/2009-September/002113.html commit da7487f6ac7b32ed7866af53da2925aa52ed7aae Author: Alex Deucher Date: Sat Sep 19 13:08:02 2009 -0400 kms: init dga using xf86DiDGAInit fixes cursor problems in games like UT2004 and Penumbra Overture see fdo bug 24034 commit 52279251fae9df99c569c16e2522bbd346d8ec38 Author: Dave Airlie Date: Fri Sep 18 14:29:32 2009 +1000 avivo: disable VGA rendering core when starting X. this thing can be rendering to VRAM when we don't expect it. turn it off. Signed-off-by: Dave Airlie commit 2c46bafcb77c4125a27c18ad6ca2f6de5f143a2d Author: Pauli Nieminen Date: Thu Sep 17 15:13:51 2009 +0300 Fix configuration to disable KMS if not finding libdrm_radeon. Most of KMS building was disabled if LIBDRM_RADEON was not detected. But at least configure was reporting KMS enabled even tough it was realy disabled. commit ee9f6d802988a4d7f7985687036db854f4a14fe5 Author: Pauli Nieminen Date: Mon Sep 14 16:36:48 2009 +0300 radeon: Add missing libdrm_radeon cflags to compiler paramaters. This fixes compilation if libdrm_radeon is installed to non-standard location like /opt. commit ac853ca0a950d6147cd6a0b4a1b089f5d2f080ea Author: Alex Deucher Date: Fri Sep 11 14:25:31 2009 -0400 atom: fix typo in asus quirks Should be DVI-I, not DVI-D commit a88f60e7b789cd23a79e6e18a7e3fa008d15aa77 Author: Alex Deucher Date: Thu Sep 10 13:42:31 2009 -0400 r600: add CS UTS and DFS hooks commit 0bb0ff0e55aaf8e64017d204e376a14f0a7384a3 Author: Dave Airlie Date: Thu Sep 10 11:48:00 2009 +1000 r6xx: fix EXA crash with gtkperf -a unmapping was getting unbalanced. commit 10a58d54857484b6e89763ecf463f54dc290c702 Author: Dave Airlie Date: Wed Sep 9 14:24:49 2009 +1000 kms: add property support. this adds support to the userspace DDX to get properties from the kernel and expose them over randr. Its most liberated from the Intel driver. commit fad9ee6cdae5ae45e6406e3071a84276f1b59a85 Author: Alex Deucher Date: Tue Sep 8 17:50:50 2009 -0400 radeon: replace dga code with DiDGA commit 651fe5a47435c6a5cc1cdfb33c5c6601d692adcb Author: Adam Jackson Date: Tue Sep 8 13:21:07 2009 +1000 radeon: fix dri2 struct zeroing commit 6990f2ac6478bf92929a4400ef84fb2142699204 Merge: 917f2d7 853f4c3 Author: Dave Airlie Date: Tue Sep 8 11:26:32 2009 +1000 Merge branch 'r6xx-cs' commit 853f4c3d1ea8f975ab2855f18d3ae336a4095091 Author: Dave Airlie Date: Tue Sep 8 11:25:39 2009 +1000 r600: more alignment fixups + vb map/unmap I'm not so sure the vb map/unmap is a good idea, I think it pretty much locksteps the cpu/gpu, so we should really work out if we really need to flush this often, since mesa doesn't have to and we are just doing 3D ops. commit 917f2d7cd1815279710939edc27133ca6609460f Author: Alex Deucher Date: Sun Sep 6 10:53:29 2009 -0400 RV280: add agp quirk deb bug 545040 commit 78fcbf577ad6eba6399cc39f74b7ce5f9c8e265e Author: Michel Dänzer Date: Thu Sep 3 14:55:05 2009 +0200 EXA: Check for solid/gradient pictures the same way for all generations. In particular, also catch them for >= R300. commit 794ae743c305331741e7cf45dd71c755fe325ed5 Author: Michel Dänzer Date: Wed Sep 2 09:19:17 2009 +0200 EXA: Fix Composite restart dst/src switcheroo. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=22636 . Now, where's that brown paper bag? :} commit c4ab50c5eafca3d04129a72453496eb8afb26b34 Author: Alex Deucher Date: Tue Sep 1 13:43:00 2009 -0400 radeon: add some notes about DVO setup commit 22fbd6476f4b3513378e848affc4dd269e9d4498 Author: Dave Airlie Date: Tue Sep 1 15:22:57 2009 +1000 r100/r200: seriously WRAP is illegal for rectangular textures unless we scale all the bos up to POT commit 8f4196e88855f10762254fca9e0a0988e7b5562f Author: Alex Deucher Date: Mon Aug 31 19:41:59 2009 -0400 r6xx/r7xx: various CS fixes from Dave commit a32384f9b9ed73c14484a380dfa14652ed478ad6 Author: Alex Deucher Date: Mon Aug 31 13:26:05 2009 -0400 r1xx: fix textured video Copy/paste bug from when kms support was added. commit 3d6bf0f8cf128ee67d448491be44d345547b75c5 Author: Pauli Nieminen Date: Fri Aug 28 17:05:44 2009 +0300 radeon: Fix DRI2BufferPtr to be DRI2Buffer2Ptr for xserver 1.6. Bump requirement for xserver in KMS mode to 1.6.2 for DRI2Buffer2Ptr. commit 6521dbf3884185ca5692d35d879d251890cc4f08 Author: Roland Scheidegger Date: Sat Aug 29 12:11:03 2009 +0200 r100/r200: fix section size mismatch for textured video this fixes the driver complaining though reportedly it still does not work (on r100) commit 39dfac41eebbcdacb1ae0c17cea325ea2966c4a5 Author: Michel Dänzer Date: Fri Aug 28 12:20:04 2009 +0200 EXA: RENDER repeat fix and more cleanup. Apparently changing pPict->repeatType causes badness, see http://bugs.freedesktop.org/show_bug.cgi?id=23560 . Now we just use a normalized repeatType value derived from pPict->repeat and pPict->repeatType everywhere. commit 7d36f13afa5da742aa6c989a2652e92c96e5f80e Author: Michel Dänzer Date: Thu Aug 27 09:52:11 2009 +0200 KMS: Remove explicit radeon_bo_wait calls before radeon_bo_map. libdrm_radeon always takes care of this implicitly now. commit 066c90e8f5b93c80195dc43486ad3efa083a1f3a Author: Michel Dänzer Date: Thu Aug 27 09:52:11 2009 +0200 KMS: Don't use a blit for UploadToScreen if the pixmap BO will be idle anyway. Direct CPU writes should be at least as fast in that case. commit 174b61bb786a841cebd354e23b4b0caa85b541aa Author: Michel Dänzer Date: Thu Aug 27 09:52:11 2009 +0200 KMS: DownloadFromScreen improvements. * Drop superfluous RADEONDownloadFromScreenGTT function, EXA does the same thing when we return FALSE. * Take unflushed operations into account for determining which GEM domain the pixmap BO will end up in. * Only use a blit if it ends up in VRAM. commit 7623e169e1f7d5afbd4108de03f28098bca519db Author: Michel Dänzer Date: Thu Aug 27 09:52:11 2009 +0200 EXA: Allocate pixmap BOs in VRAM. This is the intention with EXA in xserver Git, and IME it improves performance significantly even with older versions. commit b90b823790657707b5bf7249095833bef959b0e8 Author: Michel Dänzer Date: Thu Aug 27 09:52:11 2009 +0200 DRI2: Set tiling for depth/stencil buffers with all DRI2 interface versions. commit 27d9664f8862d1948dd32021f8e9bcb94f23e4ef Author: Michel Dänzer Date: Thu Aug 27 09:52:10 2009 +0200 EXA: RENDER repeat cleanups. We can't rely on the server setting pPict->repeatType to something sensible when pPict->repeat is FALSE, but we can do it ourselves. commit 9b5517fcf7f2397a1a814d396fc9dc24769a6d9f Author: Michel Dänzer Date: Thu Aug 27 09:52:10 2009 +0200 Throttle DRI2 buffer swaps / frontbuffer flushes. commit e87f0f50f31a59ca1f60d4582d4a57ed00854fb7 Author: Alex Deucher Date: Wed Aug 26 02:13:38 2009 -0400 r6xx/r7xx: set EXA_HANDLES_PIXMAPS commit 3212c26b90c0f6f1a7248b4da3ed985a9c2e9381 Author: Alex Deucher Date: Wed Aug 26 01:42:10 2009 -0400 r6xx/r7xx: more WIP commit 5a08e68cc254fb255e631b456e331c32456ef0e7 Author: Alex Deucher Date: Tue Aug 25 19:24:41 2009 -0400 r6xx/r7xx: fix some define problems in Xv code commit 9aa214e125b7927d62b9fe124a851d0373c24d7e Author: Alex Deucher Date: Tue Aug 25 18:45:49 2009 -0400 r6xx/r7xx: fix reloc for vtx buffer commit bba51187055932ecd466f5f817428d6c773747b9 Author: Alex Deucher Date: Tue Aug 25 18:37:15 2009 -0400 R6xx/r7xx: unmap vb bo when done commit 599adfc1f5e6d708be7ad30f4871de3046775727 Author: Alex Deucher Date: Tue Aug 25 18:13:14 2009 -0400 r6xx/r7xx: fix flipped domains commit 2e83cca8d7efaf1a6836cfb9ea5893fd9d70175f Author: Alex Deucher Date: Tue Aug 25 18:05:43 2009 -0400 r6xx/r7xx: more cs exa wip commit 65852de027989c105246fa4e4eed432f29525a22 Author: Alex Deucher Date: Tue Aug 25 17:29:42 2009 -0400 r6xx/r7xx EXA: WIP commit 69ec7a35e2a0a3d802ec093a6aab2d7ed2cc88be Author: Alex Deucher Date: Tue Aug 25 16:14:02 2009 -0400 r6xx/r7xx: first pass at kms accel support Adapted from various patches from Dave and Jerome. commit 04692f80678ffea15ac33820381ce45865e697b8 Author: Dave Airlie Date: Wed Aug 26 05:31:56 2009 +1000 radeon: afaics these aren't radeon regs but r128 regs. so remove them from radeon use. commit 9cf965bbc977f0523437c0ecf1d7363b17de2468 Author: Alex Deucher Date: Tue Aug 25 12:47:34 2009 -0400 R6xx/r7xx: add begin/end batch macros commit b6368cc572c79bce9a9366242c727c13cab3f006 Author: Alex Deucher Date: Tue Aug 25 12:14:33 2009 -0400 r6xx/r7xx: move more common state to default state setup commit fc74e1194c980d978667e02c60a29a761a694bde Author: Alex Deucher Date: Tue Aug 25 11:39:56 2009 -0400 RV740: disable small DFS transfers Seems problematic on all rv740 chips, so until we can find a solution, disable them. commit 1c909ecd88e75c6e16af7aa068e32a7a60b0af37 Author: Jerome Glisse Date: Tue Aug 25 11:21:41 2009 +0200 radeon: Fix X recycling with KMS On X recycling CloseScreen drop master so grab it again in InitScreen and avoid to reallocate buffer & various others cs/bo utilities on X recycling. commit 39aaf9addc923852598ba6fb914459671b78e492 Author: Dave Airlie Date: Mon Aug 24 18:59:22 2009 +1000 r600: use exa fallback code for solid/copy codepaths. Solid seem to try and handle 1bpp which really no. commit e4b2d57ddca8739ec0b452565713398d036be0d5 Author: Dave Airlie Date: Mon Aug 24 14:11:24 2009 +1000 r600: fix bad unit in texture setup commit bac224912c750dc1c85ff2d9b8526dad6c23b572 Author: Dave Airlie Date: Sat Aug 22 21:17:59 2009 +1000 radeon: don't spec any initial placement for pixmaps. allow the first use to decide placement. commit 77f98717d825162da106c6898cdbcbdf5c984ae6 Author: Dave Airlie Date: Sat Aug 22 21:16:25 2009 +1000 exa/cs: add DFS from GTT optimisation This uses the new libdrm busy interface, once I had this in place I added a error if this happened and it does on my desktop here, so may as well add the optimisation that used to be in my old KMS tree. Signed-off-by: Dave Airlie commit b1b77a4d6fb7404af9568644e1a8e050fdfa956e Author: Alex Deucher Date: Wed Aug 19 13:29:04 2009 -0400 rs600: add support for DisplayPriority HIGH Still haven't implemented the actual watermark calculation, but this forces the display requests to urgent if the user specifies DisplayPriority HIGH. commit 72e0d1b2cb11a67b8e4be4c74913ee44dc051c5b Author: Dave Airlie Date: Wed Aug 19 19:01:30 2009 +1000 radeon/kms: add initial colortiling support (disabled by default). This requires an X server from git with createpixmap2 support fixed up in it. On 1.6 and previous it won't do any tiling, if you are running git server please upgrade to latest git. Option "AllowColorTiling" "true" to enable and do some testing commit 479a6daefe46f985c415b0d000b1b1b820f3924e Author: Alex Deucher Date: Tue Aug 18 02:53:29 2009 -0400 AVIVO: add support for DisplayPriority HIGH If the DisplayPriority option is set to HIGH, force the diplay mem requests to urgent. commit 8fd6f69c84103b277de70181988e843da23c85b0 Author: Dave Airlie Date: Mon Aug 17 15:50:21 2009 +1000 radeon: move detected monitor type debugging. We should print this after DAC detection to be useful for TV commit d25185f33d06a8162469e18688e95ee19a5d94d8 Author: Dave Airlie Date: Mon Aug 17 15:31:16 2009 +1000 atom: recall crtc source script after tv dpms on For some reason we lost the DACB source when we dpms tv back on. commit a971f1cfbbda1e3d16fb41f4a07f3b43fd59bc0d Author: Dave Airlie Date: Mon Aug 17 15:25:17 2009 +1000 atombios: store dac detect result into save register. We end up writing back an empty save register over the dac detection results so the atombios table can no longer figure out the S-video vs composite so sets the wrong one up. this gets tv-out on my r580 with a composite connector working. commit efef7c01ad38e078de2fa3f9e528e4ef7d05d00a Author: Dave Airlie Date: Mon Aug 17 13:44:20 2009 +1000 atom/tvout: set the correct scaler up for tv out If we need to use the second scaler actually set the second scaler up. commit 032a8a06315d12e66240e7ef74b5b165f6d0d1a9 Author: Dave Airlie Date: Mon Aug 17 12:18:23 2009 +1000 kms: make tv out match the connector name commit 36e51c4d63836863dd7a17cbf6e5a9b7c1bbd31a Author: Dave Airlie Date: Mon Aug 17 12:17:31 2009 +1000 r100/r200: dont emit wrong clamp modes. for rect textures you don't want to use wrap clamping which is the default. commit 595f7c3a60ca982ca2836a0174e1f36f9d1a4fec Author: Dave Airlie Date: Mon Aug 17 09:38:09 2009 +1000 radeon/tv: fix typo in crtc register modifications commit 92baeafde8f0c1eed2b6769e96f8093e3d6d7478 Author: Alex Deucher Date: Tue Aug 11 15:29:17 2009 -0400 RV280: add agp quirk from Hartmut Niemann commit 04288fdb8b8c62fc2eb32fd467fdf05151ad121a Author: Jerome Glisse Date: Tue Aug 11 19:32:52 2009 +0200 radeon/r600: abstract vertex buffer for r600 & r700 hardware Abstract vertex buffer, preliminary work before others change to bring cs support along IB support. commit 72daee2a18bfb809260d1bcbe80cc14afea3b0fa Author: Adam Jackson Date: Mon Aug 10 13:59:49 2009 -0400 Fix misleading filenames in DRI setup failure messages commit cd99d9f0d715f1f74de4fe22f2fd30046f2c7568 Author: Michel Dänzer Date: Fri Aug 7 11:56:50 2009 +0200 Properly let radeon_cs_flush_indirect() re-emit 2D state if necessary. Also remove a superfluous assignment. commit 577ff3ce922e457cc32f80d4365cb1da81552e72 Author: Michel Dänzer Date: Fri Aug 7 11:56:49 2009 +0200 Add support for EXA_MIXED_PIXMAPS in xserver master. commit e755fa56d03aa338d0c6345ed41e32aa3115ad4b Author: Michel Dänzer Date: Fri Aug 7 11:56:49 2009 +0200 Minor fixes for KMS EXA DownloadFromScreen hook. Check we can handle the bpp, and remove superfluous flush. commit 4cebafae81c1738a1c330d52a2c5248869f06411 Author: Alex Deucher Date: Fri Aug 7 11:56:40 2009 +0200 Add KMS EXA UploadToScreen hook. Fixups by Michel Dänzer: Doesn't seem to be a win in terms of raw numbers, but should allow more pipelining and avoiding BO memory waste for small glyph pixmaps. commit 9243791322e36b9231e6a3f04024ad66325385e3 Author: Dave Airlie Date: Fri Aug 7 14:07:32 2009 +1000 r200: fixup scissors for DDX. a) turn of R200_RE_CNTL - SCISSOR_ENABLE - this save us emitting R200_RE_TOP_LEFT, note scissor is still enabled. b) disable aux scissors. commit bd03977e320591ca55b1a2fbb32414c53cb3f72e Author: Alex Deucher Date: Tue Aug 4 15:21:44 2009 -0400 radeon: fix compile with !kms commit 4fc1e67e606daf9227e74518c54315b60cd38301 Author: Alex Deucher Date: Tue Aug 4 15:17:39 2009 -0400 radeon: re-add asus connector quirks fixes bug 19943 commit 22074cf0e58fddba743924532625e6fca49b6bdc Author: Jerome Glisse Date: Tue Aug 4 21:09:25 2009 +0200 radeon/kms: add simple DownloadFromScreen implementation What we want to do is add userspace object support to radeon kernel modesetting. Also this DFS is dumb and might endup doing blit from GTT to GTT. commit fce31b61a88522733863a9b4e9f1c935c439cb4e Author: Alex Deucher Date: Tue Aug 4 11:16:05 2009 -0400 RS880: enable accel commit 6b1b4b9214d58175727f7992fc42bc7244c42bf2 Author: Alex Deucher Date: Mon Aug 3 15:55:04 2009 -0400 radeon: add some new r7xx pci ids commit f564460e94c9d0f1cf3ff4b8535481b2b8b4e9c1 Author: Alex Deucher Date: Sat Aug 1 16:53:47 2009 -0400 radeon: use XAA in some cases Use XAA in low memory situations or when the DRI is disabled. Using shadowfb might also be a viable option, maybe even a better option... fixes bug 21683 commit c71b2f050e8996787eae463eddbfdb5864ffa65a Author: Bryce Harrington Date: Sat Aug 1 16:50:43 2009 -0400 radeon: AGPMode quirk needed for SiS fixes bug 23065 commit e3659ed06fc5bb8817f1dbd7c2d6bc94c67b30f7 Author: Bryce Harrington Date: Sat Aug 1 16:48:48 2009 -0400 radeon: AGPMode quirk needed for IBM Thinkpad T40 with Mobility M7 LW fixes bug 23064 commit 2391531ed6b7c11ddd5ab91b2369821cc5f8b8a7 Author: Bryce Harrington Date: Sat Aug 1 16:41:41 2009 -0400 radeon: AGPMode quirk needed for HP Omnibook 6200 fixed bug 23063 commit 474eda02257152ced52364f38cbad24c20aebbc0 Author: Alex Deucher Date: Sat Aug 1 16:06:52 2009 -0400 radeon: reload bicubic Xv texture on VT switch fixed bicubic filtering after VT switch or suspend/resume commit 447a2ce1b88aa2d6d5713e93174c4002617720f7 Author: Dave Airlie Date: Thu Jul 30 09:54:01 2009 +1000 radeon: fix r600 shadow fb mode with cursor allocation in wrong place From RHEL QE testing, we could end up with the cursor at 0 since we think EXA is in use when really it isn't. the info->useEXA = FALSe might be unnecessary but better to be explicit Signed-off-by: Dave Airlie commit 2b9a5be3bb22fad1d52ec9eea7733c5e956250b7 Author: Alex Deucher Date: Wed Jul 29 03:34:11 2009 -0400 radeon: fix typo in object header to connector type conversion Should fix bug 19943 commit 63c873cbd4d1d21d9f688028c0900c79fadc42c1 Author: Dave Airlie Date: Tue Jul 28 15:22:40 2009 +1000 ati: change to using ABI version check commit 21a621c297ac71c65c239ea960c38706e718b91c Author: Dave Airlie Date: Tue Jul 28 13:32:28 2009 +1000 ati: update for resources/RAC API removal commit 5ad2519c2a7c0df389b2cd7cf7151c7e4b7252a8 Author: Michel Dänzer Date: Mon Jul 27 14:22:02 2009 +0200 KMS: Explicitly specify VRAM and GTT domains when allocating BOs for pixmaps. Without this, apparently they are initially allocated in system RAM (or possibly GTT), so any GPU rendering to them first triggers a copy of the whole uninitialized data to VRAM... We may want to explore more sophisticated schemes in the future, but for now this seems to improve KMS 2D performance quite a bit. commit 57f2c83a22f27567506c555af431f89e6031204c Author: Alex Deucher Date: Sat Jul 25 14:19:38 2009 -0400 radeon: Set PCI/PCIE bus type properly per asic - r1xx-rv350 chips have the old pci gart - rv380+ chips have newer pcie gart Select the right kind regardless of whether the user selects PCI or PCIE. commit 2afc46fa74ce7730f766a3370d323c6b59694186 Author: Jerome Glisse Date: Thu Jul 23 20:13:15 2009 +0200 radeon: fix KMS shadowfb for r6xx and newer hw. We need to map front buffer and also to avoid EXA initialization when falling back to shadowfb on newer r6xx/r7xx when KMS is enabled. commit 328e4c816348b6f867df30b39856dbe78c8e0dcc Author: Alex Deucher Date: Thu Jul 23 13:28:36 2009 -0400 RS780: fill in MC access functions Also, r6xx/r7xx don't have indirect MC space, so don't try to access it. commit f96d5b255425fbd02be2cad26edb590d474a5640 Author: Alex Deucher Date: Thu Jul 23 13:25:04 2009 -0400 R6xx/R7xx: clip rendering to destination surface dimensions commit e372f845b0defaf2d2c9ef3cbbf7498e09d9372e Author: Michel Dänzer Date: Sun Jul 19 16:05:29 2009 +0200 Guard reference to CRTC active field. Fixes build against older xserver. commit e38305aebdc95f80f5b4b3e5ba541ea67dc05f01 Author: Michel Dänzer Date: Sat Jul 18 22:23:45 2009 +0200 Also drop DRM master in KMS CloseScreen. The LeaveVT hook isn't always called when the server dies, e.g. when quitting from the GDM greeter. This may cause existing servers to fall over if the dying server process still exists when they try to re-acquire master and set a mode. Also use drmSet/DropMaster() rather than ioctl() directly. commit a43c660a00147bfae5ca601f4720b2680b75211f Author: Michel Dänzer Date: Sat Jul 18 22:21:59 2009 +0200 Set CRTC active flag to TRUE after a successful KMS mode set. Otherwise some things like changing the colour map won't work properly. commit f32069f42b3e4643f15148d0b96164def00dcc74 Author: Michel Dänzer Date: Sat Jul 18 22:20:08 2009 +0200 Set the STALL bit in the CRTC_GUI_TRIG_VLINE registers. As recommended by the register reference when using the WAIT_CRTC_VLINE bit in the WAIT_UNTIL register, as we are. commit 27bd9fc9b2c0eeff488c1f26f1355a7fa3655520 Author: Michel Dänzer Date: Sat Jul 18 22:14:27 2009 +0200 Enable vsync for DRI2 region copies. commit 4b1b28865ffb17f58a70d955212fd51cb1fb55ab Author: Alex Deucher Date: Thu Jul 16 17:09:33 2009 -0400 R6xx/r7xx: reduce the amount of default state setup Most of the default state setup was extraneous or duplicated in the accel ops. There's no need to reset all the consts everytime you reset the default state for example. This leads to a 10x reduction in default state. commit 7e6557b81026d8a4d6c837839e68c28b151f8a97 Author: Peter Hutterer Date: Thu Jul 16 11:33:57 2009 +1000 Update to xextproto 7.1 support. DPMS header was split into dpms.h (client) and dpmsconst.h (server). Drivers need to include dpmsconst.h if xextproto 7.1 is available. Signed-off-by: Peter Hutterer commit 95d431e8b260dd43cf6d93b90eecab1dc0ec7c26 Author: Dave Airlie Date: Wed Jul 15 12:07:01 2009 +1000 radeon: emit colorpitch relocs. This causes relocs to be emitted for the colorpitch. Shouldn't have no effect on current kernels, but will keep DDX going on kms kernels when tiling lands Also contains a missing reloc space for r200 commit 8312763977b22e108b7d003cbf3256e0165e4439 Author: Alex Deucher Date: Tue Jul 14 18:13:27 2009 -0400 Add an r420 AGP quirk fixes bug 22726 commit 5473eeeb45468fd200fec49a8506281628a5e4b5 Author: Alex Deucher Date: Tue Jul 14 14:05:13 2009 -0400 R3/4/5xx: only upload the bicubic texture once Upload the bicubic texture once during textured video init rather than once per frame. Suggested by Michel Daenzer on IRC. commit 0485f27bc3d75cb6ab320e8164dbe6ea2713c78e Author: Alex Deucher Date: Tue Jul 14 13:11:12 2009 -0400 R3/4/5xx: fix bicubic Xv filtering with KMS changes fixes bug 22730 commit ca4a9efef987108266ae59afbb5142d4d2000c8e Author: Alex Deucher Date: Mon Jul 13 11:28:41 2009 -0400 Add configure option to disable kms support Useful to building with mixed kms/non-kms setups commit 035e8d1d5593c12828bb079de4e663cf1b1f1674 Author: Edward O'Callaghan Date: Sun Jul 12 13:45:29 2009 +0200 Fix a warning Signed-off-by: Nicolai Hähnle commit 76af48c43f829e7aebacc9f2a623823fa26ee22b Author: Gaetan Nadon Date: Wed Jul 8 09:58:56 2009 -0400 xf86-video-ati: use XORG_CHANGELOG macro to create ChangeLog. #22611 Build break: Makefile.am: command not found: git-log Adding the macro in configure.ac and use it in Makefile.am Refer to: https://bugs.freedesktop.org/show_bug.cgi?id=22611 Tested: running autogen.sh, make and 'make dist' Signed-off-by: Gaetan Nadon Signed-off-by: Peter Hutterer commit 43db263d301082e84e9bc304816bcbb206fe280e Author: Alex Deucher Date: Thu Jul 9 12:48:06 2009 -0400 RV280: another AGP quirk fdo bug 12544 commit 69b5e5496f10a9f566d2e563862c96cb41952eb6 Author: Alex Deucher Date: Thu Jul 9 12:42:45 2009 -0400 RV280: Add an AGP quirk lp bug 370205 via fdo bug 12544 commit a6d6c900e60a3685ee9e93c34eb7f6d237c45fd8 Author: Alex Deucher Date: Thu Jul 9 11:30:57 2009 -0400 RS740: fixup display latency setting as per rs690 Both chips program the same in this regard commit ea407570d39ace3162d372eda56bf791bfd80c24 Author: Dave Airlie Date: Thu Jul 9 10:46:23 2009 +1000 radeon: add shave support. clean up output a lot commit 8c03c1fdb5ea35570064946557050c87ca30582a Author: Alex Deucher Date: Wed Jul 8 18:34:57 2009 -0400 R6xx/R7xx: fix hangs on x2 cards with PM options Changing the PCIE lanes on x2 cards results in a hang, so for now, disable it. Fixes fdo bug 22669 commit 9645838c57f6b40837fdce23ce7f9faefb3d9966 Author: Michel Dänzer Date: Wed Jul 8 19:18:02 2009 +0200 Further non-KMS fixes / cleanups. Only compile tested. commit 2d86ec4ddb1fb83be95ed9cdcbabf4d568a6d7b6 Author: Alex Deucher Date: Wed Jul 8 12:33:34 2009 -0400 Fix the build for the !XF86DRM_MODE case compile tested only. commit a68afc2a80b8581cc3d67e9b5a95a10b0d4ead0e Author: Michel Dänzer Date: Wed Jul 8 09:15:28 2009 +0200 Fix RADEON_TRACE_FALL build. commit 9ca0aeaad01b7c682396b30af48668f287a59d6e Author: Michel Dänzer Date: Wed Jul 8 09:13:36 2009 +0200 Pass on CS relocation offset values. Not actually used ATM, but just in case... commit f718dd794477fbdd5eeb4183f43ff25517c63034 Author: Michel Dänzer Date: Wed Jul 8 09:11:18 2009 +0200 Don't set EXA UploadTo/DownloadFromScreen hooks when they'd always return FALSE. commit 42e76d0b24b76fbcc6b08a4ea5003dbec368645c Author: Michel Dänzer Date: Wed Jul 8 08:51:10 2009 +0200 Don't always flush CS when switching from 2D to 3D. This works fine here and doubles x11perf -aa10text scores, but may cause problems on other setups according to Dave. Let's see... commit 94fe049c35187ddc3ec0472e9309c3a22879f415 Author: Michel Dänzer Date: Wed Jul 8 08:36:22 2009 +0200 KMS CS fixes, take two. Avoid flushing CS in the middle of (setting up state for) an operation, properly finish/restart the operation. commit 0519f15af2fe5e7e5a6c94e7203a96fe363c643e Author: Michel Dänzer Date: Tue Jul 7 10:04:09 2009 +0200 Fix DRI2 with current xserver Git. commit 7ad11fec2579807371360cb680e593f723ebaa1a Author: Dave Airlie Date: Mon Jul 6 18:43:08 2009 +1000 radeon: add make dist headers commit e68fbf743ec88e0fa3a9f1ffe83daf251e250b21 Author: Dave Airlie Date: Mon Jul 6 18:32:32 2009 +1000 git: fix git-log to git log commit 5eeb1fd19c6797cc76ce308570dffe34cb82b24d Author: Dave Airlie Date: Mon Jul 6 17:45:50 2009 +1000 radeon: oops fix compile without libdrm commit 98824f37fc74dc1fec2677515d0dc3cfc263f00a Author: Dave Airlie Date: Mon Jul 6 15:29:53 2009 +1000 radeon: move state changes into flush function commit 503b51343267248b4c6994b88238dd5384528f03 Author: Dave Airlie Date: Mon Jul 6 15:20:13 2009 +1000 radeon: taken from kms-support + CS fixes commit. re-emit 2D state and reset 3D state emit on flush commit d78d50591851d14543f0935d051a59ef29751bbc Author: Dave Airlie Date: Mon Jul 6 14:45:07 2009 +1000 radeon: port to new space checking in libdrm interface This uses a new libdrm interface which shares code with mesa. It also fixes the bo to flush when full instead of never flushing. It survives gtkperf -a here which the driver didn't before now commit e1200cb89218930d01330ba0114e013438655cce Author: Dave Airlie Date: Mon Jul 6 15:10:29 2009 +1000 Revert "KMS CS fixes." This reverts commit 11cf8a28eb46f48d101888552266921bee8b63fc. I'll bring this back in a few minutes, I've got a big change introducing a new cs space accounting scheme which this messes up and I think probably conflicts with what I've done. I promise i'll go over this and pick the bits that are still useful :) commit 11cf8a28eb46f48d101888552266921bee8b63fc Author: Michel Dänzer Date: Sun Jul 5 15:14:59 2009 +0200 KMS CS fixes. * Flush CS before running out of space. * Don't flush CS every time when switching between 2D and 3D engine, but make sure to re-initialize 2D/3D state after flushing. Doesn't seem quite perfect yet (some rendering seems to get dropped on the floor sometimes), but this should fix a lot of CS failures people have been seeing. commit 8d2f712eaf1e569fd92bbe2db5aceb43b7b367d1 Author: Dave Airlie Date: Fri Jul 3 10:40:59 2009 +1000 radeon: don't set up overlay under KMS until we figure out how. commit 2a622168606d98c404708b879e6417c8f7d7305c Author: Michel Dänzer Date: Thu Jul 2 15:03:53 2009 +0200 Test BO pointer before passing it to radeon_bo_unref(). commit 36a4ea5a9c7062f4c8aa7480bb7488ce2062390f Author: Michel Dänzer Date: Thu Jul 2 14:52:44 2009 +0200 Warning fixes. commit 65465d56c1bf943113518a5b2f57b3170213bab9 Author: Dave Airlie Date: Thu Jul 2 18:38:38 2009 +1000 radeon: fix up configure check better commit ad17108b72c9adf773a122b4c054c7b92e6a8b9d Author: Dave Airlie Date: Thu Jul 2 17:25:57 2009 +1000 radeon: fix it properly. I blame the flu commit e1b9cb9ea665eaa84e64a386299efa0819d55df4 Author: Dave Airlie Date: Thu Jul 2 17:18:47 2009 +1000 radeon: fix compile without kms commit de427fac6912a625f7e4d8b982a1f7a1ba80dfbe Author: Dave Airlie Date: Thu Jul 2 15:41:43 2009 +1000 radeon/dri2: fix dri2 - needs newest libdrm_radeon commit 2b671adba54ebff1756dd990123f4bade6e35d61 Author: Dave Airlie Date: Thu Jul 2 15:25:19 2009 +1000 radeon/dri2: call proper gem bo function commit 851b2b8cab883e4422745cca1827aa8ac9f193a3 Author: Dave Airlie Date: Thu Jul 2 15:17:13 2009 +1000 radeon/kms: add textured video BO size checks commit 9d092060236e8587697fdd57a7a01f3c0dddd680 Author: Dave Airlie Date: Thu Jul 2 15:17:03 2009 +1000 kms: drop DGA commit 207174ea964c561076bdd5297a2fb6f136b4b645 Author: Dave Airlie Date: Thu Jul 2 15:16:47 2009 +1000 radeon: fix CS imbalance commit 4d24a9d2c0be0c025266cc8cdf7e8d7bb065cdb1 Author: Dave Airlie Date: Thu Jul 2 14:55:45 2009 +1000 radeon: enable KMS build commit 9bcd3ae7966eb7a17b922bcd33e0d6f016245614 Author: Dave Airlie Date: Thu Jul 2 14:55:18 2009 +1000 radeon/kms: fixup 3d state emission for KMS This fixes font rendering under KMS (should have looked at dmesg) commit ac1607bb23f0c7584648407a3ac3fb27142e186e Author: Dave Airlie Date: Thu Jul 2 14:55:05 2009 +1000 kms: no need to reference fifo slots commit 1782ce28953184776c90eb1255208a3e0ad245f0 Author: Dave Airlie Date: Tue Jun 30 16:55:26 2009 +1000 radeon: add KMS support (still disabled) This adds DRI2 + KMS + driver pixmaps support to the driver. I've decided to just do a completely separate KMS driver file instead of hacking the crap out of radeon_driver.c. So now I do the KMS check in radeon_probe.c time and set the DDX pointed up to a completely different set at this stage. This avoids a lot of if (kms) type crap in the code at the expense of making sure we make changes to both files if necessary. This code is still disabled in configure.ac as I broke EXA composite rendering somehow in KMS mode commit ac4bd24a66c1bdda0293f770a3f891e2b88cc8ee Author: Alex Deucher Date: Tue Jun 30 16:00:06 2009 -0400 EXA: fix the build on servers without EXA_HANDLES_PIXMAPS commit 49a0ca19ee4109cdd39a43fbf4bedf3f0557d6ec Author: Michel Dänzer Date: Tue Jun 30 17:22:50 2009 +0200 Warning fixes. commit e932836691aeaec37794fdaed2dabb22710fd171 Author: Dave Airlie Date: Tue Jun 30 16:24:37 2009 +1000 radeon: initial preparation for kms patch. This patch contains most of the changes to the EXA and texture video accel code. It adds a few bits of pixmap support but doesn't actually do anything useful KMS yet. Testing this should not have any regressions over what we have already, biggest worries are r6xx, I've fixed a textured video one, but no idea what other might lurk It won't build against libdrm radeon yet either commit bb04b450ed00ca4b1aa44c33085567d47b33b547 Author: Fredrik Höglund Date: Mon Jun 29 22:38:26 2009 +0200 Check if the composite op is supported in R200CheckComposite. commit f39cafc5c4a93a16ac93756473ebb1f33c7881db Author: Alex Deucher Date: Sun Jun 28 20:42:49 2009 -0400 radeon: call hdmi-b connectors dvi in randr Technically HDMI-B is a glorfied DL DVI, but this is confusing to users, so call it DVI when reporting randr outputs. This allows us to remove two quirks where the bios was actually correct. commit 407e676b04117c7ca3dcc0cc072f3552b03c64e5 Author: Roland Scheidegger Date: Sun Jun 28 16:54:32 2009 -0400 R6xx/R7xx: fix pixel centers Make sure we are using GL mode (centers at 0.5) rather than D3D mode (centers at 0.0). This also fixes fdo bug 21963. commit 68001981f22173ff949720055dba89291f284474 Author: Alex Deucher Date: Sun Jun 28 16:20:10 2009 -0400 Add some missing M96 pci ids fixes fdo bug 22404 commit 06d5d8d7fd92b58b2467c782e57a80a3520a2c90 Author: Adam Jackson Date: Thu Jun 25 13:51:36 2009 -0400 Add a (harmlessly) missing break statement. commit 7d1d968fdc8de1e0ab0be916a1f3a4a398af47aa Author: Adam Jackson Date: Thu Jun 25 13:49:18 2009 -0400 Cosmetic cleanup to digital output detection No functional change, but this logic would need extending anyway for DisplayID, so unify it now. commit 96581746eea2f4e29a04f9266ec9649f25480424 Author: Adam Jackson Date: Wed Jun 24 17:05:47 2009 -0400 atom: Fix phantom VGA connector when HDMI-B present. HDMI-B is really a glorified DL-DVI connector, the analog pins work fine. commit 496adc4dc7cf53fc6acfecb1158f1491d5f36168 Author: Michel Dänzer Date: Fri Jun 19 14:37:01 2009 +0200 Revert "Build fixes for -Werror that aren't ready for prime time yet." This reverts commit ab20ea1530ec8a3a9fd4089775c4e157e50fe1bf. Whoops, pushed wrong branch... commit ab20ea1530ec8a3a9fd4089775c4e157e50fe1bf Author: Michel Dänzer Date: Sun Jun 14 16:50:07 2009 +0200 Build fixes for -Werror that aren't ready for prime time yet. commit 77e3537d312175a25f0e21cc07c3a96f78c3b35a Author: Markus Gapp Date: Sat Jun 13 11:51:29 2009 -0400 Add quirk for asus hd3450 board Fixes bug 22266 commit e8e0bb1ba29761c94d473e42ca6ada161cfff557 Author: Alex Deucher Date: Fri Jun 12 11:07:43 2009 -0400 Fix count in 3d state setup after 43374c7420e378918bec062f4cbd581f16adb6f0 commit 808c90a24c48da7fa97e15e2f12be5bb8fd8cc96 Author: Alex Deucher Date: Thu Jun 11 16:09:40 2009 -0400 Only enable frac fb divs on rs600/rs690/rs740 for now fixes bug 21413 commit d095bb3157faaee10b0130ea9b1032e0b533aaee Author: Alex Deucher Date: Thu Jun 11 12:34:15 2009 -0400 Re-enable frac feedback dividers on AVIVO hardware Preferring a freq <= target frequency seems to fix the previous issues with frac fb divs. Appears to work fine on all hardware I've tested on. See fdo bug 22229 for details. Should fix bugs: 22229, 21553, 21413, and possibly other ones related to unstable images at certain resolutions. commit 55fbdbae83d1563b472f49d0436c9298e390be66 Author: Alex Deucher Date: Thu Jun 11 12:31:53 2009 -0400 Add PLL flag to prefer frequencies <= the target freq This appears to be needed when using fractional feedback dividers. Based on a patch from Tom Hirst. See fdo bug 22229 for more details. commit 43374c7420e378918bec062f4cbd581f16adb6f0 Author: Alex Deucher Date: Tue Jun 9 14:39:54 2009 -0400 r1xx/r2xx: clip 3D rendering to destination buffer commit 74b0a38c75c1d6a6344015d32d84b43d9e80df1d Author: Alex Deucher Date: Tue Jun 9 14:26:21 2009 -0400 Consolidate indentical RADEONDoneSolid/RADEONDoneCopy functions commit f6dff8836729cc9d29264080c9cfa0e1df6182cf Author: Alex Deucher Date: Tue Jun 9 13:31:15 2009 -0400 r3xx/r4xx/r5xx: clip 3D rendering to destination buffer commit 48dbf09e1309c815ac8b733145a0310083a29933 Author: Alex Deucher Date: Tue Jun 9 13:12:40 2009 -0400 r3xx/r4xx/r5xx: refactor exa prepare composite - consolidate code duplicated between r3xx/r4xx and r5xx - make pixel shader setup easier to read and less redundant commit ec1a3ccdf61c2226617b571cc4a209a542e9d7e3 Author: Alex Deucher Date: Mon Jun 8 15:31:57 2009 -0400 R6xx/r7xx: don't clamp tex coords in composite VS Fixes broken repeat modes. see fdo bugs 21818, 22139 commit 32c218c5633fb7ffeb19e717bf645c1b25dd4ef5 Author: Alan Coopersmith Date: Thu Jun 4 07:23:03 2009 -0700 Add link to patch submission instructions to README Signed-off-by: Alan Coopersmith commit 39f736d6cb65fc7c3fd769478023fc87c1af5979 Author: Alex Deucher Date: Thu Jun 4 09:57:22 2009 -0400 atom: connector quirk Some r6xx cards have a VGA and an HDMI port with a shared ddc line listed as an HDMI port with both analog and digital encoders. Fixes bug 19943 commit 7599dc40855c33a5fbd8e9bbc2b4cd62752fb7df Author: Alex Deucher Date: Fri May 29 16:29:50 2009 -0400 Add RV740 (HD4770) support Verified by ernstp on IRC commit ee0424078a3ea26f58c2998c9e58e065fb63f1a0 Author: Alex Deucher Date: Wed May 27 18:37:58 2009 -0400 radeon: remove dead code commit b34df233115c0d82d7bcf82e041afbc55981ce82 Author: Alex Deucher Date: Tue May 26 17:47:01 2009 -0400 R3xx/R4xx: increase EXA render target limits now that we are using 1/12 subpixel mode commit 1457bc089d1395d18cf582a4d52444005f013753 Author: Matthieu Herrb Date: Tue May 26 17:21:07 2009 -0400 radeon: fix segfault if Option "NoAccel" is set commit 4079f97958cf1d5fd76a83aa61b93d6289bb9b1e Author: Michel Dänzer Date: Sat May 23 13:51:00 2009 +0200 Bump version to mark Git snapshot. The fourth version component isn't visible in the log file. commit 88a9e98341d96e5e7f48b69aed597d1bada6313a Author: Alex Deucher Date: Tue May 19 17:11:34 2009 -0400 Pre-atom: Improve engine clock setup code Also remove SetMemoryClk() for pre-atom cards for now as it requires quite a bit more asic specific work. To set the mclk we'll need to use the mem reset/dll tables in the bios. commit 1429133ffdbfe046249fcaaa4cbee432a1012e55 Author: Michel Dänzer Date: Mon May 18 17:59:00 2009 +0200 EXA: Set new EXA_SUPPORTS_OFFSCREEN_OVERLAPS flag when we have a 2D engine. commit e9cca1e7dc521d3756bb2d97f1d703b9ad65cb47 Author: Alex Deucher Date: Mon May 18 10:48:25 2009 -0400 r4xx: Add some missing pci ids Noticed by Romain in bug 21798 commit 76fffd51027820b3a6ea10de2be67d5fd4f3e843 Author: Alex Deucher Date: Fri May 15 16:35:13 2009 -0400 R100: switch to normalized texture coordinates for consistency with the other asics commit 1a1eef31e36f98b7a30e27e567c1b66e0e4cf7dc Author: Alex Deucher Date: Thu May 14 15:48:54 2009 -0400 radeon: try harder when checking if a card is posted fixes debian bug 524280, possibly others. commit 22e39392297fa11003df90c175db3c449d8f9853 Author: Michel Dänzer Date: Thu May 14 10:24:07 2009 +0200 Pre-R600 EXA: Fix coordinate limits off-by-one error. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21598 . commit fa09b058c7a17689989e600ffd465856a058579d Author: Alex Deucher Date: Wed May 13 16:10:40 2009 -0400 R6xx/R7xx Xv: normalize texture coordinates in the vertex shader commit 026b6f820d6caea17d2a082193e850713d5770a8 Author: Alex Deucher Date: Wed May 13 15:48:32 2009 -0400 R6xx/R7xx: do EXA transforms in the vertex shader commit cd89241396d1931b04cfbdd8d553be16dbf9c360 Author: Alex Deucher Date: Tue May 12 17:30:02 2009 -0400 R3xx-R5xx: do EXA transforms in the vertex shader commit 15ee78d37f8b64c3e6d234e7ab37a31e82327b6b Author: Alex Deucher Date: Mon May 11 02:22:13 2009 -0400 RV770: add missing pci id Fixes bug 21209 commit 5ff51ea83f9fdd836e830c77e3561eaef4b83183 Author: Alex Deucher Date: Fri May 8 13:19:26 2009 -0400 R7xx: add support for reading disabled bios images commit 76fdae9018330aa5af0d57339baff3ca4834e1b5 Author: Alex Deucher Date: Thu May 7 02:59:32 2009 -0400 R3xx/R4xx tex vid: no need to check if IS_R300_3D function is r3xx/r4xx specific already commit 23a8ada06a5b1ccc975e89f129c00382ecbf29df Author: Alex Deucher Date: Thu May 7 02:34:22 2009 -0400 R3xx/R4xx tex vid: increase the guardband limit for rendering with a tri limit goes from 2880 to 4021 now that we've switched to 1/12 subpixel mode. This allows us to render with a clipped tri at higher resolutions preventing diagonal tearing. commit 0c3541f7013c53fb8096ada63cc7b3577524aa4c Author: Alex Deucher Date: Wed May 6 12:24:35 2009 -0400 AVIVO: set default cursor mode in cursor init Should fix bug 21557 commit da58e351b6398fa18b1d9c1a57a6e49b285f610f Author: Alex Deucher Date: Mon May 4 16:03:53 2009 -0400 AVIVO: fix cursoe corruption bands for real Don't have to leave both cursors enabled, just have to use the same mode for both cursors whether or not they are enabled. commit 2c8e130f73c680d4a7381b2ef37982b82c6ee478 Author: Alex Deucher Date: Mon May 4 13:40:17 2009 -0400 radeon: switch to EXA by default commit 8155a62df6817358a12cc2d613c1470ca55996ef Author: Alex Deucher Date: Mon May 4 12:57:36 2009 -0400 AVIVO: move cusor offscreen when disabling Adapted from Yang's patch. Setting size to zero is actually a 1x1 cursor. commit a1c64ea5224009779ccad66b0f84d861eae966ac Author: Alex Deucher Date: Sun May 3 19:42:44 2009 -0400 r3xx-r5xx: switch to 1/12 subpixel precision - based on similar patch in Jerome's cs ddx tree - also fix clipping offsets - should eventually allow for 4k render targets - mesa driver uses 1/12 mode, this avoids changing the subpixel mode when switching between ddx and mesa commit 3880bc3c95764acccd62cfa438932458df95daf6 Author: Alex Deucher Date: Sun May 3 19:01:28 2009 -0400 Remove some old debugging info commit 3362381aa3a97c1da564f8a479ed4e7b0d6368b8 Author: Alex Deucher Date: Sun May 3 18:52:00 2009 -0400 r2xx-r4xx: fix typo in last i2c fix and clarify hw i2c pin sel commit e01b8dc827ce1913927e1a4fad05a99a2dd9e805 Author: Alex Deucher Date: Sun May 3 13:09:39 2009 -0400 RS690: gpio/connector fixes Fixes bug 21521 commit 1f70c9f05df9017d87b37f887e1eccd6d0568a02 Author: Alex Deucher Date: Thu Apr 30 19:18:13 2009 -0400 R3xx-R5xx: don't set TX_OFFSET_RS in RS_INST_COUNT Isn't necessary and seems to cause problems for RS690 users commit de17d36c1f710305870e3c636cae3f742f1cb6d6 Author: Alex Deucher Date: Thu Apr 30 19:13:09 2009 -0400 AVIVO: first pass at display watermark setup This helps with flickering and blanking when there is contention for MC bandwidth. commit 7d9f643ae3d07e51e644a5979ca90bc2c102bc89 Author: Alex Deucher Date: Wed Apr 29 12:38:15 2009 -0400 radeon: fix several dpms issues - atom dpms was unblanking for standby/suspend - return if r600+ in radeon_crtc_modeset_ioctl() - remove seprate standby/suspend handling in legacy crtc dpms. we turn the outputs off, so turn the crtcs off too. - disable the crtcs in legacy crtc dpms - move radeon_crtc_modeset_ioctl() calls to radeon_crtc_dpms() so they will get called for both atom and legacy paths Should fix bug 21321 commit 35183ef528411eb0122cf48550d93f921d291d12 Author: Alex Deucher Date: Wed Apr 29 01:55:10 2009 -0400 AVIVO: better fix for cursor flickering/corruption issues Should prevent ghost cursor from being left on screen. commit 53e75cbd0ba8f39799d7b776cdc59d60aa2a6916 Author: Alex Deucher Date: Wed Apr 29 01:05:31 2009 -0400 R6xx/r7xx: fix CURSOR_SWAPPING_* macros r6xx/r7xx have different swapper regs commit 4e948e2aaa59267a9aa797396add2c6b7b4c1e7c Author: Alex Deucher Date: Tue Apr 28 19:28:25 2009 -0400 AVIVO: fix cursor corruption/flickering issues When both crtcs are enabled, both cursors need to be enabled or you get corruption bands. Thanks to Yang Zhao for figuring this out. commit 4d0beaf02b28d5a5dac4ff6053593a2f979f92ec Author: Alex Deucher Date: Tue Apr 28 12:33:24 2009 -0400 RV410: SE variants only have 1 quad pipe Should fix EXA corruption with the 3D engine. Mesa and drm patches forthcoming. Reported by Kano on IRC. commit abd565ae71d9844d5afcd658628ca7778ce26ab1 Author: Alex Deucher Date: Mon Apr 27 14:21:38 2009 -0400 AVIVO: disable fractional feedback divs Doesn't seem to work well in all cases. Needs more investigation. fixes bug 21413 commit 93626b1277f57bd559cf71b263221209b02e0046 Author: Alex Deucher Date: Mon Apr 27 03:35:24 2009 -0400 AVIVO: make sure cursor width isn't negative commit 32af0f097bccc4499d67e969d46ba35e7487c5e2 Author: Dave Airlie Date: Sat Apr 25 19:39:34 2009 +1000 Revert "r300/r500: set R clamp mode." This reverts commit dab3d61619d91ae6a3da3e9b29b8258313653813. commit b2c8f57bccbd46164907049a26ad2dd209d7b108 Author: Dave Airlie Date: Sat Apr 25 19:39:19 2009 +1000 Revert "r3xx/r5xx: fix typo in last commit" This reverts commit 1a7b982457ead5f21c6e62a409ca0dbf86005607. commit 253731dce6ab25122f2eda559233c098536b7143 Author: Dave Airlie Date: Sat Apr 25 19:39:05 2009 +1000 Revert "radeon: attempt to fix R clamping for repeat again" This reverts commit 5998f262a52cb85b334fcc1fe24c7b2ae474ce93. commit 5998f262a52cb85b334fcc1fe24c7b2ae474ce93 Author: Dave Airlie Date: Fri Apr 24 17:30:57 2009 +1000 radeon: attempt to fix R clamping for repeat again commit 7ed27b926f28a1f088eace5034a7d9985f13752d Author: Alex Deucher Date: Thu Apr 23 14:06:06 2009 -0400 r2xx/r3xx/r4xx: further i2c fixups - hw i2c engine has pin selection on r2xx/r2xx/r3xx chips - also switch hw i2c pin sel for external tmds commit 0da80f34b5aa5999d2030ffbc5187328fa4e4ae5 Author: Alex Deucher Date: Wed Apr 22 18:42:36 2009 -0400 radeon: minor cleanup and warning fix commit 1a7b982457ead5f21c6e62a409ca0dbf86005607 Author: Alex Deucher Date: Thu Apr 23 10:09:22 2009 -0400 r3xx/r5xx: fix typo in last commit Noticed by osiris on IRC commit dab3d61619d91ae6a3da3e9b29b8258313653813 Author: Dave Airlie Date: Thu Apr 23 15:46:44 2009 +1000 r300/r500: set R clamp mode. On rs690 without this set, we appear to end up fetching from well outside the texture sometimes into memory that isn't mapped. This "shouldn't" have any effect. commit bbfd4625478e37d10fd58b23f46153f349370a52 Author: Alex Deucher Date: Wed Apr 22 14:47:16 2009 -0400 radeon PM: update quirks commit e3c564114eea4d032f920fcebd4040f1934c21b0 Author: Alex Deucher Date: Wed Apr 22 14:31:44 2009 -0400 AVIVO: fix for cursor corruption issue commit 24e4b73b4fbbb2c790e6120ede3caaa4e7e58359 Author: Alex Deucher Date: Wed Apr 22 11:42:18 2009 -0400 radeon pll: add support for fractional feedback divs Allows us to hit dot clocks much closer, especially on chips with non-27 Mhz reference clocks like most IGP chips. This should fix most flickering and blanking problems with non-exact dot clocks. commit efa0825a86a8dc0f03ebb42c576ed26189e9d4bb Author: Alex Deucher Date: Tue Apr 21 13:51:11 2009 -0400 Tex vid: fix top clipping commit aa59b5b55e6ac64940fb3f0fa61f7b8fe36ba745 Author: Alex Deucher Date: Tue Apr 21 12:06:24 2009 -0400 RS690: add quirk for acer board thanks to Gino Badouri for testing commit 0e5164d968316bbb59b4484a7df087854738068f Author: Alex Deucher Date: Tue Apr 21 04:47:43 2009 -0400 Tex vid: rework part 2 - use pPriv->w/h directly for tex coords - take src x/y offset into account when calculating tex coords - when copying data, only optimize for y clipping. In order to deal with the x clipping optimization, the copy routines or tex coords would need to be fixed. This should fix clipping problems with the current code. commit 06a1b4169b506f69dd807380d9ce7210b3a3bc23 Author: Alex Deucher Date: Tue Apr 21 01:21:51 2009 -0400 R4xx: avoid a PM related hang commit 228b9ac87668241b09980fca17e9d866891285e6 Author: Alex Deucher Date: Tue Apr 21 01:02:34 2009 -0400 radeon PM: add some quirks commit b6febf7368d3df3f1d3fee6a87aa71c54e77cdcc Author: Alex Deucher Date: Mon Apr 20 18:04:18 2009 -0400 Tex vid: cleanup and unify common code commit d096d1189c8dc5e19f68cc605ccffe1a8fef048b Author: Alex Deucher Date: Mon Apr 20 13:05:18 2009 -0400 Endian fixes for object table commit 101ce28ec4af696549b7d6defebb5b4ad412176c Author: Alex Deucher Date: Sun Apr 19 12:13:18 2009 -0400 Remove old messages R5xx/r6xx support isn't really experimental anymore commit db177c70ce88af19c8e05eb916a15f3e124876eb Author: Alex Deucher Date: Fri Apr 17 01:05:15 2009 -0400 Update Xv info in man page commit 00266177bed2dc8693df497ca3ec19f2dc4adc05 Author: Alex Deucher Date: Thu Apr 16 20:33:28 2009 -0400 R3xx/R5xx: only apply Xv attributes if bicubic is disabled Provides consistent output commit 85323a7f84381fef7fad20c7f7ec601637af9aa7 Author: Alex Deucher Date: Thu Apr 16 11:10:51 2009 -0400 R3xx/R4xx: set tex caching for Y texture when doing planar rendering Doesn't affect performance, but docs indicate its the right thing to do. commit 5ea5df22c038fc8f00984acc760e9d8c962bf902 Author: Alex Deucher Date: Wed Apr 15 20:26:34 2009 -0400 Tex vid: remove remnants of XV_HWPLANAR no longer needed as bicubic is the only thing that uses the old csc code. commit 9091b3f5f13dbea83ffd89679dac600e9f280bb2 Author: Alex Deucher Date: Wed Apr 15 20:07:42 2009 -0400 R3xx/R4xx: fix up planar shader We were overwriting the coord fetch address with the first tex fetch. Seemed to work however, luck I guess. Reorder the fetches to write to temp0 last. commit 14c13faeb9f9b7717a25fcc1ca97d46cc6ee0031 Author: Alex Deucher Date: Wed Apr 15 19:53:12 2009 -0400 R5xx: add shader-based csc - native planar support - Xv attributes commit 832efc7b90f5eb2da99512fcb902ab4838d2dcd1 Author: Alex Deucher Date: Tue Apr 14 17:56:49 2009 -0400 R3xx/R4xx: Implement shader-based csc for packed formats commit 32625118c27041265d25811c00d25ab7e82fb340 Author: Alex Deucher Date: Tue Apr 14 16:38:40 2009 -0400 tex vid: fix attribute setup typo for XV_COLORSPACE commit adf0912006b4f1597784dbfcc563d5c6d1c5667d Author: Alex Deucher Date: Tue Apr 14 16:16:33 2009 -0400 R6xx/R7xx: implement Xv attributes - brightness, contrast, hue, etc. - TODO: implement gamma commit 8810fe92b5aed08888584c6914482586b59f71ab Author: Alex Deucher Date: Tue Apr 14 11:26:35 2009 -0400 R200: clean code, always use shader based csc - consolidate common r2xx csc shader code - always use shader based csc for both packed and planar formats - always use native planar csc on r1xx commit 17685fefba68d188c7c0fe7a079180ec0722c046 Author: Alex Deucher Date: Mon Apr 13 20:06:11 2009 -0400 Tex vid: general cleanup - convert macros to more meaningful VTX_OUT_4 and VTX_OUT_6 names to reflect that they actually do - fix indenting commit 093ab4c9a33b0b396b78c061c3321dc044bdccdc Author: Alex Deucher Date: Mon Apr 13 19:48:35 2009 -0400 R1xx: add support for native planar textured Xv commit ec0cb51df81c6c9a1de640d227fa9c9c33161083 Author: Alex Deucher Date: Mon Apr 13 17:21:20 2009 -0400 R2xx tex vid: append verts for clip boxes rather than sending a new draw packet for each rect commit fde075a30a8ee2c333aa1bbe8fbd177258b085ba Author: Alex Deucher Date: Mon Apr 13 17:13:51 2009 -0400 R1xx tex vid: append verts for clip boxes rather than sending a new draw packet for each rect commit 12839fc17a2cca4ac14b9757bdaa63ba4679f96f Author: Alex Deucher Date: Mon Apr 13 17:04:31 2009 -0400 Tex vid: split by family commit a30737b337edb31528174b483c9094941a5d41bb Author: Roland Scheidegger Date: Mon Apr 13 15:36:07 2009 -0400 r200/r300: implement brightness/contrast/hue/saturation/gamma controls for textured video This implements contrast/brightness/hue/saturation controls for r200/r300 plus gamma (same gamma value for all channels used though separate values would be trivial) control for r300. Some issues left: - only r200/r300 - still can't be combined with bicubic - controls will silently cease to work if the format used is packed and not planar (except for rv250) - gamma range is from 100 to 10000 corresponding to 0.1 and 10.0 like used in overlay. However, usable range is far smaller. Over 2.0 picture gets dark pretty quickly, and below 0.6 or so black seems to turn into purple (I've verified that even with gamma 1.0 black actually often seems to be RGB 1/0/1 so this explains this since that gets amplified by low gamma values - not sure if this is a rounding problem somewhere, bogus reference values or is somehow expected). - gamma adds a bit too many instructions for my taste (7) though the alternative (3 texture lookups + some swizzling instructions) doesn't seem any better. commit 9dd33cc8346073300312cd5f68de72d9bea1dd6b Author: Dave Airlie Date: Fri Apr 17 10:30:21 2009 +1000 radeon: tweak ddc fix for all r300s. Alex seems to think this might affect some other chips commit a846ec14dd65bb12f314f83ffb45c4c4be564a5e Author: Dave Airlie Date: Fri Apr 17 10:24:15 2009 +1000 radeon: fix DDC on rv410 VGA ports for non-atom use. The rv410 hw i2c block appears to hold down whatever i2c lines it is connected to when in reset, so when doing DDC change hw i2c to point at different i2c lines. commit efa1476fc0765b53298624198137dc5cc71d37a8 Author: Alex Deucher Date: Thu Apr 16 16:43:02 2009 -0400 PM: fix reversed logic in pm block handler commit 2b95de17781959457a809c8fecc6bbb08336c83f Author: Alex Deucher Date: Thu Apr 16 12:52:41 2009 -0400 RS400/RS480: attempt to fix ClockGating on RS4xx chips commit c0215d2f2a27755fb04d20aaa4320a5e7da7ee04 Author: Alex Deucher Date: Thu Apr 16 11:58:19 2009 -0400 RS690/RS740: fix connector enumeration in some cases Should fix Masta-G's issue reported on IRC. commit 573339114660f06e5f257648ba413bab0d6083ce Author: Alex Deucher Date: Thu Apr 16 11:19:01 2009 -0400 R3xx/R4xx EXA: set explicit tex cache regions When using a mask, set explicit cache partitions for each texture. Gives 1% performance improvement in x11perf with anti-aliased text. commit eea9800890b56bac9c07b7bd9c9e33fae2938af3 Author: Alex Deucher Date: Thu Apr 16 10:41:28 2009 -0400 Revert "DCE3/3.2: cleanup dpms after previous changes" This reverts commit f8c7d6a6162196a743f6885ecaf63ba50de1722a. This is apparently still needed for some setups, however, I can't reproduce this locally anymore. commit 099cb27d760af61b967239d960bc77f71e828655 Author: Alex Deucher Date: Wed Apr 15 16:23:01 2009 -0400 Change ForceLowPowerMode to 4 pcie lanes This fixes corruption for some users commit 5abcea88d1f3307a7d08ae7757c4b535df1503bf Author: Alex Deucher Date: Wed Apr 15 15:52:04 2009 -0400 PM: don't touch clock gating regs unless ClockGating option is set Fixes an M26 hang reported by tormod on IRC commit bae88f81e2a01c0d547132b5b91e717ff9d0497d Author: Alex Deucher Date: Wed Apr 15 14:38:35 2009 -0400 man page: fix missing break commit 4b3a3785f7b06205eeec6ca6b8913ecc2b94bd1f Author: Alex Deucher Date: Sat Apr 4 11:39:35 2009 -0400 Unify ForceLowPowerMode and DynamicPM Options Force lower power mode and switch to a lower mode when idle. commit 63cb57c5eb0d6bc083f54eb100cb972b0e7bca69 Author: Alex Deucher Date: Wed Apr 1 16:22:02 2009 -0400 Add DynamicPM Option Dyanmically switch between power states. Switch to a low power state when the system is idle (DPMS off). commit a34a8b37afbea6ed4bf8ca42364195e174250c48 Author: Alex Deucher Date: Wed Apr 1 15:23:17 2009 -0400 Set default low power PCIE lanes to 2 1 lane seems to cause occasional corruption when blitting to/from gart memory. commit 1f0dc778dc25f4f85fedd73c55c847cab2c79fc5 Author: Alex Deucher Date: Wed Apr 1 15:12:27 2009 -0400 Add support for setting the number PCIE lanes commit 7e10b6222e8f44a3ecc6aaea55a7a7680d133bb3 Author: Alex Deucher Date: Wed Apr 1 15:05:38 2009 -0400 Add ForceLowPowerMode Option Force the chip to a low power mode at the expense of performance. commit 533d01a5933cd491bbc09cd463ea62475abf4bf2 Author: Alex Deucher Date: Tue Mar 31 17:24:29 2009 -0400 radeon: Add functions to set sclk/mclk using atombios commit adb099409768e695b9928fa6aa5760f93dadd9af Author: Alex Deucher Date: Tue Mar 31 17:13:11 2009 -0400 radeon: Add functions to set sclk/mclk on r1xx-r4xx commit 68e2a959ccc3d1a5d0731f1b55fdf1b2412635b2 Author: Alex Deucher Date: Tue Mar 31 17:02:45 2009 -0400 Add unified ClockGating Option - replaces DynamicClocks Option as the name was misleading - unified interface for atom and com based bioses - fix up clock gating code for newer r3xx asics commit 336cee0e6d19068582b189b2c747d92cb2139d2f Author: Dave Airlie Date: Mon Apr 13 18:11:48 2009 +1000 radeon: legacy bandwidth calcs for later r3xx/r4xx cards. This is an attempt to rationalise the code using the register info files available to me here. Further info is required: r350 check for stop_req > 15 then subtract 10: what other chips need it? get rs480 working instead of using magic. commit 367ba7af76e7f63f3186a6e8d9bbe21aa31fc6d1 Author: Alex Deucher Date: Fri Apr 10 09:37:15 2009 -0400 radeon: fix tmds_pll randr property commit 15f1a2f31a7bc33f276a65283dbad0c106bee73e Author: Alex Deucher Date: Thu Apr 9 20:17:03 2009 -0400 radeon: remove old crtc size heuristics IIRC, the old randr code used to use this to use for front buffer sizing, but it has since been changed. commit ce9077b2f5a5e749c0078dfb79d26ef8711a823a Author: Alex Deucher Date: Thu Apr 9 19:59:19 2009 -0400 R6xx/R7xx: cleanup macro commit 6532aeddacdeda3aa534264741c8648e1c449e76 Author: Michel Dänzer Date: Thu Apr 9 09:41:56 2009 +0200 Clear the framebuffer before initializing modes. Fixes garbage being visible shortly on server startup or when VT switching back to X. commit 0c19053975925fed637aaa41d440e0cab8f6b596 Author: Alex Deucher Date: Wed Apr 8 13:34:23 2009 -0400 radeon: chip family typo commit 2888dd9ae9689b1cd72115dc0ceea1f5957299b0 Author: Alex Deucher Date: Wed Apr 8 13:10:01 2009 -0400 R6xx/R7xx: set proper 3D client driver name for r600 commit 61a083116a2c89e145aa19da951243536e07542e Author: Alex Deucher Date: Wed Apr 8 10:44:30 2009 -0400 Bump version post release commit 1b02b93895c31a0c9d641e47b46dce43b40edd97 Author: Alex Deucher Date: Wed Apr 8 10:34:44 2009 -0400 Bump for release commit da74b94a5da8f0bcf4ae99b20e594d2f0f4fc6f6 Author: Alex Deucher Date: Tue Apr 7 18:59:06 2009 -0400 ATOM: code cleanup - remove cases that aren't possible (e.g., no TMDSA on DCE3 cards) - condense duplicate cases commit a24aa7250d09ae68ceaaba987314388b5e52096c Author: Alex Deucher Date: Tue Apr 7 18:52:08 2009 -0400 DCE3/3.2: further fixes disable the dig transmitter and encoder before setup and enable commit 284e1943f6726ed08e796f99e49fbd90ac7fa8a4 Author: Alex Deucher Date: Wed Apr 1 15:07:01 2009 -0400 Cast info->sclk to int commit b580e388e0e31843308c783c1ca859672dc6ca0e Author: Alex Deucher Date: Wed Apr 1 14:59:43 2009 -0400 Fix missing ')' in PCIE macro commit 8ec27be3c8043a6ddc816b0b1480dd19f8d73832 Author: Alex Deucher Date: Tue Apr 7 11:33:44 2009 -0400 radeon: fix Xv vsync for multi-head commit f8c7d6a6162196a743f6885ecaf63ba50de1722a Author: Alex Deucher Date: Sat Apr 4 16:05:20 2009 -0400 DCE3/3.2: cleanup dpms after previous changes commit a707d355c3c6ff92252c5a060a1fc32d97547552 Author: Alex Deucher Date: Sat Apr 4 15:20:01 2009 -0400 DCE3/3.2: fix up transmitter/encoder setup Should fix bug 21050 commit 215e12f9c0e8ac62c23af1add776ef88f9a0dc54 Author: Eduard Fuchs Date: Thu Apr 2 12:36:59 2009 -0400 Enable byte swapping for r6xx/r7xx Hardware Patch from Eduard Fuchs with some cleanup from me. Tested at 32 bpp on MPC8641HPCN board (PowerPC) with HD2400 PCIe card commit 0ded9fab6bc3fecc1976ae8369b788659e4d7793 Author: Alex Deucher Date: Thu Apr 2 12:09:00 2009 -0400 Add RV790 (HD 4890) support commit 0c6f20a9404c6a4210c5180bdca61c13fc186754 Author: Alex Deucher Date: Tue Mar 31 15:51:11 2009 -0400 Add PCIE register accessors commit 229d4e20e5adcdf9207944c19ca721477936ff02 Author: Alex Deucher Date: Tue Mar 31 15:39:42 2009 -0400 Unify mc_idle() commit f44b486848094b75479abef61c1aa075aede835c Author: Alex Deucher Date: Tue Mar 31 15:33:11 2009 -0400 COMBIS: Clarify case 0 for LCD DDC table commit e6f3c48899a92174a55f6fe7327412bc88039d87 Author: Alex Deucher Date: Tue Mar 31 15:30:40 2009 -0400 COMBIOS: fix default sclk/mclk from bios commit 75bf5272936093bc024559e5744d97d8e79943b1 Author: Alex Deucher Date: Tue Mar 31 15:17:37 2009 -0400 mac mini: 3rd time's the charm fixes 10fbbac4bed59e12ad794ac873dd415d9ee4e340 fixes bugs 20796 and 20979 commit 10fbbac4bed59e12ad794ac873dd415d9ee4e340 Author: Alex Deucher Date: Tue Mar 31 15:14:27 2009 -0400 Mac mini: fix connector setup for real fixes f061308e7abcf93d1612681b935387fee23e0a24 fixes bugs 20796 and 20979 commit 8f2a03bfc86422669a46c2853050979f099a17a8 Author: Alex Deucher Date: Mon Mar 30 11:30:34 2009 -0400 r1xx-r3xx TV: fix white noise should fix bug 13872 commit f061308e7abcf93d1612681b935387fee23e0a24 Author: Alex Deucher Date: Fri Mar 27 01:14:12 2009 -0400 mac mini: fix connector setup regression fixes bug 20796 commit 47134ca77988f8c3b42d55ac4fcbb5dc182878d4 Author: Alex Deucher Date: Thu Mar 26 17:18:47 2009 -0400 radeon: re-enable r/g/b intensity attributes for overlay Noticed by sroland on IRC. commit e2b5e48e2652daf03fcae852d8368f29ea4abcd9 Author: Alex Deucher Date: Thu Mar 26 13:42:25 2009 -0400 R6xx/R7xx EXA: rework composite pixel shader - move to vram storage - move swizzle logic to tex setup commit 24dbd3f93c640f819a9f5029f5a49e41ab875bd4 Author: Alex Deucher Date: Thu Mar 26 12:01:07 2009 -0400 R6xx/R7xx: clean up logic in EXA Comp PS setup commit 076e4e3ac1c81086aecb4e70dd30fd5d26ec7bc8 Author: Alex Deucher Date: Thu Mar 26 11:36:26 2009 -0400 R6xx/R7xx: clean up bool const code 3 regs: 1 bit per bool, 32 bools per ps/vs/gs commit d2c3964fe04be42fe538f36439ed5ffca96e436a Author: Roland Scheidegger Date: Wed Mar 18 01:55:12 2009 +0100 fix textured video allocation bug size needs to be calculated after dstPitch adjustments, got already fixed for earlier than R600 chips by planar textured yuv patches, clean this up. commit 18e56eb179fde28477487c63e6f9ebf7579e2cd5 Author: Roland Scheidegger Date: Thu Mar 5 02:07:46 2009 +0100 don't convert planar yuv to packed for r200 uses 3 textures for planar yuv and does yuv->rgb conversion in the shader. Similar to r300 code, but might have precision issues - hardware alu should have enough precision but hardware consts are only 8bit and we'd want at least 11. This also enables textured video on rv250 (and also supports packed yuv on that chip by using basically the same shader with packed data). commit 58530bf4912800f9e09ebaea42a13cff8a80c19e Author: Roland Scheidegger Date: Sat Feb 21 04:46:31 2009 +0100 don't convert planar yuv to packed for r300 uses 3 textures for planar yuv and does yuv->rgb conversion in the shader. small performance advantage, but manual texture cache setting is necessary otherwise it may be measurably slower (but probably not relevant) in some cases. Unlike some other drivers, using MADs instead of DP3s, since this requires less instructions due to no MOVs are required, the end result is the same though the constants need to be different. Use of this is user settable for now (XV_HWPLANAR attrib). commit 97e19d96ba65a3df2fa3bbf73cfcc01b6dc3e796 Author: Roland Scheidegger Date: Tue Dec 30 22:23:39 2008 +0100 clip fixes This fixes some oddities observed when the video is only partly visible. Instead of recalculating the geometry of the video, always use the same. Also fixes a assignment present twice, and another issue (bring in line with what the overlay code does). commit 7aaf5f08e4147b75c4975e6d680d3f5a93424164 Author: Alex Deucher Date: Mon Mar 23 12:55:02 2009 -0400 R4xx ATOM: fix crtc routing for CRT1 should fix bug 20814 commit 2fe6b393d9dbb193d4f0a3351ad76618cda07e2c Author: Alex Deucher Date: Sun Mar 22 01:31:30 2009 -0400 radeon: add new chip ids commit 1ddee7cd6fd267b2fc86f21af27c5425eb0835a4 Author: Alex Deucher Date: Fri Mar 20 13:44:00 2009 -0400 DCE3.2: use RMX for for non-native modes on DVI DVI seems to have issues with low dotclocks, so use the scaler instead. Fixes bug 20754 commit 44081e8fd2bf974272d5447b45dd7b206cf939c1 Author: Alex Deucher Date: Thu Mar 19 20:48:16 2009 -0400 R6xx/R7xx EXA: fix maxPitchBytes should now allow accel up the hw max of 8192x8192 commit e8e2367b66d9a4f5977d95f52b37cdbad75e409a Author: Alex Deucher Date: Thu Mar 19 20:09:32 2009 -0400 Add new pci ids commit 68e83f10adb23fc359c1da881f5d666cd08b4067 Author: Alex Deucher Date: Wed Mar 18 20:58:19 2009 -0400 bump version post release commit a196aae19603c8651dc502f5cb0df4d55befe163 Author: Alex Deucher Date: Wed Mar 18 20:52:12 2009 -0400 bump for release commit 537da7018b0fd2ad263fc5cdc55b3b85cf8e9205 Author: Alex Deucher Date: Wed Mar 18 19:22:55 2009 -0400 ATOM: fix up tv-out support - fix purple hue when using ATOMTvOut option - fix TV load detection on newer r6xx/r7xx chips - disable CV for now commit c0e2513ab128ddd5be0ed626d9e31777a98983ef Author: Alex Deucher Date: Wed Mar 18 14:08:30 2009 -0400 R6xx/R7xx AGP: disable gart data transfers UTS/DFS/Xv Doesn't seem to be reliable on AGP. fixes bugs: 20436, 20236, several reports on ML and IRC commit e3e1f0c7b892b094b292081021a0e97932b8e079 Author: Fabio Date: Wed Mar 18 12:13:53 2009 -0400 man page update commit 6ae54d3ea023968887bf0cb0ec1be2115621d554 Author: Alex Deucher Date: Wed Mar 18 11:50:22 2009 -0400 AVIVO: Fix dac load detection commit 04e36b794c216e4fa77c780fd989df1ef1c7f0d9 Author: Fabio Date: Tue Mar 17 11:29:26 2009 -0400 man page updates from bug 20648 commit a6855c370194b6df307ea33724fe17a85d67607e Author: Alex Deucher Date: Mon Mar 16 13:52:42 2009 -0400 radeon: add another AGP quirk bug 20647 commit a55ced5ee20c07e743c7c0978803fd10589c1531 Author: Alex Deucher Date: Sun Mar 15 12:08:04 2009 -0400 Fix fallout from r6xx/r7xx EXA merge in IB handling Noticed Christiaan van Dijk. Should fix bug 20510 commit a065eeb9b301ab452cc8fbd3cac1fd9a3841c4e1 Author: Alex Deucher Date: Sat Mar 14 18:40:28 2009 -0400 atom: fix up bios scartch register usage the bios scratch registers keep 3 types of state for each output: 1. dpms 2. active 3. connected some of the command tables use the active flags. We used to set the active flags based on dpms state, but instead set them based on whether they are connected or not. commit 5c4ef924d082fd3b279f62fda7a97f563b009d38 Author: Alex Deucher Date: Sat Mar 14 18:16:49 2009 -0400 radeon: fix typo in bios scratch reg setup commit 96fce5a56269509a935e8ee621a5e17cc9005ddc Author: Alex Deucher Date: Fri Mar 13 19:29:58 2009 -0400 Bump post-release commit 8da1b82a70de7b3ef38905bd77c58a20fd44ddd6 Author: Alex Deucher Date: Fri Mar 13 19:23:19 2009 -0400 bump for release commit 28d9d699dcdff394aa561505f7f54f08db800828 Author: Alex Deucher Date: Fri Mar 13 18:18:31 2009 -0400 radeon: man page updates commit 06963796d00b5cb6704412a7d4417fcefae4aa4d Author: Adam Jackson Date: Fri Mar 13 18:14:43 2009 -0400 uniphy: start adding DisplayPort setup commit 1db81afe4f8db55e02a65cd22ad84c6bbb27e8ef Author: Alex Deucher Date: Fri Mar 13 17:51:56 2009 -0400 radeon: add support for 30 bit LUTs All radeons have them. Thanks to Yang Zhao for figuring this out. commit 5bb326c64ad3bf5c93943280dcbcb25c8910d1aa Author: Alex Deucher Date: Fri Mar 13 14:10:58 2009 -0400 R6xx/R7xx: EXA VSync Option not supported yet commit 8c2d40894448329e721360811c124998a17ba2ba Author: Alex Deucher Date: Fri Mar 13 14:03:43 2009 -0400 R6xx/R7xx: fix up vline stuff along the lines of previous chips Avoids an additional function call. commit 176c1b43fc3ee48e87c134446754360b3683c24b Author: Alex Deucher Date: Fri Mar 13 13:28:42 2009 -0400 R6xx/R7xx: return in RADEONWaitForIdleMMIO() if accel is off Don't wait for engine idle if we haven't initialized the engine. Behavior should be consistent with versions of the driver prior to accel support being added. Should fix bug 20645 commit d538a4508248adf2debaf0cc870a2d1c48abd986 Author: Alex Deucher Date: Fri Mar 13 13:22:03 2009 -0400 R6xx/r7xx: clarify accel messages We only support EXA and and only with DRI. commit 1b7090a4c0d6a38701fbfb928fac8e15d40fb81f Author: Adam Jackson Date: Fri Mar 13 17:41:59 2009 -0400 Add some more cases to the DVI single-link checks. commit 104e13da74de37477e3a31a5de96c5ebb8fe888b Author: Cooper Yuan Date: Fri Mar 13 11:47:43 2009 -0400 radeon: save bios scratch registers in Preinit() The display detect routines can change these which causes havok with some bioses. commit f70d7a0fd9ac3659d93511ab362eb80a7ff49777 Author: Dave Airlie Date: Fri Mar 13 12:56:29 2009 +1000 r600: reload shaders into VRAM on resume As VRAM gets zeroed out over s/r, we need to reload the shaders. commit 1fe0dcfe98dfe30499ba53c1f208c4ef10bef001 Author: Yang Zhao Date: Thu Mar 12 18:50:32 2009 -0400 R6xx/R7xx shader: Fix OFFSET_[XYZ] macro for TEX_DWORD2 to accept floats Values for OFFSET_[XYZ] are 5-bits two's-complement fixed-point with one-bit after decimal point. Values in [-8.0, 7.5] are valid. Inputs that do not exactly land on 0.5 increments are rounded towards 0 to the nearest increment. commit f356ca7795531e0c080775efb598141eb7db44ba Author: Alex Deucher Date: Thu Mar 12 03:42:40 2009 -0400 RS600: fix page table size for rs600 as well commit ef69336584c45e35aabb797a06c4030e75d66507 Author: Dave Airlie Date: Thu Mar 12 14:54:18 2009 +1000 r600: fix sizing of PCI GART table for r600 commit 945ccbbd4fa2b65ccdfb23716c178c95b036734d Author: Alex Deucher Date: Tue Mar 10 09:53:14 2009 -0400 radeon: clean more thoroughly in RADEONFreeRec() commit 03ec2099fdc859b23e5fa56ac8696ec045f1b110 Author: 오유연(Yu-yeon Oh) Date: Tue Mar 10 09:51:08 2009 -0400 radeon_driver.c small memory bug commit 60dac878cc8626b0821c4c7a6a6dfa12a5597cfa Author: Alex Deucher Date: Mon Mar 9 20:48:39 2009 -0400 R4xx: add R4xxATOM option If set, enables the use of atombios for modesetting on r4xx cards. commit 758fcc33c232c32e7b66261fca51de161d1a4800 Author: Dave Airlie Date: Tue Mar 10 10:34:13 2009 +1000 r600: enable DRI by default fallback to shadowfb if DRI fails pre init commit 7735e411954fd2cb6105c30ebd5a1b209974ce22 Author: Alex Deucher Date: Mon Mar 9 17:49:25 2009 -0400 R6xx/r7xx: clarify EXA message commit 1d355798f3d421cabf2a3a0ba32a580483476ab0 Author: Alex Deucher Date: Mon Mar 9 15:13:01 2009 -0400 AVIVO: fix panning low 2 bits of X need to be 0. commit d1add18f3d238c755f9875b5e5c211e4af742482 Author: root Date: Fri Mar 6 17:53:59 2009 -0500 output: Filter out dual-link modes from DP->DVI connections There's not enough pins on a DP->DVI connector for this to possibly work. commit 04481bf450650d1ea5aadabc9213b899b0fe8119 Author: root Date: Fri Mar 6 17:32:15 2009 -0500 atom: Enable DisplayPort source to DVI/HDMI sink DP source to DP sink still doesn't work yet, of course. commit 0ba73e040b94590867f8b1071a26da2526a3c375 Author: Adam Jackson Date: Fri Mar 6 15:38:00 2009 -0500 output: Allow for multiple DisplayPort outputs. commit 8f7c17a6b77ca368f067c2acb803cc8f9ef19351 Author: Tormod Volden Date: Fri Mar 6 09:42:39 2009 -0500 RV350: Add AGPMode quirk for Thinkpad fixes bug 15096 (and Ubuntu bug #195051) commit 5dc4b69fbdd0e8ca48cc00321f193260a8f10bd0 Author: Alex Deucher Date: Thu Mar 5 12:26:04 2009 -0500 radeon: add a few more default common modes for lvds commit 3b0fc22ad9e5c0f120a74c4f3d8e48c270f0ff29 Author: Alex Deucher Date: Wed Mar 4 19:04:34 2009 -0500 R6xx/R7xx: wire up DMAForXv option like older asics Select between SW and HW-assisted uploads commit 52f06ace04ad8141effc45fb6a0107a05bb46a73 Author: Alex Deucher Date: Wed Mar 4 18:51:44 2009 -0500 R6xx/R7xx: disable XV_BICUBIC attribute It's not implemented yet. commit b1fd883b59b85fed8782e035890098908902f4ce Author: Alex Deucher Date: Wed Mar 4 11:17:16 2009 -0500 RN50: fix up cloning on servers Since the rn50 only has one crtc, but often has multiple outputs, occasionally one of the outputs doesn't get a crtc assigned eventhough the outputs may have common modes. If we see an output with modes, but no crtc, assign it so all the attached outputs light up. fixes bugs 19457 and similar ones commit 592bcac52f113a95923a8f1cb8427e7552d5670b Author: Alex Deucher Date: Wed Mar 4 10:53:20 2009 -0500 ATOM: don't use fixed ref div for LVDS The bios doesn't provide one. If there are problems with certain panels, we may need to adjust the PLL flags in certain cases. Should fix bug 20458 commit e88b0eac8cab8b54b769fd7b4ad3b3b65a90de09 Author: Alex Deucher Date: Wed Mar 4 02:52:36 2009 -0500 radeon: just add some common modes for LVDS avoids needing to hack around with the edid commit 2bb319fd80d20a3d4e5cc9416891bc7e4c3e431e Author: Alex Deucher Date: Wed Mar 4 02:50:45 2009 -0500 Revert "radeon: adjust LVDS so that default modes get added" This reverts commit 1a2b16561d19ec9c027c562902f5fc086c856994. commit 1a2b16561d19ec9c027c562902f5fc086c856994 Author: Alex Deucher Date: Tue Mar 3 20:21:17 2009 -0500 radeon: adjust LVDS so that default modes get added we can scale, so add the default modes. for panels with an EDID, set the continous freq bit. for panels without and EDID, add a FAKE edid with the continous freq bit set. Based on similar code in the Intel driver. commit 71117970df36cbe689ef15e9a6cca24439b4cd62 Author: Alex Deucher Date: Tue Mar 3 19:40:30 2009 -0500 AVIVO: add aspect scaling mode No luck yet for aspect on pre-avivo chips commit d586a2c6f821c821a4a7708a3382acb63187534f Author: Alex Deucher Date: Tue Mar 3 12:17:30 2009 -0500 Rotation: don't rotate if acceleration is not active commit fdc64948119e2218921b4dc0a492522442668875 Author: Alex Deucher Date: Mon Mar 2 16:33:46 2009 -0500 R6xx/r7xx: remove some unneeded code I missed in the last commit commit 4ad1c4decfee653dbbc1ea2ca4270487be622382 Author: Alex Deucher Date: Mon Mar 2 15:38:35 2009 -0500 R6xx/R7xx EXA: cleanup composite texture setup commit b7164ac4ad55e5d0fc474df8ae762b469b91ba30 Author: Alex Deucher Date: Mon Mar 2 04:08:09 2009 -0500 R6xx/R7xx EXA: combine composite mask/non-mask VS Also fix set_bool_const() the CF bool consts are not contiguous by shader type There are 96 boolean constants (32 each for PS, VS, GS) and they are ordered as follows: ps, vs, gs ... ps, vs, gs commit fa98f424de739be2c6005b740a74bbf1ee968a8b Author: Alex Deucher Date: Mon Mar 2 02:28:57 2009 -0500 R6xx/R7xx Xv: combine packed and planar shaders use a bool const to select the tex fetch routine commit ccde35c3eda3fff0de29eb8c6fdc392629724a34 Author: Christian Koenig Date: Sun Mar 1 23:38:37 2009 -0500 R6xx/R7xx: move shaders to r600_shader.c and fixup Xv PS patches from Christian Koenig with some adjustments from me commit a8e631c1b1c9b46602aeca66f8e7e68154d0bfc8 Author: Alex Deucher Date: Sun Mar 1 22:30:31 2009 -0500 R6xx/R7xx: code cleanups commit 528061d51bb4248d6fabec9579dead32a730467a Author: Alex Deucher Date: Sun Mar 1 18:28:13 2009 -0500 R6xx/R7xx: write vertexes directly to the IB Reduces the vertex buffer setup overhead commit 96a0bafa16dbb67a3d10fa6fe45be13930495ddc Author: Alex Deucher Date: Sun Mar 1 17:58:36 2009 -0500 R6xx/R7xx: switch emit functions to macros This improves performance due to decreased function call overhead. commit cbd579c41a16bddcbb8793eac2a41f2e958bef4d Author: Alex Deucher Date: Sun Mar 1 13:16:20 2009 -0500 Print a message when we have a shared DDC line commit a7f465f73363fce409870f62173d518b1bc02ae6 Author: Alex Deucher Date: Sun Mar 1 12:39:31 2009 -0500 R300: Add AGP quirk bug 7770 commit 017bc7f34de2e40919f0e711205b78ee4e3643f6 Author: Tormod Volden Date: Sat Feb 28 10:33:35 2009 -0500 M9+: Add AGP quirk for Sony Vaio commit 49b57767d0d2c041517b0764c2ed2d2ba5a7092c Author: Bryce Harrington Date: Fri Feb 27 20:31:03 2009 -0500 Quirk for RV280 on 82865G/PE/P DRAM Controller/Host-Hub Solves issue where display suffers from line corruption. (See https://edge.launchpad.net/ubuntu/+bug/300304) commit 150abd4123664eab65ea43585dbdb9b3151c46af Author: Tormod Volden Date: Fri Feb 27 11:23:32 2009 -0500 Janitor: cosmetic clean-up of AGPMode quirk table commit c7d344f0ad255761d5ae30da59cf0a8b532dfc68 Author: Michel Dänzer Date: Fri Feb 27 17:05:01 2009 +0100 EXA: Make sure Prepare/FinishAccess hooks can handle EXA_PREPARE_AUX* indices. And signal this to the EXA core using the new EXA_SUPPORTS_PREPARE_AUX flag. commit f4d57105fc869e9318f447a1514f1b284a0a4ec0 Author: Michel Dänzer Date: Fri Feb 27 09:23:24 2009 +0100 Revert "EXA: Adapt to EXA changes in xserver Git." This reverts commit de358736dc696559ba99c71cf5b2a97508201630. commit 3285a4af17b19f2d1c24eebfb6aa51cddcf3ca50 Author: Alex Deucher Date: Thu Feb 26 17:31:13 2009 -0500 DCE3.2: fix up Save()/Restore() commit 4fc978f3d83ef6370c9715e7ca5350640ccbfe10 Author: Alex Deucher Date: Thu Feb 26 12:10:08 2009 -0500 R6xx/R7xx: use shadowfb if DRI is disabled commit 000756e052a291230e5c95e48b69a5aa9c4fab0e Merge: 22d7746 8373f43 Author: Alex Deucher Date: Thu Feb 26 11:44:13 2009 -0500 Merge branch 'r6xx-r7xx-support' of git+ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati commit 22d7746bfc1bcbb3269afac88971254088ea9ece Author: Alex Deucher Date: Thu Feb 26 11:00:46 2009 -0500 RS600: enable the DRI by default commit 8373f4399b03961f2c928a9275d47e9f41bd92bb Author: Alex Deucher Date: Wed Feb 25 09:16:38 2009 -0500 R6xx/R7xx EXA: same surface and same coords equals nop should fix bug 20305 commit c74727015453ff3c3d6d06b812ebca9eb19a9767 Author: Alex Deucher Date: Tue Feb 24 11:08:46 2009 -0500 R6xx/R7xx EXA: init copy_area to NULL commit 95ce13572dc2d9f5dd6cf55c23411e275c0aadf1 Author: Alex Deucher Date: Tue Feb 24 10:51:13 2009 -0500 R6xx/R7xx EXA: Optimize temp surface for overlapping copies - allocate temp surface in PrepareCopy() - fall back to old OverlapCopy() path if we are not able to allocate a temp surface commit 1a7db3fc2a0277d724d60d028064d8ef75019c28 Author: Mark van Doesburg Date: Tue Feb 24 10:44:19 2009 -0500 R6xx/R7xx EXA: use a temp surface for overlapping copy commit 957c2ba3459af152ad16a3f6dd4631044f9df6f9 Author: Alex Deucher Date: Tue Feb 24 09:43:58 2009 -0500 RS600: fix MC addr mask Noticed by osiris on IRC commit de358736dc696559ba99c71cf5b2a97508201630 Author: Michel Dänzer Date: Tue Feb 24 08:30:23 2009 +0100 EXA: Adapt to EXA changes in xserver Git. The PrepareAccess hook can now get six different indices. Also remove superfluous instances of #include "exa.h". Note that you may need to run autoheader manually to get config.h.in updated. commit 752b0218af36a45b333a12f66dfdce8c1e662aa8 Author: Michel Dänzer Date: Tue Feb 24 08:13:06 2009 +0100 EXA: Pass pScrn and info into RadeonCompositeTile. Saves some cycles looking them up. commit e2e508bc08d993fc108297e9cd2fa0ce183282bc Author: Michel Dänzer Date: Tue Feb 24 08:12:42 2009 +0100 Only call RADEONWaitForVLine if it might actually do anything useful. Otherwise it and RADEONBiggerCrtcArea show up pretty high in x11perf -aa*text profiles. commit 5ab8699c97c050424cf813b9a60550aba32446a2 Author: Michel Dänzer Date: Tue Feb 24 08:12:23 2009 +0100 Fix compile warning when building without EXA. commit 132e61741185f4a1114e66a34bdbf21e08e4d5d8 Author: Alex Deucher Date: Mon Feb 23 12:13:41 2009 -0500 radeon: re-enable load detection output attribute for TV/CV commit 918d511f6f26d2fdeb63d6e32cd348707b4a2140 Author: Alex Deucher Date: Mon Feb 23 10:22:19 2009 -0500 RS600: fix up MC setup Please test if you have an RS600 commit 27f8ca2cce65be2bcb3375231886d5444d251808 Author: Alex Deucher Date: Thu Feb 19 21:18:07 2009 -0500 R6xx/R7xx: add wait for idle MMIO path commit 1f783117f79f95f1744681ccc7d80dc0e7b53057 Author: Alex Deucher Date: Thu Feb 19 21:07:06 2009 -0500 RBBM_GUICNTL is pre-r6xx only commit f3933ed200dbf61b05a114f7697f2bb68d92abe7 Author: Alex Deucher Date: Thu Feb 19 20:12:33 2009 -0500 Don't write new HDP location until we've written the new FB location commit 7f6801abb4bbd79830999d99ccdbd672a9984df6 Author: Alex Deucher Date: Thu Feb 19 19:02:52 2009 -0500 radeon: one more 32 -> 64 just to be safe missed this in cadae2a8d9979b2d61eae7d1f7a9ab8f5eb28e83 commit ca22390c8a5256bbc8eeff775d5eebf0e892d890 Author: Alex Deucher Date: Thu Feb 19 18:58:40 2009 -0500 R6xx/R7xx: fix up a few more paths commit cadae2a8d9979b2d61eae7d1f7a9ab8f5eb28e83 Author: Alex Deucher Date: Thu Feb 19 18:50:49 2009 -0500 Fix MC setup on systems with more than 512 MB of VRAM many thanks to app4des on IRC for helping me sort this out. commit 42492c70c481c88911337eefb97ba9d030adf7b6 Author: Alex Deucher Date: Thu Feb 19 10:20:28 2009 -0500 R6xx/R7xx: wait for MC idle when changing the MC should fix bug 19984 commit e6475282486f4895bc68f6b093ecbb1aa6d25f72 Author: Alex Deucher Date: Wed Feb 18 20:21:13 2009 -0500 R6xx/R7xx Xv: fix some missing bits from last commit commit adff8906c9899dde7711382577a63f4a726437ca Author: Alex Deucher Date: Wed Feb 18 20:01:57 2009 -0500 R6xx/R7xx EXA/Xv: properly deal with running out of vertex buffer space As noted by mhopf, if VGT_MAX/MIN_INDX, etc. regs change, you need to re-emit CB blocks to avoid a hang. So, just set the VGT_MAX_INDX to a reasonably large value in the default state and don't touch them when drawing. When we run out of VB space, just draw the current buffer, grab a new one, and continue. commit cf85d4a1d43a3209c7ca9307aede2c2c243f7130 Author: Alex Deucher Date: Wed Feb 18 19:02:56 2009 -0500 R6xx/R7xx: reset 3D state after VT switch commit 6545f0a2967414fa518a78440060b8b69c0146ee Author: Alex Deucher Date: Wed Feb 18 18:15:18 2009 -0500 R6xx/R7xx: fixup accel paths commit 61311b1de019c5a2344928a47347a966c229b08a Author: Alex Deucher Date: Wed Feb 18 17:27:05 2009 -0500 Bump version post release commit 0d3d1f1f7b450dabd3ad7d2df26ad1c72709b29b Author: Alex Deucher Date: Wed Feb 18 17:24:57 2009 -0500 bump for release commit 76a32f8391317513538dafee49cbb61c0d756356 Author: Alex Deucher Date: Wed Feb 18 16:31:44 2009 -0500 R6xx: Connector quirk for asus board bug 19943 commit 97b8482dba4e99088b59d3ab1396be98a70e823e Author: Alex Deucher Date: Wed Feb 18 13:27:15 2009 -0500 Set default RMX type to FULL on LVDS commit 7d22b1799b34010d34c3600d6cb02ffe839a0780 Author: Alex Deucher Date: Wed Feb 18 12:55:40 2009 -0500 DCE3.2+: allow output cloning commit 1a237a40958c006c56b80850bd77b2ac6c17e030 Author: Alex Deucher Date: Wed Feb 18 11:46:20 2009 -0500 ATOM: reset crtc initialized flag on CloseScreen() additional fix needed for bug 16781 commit 9a108f0a0b7203458673ce6221e747a166d39617 Author: Alex Deucher Date: Tue Feb 17 19:52:27 2009 -0500 ATOM: don't unblank uninitialized crtcs If the crtc timing isn't setup, you might get stuck in a loop in the BlankCRTC command table fixes bug 16781 commit 3dff20e276615e8b77177689a4a5f8d91b3e8eac Author: Alex Deucher Date: Tue Feb 17 13:14:38 2009 -0500 R6xx/R7xx EXA: switch to surface sync packet commit 31bd6d28dd35021e0e706d4f094989deb856c26a Author: Alex Deucher Date: Tue Feb 17 11:24:02 2009 -0500 Fix crtc routing on pre-DCE3.2 systems This should fix peterz and bug 20074 commit 3c9e00c7f2ed494976713e8f77b729e0d76409db Author: Alex Deucher Date: Mon Feb 16 16:18:42 2009 -0500 RV350: add another AGP quirk commit 036a17bec5dabbb91640b907811da060dac154d6 Author: Alex Deucher Date: Mon Feb 16 13:10:45 2009 -0500 RV280: add another agp quirk commit 00ac9d2f8d58725d0d3e6b1bf7f728d9ae7e6109 Author: David Miller Date: Sun Feb 15 18:26:14 2009 +1000 GART: Save/restore GART table consistently. Always save the GART table with the RADEON_SURFACE_CNTL register zero'd out to make sure we always use the same endinanness. fixed up as per Michel's suggestion for endianness. Signed-off-by: David S. Miller Signed-off-by: Dave Airlie commit 2de90c8349409eb892edc57fd24b61b679eb7719 Author: David Miller Date: Sun Feb 15 18:24:01 2009 +1000 DRI: Fix page size used in RADEONDRIGetPciAperTableSize(). The ATI GART has a fixed size of 4096 bytes. So using the system page size here is wrong. Signed-off-by: David S. Miller Signed-off-by: Dave Airlie commit 7cde00f49649e25fd5816927c7a5e28b608fabcd Author: Alex Deucher Date: Thu Feb 12 17:39:44 2009 -0500 R6xx/R7xx: switch to drm for wait for idle THIS REQUIRES AN UPDATED DRM commit e22cd4011b9be437ba89bff568e7fb82b4907d99 Author: Yang Zhao Date: Thu Feb 12 14:46:53 2009 -0500 R6xx/R7xx EXA: Further optimizations to overlapping copy Diagonal overlapping copies can be reduced to either horizontal- or vertical-only offset, and the one with fewer copies is picked. commit da08b760bcf3d04d775c4440fafec10657bb1863 Author: Alex Deucher Date: Thu Feb 12 13:53:11 2009 -0500 R6xx/R7xx EXA: handle running out of vertex space in the copy path commit e3be312b0b73982c24f1f5d9cf76d7caafae0853 Author: Alex Deucher Date: Thu Feb 12 13:48:36 2009 -0500 R6xx/R7xx EXA: properly handle non repeat cases in the texture setup commit 3ff1eb7e50fef22adb6280dd7de77c3ecafdb451 Author: Michel Dänzer Date: Thu Feb 12 19:24:41 2009 +0100 EXA: If making a pixmap offscreen fails, return ~0ULL as texture offset. This allows AIGLX to fall back to the non-zero-copy code rather than messing up the 3D driver. commit c19aa4fc8da7ac4745624098b146bcc42c0436dd Author: Michel Dänzer Date: Thu Feb 12 19:22:12 2009 +0100 EXA: The source tiling code can't handle RepeatReflect yet. commit adc35636aa1e936ec74cba8931ccffe2b5c11656 Author: Alex Deucher Date: Thu Feb 12 13:10:53 2009 -0500 R1xx/R2xx EXA: fix non repeat texture setup commit c6e1bf75c399807716b99486ab3301aeba60fa79 Author: Alex Deucher Date: Thu Feb 12 12:49:24 2009 -0500 R3xx-R5xx EXA: fix texture setup for non-repeat case fixes bug 19923 commit 0804dde9012cf33f614a1c2ee6d5d0def040a9af Author: Alex Deucher Date: Thu Feb 12 12:02:57 2009 -0500 AVIVO: fix dualhead/rotation for real commit 3e5ac32f747bef70903e9cdf41652a827eece707 Author: Alex Deucher Date: Wed Feb 11 17:40:20 2009 -0500 Revert "R6xx/R7xx: handle running out of vertex buffer space" This reverts commit 4fd7228de7ad88edf825dbc3039df877795a9479. Causes lockups. commit bd141aa73a77f68301715fb3b5664e2082327a80 Author: Alex Deucher Date: Wed Feb 11 15:31:47 2009 -0500 R6xx/R7xx Xv: switch packed over to Yang's new shader code commit cb4a1ceaa32d6847b146a31291772e1183972ee7 Author: Yang Zhao Date: Wed Feb 11 15:18:00 2009 -0500 R6xx/R7xx Xv: Planar - Properly scale Y'CbCr values before converting to RGB According to MPEG-2 spec, Y' and Cb/Cr values are scaled to [16, 235] and [16, 240], respectively, when packed into bytes. Properly take care of the reverse scaling before translating to RGB. Conversion matrix has been simplified to remove 3rd column, as the fitting to [-0.5, 0.5] can be done with scaling. Redundant MOV instructions were also removed, and now only 3 GPRs are required. commit 4fd7228de7ad88edf825dbc3039df877795a9479 Author: Alex Deucher Date: Wed Feb 11 14:46:02 2009 -0500 R6xx/R7xx: handle running out of vertex buffer space draw current VB and start a new one. commit ec60ef094762901ede4df5cde55c3f162e8c667b Author: Alex Deucher Date: Wed Feb 11 13:05:27 2009 -0500 R6xx/R7xx: be more verbose about what function ran out of VB space commit e7dedbc355970407eddb38370b58a8c96d204c1d Author: Alex Deucher Date: Wed Feb 11 12:45:14 2009 -0500 R6xx/R7xx: Move engine idle to sync functions commit 4a759a907ecd571460c7ff64cd6288380359b04b Author: Alex Deucher Date: Wed Feb 11 12:29:50 2009 -0500 adjust alignment commit d98359b20e1eb8eae893581ab199c299c8352dc4 Author: Alex Deucher Date: Wed Feb 11 12:03:56 2009 -0500 Revert "Radeon EXA: wait for the engine to be idle before sw access" This reverts commit 0c4694c58f2ec152b19023626bc7ced891d9da65. This patch just adds latency and thus isn't a real solution commit d6c50b221cbab6e726948e2310c1def9fc38da64 Author: Alex Deucher Date: Wed Feb 11 11:05:02 2009 -0500 R6xx/R7xx Xv: add support for packed uploads commit 8e437e996cc3f2c424c342701f4aa6bcf72ad08e Author: Alex Deucher Date: Wed Feb 11 10:53:50 2009 -0500 R6xx/R7xx Xv: Add native support for packed formats commit 0c4694c58f2ec152b19023626bc7ced891d9da65 Author: Alex Deucher Date: Tue Feb 10 17:08:37 2009 -0500 Radeon EXA: wait for the engine to be idle before sw access Really we need proper fencing with timestamps but this should help in the short term. This should help with minor corruption issues and possibly lockups. commit 13ab61d90bb58112bef4ce7267ef127935315f80 Author: Fabio Date: Tue Feb 10 10:50:30 2009 -0500 man page updates bug 20030 commit 615f2f202cee5f0dd2c6b29329f843bb1c9c70d5 Author: Alex Deucher Date: Tue Feb 10 10:17:47 2009 -0500 Bump version post RC release commit 1b4afc1c9f8458f9ab3434418f4ccf959f532ac1 Author: Alex Deucher Date: Mon Feb 9 19:50:37 2009 -0500 R6xx/R7xx: Add checks to make sure we don't overrun VB space commit ff6efe513e0c3148812d6a9578d2265522417053 Author: Alex Deucher Date: Mon Feb 9 17:43:24 2009 -0500 ATOM: warning fixes commit 87ad9006f3dafb45e131c9a3d6df713321f39998 Author: Alex Deucher Date: Mon Feb 9 17:40:41 2009 -0500 RV350: add AGP quirk bug 19981 commit 610b8b65fd7aa97f9c03b2ff6ae607aa959eab0b Author: Alex Deucher Date: Mon Feb 9 16:33:20 2009 -0500 Bump for rc release commit e85b7a1c5948b5123eddf9dfbb9e002d74fbe9fb Author: Alex Deucher Date: Mon Feb 9 14:13:16 2009 -0500 R6xx/R7xx Xv: fix cache flush buffer size for planar commit 2a893bac1faffd28dce6d9a9693108196c71e6d3 Author: Alex Deucher Date: Mon Feb 9 13:18:17 2009 -0500 R6xx/R7xx Xv: add accelerated uploads for planar formats commit 231aee18a73805be2f6c962e94a8345dd89fd0df Author: Alex Deucher Date: Mon Feb 9 13:02:27 2009 -0500 R6xx/R7xx Xv: implement native shader for planar formats commit 6c76bfe8105e3cf4e7e6ea1bfe1235be2079110f Author: Alex Deucher Date: Mon Feb 9 09:47:22 2009 -0500 R6xx/R7xx UTS: move actual upload to separate function So it can be shared with Xv commit 04859362ce64ed4ae48305a83c92059899c1db4b Author: Alex Deucher Date: Sun Feb 8 20:13:06 2009 -0500 Add some missing r6xx/r7xx pci ids commit 132e4c575dc4675f4995e45f08c53c26bffd999a Author: Yang Zhao Date: Sat Feb 7 13:54:51 2009 -0500 R6xx/R7xx EXA: Optimize overlapping copy Overlapping copy is now done in chunks proportional to the non-overlapping area. Diagonal overlaps are also handled properly. commit 8e9ef8ff581892cbe1b7ea56d48b9a1abd70179d Author: Pierre Ossman Date: Sat Feb 7 18:57:47 2009 +0100 Xv vsync support on r6xx/r7xx cards. commit 2222f0fd700f100b2e91fac2babe7d1b53f56c3e Author: Pierre Ossman Date: Sat Feb 7 18:56:42 2009 +0100 Fix bad range adjustment in VLINE code. commit 8ce6c024e31f6a3f5ae6c882738b1e64ae2944a1 Author: Alex Deucher Date: Sat Feb 7 10:32:01 2009 -0500 R6xx/R7xx Xv: fix typos in cache flushing commands commit bba5d806cc46328ad9e4c521bfeeb2a59f96862b Author: Alex Deucher Date: Fri Feb 6 19:44:17 2009 -0500 AVIVO: better fix for rotation This should handle initial rotation as well. commit 28cf3492f431f325cb08d7c6aade43d8886df3f6 Author: Alex Deucher Date: Fri Feb 6 19:20:18 2009 -0500 AVIVO: fix rotation When rotation is active, virtualX and virtualY change. commit 1b45936ae614244aa49b1a5d3c7fc39773c4f9b6 Author: Alex Deucher Date: Fri Feb 6 18:29:55 2009 -0500 R6xx/R7xx EXA: Fix typo in DFS noticed by pzad in IRC commit c06d89e16d5b2553142e8641e66080e1770c1563 Author: Alex Deucher Date: Fri Feb 6 18:07:22 2009 -0500 R6xx/R7xx EXA: fallback on overlapping blits for now Leave this disabled until we get a proper solution. commit 1d5fc3febf3470b94c423a1eda5e0683856909df Author: Alex Deucher Date: Fri Feb 6 14:43:30 2009 -0500 Revert "r6xx/r7xx EXA: Optimize overlapping copy" This reverts commit 0dfadc1843e0d14b9cc1ee19a72f4fd60a2c495b. This doesn't always work properly. commit def317e22d072405cd95ddb19d17eacd784ffd9e Author: Alex Deucher Date: Fri Feb 6 11:04:59 2009 -0500 R6xx/R7xx EXA: add accelerated UTS/DFS hooks I'm not sure how much of a win these are. I need to do some benchmarking. commit 0dfadc1843e0d14b9cc1ee19a72f4fd60a2c495b Author: Yang Zhao Date: Fri Feb 6 10:29:39 2009 -0500 r6xx/r7xx EXA: Optimize overlapping copy When source and destination blocks are only offset horizontally, it appears to be unnecessary to perform careful, segment-by-segment copy. The code path that does this is taken out completely. For the case where offset is only vertical, copying is now done by height of the non-overlapping area each time, instead of always line-by-line. commit 3d17bd199423e92d201c20f047d5e699942af976 Author: Alex Deucher Date: Thu Feb 5 19:25:03 2009 -0500 Revert "R6xx/R7xx EXA: improve overlapping copy performance" This reverts commit b24827c9d211e8a35da53b665385a7733d19910d. This seems to cause corruption in some cases. commit bf74055f543e7f0664741620fb1fe827ebc12711 Author: Alex Deucher Date: Thu Feb 5 17:31:43 2009 -0500 r6xx/r7xx EXA: fix corruption when doing sw access need to wait until the engine is idle. Ideally we wait on a timestamp shadowed in memory, but polling the GRBM_STATUS reg will do for now. commit b24827c9d211e8a35da53b665385a7733d19910d Author: Alex Deucher Date: Thu Feb 5 16:21:37 2009 -0500 R6xx/R7xx EXA: improve overlapping copy performance send vertices for each line of the copy, but only draw once commit 729fe756f809a41494dc161252d82313956e4a4b Author: Alex Deucher Date: Thu Feb 5 16:08:35 2009 -0500 r6xx/r7xx EXA: cleanup overlapping copy commit 16e01a5796a8e8b86ad25d3aa45b9e7044dc72d1 Author: Alex Deucher Date: Tue Feb 3 19:46:10 2009 -0500 Fix encoder accounting Should fix bug 19924 commit d7bf7b9c17add31dc9a115b56a563c7f9bf2cdb6 Author: Alex Deucher Date: Tue Feb 3 18:28:38 2009 -0500 EXA: fix and re-enable Solid() on R7xx missing last bit in alu clause in solid PS commit 9abb09d5f43320bd27b336612d39d264fe93549f Author: Alex Deucher Date: Tue Feb 3 11:17:13 2009 -0500 Fix bad rv710 pci id commit e5b916770946a9eebcb4bd1e6f698220db8c718a Author: Alex Deucher Date: Tue Feb 3 10:48:41 2009 -0500 Allow rotation on r6xx/r7xx commit d1f071c7f1dad6babfbcfcc2cb2b722a4987f372 Author: Alex Deucher Date: Tue Feb 3 10:44:10 2009 -0500 Initial R6xx/R7xx EXA and textured video support commit c88c3ef6f3db266c1aacba5297b8dfc8b66bf00e Author: Wolke Liu Date: Mon Feb 2 17:01:34 2009 -0500 AVIVO: Save/restore vga pll registers This fixes some VT switch issues on some chips commit 6fac3cefd1f46161c1e276ba40e72da2823aa9f6 Author: Alex Deucher Date: Sat Jan 31 14:21:02 2009 -0500 Return NULL for encoder if no active device is assigned fixes bug 19855 commit db178c852d00e9b85513d750b5f8f7495f9e3360 Author: Alan Coopersmith Date: Fri Jan 30 20:37:41 2009 -0800 Add README with pointers to mailing list, bugzilla & git repos commit fa8e5a4fc236f8f15f462cb0d6164b194a65a118 Author: Michel Dänzer Date: Fri Jan 30 16:16:26 2009 +0100 EXA: Accelerate Composite of RepeatPad/Reflect pictures when possible. commit 3a6e958c59b4b44fe620c8abe760ed1abf0007b1 Author: airlied Date: Fri Jan 30 07:56:14 2009 +1000 rs780: include RS780 in the InitMemory to leave alone This stops the MC_FB_LOCATION getting reassigned to 0, which is really bad thing to happen. I've had reported memory corruption on these cards so hopefully this fixes it. commit bd8021d46e9066e4cd116c03a7b7adcfe2557aff Merge: 4f88dd8 20d5dd3 Author: Alex Deucher Date: Wed Jan 28 14:33:14 2009 -0500 Merge branch 'atom-rework' and fix conflicts commit 20d5dd387da555e895e2b73fb53e2b026dd91003 Author: Alex Deucher Date: Wed Jan 28 14:12:26 2009 -0500 Move encoder specific data to encoder dev_priv commit 4f88dd83f290fb38e41256a7f1804008c0f28139 Merge: 1c5678f 2ca970c Author: Alex Deucher Date: Wed Jan 28 13:13:13 2009 -0500 Merge branch 'atom-tvout' of ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati Conflicts: src/radeon_atombios.c commit 1a62360e8260eaf5f98fa6be3f89f64c8cae7d32 Author: Alex Deucher Date: Mon Jan 26 10:11:28 2009 -0500 Encoders not assigned yet, use supported devices need to move this to encoder setup commit 44d9ceacb1fa6e1859d5d8bd1c55405aea24ad85 Author: Alex Deucher Date: Mon Jan 26 03:47:32 2009 -0500 Fix legacy output setup don't have assigned encoders at this point. Need to eventually move this stuff to encoder dev_priv. commit 0c24cbcea56c8f36374aca0f8ba849adfbf0ecfe Author: Alex Deucher Date: Mon Jan 26 03:24:19 2009 -0500 ATOM: print useful output info for DPMS events commit 2f92b885457c5cee2098ebbf8c6fe5a5eb98ec48 Author: Alex Deucher Date: Mon Jan 26 03:12:44 2009 -0500 Warning fixes commit 4cbf6189f3a7945a1141b0451e4f7881ceaaadcd Author: Alex Deucher Date: Mon Jan 26 02:59:51 2009 -0500 Move legacy output setup functions to legacy_output.c commit 93ed767255b60fbdf5b416b9bd06c366036a5141 Author: Alex Deucher Date: Mon Jan 26 02:40:41 2009 -0500 Fix off by one when printing encoder name - also cleanup some debugging output commit b515eee4b1cafae78ed39cd91c18b4f5e671b20b Author: Alex Deucher Date: Mon Jan 26 01:50:18 2009 -0500 Additional output cleanup commit 1c5678fc452dbc93135e9ece50a4cff6583f6078 Author: Michel Dänzer Date: Sat Jan 24 11:10:00 2009 +0100 Drop memcpy fallbacks from EXA UploadToScreen and DownloadFromScreen hooks. While in theory it's possible for the PrepareAccess hook to fail on big endian platforms, in practice it isn't at this point because there's no other users of the surface registers. commit 5cbd6082b9f8d7009ee9ef5e036673f99e1bfb05 Author: Michel Dänzer Date: Sat Jan 24 11:07:12 2009 +0100 Don't transform EXA Composite mask coordinates when there's no mask. commit 7e54c4b8acafead8de5d0dd6fdc1b619f832dd6f Author: Thomas Jaeger Date: Fri Jan 23 20:03:27 2009 -0500 Fall back to software for unsupported repeat modes commit 289b4a377cfff0c2a8ec938951cfbae1e270570e Author: Alex Deucher Date: Fri Jan 23 20:00:43 2009 -0500 Remove OutputType and other cruft commit 5f98508effbdc1fd62d0df15798722c147d88da1 Author: Maciej Cencora Date: Fri Jan 23 19:33:25 2009 -0500 Make sure gb_num_pipes is initialized when DRI is disabled Found with valgrind commit 0faab02cc732414af3cfb2014d3ddc1139aff063 Author: Alex Deucher Date: Fri Jan 23 17:35:01 2009 -0500 Remove some unused cruft commit 025082160c53c01a44f4d681cc63bf26ac4561d5 Author: Alex Deucher Date: Fri Jan 23 17:31:18 2009 -0500 track encoder state commit 82f12e5a40c1fbcb91910a0f8b725c34fff02aae Author: Alex Deucher Date: Fri Jan 23 16:21:33 2009 -0500 Remove TMDSType, DACType, LVDSType from output rec commit 7b42b57d748f77ff6ef6f8ade7cbc983a98d7204 Author: Alex Deucher Date: Wed Jan 21 16:28:00 2009 -0500 few more logic pasto's bits I missed commit fef1c12fbe4ceb4676258850d1fa5cac994f7c21 Author: Alex Deucher Date: Wed Jan 21 15:34:01 2009 -0500 Fix compilation with RADEON_TRACE_FALL set noticed by curaga on phoronix forum commit 1305376b009d17d65b4935896dc35cb7530f7c52 Author: Alex Deucher Date: Wed Jan 21 15:20:47 2009 -0500 Move active_device setup to detect() Also add encoder debugging printouts commit 9e0cc0ca5d7bc68756ae92ee3b5b2392366be71a Author: Alex Deucher Date: Wed Jan 21 14:47:08 2009 -0500 Fix logic cut and paste error commit 12010ae9296635ffa5f42ce0cd14482aaa290cf7 Author: Alex Deucher Date: Wed Jan 21 13:52:11 2009 -0500 More legacy rework commit 3f8bbede8bf639050f773780888b89cbdcb425b8 Author: Alex Deucher Date: Wed Jan 21 13:45:11 2009 -0500 fix legacy crtc routing and add some debugging info commit 80e0162ea2c1f793964731268251aba2d3243127 Author: Alex Deucher Date: Wed Jan 21 13:28:14 2009 -0500 ATOM: fix encoder init commit aea27d9caabb0e54e868a21e6e547733a4ca2709 Author: Alex Deucher Date: Wed Jan 21 12:33:49 2009 -0500 Switch legacy output code to use new encoder objects commit 9b44a4b57b00b150d041a5d82cb2df42159c062b Author: Alex Deucher Date: Wed Jan 21 11:32:24 2009 -0500 ATOM: more output cleanup commit 9e283fa9de34407fa6f0d5a8006a611b104f4bf2 Author: Alex Deucher Date: Wed Jan 21 03:16:20 2009 -0500 Fixup encoder setup on pre-ATOM chips commit 5850abbdcd22b70bdbccd3642f8ba1a27e38e7cd Author: Alex Deucher Date: Wed Jan 21 02:28:47 2009 -0500 clean up encoder setup - make sure not to duplicate encoders - use single encoder array commit 152d1d4c179c262be4d0a5618400aa13b4820342 Author: Alex Deucher Date: Tue Jan 20 00:58:18 2009 -0500 First pass at converting legacy code to encoder objects commit 7cc7ba8bf9ce2f0eebfd9b48aa648c416c333ff4 Author: Alex Deucher Date: Mon Jan 19 18:42:12 2009 -0500 ATOM: round 1 of output rework commit 25f3878858e6efb486888e5271b60d4ba08c73c6 Author: Alex Deucher Date: Mon Jan 19 15:54:42 2009 -0500 start to re-org outputs commit cbeb310d35e5ea25ba7a45a2c555468391cdf29e Author: Alex Deucher Date: Fri Jan 16 19:53:49 2009 -0500 ATOM: switch to define for external tmds commit d0d157abced43f822885fa26f14a4924766594cd Author: Alex Deucher Date: Fri Jan 16 19:51:07 2009 -0500 ATOM: combine DAC setup functions plus a few other clean-ups commit f6f969338f8187529c7ae9b2adc980b71a3f5837 Author: Alex Deucher Date: Fri Jan 16 18:10:34 2009 -0500 DCE30: LVTMA requires DIG2 encoder Fixes bug 19544 commit 549ae63aecc2624a69b41ce4db75883d03d59c23 Author: Alex Deucher Date: Thu Jan 15 19:26:40 2009 -0500 RV280 Add another AGP quirk commit 0e69068a8ed82e3fb7349d8224933451955e5f16 Author: Tormod Volden Date: Tue Jan 13 20:31:17 2009 -0500 [PATCH] Add yet another AGP quirk for RV280 commit b437da34cb4f7c637674fb432ad81b9bf32244a3 Author: Christiaan van Dijk Date: Mon Jan 12 11:54:15 2009 -0500 R3xx/R4xx: Maximize the use of clipped triangles for Xv rendering While trying to get tear free video on my RS690 I found some problems in the code for rendering the video as a clipped triangle. The size limitations are quite strict and scaling the video output window creates all kinds of weird effects. This patch maximizes the use of this function and resolves the scaling issues. There could be a problem with zero target height/width, not sure if this is handled elsewhere. commit 3d106b990fa8daba96e590c57b164640a2faae7f Author: Alan Coopersmith Date: Fri Jan 9 16:26:04 2009 -0800 Remove xorgconfig & xorgcfg from See Also list in man page commit 14d29a223028c183ba11e717a3737285d0ac8de1 Author: Alex Deucher Date: Wed Jan 7 17:04:42 2009 -0500 RV280: add another AGP quirk commit 1795706a6bb13272a58e8fa1bd5ad2603d553dde Author: Nicos Gollan Date: Wed Jan 7 14:25:24 2009 -0500 [PATCH] Fixed enumerations in radeon-output.c commit f69ad5aa17bb907105c1657803628d52b5ff3f11 Author: Alex Deucher Date: Wed Jan 7 11:33:53 2009 -0500 Bump version post release commit a0dd5d7ee3f038a9bfe051db8dbfac4934a81581 Author: Alex Deucher Date: Tue Jan 6 19:08:28 2009 -0500 Bump version for release commit c3fb8bb279959512a4ced644a64cc660c5cd97bd Author: Alex Deucher Date: Tue Jan 6 17:41:22 2009 -0500 ATOM: rework encoder/transmitter setup commit 9bb6b8ceaf772e1ce63610812a12260ee3860c27 Author: Alex Deucher Date: Tue Jan 6 16:25:26 2009 -0500 ATOM: refactor output dpms commit 467995d960bdefb1911eabfc2a047cf816013101 Author: Alex Deucher Date: Tue Jan 6 15:18:41 2009 -0500 ATOM: Adjust PLL setup for recent atom changes commit ee6310174c44809c761dbdb423e56e61392a0e10 Author: Alex Deucher Date: Tue Jan 6 14:59:22 2009 -0500 ATOM: handle cases where TMDS uses linkb fixes bug 18564 commit 690999b682c0f954e27d9f1b3a3d8db4ef865c21 Author: Alex Deucher Date: Tue Jan 6 14:55:49 2009 -0500 ATOM: rework object table parsing commit e23baa2fa8b25b68cd473aec7a3d8cf3ee7b0ea8 Author: Alex Deucher Date: Tue Jan 6 14:38:06 2009 -0500 R100: Fix typo in e55598cc1b35d398c9eb2c3946df71456775f621 Noticed by Andreas Stenglein commit d5cb24075928690377fd2dfaa32abfebff9990df Author: Alex Deucher Date: Sun Jan 4 21:04:52 2009 -0500 ATOM: add format rev 2 for digitial command tables should fix bug 18911 commit 1813456af3def38c6f53103054976f3092491746 Author: Alex Deucher Date: Sun Jan 4 21:01:05 2009 -0500 ATOM: fail on more tables with unhandled revisions commit 90ce00a3dbf37833a71db234372695460c8f0342 Author: Alex Deucher Date: Sun Jan 4 19:13:53 2009 -0500 AGP: Print both device and subsytem pci ids for agp helpful for adding quirks with libpciaccess commit 006d736d890a6b2f1d7eb8ee20ccf467a939516f Author: Alex Deucher Date: Sun Jan 4 19:08:37 2009 -0500 Another AGP quirk debian bug 510208 commit c39ca66a7e216b7492fc5e3680ac535831cfb9a1 Author: Alex Deucher Date: Tue Dec 30 19:05:58 2008 -0500 R2xx: add another AGP quirk from http://www.phoronix.com/forums/showthread.php?t=14626 commit 877be1b268f275b8ad83d5e245a0f0d3b1a05091 Author: Fabio Date: Mon Dec 29 18:11:10 2008 -0500 man page updates bug 19329 commit 837f7e8a48ea35d21de24b620830a2c6db854861 Author: Dave Airlie Date: Tue Dec 30 06:50:54 2008 +1000 atombios: endian fix in r600 object table handling This fixes the r600 object table on r600. commit 45f8b911659dba7f43b9b70bde4b9c3be51b0b5b Author: Alex Deucher Date: Mon Dec 29 10:25:33 2008 -0500 RS600: remove gpio quirk for ddc Doesn't seem necessary on RS600. I'll try and find out more. commit e913990030c536427bfecdb7b3d1e18f1beb90d2 Author: Alex Deucher Date: Mon Dec 29 10:22:20 2008 -0500 Revert "radeon: maybe special handling only needed for DVI port not HDMI one." This reverts commit c877450a75d3fd4a2f200af197c691669966f6f4. This breaks RS690 setups. I think for now we just apply this quirk to RS690/RS740. I'll follow up with the bios folks about RS600. commit c877450a75d3fd4a2f200af197c691669966f6f4 Author: Dave Airlie Date: Mon Dec 29 09:05:45 2008 +1000 radeon: maybe special handling only needed for DVI port not HDMI one. fixes ciaranm's rs600 board on radeon DDC commit 2a9bc6be3246ec230b181391221e3a46beb94a23 Author: Dave Airlie Date: Mon Dec 29 09:05:16 2008 +1000 radeon: a-bit motherboard has no DVI output thanks to ciaranm for finding this. commit eccf3fed2be54f5c02fefef32e39c4084acbbe22 Author: Alex Deucher Date: Fri Dec 26 19:51:58 2008 -0500 Make sure to include radeon_drm.h in the tarball commit e55598cc1b35d398c9eb2c3946df71456775f621 Author: Alex Deucher Date: Fri Dec 26 19:31:55 2008 -0500 R2xx EXA: limit composite to 2047 like r1xx See bug 19269 commit 631123d144d088d4f77a0599c34deaa31d551d71 Author: Dave Airlie Date: Tue Dec 23 10:08:46 2008 +1000 radeon: update to 6.9.0.91 do a prerelease for end of year. commit 047f7603174f6047090f4fafbe6488d697eb78bc Author: Dave Airlie Date: Tue Dec 23 08:16:25 2008 +1000 radeon: pass distcheck commit c0c33dab44e6966b1702d4e8cfba3537fc6e2d5c Author: Patrick Haller Date: Mon Dec 22 03:06:23 2008 -0500 Fix off by one in EXA composite limit checking Patch from Patrick, with some updates from me: - fix r200 limits - note about r100 limits commit d01a609a2b07da4ca0f182e79459432584ec61f6 Author: Alex Deucher Date: Mon Dec 22 02:18:43 2008 -0500 R3xx-R5xx: better fix for xv primitive tearing issues R5xx: always use single clipped triangle R3xx/R4xx: use single clipped triangle up to guardband limit, then use quad. commit 4d009d14c9c72f6e1bc8100ec8d9b8037ee4e514 Merge: d52882d 4e96278 Author: Dave Airlie Date: Mon Dec 22 16:00:01 2008 +1000 Merge branch 'atom-tvout' commit 4e96278b581e296c1203d97a6d7aa3bff3977222 Author: Dave Airlie Date: Mon Dec 22 15:58:35 2008 +1000 atombios/tv: add an option to enable atom tv-out for users. This code is still experimental but we will allow users to enable it for experimental reasons commit d52882d8188830dd52fa112dadcf5ea7f3e5fd5e Author: Dave Airlie Date: Mon Dec 22 09:27:47 2008 +1000 radeon: setup 3D engine even when no DRI. This should fix some missing font issues in EXA without DRI cases. commit 2346fd7cbd90dcdce2b361d374a53da064fa6a12 Author: Dave Airlie Date: Thu Dec 18 16:35:13 2008 +1000 radeon: add all new pci ids for rv730/rv710 families commit 2ca970c7aa1f3f212f03bf3287d6b60eeafd68ae Author: Alex Deucher Date: Wed Dec 17 13:07:19 2008 -0500 Allow arbitrary tv-out modes commit 5da147eec70abb7c9125a8940089fd3ff8bdea95 Author: Alex Deucher Date: Wed Dec 17 05:37:58 2008 -0500 missed one in last commit commit 6bfbb930c549e67f68969f7f0483380417f755b5 Author: Alex Deucher Date: Wed Dec 17 05:36:09 2008 -0500 Make sure we hit the right bios reg commit 6ed0e68060fd2775e2d4027ff1533729e87848ba Author: Alex Deucher Date: Wed Dec 17 04:54:50 2008 -0500 properly handle EnableYUV A bit of a hack. we really need to restructure the bios scratch reg handling. commit f21e673aced1bb5138bbb80e6d9724530eb95ebf Author: Alex Deucher Date: Wed Dec 17 03:17:45 2008 -0500 Fix colors on tv-out Call EnableYUV to set the transform and enable/disable it. should also fix green tint with tv connected at boot issues. commit b2b43905a5385a8bb0b59b8e50952863d8dacb59 Author: Alex Deucher Date: Wed Dec 17 00:59:52 2008 -0500 Pre-avivo: fix FP setup - make sure to clear various shadow timing bits - crtc1 select bit was set wrong. - should fix bugs like 19100 commit 3754cc23abac99880eda87d06aa42e16081b6c8a Author: Alex Deucher Date: Wed Dec 17 00:56:19 2008 -0500 R2xx: switch EXA composite to rects rather quads For conistency with Xv path and to reduce potential diagonal tearing commit be12cf8fcc7a5a3c3ee2c630474e2f9d9368f4d4 Author: Dave Airlie Date: Wed Dec 17 15:28:25 2008 +1000 radeon: r500 tv-out force scaler values to nice set that looks correct commit 01f7a50d76f706a456de7a4eb8323939d905c82b Author: Dave Airlie Date: Wed Dec 17 13:43:21 2008 +1000 r500: re-enable TV out commit 45b9ff5e250d69de0df41f68b33524f7e2ce13b7 Author: Dave Airlie Date: Wed Dec 17 13:42:10 2008 +1000 radeon: r500 PAL timings are slightly incorrect this stablises the PAL image at least commit 435d996949185201a97493e131f9920a32863acd Author: Dave Airlie Date: Wed Dec 17 11:50:48 2008 +1000 radeon: tv timings have crev/frev wrong way around for some reason. commit b9549e89cbdf8fff4aa7bd9f3adfb7d5732508cc Author: Dave Airlie Date: Wed Dec 17 11:40:53 2008 +1000 atombios: re-enable TV dpms commit db85ff2e0c52a030546c0cc8ed0b851418f3e045 Author: Dave Airlie Date: Wed Dec 17 11:37:17 2008 +1000 atom/r600: re-enable TV outputs commit ff7b52c9a48f2e417acf6bec3b72546ad9b33471 Author: Dave Airlie Date: Wed Dec 17 11:36:38 2008 +1000 radeon: use latest atombios constants for TV encoders in set_crtc_source commit 1e0c7d3f0bf6be67b976fdea8fa2df0b4b16435f Author: Dave Airlie Date: Wed Dec 17 11:35:06 2008 +1000 atom: spc3 only requires ucEncoderMode for DIG outputs commit 105cfd0b8696347ef71ad9daa941abb308bd6c2c Author: Dave Airlie Date: Wed Dec 17 11:31:15 2008 +1000 atom/tv: enable scaler can set the TV output scaler up. Add the tv standard to the scaler enable for TV use. commit 2a768abbd2f18abe203571213260bccc225f70fd Author: Dave Airlie Date: Wed Dec 17 11:29:07 2008 +1000 atom/tv: fixup the tv out default if bios doesn't specify commit b7fdd5da08bfec705691363b8890699c794dce53 Author: Dave Airlie Date: Wed Dec 17 11:24:56 2008 +1000 atombios: fixup parsing of TV tables on r500 and r600 cards. The TV tables changed between for later cards. commit e3b08cb59716b525b3063b184eab70e32b9d66f0 Author: Dave Airlie Date: Tue Dec 16 15:43:16 2008 +1000 atombios: correct fix for previous issue. I committed an old patch. commit 1431bc6900b0e0d7f486b5b3ba281873472b3fdc Author: Dave Airlie Date: Tue Dec 16 15:31:34 2008 +1000 atombios: fix issue with Clearing of MM_INDEX 0. While playing with tv-out I discovered this issue with clearing the MM_INDEX register. commit f72367aff2d09161d30066a00673ba291b292a36 Author: Dave Airlie Date: Tue Dec 16 12:32:24 2008 +1000 radeon: add initial rv730 pciids. Lots more to come, this just adds a few to start. commit 4d2429f3ec4d7d3e1512b268c7ff5cbff8d186b4 Author: Dave Airlie Date: Tue Dec 16 12:19:00 2008 +1000 DCE32: add support for DCE3.2 digital outputs. This adds support for the digital outputs on the RV730. commit 4d3792fd1b9f733107582436540f483d8993199f Author: Dave Airlie Date: Fri Dec 12 10:34:57 2008 +1000 radeon: fixes from Alex for some output engines (cherry picked from commit 1e8ac6ea7b35ccbc3649c96ead60f69158f66ebc) commit f892154dbd0d8b6dd8abdf2196ab0c7c18327412 Author: Alex Deucher Date: Mon Dec 15 19:41:32 2008 -0500 R3xx-R5xx: switch back to quad rendering for Xv The large clipped triangle trick hits the guardband limits on large displays. This gets textured video working again until we sort out how to deal with the situation better. See bug 19046 commit 62344e460f5d0cac81f94c535cda77d3d76528a9 Author: Alex Deucher Date: Mon Dec 15 11:30:42 2008 -0500 Remove remnants of unused DDCMode option commit f1efee6a11dc9436276fb12cfb90aa79ada1192b Author: Alex Deucher Date: Mon Dec 15 11:27:17 2008 -0500 Remove mention of MergedFB from server log noticed by Fabio, bug 19098 commit 94bffac6968057cdedc792f8540fe44cb6ecfd7c Author: Fabio Date: Mon Dec 15 11:22:56 2008 -0500 man page updates from bug 19098 with some minor fixes from me commit c7899905ec824071f9cabbd1e271c4d76010b733 Author: Fabio Date: Mon Dec 15 10:58:23 2008 -0500 Remove duplicate ATI in some device names from bug 19098 commit 89a8fd5337c77abf1f3166e69ed061d85b5c20f0 Author: Dave Airlie Date: Mon Dec 15 14:41:10 2008 +1000 r600: don't idle engine (cherry picked from commit b77729448e487d37707ce028d8edc59352d1cc2d) commit 4ce255a9db8027f2471ba50e57724d3e4d5b16ba Author: Fabio Date: Fri Dec 12 09:53:33 2008 -0500 Fix formatting in man page fixes bug 19039 commit 0e99017cb9a6d46b891705df73678c2705439532 Author: Joseph Adams Date: Thu Dec 11 00:57:03 2008 -0500 Add more eMac modes, fix crash in last patch commit fb46c30d316ab3ec54c54f3aec91d5164070a423 Author: Alex Deucher Date: Wed Dec 10 17:16:56 2008 -0500 Add support for Apple eMacs Thanks to Joseph Adams for helping me sort this out. Verified on eMac G4/1.0 with radeon 7500 Later eMacs with radeon 9200 or 9600 chips may have different ddc setups. Need to verify. commit c0bcea9150ef215fa614733cef9a5b71a55a33bd Author: Alex Deucher Date: Wed Dec 10 11:40:47 2008 -0500 Add another AGP quirk fixes bug 12544 commit 607b02d6abf78147902a5944bd006897ad95e982 Author: Alex Deucher Date: Wed Dec 10 03:54:35 2008 -0500 Add randr 1.3 panning support commit 24007acbf36bcfd09cb5e74ce4a8d918d393cf34 Author: Benjamin Close Date: Wed Dec 10 02:17:56 2008 -0500 [PATCH] xf86misc extension has been removed, update driver to reflect it commit 69e445f7f2ebd299070e44457b434bbc28b7e05c Author: Dave Airlie Date: Tue Dec 9 18:59:11 2008 +1000 radeon: memset the pll setting function Thanks to Peter Zijlstra for making me debug this and providing feedback. commit c72b732a2f5597cd72bd4ebe207799ae07f2681e Author: Adrian Friedli Date: Mon Dec 8 10:42:46 2008 -0500 Add another AGP quirk commit 979ad04d901676cb41aea5cf47a8a2e9c19064dd Author: Alex Deucher Date: Fri Dec 5 17:53:57 2008 -0500 Add missing .TP in man page commit b89d434011787fb71593395f462d142375783e35 Author: Pierre Ossman Date: Fri Dec 5 17:52:02 2008 -0500 Fix scissor setup for Xv We need to adjust the scissoring for each clip box, so move the setup to inside the while loop. commit 83c1115333cbe763f86422fa5aabf4ab21951e68 Author: Alex Deucher Date: Fri Dec 5 11:52:18 2008 -0500 R200: Remove scissor setup from init3d() We aren't using them, so no need to set them up. commit 7593d5399cdb2f42ecbcb5193580385b286a9db9 Author: Alex Deucher Date: Fri Dec 5 11:18:15 2008 -0500 set coherent mode consistently (enabled for now) It's set to enabled in the output setup, but then was set to disabled when teh output properties were setup. Set it up consistently. commit ad2579f8898251105a6b36b745afd1ce1dab103e Author: Dave Airlie Date: Fri Dec 5 20:03:53 2008 +1000 radeon: damn you bios, HDMI cannot have DACs. commit bae30856f2cb3884387ef347327af6ff00b75854 Author: Alex Deucher Date: Fri Dec 5 08:15:59 2008 +0100 Make VSync for EXA and Xv configurable commit 33638d9e388b330e2f4eb4debd05ba09924cf176 Author: Pierre Ossman Date: Thu Dec 4 23:29:31 2008 +0100 Optimise RADEONWaitForVLine Only avoid the vlines we are rendering to, instead of the entire screen. This way we don't stall the card for longer than we absolutely have to. EXA calls fixed by Alex Deucher. commit d1690f5cc096e2f735c8b407c370a1c1cd7a8afc Author: Pierre Ossman Date: Wed Dec 3 21:49:37 2008 +0100 Improve tearing avoidance for Xvideo in two steps - Fix up VLINE handling to trigger whenever scanout is outside the visible area. - Render the video as a scissored triangle as R300+ cannot render a quad in a single pass. commit 4d98acbca2e630056bf56cdcd0e23007fded2ced Author: Alex Deucher Date: Wed Jul 16 03:14:06 2008 -0400 First pass at tear-free accel if the dest pixmap is the front buffer, stall the pipe until the vline is outside the active area. For EXA, pick crtc based on the larger mode area; ideally we'd have one pixmap per crtc. For Xv, use dst window area to determine crtc. commit 82d67b70d0fb747cf7b1eb0b64244ae56cb84572 Author: Pierre Ossman Date: Thu Dec 4 15:38:13 2008 -0500 Switch r200 Xv to use rect lists rather than quads to avoid tearing Patch from Pierre with fixes from me. commit 9eccd0ad0827a1b8ec9abb2cebf5768d204a5ce9 Author: Alex Deucher Date: Thu Dec 4 12:28:12 2008 -0500 Fix up US setup after r3xx bicubic merge commit e13fba853ba19e6b0f081b9b3d9fa76c38a0f82b Merge: d296337 79bbdd9 Author: Alex Deucher Date: Thu Dec 4 12:25:29 2008 -0500 Merge branch 'bicubic' of git://git.infradead.org/users/drzeus/xf86-video-ati commit d29633708b5451f5541e88371d831ae03019a7f5 Author: Dave Airlie Date: Thu Dec 4 09:08:48 2008 +1000 radeon: apply atom quirks to object table commit 941ac0d3ab839dc5aaaef2f3b7f5c7085b2894c5 Author: Alex Deucher Date: Wed Dec 3 17:31:25 2008 -0500 Make sure 3D state is emited when switching to 3D IB - fixes bug 18864 commit 79bbdd984c925e37f5b3db2605339f1a21377fcf Author: Pierre Ossman Date: Wed Dec 3 20:33:36 2008 +0100 Change the XV_BICUBIC attribute to a tristate, where the third state automatically turns the filter on and off as appropriate. commit bbdf821c179242266fd86edf9e688a6be9cf985f Author: Pierre Ossman Date: Wed Dec 3 19:42:50 2008 +0100 Make the R300 bicubic shader program a bit easier to understand by having comments that describe the operation, not how it has to be implemented in the hardware. commit 8f4b22932c91f1d51fcbf1d1a99d852fcdaafdcc Author: Pierre Ossman Date: Wed Dec 3 19:31:31 2008 +0100 Now that we have a bicubic code path that messes up the pixel shader, we need to restore it in the non-bicubic code. commit 0851daa6e7db77e440188d774ef8b3236146bcb9 Author: Pierre Ossman Date: Wed Dec 3 19:17:36 2008 +0100 Fix macros so that they are safe to use with expressions as parameters. commit e04bcb0066781f61e97787856261e3380036d304 Author: Pierre Ossman Date: Wed Dec 3 19:16:03 2008 +0100 Fix node setup on R300 bicubic pixel shader. It was backwards and used the wrong base for sizes. commit 927aee181f3637bda1b761caf93fbc0652e1207b Author: Alex Deucher Date: Wed Dec 3 01:39:38 2008 -0500 Only flush IB when direct rendering is enabled commit ca74ebf8813b7fab8d08465ef9600f001c948e94 Author: Alex Deucher Date: Tue Dec 2 22:26:21 2008 -0500 move 3d state init after RADEON_SWITCH_TO_3D() commit fc079c5267baf431bbecee7744e484783d393152 Author: Dave Airlie Date: Tue Dec 2 22:11:57 2008 -0500 Don't mix 2D and 3D in the same IB fix from radeon-gem-cs commit 678693aabd0b4c1812ab44bf5abb4c8394b254bb Author: Dave Airlie Date: Tue Dec 2 22:02:21 2008 -0500 Stability fixes from radeon-gem-cs commit f231e4d9b2c683dc16f42cf09484fae926a892c1 Author: Dave Airlie Date: Wed Dec 3 11:39:04 2008 +1000 radeon: fix HDMI having DACs in some BIOSes commit fe73d9a7dfe8ec5c8f1a8dc08e14b4e138aa9276 Author: Bryce Harrington Date: Tue Dec 2 19:47:45 2008 -0500 Add another AGP quirk commit 6e0c48958c6a50a639368e369ce72d813256aee4 Author: Alex Deucher Date: Mon Dec 1 18:50:40 2008 -0500 Add quirk for r200 card with the primary dac wired to both ports refactor load detection setup as a byproduct should fix bug 18719 commit fa496d7b0397d9be57db90d0860928e9ced73cca Author: Pierre Ossman Date: Mon Dec 1 08:29:29 2008 +0100 Fix comments for R500 fragment shader to reflect the code. commit 0d95fca114194664d9ab612c90d3222912cf41ff Author: Corbin Simpson Date: Sat Aug 30 12:38:43 2008 -0700 Fix indentation on IS_R300_3D Xv code. commit 36a62b8c47def3f23a0b735875f59d23ed3c095a Author: Corbin Simpson Date: Sat Aug 30 11:15:20 2008 -0700 r3xx: Various Xv fixes. commit 01ed5462fad56f5b7bf867041d00443bdf81c653 Author: Corbin Simpson Date: Thu Aug 7 18:08:54 2008 -0700 Switch to Mesa-style 24-bit float packing. Seems like Mesa's got it right, so we should follow suit. commit 85bbe889045aa434f71a3eb0ba8153b7d2cc5023 Author: Maciej Cencora Date: Thu Aug 7 07:06:46 2008 -0700 Enable bicubic Xv on r3xx+. Still some buggies in the actual display, but looks pretty good. commit bf6263cff50bb85c19ff6dfebb739333fa8aca18 Author: Maciej Cencora Date: Thu Aug 7 07:00:36 2008 -0700 Add r3xx-specific bicubic filtering code. FP, RS, mostly, everything else is shared with r5xx. commit da021c36bbdf3bca31ee50ebe01cdb9495c09b36 Author: Dave Airlie Date: Sun Nov 30 18:44:24 2008 +1000 radeon_drm.h: remove kernel defines remove these we should update from an installed kernel copy not from the original kernel copy. commit 783cdb7374941bb1d2b63eea375fbf2f1b808cc3 Author: Dave Airlie Date: Thu Nov 27 15:29:06 2008 +1000 r100/r200: EXA misrenders dst == a8 + dst alpha use. Fedora BZ#469556 I've played with various dst and texture formats and rewritten large parts of this to no avail, so I'm punting for now. commit 2d7cfc421713286edd5121b56999246f9ae70286 Author: Eygene Ryabinkin Date: Tue Nov 25 13:25:33 2008 -0500 Catch unsubstituted macro for PCI region base access also fix up some warnings. commit af7690b9c300d37c3a0c51e27e0ad2ca009224a2 Author: Benjamin Herrenschmidt Date: Tue Nov 25 02:57:30 2008 -0500 [PATCH] radeon: Fix PCI usage of 32-bit driver on 64-bit platform The radeon driver is storing PCI addresses in unsigned long's which won't work well on 32-bit platforms with 64-bit physical address space such as PowerPC 4xx. This fixes it by using unsigned long long instead. commit 065938617c0feab17f4274a5350de02a692ba065 Author: Ramon van der Stelt Date: Tue Nov 25 02:23:46 2008 -0500 Interlaced mode fixes see bug 12626 commit 36a7dc6ea1e1929e986ab1159497c71521cb2f10 Author: Bryce Harrington Date: Tue Nov 25 01:04:37 2008 -0500 Additional AGP quirks bug 18693 commit 2acb8e4ed220fccb21b22a53c5142ab3a35d32ef Author: Alex Deucher Date: Tue Nov 25 15:07:09 2008 +1000 radeon: fixup shared DDC lines for some rv610 cards. Some cards share DDC between a HDMI and VGA output, and expect the driver to use load detect or EDID to figure it out. airlied- shipped in RHEL5 Signed-off-by: Dave Airlie commit b01e35168de40d192fd7a9ce6884b9c7419afbd4 Author: Alex Deucher Date: Mon Nov 24 21:06:42 2008 -0500 Fix up posted logic noticed by benh on IRC commit d7a03e93372b17d642b42f5490464616ae7c99c1 Author: Alex Deucher Date: Mon Nov 24 15:52:05 2008 -0500 Get hardcoded edid from the bios for servers that support it should fix bug 11300 commit 3858e31fa9d77d52a5cabb02f53f06385eab40f7 Author: Alex Deucher Date: Mon Nov 24 14:39:41 2008 -0500 Don't support rotation is accel is not available Fixes bug 18068 commit 3d27876d91ef69d71f17b6cf8c07c26bf12857b4 Author: Dave Airlie Date: Mon Nov 10 15:47:13 2008 +1000 radeon: always align dstPitch to 64 bytes for textured video bz# 18454 commit 6c8b352264540ccc4622a7c0b704ce452dcd707d Author: Dave Airlie Date: Wed Oct 29 15:53:57 2008 +1000 pciid: add HD3300 - 790GX chipset. RH BZ (#466706) commit 902eaf768142c6c7dcc487e10775027b84cd1f9a Author: Alex Deucher Date: Thu Nov 6 15:46:43 2008 -0500 Check for LVDS on all IGP chips - fixes bug 18395 commit 44abaa0ea8e5e3bbe833fa73e6d011618bb6d7e7 Author: Adam Jackson Date: Mon Nov 3 15:09:28 2008 -0500 Fix HDMI output setup on DIG1/DIG2. The only reliable way to detect an HDMI sink is to check for the appropriate EDID extension block, so this will only work right on servers with xf86DoEEDID(). RANDR 1.2 will call this internally for us if it exists, but pre-1.6 servers are out of luck. commit 937b7ac2a259cf504a19dcf62a58b1db1afb8eb9 Author: Bryce Harrington Date: Wed Oct 29 01:31:50 2008 -0400 Add AGP quirk table - set known good default agp modes for problematic chip/bridge combos - should fix bug 17360, others commit 67bc2ae7f227a2afedc8e699cf0458fa7960f301 Author: Julien Cristau Date: Sun Oct 26 16:05:04 2008 +0100 Bug#7148: Fix manpage formatting commit 98fdd78a1229584b922f816f331a45bfc178c961 Author: Dave Airlie Date: Tue Oct 21 18:36:22 2008 +1000 atombios: oops typo commit 763dff6c117a10b6a57ba1854c5b798359789e44 Author: Dave Airlie Date: Tue Oct 21 18:35:44 2008 +1000 atombios: set missing pixel clock commit 435cf7da68186f2601c4b888296117d4f652c625 Author: Alex Deucher Date: Wed Oct 15 10:52:14 2008 -0400 Add LCD dithering quirk for macbook pro fixes bug 17897. commit c0e6cb6d0eeef8f2ea60d840e1cd668fa92cd7f9 Author: Alex Deucher Date: Fri Oct 10 11:09:27 2008 -0400 Fix grey level dithering setup commit 9eb2b6cd28224f0cbbabf3df451696ae1a845b9c Author: Dave Airlie Date: Fri Oct 10 16:18:05 2008 +1000 radeon: hopefully fix plls for 30" monitors. Only do the HIGH trick on the DCE3 cards. Tested on rv610/630/770. commit 0975e007ec7933acf9cd8ad2f281313ef8d32ac9 Author: Dave Airlie Date: Thu Oct 9 17:16:28 2008 +1100 radeon: rename radeon_memory to radeon_legacy_memory. This is a setup patch for the kms/memory management code. commit d744dc013cf5ca3141c0fdf55e36d713fe9f53ba Author: Adam Jackson Date: Wed Oct 8 15:50:25 2008 -0400 Fix connector table mapping for lvtma/kaleidoscope/uniphy. Fixes DPMS on LVDS. commit dc795ba66a8c0eb2c3fdb86bd42dfc17e0aa3b6e Author: Alex Deucher Date: Tue Oct 7 12:32:47 2008 -0400 Fixups from last DFP/LCD refactor - fix DFP1 -> LCD1 - use _INDEX rather than _SUPPORT defs commit 4a9e8d9fe24278b56aef51677fd35289d01584a7 Author: Alex Deucher Date: Mon Oct 6 18:00:08 2008 -0400 set grey levels correctly for temporal dithering commit 5708624d1151877dd66a462d4a75fed6774604a7 Author: Alex Deucher Date: Mon Oct 6 15:11:56 2008 -0400 Turn coherent mode off by default on DVI commit a5c5ce96279d01eb519bfb92b94c06a58acb7f07 Author: Alex Deucher Date: Mon Oct 6 15:07:31 2008 -0400 Refactor atom LCD/DFP output setup Simplify the code, properly handle dithering, coherent mode, encoding, etc. Should fix bug 17897. commit f9826a5694b7adb6920eb5bdf45d840d8fb14d53 Author: Alex Deucher Date: Fri Oct 3 15:24:12 2008 -0400 Add support for DDC via atom commands for RV410 The atom calls use the hw i2c engine for DDC. For some reason, sw i2c doesn't seem to work on the VGA GPIO on RV410 chips, so we use atom in that case. This fixes the longstanding VGA DDC problems on RV410/M26 chips. commit 23c17c0121d43c2fd11bb5cfbaa4b02abac2b16d Author: Alex Deucher Date: Fri Oct 3 14:30:33 2008 -0400 man page updates Update render accel and page flipping information. fixes bug 17887. commit 4ac6e499089aec3c79af5dbede5fe631b105ce3d Author: Alex Deucher Date: Wed Oct 1 18:53:15 2008 -0400 proper fix for initial rotation The initial modeset was setting the MC regs, so just set them rather than the full modeset. commit 346228b20c69a965c9e7d67157f42c1d36a5b6c3 Author: Alex Deucher Date: Wed Oct 1 14:38:27 2008 -0400 Workaround to make initial rotation work Acceleration needs to be initialized before setting the mode for initial rotation to work. Changing the order in RADEONScreenInit() doesn't work because RADEONDRIKernelInit() hangs in the ioctl to initialize the CP if the mode is not set prior (even if the heads are turned off after setting the mode). The workaround is to set the modes twice, once before accel and once after. This needs to be looked into further. commit c359c2a31caf9f75b9fc6b6bcbc3e9dc1fe404ba Author: Michel Dänzer Date: Tue Sep 30 11:04:54 2008 +0200 Pass base offset into RADEONDisplayVideo() explicitly. This prevents the base offset from flipping back and forth if double buffering is enabled and the two buffers start on different sides of a 4 MB boundary. Should fix http://bugs.freedesktop.org/show_bug.cgi?id=17254 ; please don't reopen that bug report without attaching a log file captured after reproducing the problem with this fix. commit ba21d5ae7fbbf5828c44c41655aff8b182453e2e Author: Michel Dänzer Date: Tue Sep 30 11:03:04 2008 +0200 Update GEN_INT_CNTL register value after calling DRM modeset ioctl. Fixes sync-to-vblank hangs after mode switch with DRM vblank-rework. commit 3110646daf05fa09faaa70066cc8c3db1bb07cec Author: Michel Dänzer Date: Sun Sep 14 11:46:36 2008 +0200 Fix -Werror build. commit d82f2938f69402c641a1c8362fdc513419b27659 Author: Alex Deucher Date: Fri Sep 26 13:51:24 2008 -0400 atombios updates from upstream commit d0d58b39e49c5ce00bc8bd12f721ad8c7f554b91 Author: Alex Deucher Date: Wed Sep 24 11:54:34 2008 -0400 radeon: Further pll adjustments commit d100a6af8f828eb94f8ba6e8a96c24389b5cf46f Author: Alex Deucher Date: Fri Sep 19 14:04:59 2008 -0400 cleanup macbook quirk commit 1218e38c75351a20f7414ba6fcb3545689339442 Author: Alex Deucher Date: Fri Sep 19 13:52:07 2008 -0400 more macbook fixes commit 83e1f132965deadedda7a622184eb400cd4c120c Author: Alex Deucher Date: Fri Sep 19 09:36:59 2008 -0400 Fix copy/paste error in the last commit DVI-D -> DVI-I commit 4af825f7b13cba8c3b204e72a07cab5009331240 Author: Alex Deucher Date: Fri Sep 19 00:29:20 2008 -0400 radeon: Add quirk for macbook - should fix bug 17625 commit 38aa450fce6a91b35c191fd07112490a62cc29c6 Author: Alex Deucher Date: Tue Aug 26 21:50:23 2008 -0400 fix some fallout from the common allocator should fix bug 17317 commit a3cc1d7a421456186024c5c069e403d374a0f0b9 Author: Dave Airlie Date: Tue Aug 26 08:03:20 2008 +1000 radeon: fix powerpc build commit 6cebfe257f7ddad855ee743e4eb899bd6fac7f46 Author: Alex Deucher Date: Fri Jul 11 19:32:06 2008 -0400 Switch EXA path back to static cursor allocation pre-AVIVO cards have address limits for the cursor offset commit 4dff54a3c8d7c9f2d6ec50354ff0b92f1b7fcbdf Author: Alex Deucher Date: Fri Jul 11 17:28:03 2008 -0400 Switch cursors over to generic allocator commit 5b1978a4796bcc31ac2f01d303dc8f8f44323025 Author: Alex Deucher Date: Mon Aug 25 10:05:28 2008 -0400 Bicubic fixes from the last cherry-pick commit 7daba77ded1c718e93ae8c372a39a6e85228d513 Author: Alex Deucher Date: Fri Jul 11 02:02:38 2008 -0400 Convert randr, Xv to a common allocator commit 610fe1a937da78f4ac813ac919c158dde8f42442 Author: Alex Deucher Date: Thu Jul 10 22:47:35 2008 -0400 Switch to using radeon_drm.h from the drm modelled after Matthias' similar rhd change commit a6561f2ec673b38907f7181235386f32e60c32ba Author: Alex Deucher Date: Thu Jul 10 22:31:13 2008 -0400 Move DRI to a separate struct based on Matthias' similar work in rhd commit 75ef8dc214715d3c5c50996b293933842903ba65 Author: Egbert Eich Date: Thu Jul 10 21:49:55 2008 -0400 Cleanups from rhd port - remove unused vars - remove static exa render vars commit 71ad140fa11f3a504c38d6bddf40e3a3c0a20e60 Author: Alex Deucher Date: Thu Jul 10 21:24:16 2008 -0400 Move accel state to a separate struct commit 5b2e095c31b88d8495a4f86e6cb46b49fa4acd65 Author: Alex Deucher Date: Thu Jul 10 20:07:44 2008 -0400 Move CP into a separate struct commit 2145309230e36aee7758bd244deb1e72ada0c065 Author: Alex Deucher Date: Mon Aug 25 08:47:59 2008 -0400 match textured video macro names with other accel code OUT_VIDEO_REG() -> OUT_ACCEL_REG() etc. commit 01daef0f095fbbaee701d5fe97f3dd7838b5f915 Author: Alex Deucher Date: Mon Aug 25 08:26:16 2008 -0400 Additional cleanups and re-arragement following bicubic merge commit 0a51d08c24af040fe48690662b1a912acad51700 Author: Alex Deucher Date: Mon Aug 25 06:43:14 2008 -0400 Whitespace cleanup from bucubic merge commit c0170fef510b53a6ca2c6ea7a99119235229c929 Author: Maciej Cencora Date: Thu Aug 7 06:53:39 2008 -0700 Add needed FP registers, etc. for r3xx bicubic Xv. commit d9c38326cf70f57ab777ffdf9520b8cdea9d9cb6 Author: Dennis Kasprzyk Date: Tue Aug 5 18:45:38 2008 +0200 Fix typos. commit d38ceba62aa5cee76baa342ce7719a983a79f09e Author: Dennis Kasprzyk Date: Tue Aug 5 16:21:57 2008 +0200 Fix bicubic fp calculation. commit 6f9c7fde75edc0399559f975db9a6c4dc22714ae Author: Dennis Kasprzyk Date: Tue Aug 5 15:38:42 2008 +0200 Fixed bicubic fragment program comments. commit 48b09ca40ccb28b5584069316fd38786a78c1dd3 Author: Corbin Simpson Date: Sat Aug 2 02:36:21 2008 -0700 Switch from 32-bit floats to 16-bit half-floats. Massive bandwidth savings, or so I'm told. Yay? commit ebbb7fb634fcadf28ff99c1df2c3db89fd56932d Author: Corbin Simpson Date: Sat Aug 2 01:45:43 2008 -0700 Change floats to uint32_t hex. Useful for moving to 16-bit half-floats. commit 3b46162d8a90be3524cb513d42b9ad3d0bea45f5 Author: Dennis Kasprzyk Date: Fri Aug 1 15:24:01 2008 +0200 Move some ALU instructions after the TEX instructions, so we can do something usefull while we are waiting for the texture values. commit 2ecdec4bafc97212dde4d6908ee4ccf618adc0e1 Author: Dennis Kasprzyk Date: Fri Aug 1 04:03:12 2008 +0200 Another uneeded SEM_AQUIRE. commit e93b5d1b80d6203f63543b7b678e2f1d9221b5b3 Author: Dennis Kasprzyk Date: Fri Aug 1 03:00:26 2008 +0200 Smarter usage of the texture semaphore. commit 286f7aa18f19bd21b263701adab38b736dbeda0f Author: Corbin Simpson Date: Thu Jul 31 17:01:44 2008 -0700 Enable bicubic filtering for all r5xx HW. commit 242aa4f630b4c60aefa3c12dc459a4d4d0b334a0 Author: Dennis Kasprzyk Date: Fri Aug 1 01:11:28 2008 +0200 Remove one constant. commit 413eacb0538977b0b3c92df074d40510f4539abc Author: Dennis Kasprzyk Date: Fri Aug 1 00:52:09 2008 +0200 Heavy optimizations. commit a0c4a949cb49e5ac1e857aef08a8742b9f7b49da Author: Dennis Kasprzyk Date: Thu Jul 31 21:19:18 2008 +0200 Remove uneeded negations. commit abb2b2e757d92591ab9277824b9d9746ba98f875 Author: Dennis Kasprzyk Date: Thu Jul 31 20:31:03 2008 +0200 Implement LPR in one instruction. commit c370b74bec13194573348583c38adf710b880e79 Author: Dennis Kasprzyk Date: Thu Jul 31 19:50:49 2008 +0200 Set helper texture filter correctly. commit 5e85d5a5d0c50b29086ec0c219c8b52d25dbc2e9 Author: Corbin Simpson Date: Wed Jul 30 19:45:15 2008 -0700 Update bicubic tables. Now including the 2048x1 texture as well. commit 17e5e9573e59c3d82d51c261b9c5005f6aec7d43 Author: Corbin Simpson Date: Wed Jul 30 11:57:25 2008 -0700 Force R580-only for bicubic. Initial reading of docs suggest RV560 and RV570 can't handle it, but they're welcome to test. commit 83b52473d0e7102265918b07be053fcda17a14b4 Author: Corbin Simpson Date: Wed Jul 30 01:03:57 2008 -0700 Bump bicubic cutoff to R580. RV530 chipsets can't handle fullscreen bicubic... commit 69a4998d1286bcdd7bfe874cd5628bc1cc232bae Author: Corbin Simpson Date: Wed Jul 30 01:03:46 2008 -0700 Oops, made a mistake with vertices. commit a4ec30a677906ec2ff9824c7ddca586655f6d1a8 Author: Corbin Simpson Date: Wed Jul 30 00:54:32 2008 -0700 Merge upstream changes to vertices, and also add Xv attributes for textured video, including bicubic filtering. commit f3b81c7582aed307fa44e134ee161cd8a3158657 Author: Corbin Simpson Date: Mon Jul 28 19:50:10 2008 -0700 Fix constants. commit 7dbb7023ba023ec1a38be63af9c9f49e40222b7b Author: Corbin Simpson Date: Mon Jul 28 17:30:41 2008 -0700 Finally got the fragment program fully working for bicubic filtering on r5xx. commit 0e4dd73b9ebc6f608eeff945b4d463a00c02e07c Author: Corbin Simpson Date: Mon Jul 28 12:16:50 2008 -0700 More bicubic FP buggies. commit a87647e0c27e0950f4d0d8203a1242a994ad3419 Author: Dennis Kasprzyk Date: Sun Jul 27 10:43:01 2008 -0700 Fix texture size, texture filter, vertex offsets, etc. commit 232aa3e943fef4c4037b255c3b64a0aaff90ab5c Author: Corbin Simpson Date: Sat Jul 26 10:56:56 2008 -0700 Make vertices emit properly. *bangs head against wall* commit 8c84f67b93d926095633830aa8d95930a48b1c7b Author: Corbin Simpson Date: Sun Jul 20 14:25:44 2008 -0700 Try to get tex coords from the VAP to RS properly when bicubic filtering is enabled. I'm soo bad at this... :c commit a4a7d5f5967c51c394229de5eccaec44cfec8f50 Author: Corbin Simpson Date: Sat Jul 19 13:02:02 2008 -0700 Upload pixel shader to card for r5xx. This was ridiculous. Also it doesn't work yet... commit 20c1db2d7c110ab5c1117a57b169baa1ab070518 Author: Corbin Simpson Date: Fri Jul 18 13:48:08 2008 -0700 Upload bicubic filter to card. This was a LOT easier than I had feared, to be honest. commit a760e628134c6d7d42ec3c98118b6e5f6fcd3e7f Author: Corbin Simpson Date: Fri Jul 18 12:21:20 2008 -0700 Allocate memory for the bicubic filter texture. commit b6c9e2bb5365de82315c6814f915e57b0c4fa444 Author: Corbin Simpson Date: Fri Jul 18 11:24:14 2008 -0700 Fixed typos in the bicubic texture tables. Whoops, looks like I'm still asleep. commit ca51f4f37e1dbf53bf7ffc0e8f612e9609e11209 Author: Corbin Simpson Date: Fri Jul 18 11:06:34 2008 -0700 Add bicubic texture table, as well as the script used to (re)generate it. To regenerate, just run "python bicubic_table.py > bicubic_table.h". commit 1cf7a5494fa94e8d9f30f9b2905dfbe6d4faa445 Author: Bryce Harrington Date: Wed Aug 20 09:46:59 2008 -0400 radeon: Fix pasto in connector table setup for vga powerbooks fixes bug 17214 commit a55e85f742d1334bf88e4681e553f025d2de38df Author: Michel Dänzer Date: Thu Aug 14 15:21:51 2008 -0400 Make sure video offerlay offsets don't exceed the hardware limit of 128 MB. Always set the overlay base address such that the buffer offsets are as small as possible. This could still break in theory if the buffers were more than 128 MB apart, but in reality this can't happen ATM because we always allocate a single memory area for all buffers. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=16845 . commit 92ee21df344a989778e37369c7beb3904a00ead6 Author: Alex Deucher Date: Thu Aug 14 14:49:45 2008 -0400 PLL adjustments Seems higher dotclocks prefer a higher FB div. Someone with a lot of should try and find out where the div sweet spots are for various dotclock ranges. fixes bug 17125 commit 0d5e0347af4322713075193154b8a348de4a0b52 Author: Alex Deucher Date: Wed Aug 13 14:17:34 2008 -0400 Remove reset of 3D scissor registers when using the CP in the ddx They should only affect 3D and init3d() should take care of that case noticed by libv on IRC. commit 7e456e9c427d48151b166bcac08c3e8a8b180f01 Author: Dave Airlie Date: Tue Aug 12 08:18:30 2008 +1000 radeon: add 0x9441 for hd 4870 x2 thanks to Michael Larabel for testing commit 4dbdeea7c9316575fba26b41fd347452e42cdcf2 Author: Alex Deucher Date: Fri Aug 8 17:39:48 2008 -0400 Further cleanup and unification of i2c code - unify the ddc and i2c code - add gpio mask support for legacy chips - remove the magic gpio dance for ancient monitors (if you have an ancient monitor that ddc stops working on let me know). This should speed up DDC on legacy chips. -- radeon sw gpio i2c -- 4 sets of gpio registers for clk and data and corresponding bit masks mask - locks the gpio for use by sw get - reads the value off the gpio pad put - sets the gpio direction to output a - "other stuff" On legacy chips you clear them if you want to use a gpio for i2c. In some cases they are used for the output value when the gpio in the output state. commit 268c848130ec1770bb645a74197b6aca7fc95abc Author: Alex Deucher Date: Fri Aug 8 15:50:07 2008 -0400 Fix VT switching on M6 chips Some M6 chips have a faulty MEM_SIZE register that in some cases reports 0 on 8 MB cards. On EnterVT we check the MEM_SIZE reg as a check to see if the card is posted or not. Since this reg returns 0, the driver attempts to post the card which can lead to a hang. Switch this to check if either crtc is active as is done in the bios init code. fixes bug 13994 commit 33f88f7fc90d9d93fdcbba9ad59dd70a6596bc3f Author: Alex Deucher Date: Thu Aug 7 17:57:07 2008 -0400 RS4xx DDC fixes take 3 commit df0d1ef53100f0a19c5b5fdc349f5186c8d9bd87 Author: Alex Deucher Date: Wed Aug 6 19:13:56 2008 -0400 RS4xx: Fix up ddc gpio - I mixed up the regs previously commit 18429390440a829fb24ed3afd99ccf8278138496 Author: Alex Deucher Date: Wed Aug 6 00:35:15 2008 -0400 Remove un-needed dac check for single crtc cards Connector tables should be setup properly already and this check breaks systems with 2 DACs and 1 crtc like the es1000. commit 001c535687d8588873037ee5363d0a709f44b418 Author: Alex Deucher Date: Tue Aug 5 17:14:48 2008 -0400 IGP: fix typo in IGP quirk handling commit eb65ddf70d182b6457e1ef5ebb820456039e8f6d Author: Alex Deucher Date: Tue Aug 5 15:01:33 2008 -0400 IGP: attempt to get external TMDS working RS4xx chips have a tmds init table in the mobile info table commit 8b8990917809b9a35c6e9c1b9e3b12ff81c6dbb3 Author: Alex Deucher Date: Tue Aug 5 12:16:06 2008 -0400 IGP: Updated quirk handling - Hopefully finally fix DDC on RS4xx chips - RS3xx/RS4xx do not have internal TMDS - general quirk handling cleanup - we don't currently support mm gpio for external TMDS so return false. commit cb0deba5412a575d36f2f99377120b123506c946 Author: Calvin Fong Date: Mon Aug 4 02:04:15 2008 -0400 IGP: add support for NTSC tv-out on legacy IGP chips Patch from Calvin with some cleanups from me. No support for PAL yet. commit 942b18aca91819fa65d853cd15ffd1cd720cbd68 Author: Dave Airlie Date: Mon Aug 4 14:38:21 2008 +1000 radeon: make r600 use i2c table lookup for ddc. This may fix DDC on rv770 cards. commit 1f3eee3682f3598a303c9c3accfbe01b245cacf9 Author: Alex Deucher Date: Tue Jul 29 20:29:32 2008 -0400 Change prim types for exa and textured video to help avoid tearing - r1xx - switch from tri fan to rect list - r2xx/r3xx/r4xx/r5xx - switch from tri fan to quad list commit 5b5441f8cc119db0d1e03dd35bd06015a26270dd Author: Brice Goglin Date: Tue Jul 29 23:31:14 2008 +0200 Increase default GART size to 32MB on >=R300 commit 0a505297f09aefb1b4432176a263bfdf6f256f77 Author: Alex Deucher Date: Mon Jul 28 17:12:41 2008 -0400 Fix error in driver connector table for powerbook w/ vga commit d5799ac53c3e1b2ca1da97780b171a44060c3aad Author: Alex Deucher Date: Mon Jul 28 11:09:10 2008 -0400 Add quirk for oem x300 card - debian bug 492457 commit 64dbadddcf6d069c0472f37afeab89d3e31e937d Author: Owain Gordon Ainsworth Date: Mon Jul 28 10:40:58 2008 +1000 radeon: don't call ioctl unless DRI is initialised commit 1c5858484da4fb1c9bc3ac3b4d7a97863ab99730 Author: Alex Deucher Date: Mon Jul 21 23:47:45 2008 -0400 First pass at InitDispBandwidth() for AVIVO chips - support for LB allocation - MC priority bumps for display1/2 on RV515 variants and RS690 If you are having display underflow problems (flickering on sides of screen in high res modes, etc.) on RV515 or RS690 boards, try setting: Option "DisplayPriority" "HIGH" in your config. - still no support for full display watermark programming yet Something similar might be useful in rhd as well. commit b0378bb145c8a915c943bef7d17f2cdecfccc891 Author: Alex Deucher Date: Mon Jul 21 13:47:09 2008 -0400 Interlaced mode fixups for AVIVO chips commit c18fad622a3c4f9572051120d83af68b625b5686 Author: Alex Deucher Date: Mon Jul 21 10:36:48 2008 -0400 Clear display priority bits before resetting them commit dc231ff8e063313d2bcf5acccad67a9f8a7e3314 Author: Alex Deucher Date: Mon Jul 21 10:30:41 2008 -0400 Clean up legacy display watermark setup - makes crtc1 and crtc2 watermark setup independant. - fixes the case where only crtc2 is active commit f9034214f070fe3054cd9cefd7034252de234f38 Author: Michel Dänzer Date: Mon Jul 21 09:09:02 2008 +0200 Call DRM modeset ioctl after the IRQ has been initialized. This lets the DRM know it can safely disable the vblank interrupts. commit ecb6347a3d7071890600c98c2addef3a8ca260ee Author: Alex Deucher Date: Sat Jul 19 11:34:16 2008 -0400 Add oem quirk for external tmds setup on Dell Inspiron 8600 Noticed by fnord42 on IRC. commit df53d12a06fad41f00cff849458cb358ab5e2098 Author: Benjamin Herrenschmidt Date: Thu Jul 17 14:37:05 2008 +1000 Fix console switch on R500 This patch fixes the console switch for me on R5xx. There are two aspects to it: - Fix the ordering of avivo_restore() to better match what's happening in the driver & ATOM, properly locking/unlocking and only enabling the CRTCs after everything has been properly programmed. - Don't ASIC_INIT if the card has any CRTC enabled. This is the best I came up with for avoiding spurrious ASIC_INIT on cards that -are- POSTed but don't have the BIOS coming from c0000 on x86. The problem with spurrious ASIC_INIT is that we do it before we do RADEONSave(), so that screws up the console switch. Note that I think we also should save/restore the palette, I don't think we do. right now, it's a minor issue for me because I fixed offb to be able to set it on AVIVO's but it might still have to be done in the long run. Tested with a VGA analog setup on DACA and a DVI setup on TMDS 0. I haven't tested any other combo but that should get us going. Cheers, Ben. Signed-off-by: Dave Airlie commit e8c07270e1fc2ee455320370692aaf90abac2773 Author: Alex Deucher Date: Tue Jul 15 17:50:32 2008 -0400 ATOM: fix for r4xx cards with no VRAM_Usage tables fixes bug 15954 commit da41e71efd41907d9347a902720bce60b32550e5 Author: Alex Deucher Date: Mon Jul 14 13:21:38 2008 -0400 ATOM: Add support for UpdateCRTC_DoubleBufferRegisters cmd table locks/unlocks the crtc/grph/mode regs before updating the crtc commit a5e0cf13dc7ace6cf0e44e18b73b9a9266e740ab Author: Julien Cristau Date: Sun Jul 6 12:17:28 2008 +0200 Link with -lpciaccess and -ldrm if needed This makes sure the driver ends up with a DT_NEEDED reference to the libraries it's using. commit f8da849fd89322a54cc4d722767da755358eab70 Author: Michel Dänzer Date: Sun Jul 13 11:31:03 2008 +0200 Only declare local variable when it's used. commit a6db4dc65aec560f3b1f37ff73ec6b0bd8207295 Author: Dave Airlie Date: Sat Jul 12 18:47:07 2008 +1000 atombios: fix typo in mode conversion for panel commit 19a0d5879851eff23a3e7d5cdea55bd784051115 Author: Dave Airlie Date: Sat Jul 12 17:04:25 2008 +1000 atombios: use macro to get offset into table commit a9746114369d516072d841ec356ec3ba3d0be71a Author: Dave Airlie Date: Sat Jul 12 10:46:36 2008 +1000 pciid: add radeon HD3850. pci id from legume on #radeon commit ab14f725676e4d4e45278c64b03fe2d328a3e439 Author: Alex Deucher Date: Fri Jul 11 19:05:00 2008 -0400 R300: NUM_FPU adjustments for VAP_CNTL commit 810c28cc2660b73e03e4d27be97988fc5321a06f Author: Alex Deucher Date: Fri Jul 11 15:31:57 2008 -0400 Make sure cursor offsets are properly aligned when using EXA commit 7e67d0163579a44f104e8f354a929ac9b33e4c21 Author: Alex Deucher Date: Fri Jul 11 14:30:17 2008 -0400 Fix cursor with multi-head and rotation commit 9086d008fb8c3cde0633b90ce19ffbf4eded388d Author: Alex Deucher Date: Tue Jul 8 09:57:04 2008 -0400 Add quirk for Falcon NW laptop commit 61f82ace0210251beb0bcc492218a75a193e1deb Author: Benjamin Herrenschmidt Date: Tue Jul 8 21:58:43 2008 +1000 atombios: add support for other endians. This is a cleaned up (in as much as atombios can be..) of benh's patch. airlied - removed benh's debugging for now, it might need to be put back later.. commit b4d1a47b5c6eafda5e274398eebe2701b030f22e Author: Dave Airlie Date: Tue Jul 8 11:09:01 2008 +1000 rv770 initial support adds pci ids and one register from AMD code commit 7ae4cec8cc8c90aee5dc4fa7abcce22321d4f4eb Author: Roland Scheidegger Date: Mon Jul 7 14:39:47 2008 -0400 clamp tex coords (r100/r200) for textured video fixes bug 14904 commit 879f9a37856642b337e3c0233e38fd5443338eef Author: Alex Deucher Date: Fri Jul 4 13:54:49 2008 -0400 Revert "rotate: fix rotation in conf file." This reverts commit 22c6ca0d5d226c725ba448e5db63fdba9e32332c. There seems to be an ordering issue in that causes a nasty hang if the DRI is enabled. This needs more investigation. commit 22c6ca0d5d226c725ba448e5db63fdba9e32332c Author: Dave Airlie Date: Thu Jul 3 20:14:59 2008 +1000 rotate: fix rotation in conf file. need to set modes after init accel architecture reported-by: Christoph Bartoschek commit ce1a3edd52b647744cfa4433301befb437d211bb Author: Dave Airlie Date: Thu Jul 3 20:05:54 2008 +1000 radeon: drop all use of CPMode. We never test the other codepath and I don't think I've ever recommended it for anyone. commit c037b4ce8769ad840a257e22b1e4ad58b8ed96fa Author: Wolke Liu Date: Tue Jul 1 10:45:39 2008 -0400 Add pci id for FireMV 2400 commit 72992668ca96717bf69bcea95a5deeaf7c57e826 Author: Alex Deucher Date: Mon Jun 30 14:09:09 2008 -0400 RS4xx: enable the DRI by default on all variants Some RS4xx chips had the DRI disabled by default. With the recent drm and ddx changes these chips have been reported to work now with the DRI. commit 0378c8ed88c829f09b5c6d51314325eaf2685fdb Author: Michel Dänzer Date: Sat Jun 28 14:06:45 2008 +0200 Restore versioning of interface for Mesa DRI driver. This doesn't have anything to do with the package version. commit cfaa23d925e3c062cf87ea844566ac11ea02d69e Author: Alex Deucher Date: Fri Jun 27 20:36:54 2008 -0400 RADEON: IGP VGA fixes take 2 It seems only RS300/350/400/480 are missing the primary dac See bug 15708 commit 31c27ffcb3c4c5334cf726ecd4e293a678b2a1ea Author: Alex Deucher Date: Fri Jun 27 20:29:04 2008 -0400 Revert "IGP: attempt to fix VGA on IGP chips" This reverts commit e78e8a21b4040cd7f1983c241c860d9209398396. commit af79a77e6d8206b18bba97cf4e0770921dc439a7 Author: Brice Goglin Date: Fri Jun 27 17:09:13 2008 +0200 use PACKAGE_VERSION_* for radeon version now radeon shows verion 6.9.0 instead of 4.3.0. RADEON_VERSION_MAJOR_TILED is dropped from ddxDriverMajorVersion since RADEON_VERSION_MAJOR is bigger now. commit c83fbdfa076c107012b7dfbbfbbb2feede00542b Author: Alex Deucher Date: Thu Jun 26 19:48:45 2008 -0400 Bump for 6.9.0 release commit 32e1d1daf4f68ea37624afaa2bc1ea7742e1163b Author: Brad Smith Date: Thu Jun 26 10:22:03 2008 -0400 RADEON: sys/endian.h needs sys/types.h on BSDs See bug 16512 commit dca522355a9039eca6efaba3b36397b246800f94 Author: Brad Smith Date: Thu Jun 26 10:13:59 2008 -0400 RADEON: fix copy/paste error in accel code commit f4292e110105910d0c19bf2db28e2682b27af2c7 Author: Dave Airlie Date: Fri Jun 20 15:31:43 2008 +1000 Revert "Revert "ATOM: disable TV-out for now"" Oops I really didn't mean to do this, I was testing something and it slipped past. This reverts commit dd18caa4b2efc430eaae0c4362b65641f9bef440. commit bb1cfcbfbc1ace1f257fc3bf6401501f1a6da827 Author: Alex Deucher Date: Wed Jun 25 15:50:16 2008 -0400 RADEON: adjustments to Jerome's last commit - Flush caches and wait for idle after drawing - Make sure 3D is idle too (after composite or textured video) commit 07be302f6dba61dd15918963fae66502230c74b7 Merge: 8c9b8de 5245974 Author: Jerome Glisse Date: Wed Jun 25 10:30:45 2008 +0200 Merge branch 'master' of git://anongit.freedesktop.org/xorg/driver/xf86-video-ati commit 8c9b8de0373797cba6f0a27e6b6f461e1070fef9 Author: Jerome Glisse Date: Wed Jun 25 10:28:26 2008 +0200 radeon: flush & wait for 2d & dma idle after 2d blit This should help to avoid 2d & 3d engine to step on each other dma transaction. commit 52459745ec05de88adbc087e9566fe6d97ef424b Author: Dave Airlie Date: Wed Jun 25 17:09:11 2008 +1000 ati: hopefully fix byteswap mess for those other OSes. commit 67a6ac0001bc9d062aa426384a11a41fa7a1c09a Author: Alex Deucher Date: Tue Jun 24 21:06:37 2008 -0400 bump for rc release commit bd68507d2d66e03d8bcde5f6e7ea9b2dbfe8b8a0 Author: Alex Deucher Date: Tue Jun 24 20:59:58 2008 -0400 RADEON: warning fix commit 8e534d69c9b19fc085f7c5ca9e18f5ea04f6fc12 Author: Alex Deucher Date: Tue Jun 24 20:08:35 2008 -0400 RADEON: cleanups - fix some warnings - RS400 and RS480 are separate families now (update default tmds and dac2 tables) commit e78e8a21b4040cd7f1983c241c860d9209398396 Author: Alex Deucher Date: Tue Jun 24 19:53:28 2008 -0400 IGP: attempt to fix VGA on IGP chips VGA has never worked on some IGP chips. While the chip only has one DAC, it appears to use a mix of Primary DAC and TVDAC controls. See bug 15708 commit faa4b4b8dbe9b8a452cfa60d53874350bb04e0cb Author: Jiří PaleÄek Date: Tue Jun 24 19:20:50 2008 -0400 RADEON: remove extraneous line from new pll code commit 72feaa37ea07620f5f2ead438dbc72a1c8883cd3 Author: Jiří PaleÄek Date: Mon Jun 23 15:53:58 2008 -0400 RADEON: PLL tweaks Patch from Jiří PaleÄek (see debian bug 465864) with some tweaks by me. - abort rather than programming bad dividers if no pll dividers can be found - improve the pll selection algorithm - in general, prefer lower ref dividers I've tested this patch on a wide variety of chips (r1xx-r6xx) and clocks. commit 9c2f909ea437a63a408d2398ecabe0b378dbb982 Author: Alex Deucher Date: Mon Jun 23 10:38:15 2008 -0400 RADEON: adjust randr crtc/output prepare/commit ordering This fixes some occasional mode change problems with multiple heads active. It seems radeons generally like to turn on the whole output/crtc setup in one shot. commit aea9bf75cf0774afd3e65fcf3fd3851f5fb21ca3 Author: Alex Deucher Date: Sat Jun 21 10:57:05 2008 -0400 0x1002 0x5657 is actually RV410 See bug 14289 com_bios_scratch.diff commit 38ce8a984f96056b7345bcc06505ba27e0e6d5b4 Author: Dave Airlie Date: Fri Jun 20 14:16:22 2008 +1000 legacy: use entity MMIO for dpms as this can crossover between zaphod infos commit 1a7d9bc53512b0a5240176c949e6abf1ae2fb1fd Author: Dave Airlie Date: Fri Jun 20 14:14:21 2008 +1000 atombios: use MMIO from the entity not the info commit ef624b88903b1a87ef5b6388e18291f75776b93d Author: Alex Deucher Date: Thu Jun 19 18:20:52 2008 -0400 RADEON: fix read past the end of an array commit cfe814a481d8cf2005d738a0ca9782f1ed4177f5 Author: Dave Airlie Date: Fri Jun 20 07:51:27 2008 +1000 r600: don't add fb offset here to make shadowfb work. discovered on irc with wpwrak. commit 5b323a2cbbc412b6dd4e782438b64ee996558d05 Merge: dd18caa eed2415 Author: Dave Airlie Date: Fri Jun 20 07:49:16 2008 +1000 Merge branch 'master' of ssh://git.freedesktop.org/git/xorg/driver/xf86-video-ati commit eed241553748125e902c44dcc8cf8e0605be071b Author: Alex Deucher Date: Tue Jun 17 17:42:31 2008 -0400 radeon: X_ERROR -> X_WARNING for num gb pipes This just means your drm is old, not fatal or anything commit dd18caa4b2efc430eaae0c4362b65641f9bef440 Author: Dave Airlie Date: Sat Jun 14 18:37:56 2008 +1000 Revert "ATOM: disable TV-out for now" This reverts commit effa245914823371e052cd9aa1143a02350891e7. commit b416e97a1f16ef700ba1aaca317dee82b7a3cf64 Author: Alex Deucher Date: Fri Jun 13 02:21:31 2008 -0400 RADEON: man page updates commit 88ce87d79069662de28ecb3c10c140919927d584 Author: Alex Deucher Date: Thu Jun 12 15:10:47 2008 -0400 Bump for 6.9.0rc1 release commit ada41723fdc8cbeeda12bb4ae2d16e8d1ba215de Author: Alex Deucher Date: Wed Jun 11 14:29:36 2008 -0400 R3xx: use DSTCACHE_CTLSTAT rather than RB2D_DSTCACHE_CTLSTAT According to the hw guys, you should use DSTCACHE_CTLSTAT to flush the 2D dst cache rather than RB2D_DSTCACHE_CTLSTAT. commit 3d70c398afa0831387af81559453b77c218a54f9 Author: Dave Airlie Date: Thu Jun 12 06:18:26 2008 +1000 atom: fix another endian define commit f1794e4c34d801371461afed37e7bb7d1fc79305 Author: Dave Airlie Date: Thu Jun 12 06:10:30 2008 +1000 atom: fixup includes in cd operations to get correct endian bits in atombios.h commit f29976d12cc2020cd80c90fa3fd4b25c031559ba Author: Dave Airlie Date: Wed Jun 11 19:33:02 2008 +1000 radeon: add lots of endian bits into the atombios parser commit 09eb220971b5d2bfd7d1ff6f552060967a133152 Author: Dave Airlie Date: Wed Jun 11 19:21:22 2008 +1000 atombios: fixup atombios bitfields for endianness reverse the bits for big endian commit b80a3e85bf9dbfc8d96a745876d75d38bea97c1a Author: Alex Deucher Date: Mon Jun 9 20:29:47 2008 -0400 R5xx: fix RADEONSetAgpBase() for R5xx chips Is there any reason to still do this in the ddx? Maybe real old drms? commit ab7936708dfbee4d3676262f8010e001b73a4a38 Author: Alex Deucher Date: Mon Jun 9 17:05:04 2008 -0400 RS4xx: RC410 chips are actually RS400 based commit a54ca3c699c103e2e3df87101dca929a3eee4377 Author: Dave Airlie Date: Thu Jun 5 18:31:53 2008 +1000 radeon: fix typo in memory calcs noticed by ghepeu on irc. commit 6e4e6d2a8f29f92efc219dca24ea31d1f37d5a0f Author: Alex Deucher Date: Tue Jun 3 20:32:20 2008 -0400 RADEON: minor cleanups commit 9d3afbf5fa4110928a9f965df2733c79db92ea99 Author: Michel Dänzer Date: Tue Jun 3 11:40:49 2008 +0200 Call DRM_IOCTL_MODESET_CTL ioctl to avoid problems with DRM post vblank-rework. commit effa245914823371e052cd9aa1143a02350891e7 Author: Alex Deucher Date: Sun Jun 1 20:47:50 2008 -0400 ATOM: disable TV-out for now It only sort of works in NTSC mode and isn't handled correctly in all cases yet. Until we sort out the remaining details leave it disabled. See bugs: 16186, 16178, 16185 commit 8504c6b0e40477ee544ad7f5366d569bdc53d6f0 Author: Alex Deucher Date: Fri May 30 11:19:03 2008 -0400 RADEON: update RADEONGetVRAMType() for newer chips commit 7cb695a329a9b543ad61af08c2d7d6eaf56de35e Author: Alex Deucher Date: Fri May 30 10:10:56 2008 -0400 RADEON: add Int10 option On some radeons you can't read the bios without initializing int10. On ATOM-based secondary cards, intitializing int10 tends to hang the card. commit 714b2c63ec1c4a1410a6d521c03e9d1f90937c01 Author: Alex Deucher Date: Thu May 29 02:31:00 2008 -0400 RADEON: don't enable legacy bios table based init yet Needs more work and we need to figure out how best to decide when to use it. commit e20b08525a64888287ec4a369d8f7dbde95c655d Author: Alex Deucher Date: Wed May 28 14:43:47 2008 -0400 ATOM: fail of we are not able to get a bios image commit d4fa17b426b0cafac3184b2ea9b675e2ff154ee9 Author: Alex Deucher Date: Wed May 28 09:50:02 2008 -0400 R1xx: Gamma fixes for overlay commit c7e6a50f60a04bbbf1c1ddbf4738a5f75c94f950 Author: Alex Deucher Date: Wed May 28 09:05:19 2008 -0400 RADEON: only attempt to read vbios from legacy ISA space if it's primary commit faea008806802ec0e045754ec1eca492ebae320e Author: Alex Deucher Date: Tue May 27 18:36:01 2008 -0400 R3/4/5xx: use get_param to get the num_gb_pipes from the drm commit 965a5dbcd9dc4bf1cdd7f2bbdec15e9733b2e090 Author: Alex Deucher Date: Tue May 27 16:48:41 2008 -0400 RADEON: improve support for secondary cards this should fix bugs 16115, 16035 commit 5f951a5573f0c7572230c9aa4d3f75d67f91ed71 Author: Alex Deucher Date: Wed May 21 00:35:14 2008 -0400 ATOM: remove duplicate code commit edce33e87fb79a540d8c285f205d4c3f2c2bc9f4 Author: Dave Airlie Date: Wed May 28 06:43:40 2008 +1000 radeon: fix surface access on avivo chips. This should fix VT switch on vesafb commit 307bd65a25ee425d8359dd30572b002ce2338f91 Author: Michael Babej Date: Tue May 27 19:13:49 2008 +1000 r600: fix vt switch issue RH BZ 441492 commit bf48c9eb8ec592515be9d1732d60283af715674d Author: Dave Airlie Date: Sat May 24 11:51:20 2008 +1000 atombios: for LVDS set use ref div as per legacy commit 04500c8419b1aeaeac7968492b82e1d7cad1d05b Author: Alan Coopersmith Date: Tue May 20 20:34:31 2008 -0700 Strip ^M's from src/AtomBios/includes/ObjectID.h commit 521a0488d1c414209c3534dc242000faa332a441 Author: Alan Coopersmith Date: Tue May 20 20:33:37 2008 -0700 On non-gcc compilers, use C99's __func__ instead of gcc's __FUNCTION__ commit b7c80d0c86646105d2bce5d4d59ba6c45aa7cafc Author: Tobias Diedrich Date: Tue May 20 19:16:54 2008 -0400 R200/R300: fix gamma setup for overlay More pending. See bug 16001 commit 69423482e2e94637142a9ba675589a1449a346a8 Author: Alex Deucher Date: Tue May 20 18:57:13 2008 -0400 RADEON: cleanup connection detection and remove duplicate code commit 55e4469f59c82bb5762673de5f3f27d18b0bd9a3 Author: Alex Deucher Date: Tue May 20 17:46:58 2008 -0400 RADEON: enable cloning on multi-crtc cards commit 12f185634071980041aaac6265d89708b181b215 Author: Alex Deucher Date: Tue May 20 16:05:41 2008 -0400 ATOM: Ignore invalid connector entries commit 19e97f74e39fc2b35727708ac429de33d0b70162 Author: Egbert Eich Date: Tue May 20 11:16:15 2008 +0200 Change RMX code to follow the programming algorithm suggested by ATI. ATI provides the following algorithm to calculate the RMX scaling ratios in its programming specs: when RMX_AUTO_RATIO_HORZ_INC set to 1,Horizontal auto ratio result trucated, and then incremented by 1. Horz_Ratio = ( ((Active display width in characters (including overscan) + 1) / (Panel width in characters)) x 4096 + 1 ) else Horz_Ratio = ( ((Active display width in characters (including overscan)) / (Panel width in characters)) x 4096 + 1 ) when RMX_AUTO_RATIO_VERT_INC set to 1, Vertical auto ratio result trucated, and then incremented by 1. Vert_Ration = ( ((Active display width in characters (including overscan) + 1) / (Panel width in characters)) x 4096 + 1) else Vert_Ration = ( ((Active display width in characters (including overscan)) / (Panel width in characters)) x 4096 + 1) This patch implements this behavor. Additionally it avoids the use of floats. commit a4f3d0088ba763ed8eab1d331959b5ecde8262e8 Author: Alex Deucher Date: Tue May 20 11:42:53 2008 -0400 R3/4/5xx: fixup logic from last commit Spotted by otaylor and MrCooper commit 130e55738047f2a073bcc47e3e1400f7b694a81b Author: Alex Deucher Date: Tue May 20 11:32:42 2008 -0400 R3/4/5xx: fix EXA rotation xrandr uses PictOpSrc for rotation which we were falling back on since render semanties require alpha=0 for REPEAT_NONE when there is no alpha channel and there is a transform. If the dst has no alpha channel we should be ok I think. Otayler and I discussed this on IRC. the more general fix would be to clip the dst to the src and mask for bounded ops like in/add/over in the pixel exact transform case. commit cc9f510770700228e5d597c872e926a4e99bd950 Author: Corbin Simpson Date: Wed May 14 16:49:01 2008 -0400 RADEON: missing stdint.h includes commit 71fa57f871dba03260dba2180ce1dab44048ac1a Author: Alex Deucher Date: Wed May 14 13:36:38 2008 -0400 Add RS600 support commit 582c1a1b2c7b1032e9f9f54ca36100c57f580c5c Author: Alex Deucher Date: Tue May 13 20:50:25 2008 -0400 RS4xx: Split out RS400 and RS480 as separate families RS400 (intel based IGP) and RS480 (AMD based IGP) have different MC setups and need to be handled differently commit 708e7c98f636738fbcc47a597bc94b309a4dc1c4 Author: Michel Dänzer Date: Tue May 13 11:00:38 2008 +0200 Reinstate CARD* types that are part of external interfaces. The compiler pointed this out... commit 908b7b940e3ef296836bc94680ebb8ab67650e31 Author: Matt Turner Date: Mon May 12 12:06:33 2008 -0400 Replace CARD{8,16,32} with uint{8,16,32}_t As has been done with xf86-video-intel, replace all CARD* datatypes with uint*_t datatypes available from stdint.h. commit 87e66ce76430890ab4939ffcd42f72b9288eb598 Author: Avi Rozen Date: Mon May 12 08:33:38 2008 -0400 RADEON: fix lockup on start see debian bug 480312 commit 94bf8f01bd43cb103fffecfe04d04a214f892baf Author: Dave Airlie Date: Mon May 12 20:02:51 2008 +1000 radeon: fix set_cursor_colours remove fb offset commit 1d0f1d31e2ed1d91ee87cb3e02ce48c8c07aa418 Author: Dave Airlie Date: Mon May 12 15:44:35 2008 +1000 radeon: rs485 vs rs485m.. mobile? non-mobile? bi? So it appears we have in the wild two chipsets with the same PCI ID (0x1002:0x5974) that are mobile and non-mobile. the RH bug references is a desktop system. The Dell Vostro 1100 also has this chipset with LVDS bits. commit 25e0c3945a51ae8c14b3a847ec75a256e1397f24 Author: Alex Deucher Date: Mon May 12 10:28:33 2008 +1000 radeon: add initial support for cloning outputs. (single-CRTC cards only) airlied - This code was originally written by Alex, and I've modified it to only run on single-CRTC cards for now until we can test it some more. commit 94405eb1c9e4e0ababc6aef03b753d6ed9eb7838 Author: Alex Deucher Date: Fri May 9 05:28:44 2008 -0400 RADEON: fixup ifdef from last commit commit 18e20bc22a55ecfee9798c01079d7b24d19f0051 Author: Alex Deucher Date: Thu May 8 08:45:51 2008 -0400 RADEON: disable MMIO paths for EXA composite/texvid on IGP/R5xx The MMIO paths eventually lead to a hang on r5xx/IGP. I haven't been able to find out why yet. commit c3532268875fd24e6519bea2fb1b814d612bbdb4 Author: Dave Airlie Date: Wed May 7 02:37:18 2008 +1000 radeon: fix zaphod EXA with texture video commit ffc437f3606ab8ceba1ff152e4bb08988a58b54c Author: Dave Airlie Date: Wed May 7 02:30:28 2008 +1000 avivo: fix zaphod cursor in theory commit e36ef14e3a1087e1fe41baa26ade2937f396001f Author: Dave Airlie Date: Wed May 7 01:39:28 2008 +1000 radeon: fix textured-xv on zaphod commit 8fc19bee27c0f151d2ab3354f6ac0992b358436d Author: Dave Airlie Date: Wed May 7 01:38:24 2008 +1000 radeon: zaphod: fix render accel for EXA commit fc41b9042a5220a8419cc7b69ca3850cae6b903c Author: Dave Airlie Date: Wed May 7 01:32:23 2008 +1000 radeon: fix EXA pixmap offset on zaphod commit 4568cb820d567c6909a4be956d7e79b91232535e Author: Dave Airlie Date: Wed May 7 01:19:39 2008 +1000 radeon: zaphod fixes for pciaccess not allowing multiple MMIO maps commit ca81fa086b21633a7fd926833fb6d1d4fa080646 Author: Dave Airlie Date: Wed May 7 01:12:01 2008 +1000 radeon: zaphod fix for cursor on second head We don't need to add fbOffset here as the mmap we have of the framebuffer starts half way. commit 24b60c8965f6a0b3f0c2bb1e7236b4d6642c5918 Author: Julien Cristau Date: Fri May 2 15:30:45 2008 -0400 Add a test for __GLIBC__ to CD_Common_Types.h. Atombios redefines the standard types but the definitions conflict with the ones from glibc (causes build failures on GNU/Hurd and GNU/kFreeBSD). commit f051359ac09c6b9416e39b9ca7d9dc0880aa1557 Author: thegraze Date: Fri May 2 14:02:16 2008 -0400 ATOM: add support for DragonFlyBSD commit 3d469cbc3225d890a895dac7cbc1ab7e08054b48 Author: Alex Deucher Date: Wed Apr 30 18:33:04 2008 -0400 RADEON: lock the cursors when updating this should fix occasional corruption seen when updating the cursor. commit 445b71021843665ba32f37b2ce5c9d2857c07cc7 Author: Alex Deucher Date: Tue Apr 29 21:01:41 2008 -0400 RADEON: assorted fixes - free rotate pixmaps on VT switch - save crtc/output status so we only turn on crtcs/outputs if they are off - show/hide cursors when changing modes commit 070cce5255a5c311f9d8b85ec54bd56655014933 Author: Stephan Wolf Date: Mon Apr 28 11:26:37 2008 -0400 R3xx+: further fix for IGP chips see bug 15538 commit 211e0041c7fc2df494b77428553943a2b526ee4e Author: Alex Deucher Date: Sun Apr 27 21:08:00 2008 -0400 IGP: fix EXA composite corruption commit 656b06bdde129ca4fc370f5a2cf7311c9179b0ff Author: Alex Deucher Date: Sun Apr 27 20:20:49 2008 -0400 RADEON: remove duplicate register define Also add more bit defs to wait_until register commit 8a9820a3aa49bc667f90ac291a27e4d7b4ae38b3 Author: Alex Deucher Date: Sun Apr 27 19:02:22 2008 -0400 RADEON: decrease crtc/output verbosity commit c5d62fa0e8f52c3264ff9db3ff10cdf5a806bfc0 Author: Owen Taylor Date: Thu Apr 17 13:14:53 2008 +0200 Emulate repeats by drawing in tiles When we can't turn on hardware repeats, because the texture is non-power-of-two, or has padding at the ends of lines, try to draw the image in multiple tiles rather than falling back to software. (We can only do this when there is no transform.) commit eeb7b74bb6c813b0e3afa4b704f6ffb0d0aab92b Author: Owen Taylor Date: Thu Apr 17 13:14:25 2008 +0200 Turn on wrapping when repeating on R100 + R200 Actually enable repeats for R100 and R200. This corresponds to a R300 change made in the patch in: http://bugs.freedesktop.org/show_bug.cgi?id=15333 commit e511f39dfef503006cf249b9f6934091eaade9b5 Author: Alex Deucher Date: Thu Apr 17 05:04:34 2008 -0400 R300+: move more common code into init3d() - pre-load r3xx tex instructions - setup RS instructions in init3d() commit 99435b7c18d931ea620044d0fdb4cc93dfcc6331 Author: Owen Taylor Date: Thu Apr 17 02:46:11 2008 -0400 Radeon: Omit mask coordinates Adapted from Owen's patch on bug 15546 This fixes the slowness with aatext on r300 and may speed up other chips marginally. commit 37614e1db9a595fbe8a21d7a045895e11d272db9 Author: Alex Deucher Date: Tue Apr 15 09:48:16 2008 -0400 fix up some things from the last commit commit 1286fe5ce1c77453d57817b9b26b1bdb32ca7bc8 Author: Alex Deucher Date: Mon Apr 14 20:02:14 2008 -0400 R300+: properly setup vap_cntl this fixes tcl/pvs on RV515 among other things commit f72a4b805db26f10f69330b88459cbeae661189b Author: Alex Deucher Date: Mon Apr 14 14:10:40 2008 -0400 EXA: Don't wait for 3D idle after each Composite() wait in CompositeDone() instead commit 4cd4acf1092aeb696b086a382a033aee471d2de9 Author: Alex Deucher Date: Mon Apr 14 11:50:59 2008 -0400 R300: move more common code to init3d() commit 3c523c9a07402e17dff588fad842224c57e98223 Author: Alex Deucher Date: Mon Apr 14 11:21:42 2008 -0400 R3xx+: 3D engine documentation and minor cleanups - document the R300 exa/textured video code - minor cleanups of textured video code to clarify meaning commit ce025bbb2496d4de94b8d4ac450c64441b64ee04 Author: Alex Deucher Date: Sat Apr 12 21:22:03 2008 -0400 R300+: consolidate some tcl/non-tcl paths - Move more code to init3d() - MMIO textured video seems more reliable now on newer chips commit 11b54a319c7c9dd52e3fb13372697059dafe1cd3 Author: Alex Deucher Date: Sat Apr 12 16:50:22 2008 -0400 R3xx+: fix XAA + textured video on non-TCL path commit dd15a2f5906725116b8cd9954243099055e88e37 Author: Alex Deucher Date: Sat Apr 12 16:49:03 2008 -0400 R3xx+: more fixes to 2D/3D engine init commit f3e68d4b7afd2e23675bf6361c496814c9cb4b94 Author: Alex Deucher Date: Fri Apr 11 10:59:07 2008 -0400 Fix exa glyph corruption on newer chips commit b59686d6427cbf8b35e36b020cbbc6a0c5149b22 Author: Alex Deucher Date: Fri Apr 11 10:15:25 2008 -0400 R300+: pre-load vertex programs in init3D() commit acc5833a35ad6c29a57f659607afb27eebdc2ea5 Author: Alex Deucher Date: Thu Apr 10 17:52:52 2008 -0400 R3xx+: consolidate more tcl code commit 6f8f75bd19ef1919c0291141675be2d0e29b3251 Author: Alex Deucher Date: Thu Apr 10 17:08:50 2008 -0400 R3xx+: consolidate some common 3D code commit 4b9234e1c4f7c7f419cb4245d64f3f9756c98bb6 Author: Alex Deucher Date: Thu Apr 10 16:58:22 2008 -0400 R3xx+: tcl wip commit 865c463e3afb4759758f569132be8bf1386da5cc Author: Alex Deucher Date: Thu Apr 10 16:51:04 2008 -0400 R300+: textured video tcl cleanup commit 79c8d4ca36a1c3e5fe759d4ccc379c36af8f1676 Author: Alex Deucher Date: Thu Apr 10 16:28:18 2008 -0400 RADEON: cleanup commit c4821a287d29a65f3bcb7d60dc72ec13c0384008 Author: Alex Deucher Date: Thu Apr 10 16:20:17 2008 -0400 Revert "R3xx/R5xx: move more VAP, etc. state setup into common init3d() function" This reverts commit 305a3310963a5dd07b3495015b06aa8c7c4e6b02. Conflicts: src/radeon_commonfuncs.c src/radeon_exa_render.c src/radeon_textured_videofuncs.c commit 0032c80bf30bab189204e3e6929e18a19d753138 Author: Alex Deucher Date: Thu Apr 10 14:35:00 2008 -0400 RADEON: store tcl status in driver rec commit 9e2ffe66d106abe34a670d2edc9905ed62c485e8 Author: Alex Deucher Date: Thu Apr 10 14:24:04 2008 -0400 R3xx+: use the right register for engine flush commit e1a9f26c2d2cbca9ad159e723ec95b95be1ef349 Author: Alex Deucher Date: Thu Apr 10 14:12:15 2008 -0400 R3xx+: minor textured video fixes - set shader output swizzling correctly - flush the right cache register on r3xx+ commit d79040906cd25bd494feb5901f465bbd050aa923 Author: Alex Deucher Date: Thu Apr 10 13:59:58 2008 -0400 R3xx+: EXA/textured video fixes - get pipe config based on GB_PIPE_SELECT where applicable (adapted from a similar patch from Dave) - only flush the dst cache after submitting vertices, freeing the cache lines stalls the pipe - no need to wait for 3D idle after submitting vertices - fix PURGE_CACHE() and PURGE_ZCACHE() for r3xx+ - fix depth 16 with EXA composite commit 0a96173cc38e506728d4c3f2dd383ba56e856578 Author: Michel Dänzer Date: Mon Apr 7 18:15:34 2008 +0200 Increase default CP timeout. Helps avoid spurious timeouts causing problems, see http://bugs.freedesktop.org/show_bug.cgi?id=15203 . commit 255fbf465f5e7db2609a5a151bfa810249db52a0 Author: Owen W. Taylor Date: Thu Apr 3 02:25:41 2008 -0400 Fix rendering of transformed sources for REPEAT_NONE with EXA on >= R300. Use the border color when possible, otherwise fall back to software. commit bc0407e53237d7968808110bc0243076377acf6e Author: Alex Deucher Date: Fri Apr 4 18:40:16 2008 -0400 ATOMBIOS: Add support for DynamicClocks option This patch adds support for dynamic clock gating and static power management using the atom command tables. In some cases the bios may already set this up during post, so YMMV. I was only able to test on desktop cards, so I haven't tested to see how much (if any) power this saves or how it affects the thermal footprint. commit 5f5e21bb50555c56bd371576074c28c929307ff1 Author: Alex Deucher Date: Fri Apr 4 14:29:45 2008 -0400 RADEON: warning fixes commit c8e9a973aaded24aad567a0e36d0c78a05d6b2fd Author: Alex Deucher Date: Fri Apr 4 14:26:19 2008 -0400 RADEON: add some quirks commit 091963a635b79884afe77c026eabb48972fbe175 Author: Alex Deucher Date: Thu Apr 3 22:35:16 2008 -0400 Minor cleanup commit 950e9860643c20acde0eca4e4ff26baacc1f2b69 Author: Alex Deucher Date: Thu Apr 3 22:11:48 2008 -0400 Revert "RADEON: memmap rework 1" This reverts commit dd8ee1b444f4b973a1e0fadca5f943f2162b5e94. Conflicts: src/radeon.h src/radeon_driver.c This rework seems to have caused more trouble than it was worth. commit 88a1fe4a94c5d11aff22734b21c89890e4428cd5 Author: Alex Deucher Date: Thu Apr 3 22:04:43 2008 -0400 Revert "RADEON: remove driver rec copies of mc info, use save rec directly" This reverts commit be0858a84fbdf74c0b844f462933a221d48c707d. Conflicts: src/radeon_driver.c commit c40a7aa3989576a8144213e2f31b892d21df8686 Author: Owen W. Taylor Date: Thu Apr 3 14:43:55 2008 -0400 R3xx/R5xx: Fix pitch and clamp mode for repeating textures - We can always use TXPITCH on a R300 even when repeating, (previous check for pitch matching width was also wrong) - Fix clamp mode for repeating textures to be WRAP commit a8593482c1f2e0f2dbac06c2e5325ba8c83ed9ff Author: Dave Airlie Date: Wed Apr 2 09:58:05 2008 +1000 atombios: fix the dual-head hopefully. tested on r600 with DVI and VGA commit 61d883d116fab3e9b513432d65e705afc5bb39f1 Author: Dave Airlie Date: Wed Apr 2 09:57:38 2008 +1000 Revert "Revert "atombios: fixup the width/height to use the mode values not the scrn ones"" This reverts commit fc9af578997b6f22ee8b17e83f37d98689291b0e. I see your revert and raise you one... commit fc9af578997b6f22ee8b17e83f37d98689291b0e Author: Alex Deucher Date: Tue Apr 1 09:25:45 2008 -0400 Revert "atombios: fixup the width/height to use the mode values not the scrn ones" This reverts commit c2b1c8b706a6c7c1fd0af80091958473133d54e7. These registers hold surface size. Using the mode values breaks dualhead. commit 959509dd54de053f526b534e379a46934127231f Author: Dave Airlie Date: Mon Mar 31 14:29:44 2008 +1000 radeon: use correct DDC interfaces so quirks get applied Radeon seemed to mess up applying certain quirks, hopefully this will fix it. commit 18f5f1cd2f52afed89fc11ade0920f3dfea87306 Author: Dave Airlie Date: Mon Mar 31 14:11:49 2008 +1000 radeon: split quirks into separate function and new quirk for IBM RN50 Add a connector table quirk for the IBM RN50. commit c2b1c8b706a6c7c1fd0af80091958473133d54e7 Author: Dave Airlie Date: Sun Mar 30 11:44:14 2008 +1000 atombios: fixup the width/height to use the mode values not the scrn ones this fixes it properly, legacy appears to be okay. commit c5edea3d8c9254d3a21e390b8309e39e4c9635db Author: Dave Airlie Date: Sun Mar 30 11:11:22 2008 +1000 r500/r600: fix rotation to fill screen I'm not 100% sure this is the correct fix (maybe we shouldn't be using scrn virtualX/Y)... this will fix it for now until I get more time. commit 9c62c820ba45ebc14d5f36f5d7885863800b6adb Author: Michel Dänzer Date: Fri Mar 28 12:37:29 2008 +0100 Include config.h, so FGL_LINUX can actually be defined when it's tested... commit a00d9260a85b94a522c442aee24bc5ea4dc31c5c Author: Alex Deucher Date: Thu Mar 27 20:03:13 2008 -0400 RADEON: fix lid issues on AVIVO chips for real this time :) commit f0e89c09074b2c7e641f73692bb39b0bf68eb49c Author: Alex Deucher Date: Thu Mar 27 19:15:18 2008 -0400 Revert "RADEON: attempt to fix lid issues" This reverts commit 9b4473c1d830b88866dd22e8174a07195bd6fcf4. This doesn't help. commit 1442d396b938049b83f009a78ddabe2bf85641b6 Author: Dave Airlie Date: Thu Mar 27 14:02:51 2008 +1000 radeon: size bios to max of bar vs 64k. reported by dwmw2: rhbz 438299 commit de2f609ff0004ef8b74727bfebc2c74fb91205ea Author: Alex Deucher Date: Wed Mar 26 18:35:21 2008 -0400 AVIVO: no need to call PreinitXv() on AVIVO chips as they have no overlay commit 75884c257bc2bcfa5b498a77d4c403f09face036 Author: Alex Deucher Date: Wed Mar 26 18:16:47 2008 -0400 XAA: update message about render so as to not confuse users commit 9b4473c1d830b88866dd22e8174a07195bd6fcf4 Author: Alex Deucher Date: Wed Mar 26 18:01:29 2008 -0400 RADEON: attempt to fix lid issues On some laptops the bios attempts to re-program the chip when a lid event comes in. This should hopefully prevent the bios from doing that. commit 8b144830fe9b4a0cee4745023de5e7d387070f60 Author: Alex Deucher Date: Tue Mar 25 01:15:05 2008 -0400 RV250: disable textured video due to HW bug The YUV->RGB conversion in the texture engine is broken on RV250 so the colors come out wrong. commit 1789f11ab91633d3928f8b71988d51ff44bda9d1 Author: Alex Deucher Date: Mon Mar 24 19:03:30 2008 -0400 R3xx/R5xx: flush PVS state before enabling pvs-bypass commit 305a3310963a5dd07b3495015b06aa8c7c4e6b02 Author: Alex Deucher Date: Mon Mar 24 14:25:03 2008 -0400 R3xx/R5xx: move more VAP, etc. state setup into common init3d() function Also some minor code cleanups commit 399b1d405e602c62d6deebea6d7e1f38886cd8e2 Author: Alex Deucher Date: Mon Mar 24 13:04:57 2008 -0400 R3xx/R5xx: use non VAP/TCP for textured video Just extra state to emit. commit cd77ec18f32a7b36acb655c927bbfd7044019f97 Author: Dave Airlie Date: Mon Mar 24 18:42:21 2008 +1000 r300: don't bother with VAP/TCL for render. We just send more data to the card to process per transaction, without getting any actual gains, as we already pre-compute the vertices without needing any clipping or transforms from the card. Perhaps some stuff could be done on-card, but so far the code is a lot faster if we avoid sending this extra info. pre: 150000 glyphs/sec post: 185000 glyphs/sec commit 301c6739b88676a0c78fc72194e993f894b8dc28 Author: Alex Deucher Date: Sun Mar 23 11:14:02 2008 -0400 RS4xx: Revert back to previous fifo settings for now Setup of these registers needs more investigation. commit 9bea60b3eb378de5e1d44cc02a2763f4feae7882 Author: Alex Deucher Date: Sat Mar 22 11:46:15 2008 -0400 RS4xx: more work on disp/disp2 fifo setup commit 90f11c3986c28daa7b600b9662da145af325d264 Author: Alex Deucher Date: Sat Mar 22 11:29:51 2008 -0400 RS4xx: missed this on the last commit. commit 6d5066a451017a2683addc9e2496987626795dda Author: Alex Deucher Date: Fri Mar 21 16:21:54 2008 -0400 RS4xx: attempt to set up disp/disp2 fifos correctly If you have an XPRESS chip, please test!!! commit fb1cffac05ae20c8365b25a2042b0ae961880faf Author: Alex Deucher Date: Fri Mar 21 15:24:36 2008 -0400 RS4xx: attempt to fix TMDS/DVO support XPRESS chips added a second set of FP control registers. I don't have the hw to test however. commit 5e3b21284482df9974c9a58f248f0100def2bb0c Author: Alex Deucher Date: Wed Mar 19 19:15:05 2008 -0400 Disable the setting of HARDWARE_CURSOR_BIT_ORDER_MSBFIRST See bug 11796 commit 17cd42ed31814ba329a6a68edd0d75390a7da40e Author: Matt Turner Date: Wed Mar 19 18:17:10 2008 -0400 Enable BSR in Log2 functions This patch edits RADEONLog2 and ATILog2 to use the x86 BSR instruction instead of looping through bits. It should provide a somewhat of a speed increase in this function on x86 and AMD64 architectures. Note: the BSR instruction was added with the 80386 CPU and is therefore not compatible with earlier CPUs, though I highly doubt it's even possible to use a 286 in conjunction with a Radeon. The inline assembly also works with Intel's compiler (icc). commit c83827b4d2b6f03c54429e757a756eb99ff8be6b Author: Paulo Cesar Pereira de Andrade Date: Wed Mar 19 17:58:34 2008 -0400 [PATCH] Compile warning fixes. Minor changes to avoid declarations mixed with code. Ansified functions with empty prototype to specify they don't receive arguments. Added some prototypes to radeon.h, and major reorder on radeon.h adding prototypes in alphabetical order and specifying to file that defines it. commit bed9754ad21d6c0a7f61067b04ba31c430a7cecb Merge: 55e446b f71ac0e Author: Alex Deucher Date: Wed Mar 19 16:06:41 2008 -0400 Merge branch 'master' of ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati into r3xx-render commit 55e446b5bc091e6c7b3c2e9ae20b45130555c246 Author: Alex Deucher Date: Wed Mar 19 13:15:32 2008 -0400 R3xx/R5xx: Make sure to clamp the output of the FS commit b6aa4279cbe68cc8e4523795e9714fb798b62d98 Author: Alex Deucher Date: Wed Mar 19 12:45:01 2008 -0400 R5xx: bump textured video limits to 4096 commit 4a445a3e8c4c5ecd9d4ef8daa26906c3ceaa94a1 Author: Alex Deucher Date: Wed Mar 19 12:31:51 2008 -0400 RADEON: add new macros to distinguish between R3xx and R5xx 3D commit 85d0c9e8d22ccc72bec87b3fd44da5d7609293e0 Author: Alex Deucher Date: Wed Mar 19 12:07:33 2008 -0400 RADEON: fixed textured video with XAA and tiling commit f5951db7b3522e0fe6af7f46a170c9c9a60a9bff Author: Alex Deucher Date: Wed Mar 19 12:01:50 2008 -0400 RV515: fix textured video and EXA Composite There seems to be an issue with the PVS setup on RV515, but bypassing it seems to work fine. commit 13573879fe56368ad06234712b677c23fabc56c6 Author: Dave Airlie Date: Wed Mar 19 15:06:47 2008 +1000 r500: make it work from startup. I'm not sure why this worked or what is going wrong here, really the VAP internal architecture escapes me :) commit d331dd64d644a18ec99a2136cd0943b5edca1f03 Author: Alex Deucher Date: Tue Mar 18 19:44:26 2008 -0400 R3xx/R5xx: remove extra return after last commit commit bc34df7a9c35cdd38c49d5c22471f3f487a33d6e Author: Alex Deucher Date: Tue Mar 18 19:39:47 2008 -0400 R3xx/R5xx: switch an ErrorF() to RADEONFALLBACK() commit 6f03f8fe0ecf4181dcf125049cf63bece0451fb2 Author: Alex Deucher Date: Tue Mar 18 19:36:05 2008 -0400 R3xx: we only use 2 temps, not 3 commit 8bb71ab4a3eb4fb6ef7f709e87c8df387cb70ee3 Author: Tilman Sauerbeck Date: Tue Mar 18 14:36:08 2008 -0400 R3xx/R5xx: fix up a8-src-something_with_colors commit c362591d9b496df30668543158e4de44de742dc3 Author: Alex Deucher Date: Tue Mar 18 11:15:17 2008 -0400 R3xx/R5xx: remove some cruft commit 89fe6d2c7d7471e6088558130f6e49f46c31dd47 Author: Dave Airlie Date: Tue Mar 18 09:43:43 2008 -0400 R5xx: fix typ in r5xx render accel This gets render working on r5xx commit 79b40ebcd8dedfc83e484c1024beeeaccc6124f3 Author: Alex Deucher Date: Tue Mar 18 02:46:49 2008 -0400 R5xx: first pass at render support (untested) commit 71292c8f193230255d1d980c2e996bb01d04fab6 Author: Alex Deucher Date: Tue Mar 18 00:45:37 2008 -0400 R5xx: bump tex/dst limits to 4096 commit 30b52f8aa6a471455284f59b5b27252743892b13 Author: Alex Deucher Date: Mon Mar 17 23:20:10 2008 -0400 R3xx/R5xx: whitespace cleanup and cruft removal commit 9c9f1b538ed710c3066775fba0a8e936b63087b1 Author: Alex Deucher Date: Mon Mar 17 23:01:37 2008 -0400 R3xx: get masks working and cleanup RS offset was wrong for mask texture commit ef94febd74f8ee63081b61e42f093a5a2b8fbf1e Author: Alex Deucher Date: Mon Mar 17 22:27:19 2008 -0400 R3xx: minor adjustments commit f71ac0e40b9d950bcb3bba42a75d41f45b6ed1bf Author: Alban Browaeys Date: Mon Mar 17 20:48:48 2008 -0400 RADEON: Revert to old behavior when resetting the memmap on VT switch Not sure why this needs to be done twice. Should fix bug 14980 Probably needs more investigation. commit bedbbf196dc97ee5142e7dfae16fb6f317fca5a7 Author: Alex Deucher Date: Mon Mar 17 20:16:25 2008 -0400 R3xx: some progress commit af0e626c132de2dd9958fec657fcc85d4c0fe5e1 Author: Alex Deucher Date: Mon Mar 17 18:07:12 2008 -0400 R3xx: fix errant w commit 29ea5bfc0eb3194e2454fc3ee863df54f0300880 Author: Alex Deucher Date: Mon Mar 17 16:41:57 2008 -0400 RADEON: fix typo in RADEONAdjustMemMapRegisters() commit ab317e85c5ab1a249a510c34aeb3a908be1a66fc Author: Alex Deucher Date: Mon Mar 17 15:28:09 2008 -0400 RADEON: make sure var is initialized properly in RADEONAdjustMemMapRegisters() commit 208d307227e15f37a6af5194398ed23266ff743a Author: Dave Airlie Date: Sun Mar 16 19:39:23 2008 +1000 radeon: the 0x5974 appears to be a mobility chip... After debugging with partymola on #radeon, adding this allowed his Dell Vostro 1000 to work properly commit 9bc7c2ec4048e1677547c1d60c51ccb954f7589a Author: Alex Deucher Date: Fri Mar 14 20:12:22 2008 -0400 R3xx: odds and ends... still not working. - swizzle US output for BGR formats - no need to write to temps in ALU ops, write to output only - flush the PVS before updating commit 96bea7906c4706fcd57a9cd8f1ce3feab6ac676d Author: Alex Deucher Date: Fri Mar 14 15:59:36 2008 -0400 R3xx: theoretical support for component alpha masks are still broken so... commit cffe3dcc8991cd7c457a9c1a9f41055aa9ea3436 Author: Alex Deucher Date: Fri Mar 14 14:37:43 2008 -0400 R3xx: VS WIP commit b73f52a50dfd6ff8d92f04d6b510c39582c6ac67 Author: Alex Deucher Date: Fri Mar 14 14:20:49 2008 -0400 R3xx/R5xx: enable VS for mask texture commit 569a14ca9be1e18fe9921edc816ac3dc32d6cca7 Author: Alex Deucher Date: Fri Mar 14 13:32:12 2008 -0400 R3xx/R5xx: Fix magic numbers in vertex shaders commit 4878997529601d62e257aa1c9112bd460561de73 Author: Alex Deucher Date: Thu Mar 13 21:23:40 2008 -0400 R3xx: make sure to set the FS code size correctly commit 22f46b88ef05afb6a6b6d70007ac4980a446430e Author: Alex Deucher Date: Thu Mar 13 20:25:33 2008 -0400 R3xx: attempt to setup the rasterizer properly for mask texture Not working yet commit 081fc9e892fa3d2e07b7db65b2e2719646255463 Author: Alex Deucher Date: Thu Mar 13 18:38:26 2008 -0400 R3xx: more mask work commit 2bf0236c03538ace3ce6d0e68f0829fc47d1385b Author: Alex Deucher Date: Thu Mar 13 18:32:00 2008 -0400 R3xx: enable composite for non-mask cases commit 74286ba41302107d2fc626fee2181f7c4bc18164 Author: Alex Deucher Date: Thu Mar 13 18:25:32 2008 -0400 R3xx: add basic mask support commit a2bbe10d866567911b68f222b4758624bfe9bf84 Author: Alex Deucher Date: Thu Mar 13 18:16:53 2008 -0400 R300: setup source selects and output swizzling commit b9974ecce7d1932595226004858b08a7a6b188dc Author: Alex Deucher Date: Thu Mar 13 17:35:38 2008 -0400 R3xx: set the texture id and add some register info commit 0ef700b7da5e554a0d0d166f3fde85ff45c9eb1f Author: Alex Deucher Date: Thu Mar 13 17:02:25 2008 -0400 R3xx/R5xx: enable blending commit b35c09a597c93a1d9f06ef0091c96822b0653f98 Author: Dave Airlie Date: Thu Mar 13 18:42:29 2008 +1000 xv: fixup XAA on r500 textured video the XAA area should never end up tiled. This may break with nooffscreen pixmaps commit d4446461c3630caff166456c351ace34f57cc119 Author: Matt Turner Date: Tue Mar 11 21:20:53 2008 -0400 Properly fix uninitialized variables warnings According to commit 9fd13e6773371c82b9799a5bda7c96ffa5cafe8c to xf86-video-intel by Kristian Høgsberg, there is a better way to fix the possibly initialized variables warnings. This patch will use Kristian's fix. commit 20adfd7390d9b1f100e0c4a14f175377b8335c82 Author: Alex Deucher Date: Tue Mar 11 20:09:35 2008 -0400 RADEON: enable output attributes that require a modeset immediately This should fix bug 14915 commit 53ba7f5771b0b53fb0d3bc29d64bdd3813756d10 Author: Alex Deucher Date: Tue Mar 11 19:12:40 2008 -0400 RADEON: fix vblank interrupts after VT switch or suspend/resume commit e946c097f0438afbea6f3dd37ee39d67d415708c Author: Matt Turner Date: Tue Mar 11 19:07:58 2008 -0400 [PATCH] Fix a few warnings commit 8e160508520c0a24ca90aad182f296461ca0d9b6 Author: Alex Deucher Date: Tue Mar 11 18:11:13 2008 -0400 DCE3: add support for PCIEPHY (untested) commit fbded88a2925f9f049936dad0736721e7b84a6ee Author: Alex Deucher Date: Tue Mar 11 14:10:31 2008 -0400 ATOM: remove some cruft commit 3263f6e4a410281d620c288a92bb4521f7b6fc06 Author: Alex Deucher Date: Tue Mar 11 14:05:48 2008 -0400 DCE3: enable DPMS on DIG ports commit eb90e235b58c94f3d4d75394725ab2fe246a42ff Author: Alex Deucher Date: Tue Mar 11 13:53:54 2008 -0400 DCE3: adjust PLL for DCE3 chips this fixes stability issues on digital outputs and certain modes. commit 552615ccc5360baafb8bb41698c1ca27816fd4b2 Author: Alex Deucher Date: Tue Mar 11 13:38:29 2008 -0400 ATOMBIOS: enable load detection by default on both DACs Load detection is reliable with atom, so enable it by default on both DACA and DACB, rather than just DACA. commit 78b10487cf222c96f8944ba25e2ea970506b3535 Author: Alex Deucher Date: Tue Mar 11 13:16:00 2008 -0400 DCE3: add output attribute to enable/disable coherent mode Enabled by default. The TMDS transmitter can be programmed slightly differently depending on the chips in the panel. If you have problems with tmds on a particular panel, try disabling it. commit d20be31c46fbec623af4c3628a7c603ceacf500f Author: Alex Deucher Date: Mon Mar 10 21:05:43 2008 -0400 RV550: MC setup is like RV515 not RV530 commit 38606b08b68842fbcc81c233009c1117269f3be9 Author: Matthieu Herrb Date: Sat Mar 8 23:22:59 2008 +0100 Makefile.am: nuke RCS Id commit 9d710ee1a44cf2f3a948fbdbe17ef09521cbe744 Author: Alex Deucher Date: Fri Mar 7 15:09:14 2008 -0500 AVIVO: clean up some unused variables commit c28c30c9f3d7bfebfd56a5c982c96f0090982054 Author: Alex Deucher Date: Fri Mar 7 14:10:49 2008 -0500 RADEON: Fix crash in last commit commit c3a3635865e380c784a226c8ead069d4716d6b75 Author: Dave Airlie Date: Thu Mar 6 20:17:45 2008 -0500 RADEON: fix tiling/interlaced interaction with randr 1.2 commit df1b94dc4eb1f35b636dbf2ec0ab1c2da9937c0d Author: Alex Deucher Date: Thu Mar 6 19:22:08 2008 -0500 DCE3: Ignore outputs with DIN connectors for now commit cb2dc19387c7b6494c47c76d683cf38a48700768 Author: Alex Deucher Date: Thu Mar 6 18:33:12 2008 -0500 AVIVO: fix typo from a previous commit Leave tv dpms hook disabled or you may get bad interactions with the shared DAC commit 77355de48057e5e7e0d5b3f3cf5a7a92220a53b1 Author: Alex Deucher Date: Thu Mar 6 17:46:00 2008 -0500 AVIVO: don't add outputs for invalid connectors commit 600dbe080997a01ceaf6be86723189d518bc1281 Merge: 594743a 5b7875d Author: Alex Deucher Date: Thu Mar 6 17:31:37 2008 -0500 Merge branch 'master' of ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati commit 594743a99811a8b0f391412892414fcd158eeb56 Author: Alex Deucher Date: Thu Mar 6 17:30:21 2008 -0500 AVIVO: fix up memsize detection for IGP chips commit 5b7875d0cbfbdbcd1515c4e942d30de298b49dff Author: Doug Chapman Date: Thu Mar 6 14:31:06 2008 -0500 Bug #14826: Fix a bogus check around xf86SetOperatingState. commit 651fe23f4c650ed91843dec48db24e18e8b91219 Merge: 3de2dc8 766f464 Author: Adam Jackson Date: Thu Mar 6 14:28:27 2008 -0500 Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-ati commit 41171c25cd235bafad26bcbabced16ead4b8c54b Author: Alex Deucher Date: Thu Mar 6 14:05:18 2008 -0500 DCE3.0: add support for crtc memreq table commit 766f464dfdfccadef23e4232f2bce5db22195513 Author: Alex Deucher Date: Thu Mar 6 13:35:43 2008 -0500 RADEON: take 2 on proper pragma pack support for bsds See bug 14594. Based on suggestion by Henry Zhao commit a842ce9ca6494e724a7828cead9b61c9ef02b6aa Author: Alex Deucher Date: Thu Mar 6 12:32:18 2008 -0500 DCE3.0: Minor fixups commit 8a1ba374033591c725a78923aa30829e4de2a5ae Author: Alex Deucher Date: Thu Mar 6 09:53:51 2008 -0500 RADEON: option to override TVDAC adj values from bios with driver defaults If you have a washed out image on the tv dac, try this option. Option "DefaultTVDACAdj" "TRUE" commit 0ed48f8f651a28e189f9fee8c6b593da0178d21c Author: Alex Deucher Date: Wed Mar 5 18:41:01 2008 -0500 AVIVO: Initial support for DCE 3.0 using atombios DACs are working well, DIG support (DVI, HDMI, LVDS, etc.) still has some issues. commit 2901e99f1942842856cd39c1dcc8b22f3cf7d9e3 Author: Alex Deucher Date: Wed Mar 5 10:40:06 2008 -0500 RADEON: fix fetching of dac2 adj values from newer bios tables commit 74eb981287d76836327830bd51272f605a07e0cc Author: Alex Deucher Date: Mon Mar 3 12:02:44 2008 -0500 ATOMBIOS: fix atombios parser support on *bsd bsd requires a different pragma pack than Linux. See bug 14594. commit f7769ea86e265f347eb58c517ccb5ef8b35eec27 Author: Paulo Cesar Pereira de Andrade Date: Sun Mar 2 14:49:21 2008 -0500 [PATCH] Ensure symbols used by other modules are visible. The xf86-video-ati drivers are one of the cases where LoaderSymbol is widely used in some obscure ways. This patch fixes the problem, and allows compiling with -fvisibility=hidden. commit a4398ac3ad77216f2c8aa628425bef5f2912a0a9 Author: Alex Deucher Date: Sat Mar 1 18:52:26 2008 -0500 RS6xx: change isIGP checks to CHIP_FAMILY_RS690 these paths are only relevant on RS6xx chips commit 67d4d04836c05293b844bc505f303cfb04c0f8a4 Author: Alex Deucher Date: Sat Mar 1 18:33:18 2008 -0500 RADEON: use xf86SetDesiredModes() in screeninit and enterVT this should restore the proper output state on VT switches commit be0858a84fbdf74c0b844f462933a221d48c707d Author: Maciej Cencora Date: Sat Mar 1 18:11:58 2008 -0500 RADEON: remove driver rec copies of mc info, use save rec directly info->mc_* were used and the immediately copied into info->ModeReg ones. Just use the ModeReg copies directly. commit dd8ee1b444f4b973a1e0fadca5f943f2162b5e94 Author: Alex Deucher Date: Sat Mar 1 16:23:51 2008 -0500 RADEON: memmap rework 1 Don't restore memmap regs on every mode switch. Just do memmap save/restore/setup on server start and VT switch. commit 1f6a23000001f3d1c21b5c04f94714a8caa7aa8b Author: Alex Deucher Date: Sat Mar 1 15:53:42 2008 -0500 RADEON: only restore legacy dac regs on legacy radeons commit dee6cef8e62d0651c00319e03eea92940fd24aa4 Author: Alex Deucher Date: Sat Mar 1 14:39:32 2008 -0500 RS4xx: enable exa render accel and textured video RS6xx paths seem to work fine on RS4xx commit 129f737efe4e8d1a368e7db4b063bdcd9339cb09 Author: Alex Deucher Date: Sat Mar 1 14:32:30 2008 -0500 AVIVO: save/restore regs by block Save/Restore the entire block for each output. This should fix VT switch problems. commit b069aadaa63a95d7a71b5cfbab83577b49501094 Author: Alex Deucher Date: Fri Feb 29 22:36:02 2008 -0500 AVIVO: LVDS panels need dithering enabled Fixes bug 14760 commit fe87bdee815372b4b4d7d4c705e34681625b90f2 Author: Alex Deucher Date: Fri Feb 29 13:10:13 2008 -0500 AVIVO: disable pageflipping on avivo chips until we have proper drm support commit fb3678c7f511d539a51cd090cb8b5041d7d2ba26 Author: Alex Deucher Date: Fri Feb 29 13:01:21 2008 -0500 R5xx: fix register count when sending fragment program for textured video commit a66d37d1a896ec934989592457c2beff8e6f1639 Author: Alex Deucher Date: Fri Feb 29 04:07:05 2008 -0500 fix off-by-one in last commit commit e56062960be0c8d3947861dd5e0691fce6516b99 Author: Alex Deucher Date: Thu Feb 28 19:16:39 2008 -0500 AVIVO: save/restore scaler regs commit ae1c39a9b3e666404d0931679c9078c2e125a8bc Author: Alex Deucher Date: Thu Feb 28 18:53:55 2008 -0500 RS6xx: rework output parsing Turns out it's not as complex as I originially thought. IGP chips just have non-standard GPIO entires for DDC. commit d8d6c9fe4ae7e1ab67dd041a251e901d97c29ed6 Author: Alex Deucher Date: Thu Feb 28 17:01:14 2008 -0500 RS6xx: fix typos in previous commit Noted by Maciej Cencora on IRC commit 46547ae8bdbc5c10f1fd028b95ec4c5c31a5b318 Author: Alex Deucher Date: Thu Feb 28 14:29:30 2008 -0500 AVIVO: disable dithering on DFPs This should fix the color banding some people have noticed. Also save/restore DDIA regs on RS6xx commit 72a53d6f20ac29b3baddb7d8af04f19b76d2e04f Author: Michel Dänzer Date: Thu Feb 28 17:38:04 2008 +0100 Handle EXA coordinate limits more cleverly. Generally set the 2D engine limits, and only enforce the 3D engine limits in the CheckComposite hook. This should still prevent useless migration of pixmaps the 3D engine can't handle but allows for basic acceleration of bigger ones. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=14708 . commit 5249f450a2487475a95531603cc8668db2c21c33 Author: Michel Dänzer Date: Thu Feb 28 12:23:58 2008 +0100 Fix 16 bit packed YUV XVideo playback on big endian systems with DRI disabled. http://bugs.freedesktop.org/show_bug.cgi?id=14668 commit e40d75fd8b2aece9dae8076fac822a4a83025fb2 Author: Alex Deucher Date: Wed Feb 27 22:53:10 2008 -0500 R500: fragment program clean up and magic number conversion commit 140dadba36b2191f0e18e41dd987785abd5f55d2 Author: Alex Deucher Date: Wed Feb 27 22:21:12 2008 -0500 R300: fix up magic numbers in fragment program commit e521476bb5e2dfabc93747e43eb911a8a101357e Author: Alex Deucher Date: Wed Feb 27 21:26:55 2008 -0500 R300/R400: bump up the clip limits for textured video This allows up to 2560x2560 (hw limit) commit 10db46f11d7e1c055c9ad6034c65ad163dad17dc Author: Alex Deucher Date: Wed Feb 27 15:28:50 2008 -0500 AVIVO: make sure we select the right LUT for each crtc commit ea944f38dcfd871b27345698afea1cb986ecb049 Author: Alex Deucher Date: Wed Feb 27 14:37:52 2008 -0500 R300+: update RADEONCP_REFRESH() to reflect new location of scissor regs commit b865faf95666e2172c3eec143f77fe9c524e4983 Author: Alex Deucher Date: Wed Feb 27 14:05:44 2008 -0500 R100/R200: move r100/r200 specific 3D setup into appropriate blocks R3xx+ doesn't have these regs. commit ee485ee0fc550414cd39cdb8fd2769fe0bc996a8 Author: George Sapountzis Date: Wed Feb 27 18:41:31 2008 +0200 radeon: pass distcheck commit ff110c781299fb729e93572ba3d630ca59e8127d Author: George Sapountzis Date: Wed Feb 27 18:41:17 2008 +0200 add warning for r128 commit b4a344f36332a12a51c9e896d93e9cb0672d31ef Author: George Sapountzis Date: Wed Feb 27 18:40:50 2008 +0200 add warning for mach64 commit 81ce4097c12ab64a52d0992f981f588f5a297b7b Author: George Sapountzis Date: Wed Feb 27 18:40:23 2008 +0200 drop r128 commit 873ff2033f1d0b84c91c48e829aa945f41b490b7 Author: George Sapountzis Date: Wed Feb 27 18:40:09 2008 +0200 drop r128 (build system) commit 2b8b2676e7b2fd2952f5307a934ef0a11006f838 Author: George Sapountzis Date: Wed Feb 27 18:39:49 2008 +0200 drop mach64 commit 05bbbec11a04e7f6321b92c9dbec4ad4c0d130ff Author: George Sapountzis Date: Wed Feb 27 18:39:32 2008 +0200 drop mach64 (build system) commit 68888189cf8d460ef6f8f2f1431a6ffe9fcd8134 Author: Alex Deucher Date: Wed Feb 27 03:09:28 2008 -0500 RADEON: fix textured video uploads commit 7cfad216a3f1486be194c972b9b6bcf070358586 Author: Alex Deucher Date: Wed Feb 27 02:13:10 2008 -0500 RADEON: fix clipping for textured video commit a2dca1d68d751def34ef3c6f836574173737bf76 Author: Alex Deucher Date: Tue Feb 26 16:38:29 2008 -0500 RADEON: Convert textured video to use pipelined uploads commit b4fa1ce9d2da04d94521a82d3c2e95f0fe985ccc Author: Alex Deucher Date: Tue Feb 26 14:45:25 2008 -0500 R300/R500: fix up clipping Based on patch from Peter Zubaj. commit 44e527a117ab0a363135ff066c7f7e0c12e3dc89 Author: Alex Deucher Date: Tue Feb 26 14:33:24 2008 -0500 R300: fix cordinate clamping in render code Based on Peter's fix for textured video commit 00ec17ad53d7ad43f19c9b723794ac1b8ef86826 Author: Peter Zubaj Date: Tue Feb 26 14:26:14 2008 -0500 R300: Fix clamping and pitch for textured video commit 4207793f9b6c891cb17ba715223d2002668885e3 Author: Alex Deucher Date: Tue Feb 26 13:16:22 2008 -0500 R300/R500: set the number graphics pipes properly This should fix the checkerboard issues on r300/r350 cards. commit 823d8bf49e4c0a8c839354179942c5a1944c178d Author: Alex Deucher Date: Tue Feb 26 12:25:14 2008 -0500 R300/R500: clean up magic numbers in textured video commit 8ea75b268f11794f4a7e7bac52cb256490ed3fd2 Author: Dave Airlie Date: Tue Feb 26 16:29:19 2008 +1000 regs: fix spelling properly commit f2816064a6c2c4c35ccba74b9aa80547e25c012e Author: Dave Airlie Date: Tue Feb 26 16:28:24 2008 +1000 regs: fix spelling mistake pointed out by plaes on irc commit 9d2ca30b90607085578dde1f314db663bd5f82ec Author: Alex Deucher Date: Mon Feb 25 17:34:00 2008 -0500 R300/R500: clean up magic numbers in render code commit 153ad6fcf704cbf9f811d9986cd4baf04e82c9d2 Author: Dave Airlie Date: Mon Feb 25 07:10:48 2008 +1000 fixup check for EXA composite pointed out by Alan Swanson commit 85e470e64f629de72e361c77770e2e29998d1bf4 Merge: 27ddb39 1b84c76 Author: Alex Deucher Date: Sun Feb 24 05:37:22 2008 -0500 Merge master and fix conflicts Merge branch 'master' of ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati Conflicts: src/radeon_commonfuncs.c commit 27ddb39b12a0b54e099fd5274c4c91f08e2d2822 Author: Alex Deucher Date: Sun Feb 24 05:30:11 2008 -0500 R300: clean up magic numbers in RADEONInit3DEngine commit d4c20f33ad6a1f88615cd7e09ad3638896873f9e Author: Alex Deucher Date: Sun Feb 24 04:46:10 2008 -0500 R300: replace magic numbers in cache flush commit e52f1c8d2647b81d891ec0728dd582941a76c83f Author: Alex Deucher Date: Sun Feb 24 04:43:18 2008 -0500 R300: fill in some more 3D bitfields commit 1b84c76f27c8d24cb42beae26abf000721901c1c Author: Dave Airlie Date: Sun Feb 24 19:20:36 2008 +1100 rs690: initial textured video support commit 68158124366db883a901e960fe5f05f8df5efa42 Author: Dave Airlie Date: Tue Feb 19 19:51:18 2008 +1100 rs690: initial rs690 rotate suffers same problem as r500 with clipping commit e614bb6965588bf09dcb87f5e08e67120ec9847f Author: Dave Airlie Date: Sun Feb 24 01:46:05 2008 -0500 r500: convert fragprog to use register values commit 6ce9ee47c75620b2e5d211c5d59d17271a6a7b19 Author: Dave Airlie Date: Sat Feb 23 22:49:34 2008 -0500 r500: add textured video Xv adapter support commit 9aaf8b33b22b6ba112869558ae54e021b9487ad2 Author: Dave Airlie Date: Sat Feb 23 22:16:25 2008 -0500 r500: initial rotate support - not fully working yet. Just an example of how to setup and run the r500 3D engine for rotation. this rotates for me but I get some strange clipping on the bottom of my screen commit 05dc3e4fc19d056ce99a7b110665adab2ca1ea21 Author: Adam Jackson Date: Sat Feb 23 20:29:51 2008 -0500 Clarify R500 US setup. commit 080606ad528972623e1ed1124d8efe7705a73446 Author: Adam Jackson Date: Sat Feb 23 20:21:17 2008 -0500 Add the R500 US index/data pair. commit edfb3b6bbf0ee17ace8e6ba704a6f54e249fec63 Author: Alex Deucher Date: Sat Feb 23 19:59:33 2008 -0500 RADEON: no textured video yet on XPRESS chips Still need to sort out the VAP and PVS stuff commit 4146bfe5d00e40a86d17826fac50d04b2469621d Author: Alex Deucher Date: Sat Feb 23 19:21:52 2008 -0500 R500: fix typo in new r5xx regs commit d9be9f34b0d3313e7b22b2a8bb0a8924ad3116bf Author: Alex Deucher Date: Sat Feb 23 19:06:30 2008 -0500 RADEON: add textured video support for r1xx-r4xx radeons Based on the kdrive ati video code by Eric Anholt. R3xx/R4xx still have some clipping issues in certain situations commit 9dc4acad79196e9d5d94dd710773bfa83456d47f Author: Alex Deucher Date: Sat Feb 23 18:29:00 2008 -0500 RS6xx: gpio entry for DDIA varies depending on the number of DFP ports commit ed0a93edf28155308e7ab9d8705581bb38455ea0 Author: Adam Jackson Date: Sat Feb 23 15:02:17 2008 -0500 Fix R500_US_CONFIG. commit bc2bd6f841b51aeed3b6b4a47dbe758c200bc5a6 Author: Adam Jackson Date: Sat Feb 23 14:34:18 2008 -0500 Add R500 unified shader register block. commit a7b5c3bb74fc4de5e38a75ac31656445ce823464 Author: Alex Deucher Date: Fri Feb 22 19:35:11 2008 -0500 RS6xx: fix DDC on DDIA output (usually HDMI port) commit 3327a681e21101cc6f6e162f4e29f9937b69ccc3 Author: Alex Deucher Date: Fri Feb 22 17:05:56 2008 -0500 ATOM: properly set up DDIA output on RS6xx boards commit 1d0e9ab8b9451101b1b91943546f6c5833c21b3f Author: Michel Dänzer Date: Wed Feb 20 10:21:49 2008 +0100 radeon: Fix typo flagged by gcc -Wall. commit b5bd442b60dbc72fe4c1e928ab864aeb0fd7a3cb Author: Alex Deucher Date: Tue Feb 19 20:47:40 2008 -0500 R100: fix render accel for transforms Not sure why we had a separate broken path for r100 vertex submission. commit a0a73208a21546ac120fb9a463261836c9ea7b55 Author: Alex Deucher Date: Tue Feb 19 20:11:19 2008 -0500 RADEON: restore clock gating and CP clock errata on VT switch This may help people with hangs on resume commit b77e2aff7453a9f370beba37ca3c25b92b3f97ff Author: Alex Deucher Date: Tue Feb 19 19:55:41 2008 -0500 RADEON: fix DDC types 5 and 6 commit af82172a82f2bdf96e571def659a1c70f92dfdbf Author: Alex Deucher Date: Tue Feb 19 19:39:35 2008 -0500 RADEON: update man page with supported chips commit 1302d1b019c8091986aaf9c86b25c1f36a037788 Author: Alex Deucher Date: Tue Feb 19 00:34:31 2008 -0500 Bump for 6.8 release commit 830d29e8b280c11e798fb5bf5278bf24ecbac7bf Author: Alex Deucher Date: Mon Feb 18 21:17:12 2008 -0500 ATOM: fix RS6xx connector table parsing and fix some warnings commit 03aa4cc6d6e8c715a1c1d677cc1845223505b358 Author: Roland Scheidegger Date: Mon Feb 18 20:19:58 2008 -0500 bring back to life planar-to-packed conversion for rs4xx Here's a patch to bring back the code for converting planar yuv to packed yuv, if a RS400 family chip is used (though I've no idea if they really all fail with planar yuv). fixes bug 12744 commit 66b0b3f43bb714bc007169d5ba6dabe34cfc008b Author: George Sapountzis Date: Mon Feb 18 10:33:59 2008 +0200 r128/radeon: probably correct fix for non pci access code commit d055b9e800ae50d08cca9db75fc666ce1da9ab52 Author: Dave Airlie Date: Sat Feb 16 09:13:43 2008 +1000 r128/radeon: hopeful fix for non pci access code commit c773bc6a314327da29e21e4ebac6fa7f3e98a0a7 Author: Dave Airlie Date: Sat Feb 16 09:05:07 2008 +1000 r128/radeon: fix build without pciaccess commit 690a52da5248f47a587a878d05fce9784957970b Author: Dave Airlie Date: Sat Feb 16 08:33:36 2008 +1000 mach64: fix non pciaccess build commit fc85188fd95bf78b7f965cdde3e22b644c74ff81 Author: George Sapountzis Date: Fri Feb 15 18:36:10 2008 +0200 ati: convert to pci probe add pciids for each subdriver, make no use of the match_data functionality. thanks to Alex Deucher for reviewing and testing. commit 665bd7e2f61cac3e029bbad5024034e5136deec1 Author: George Sapountzis Date: Fri Feb 15 18:34:56 2008 +0200 ati wrapper: translate Device lines commit a596c1618f72179a45289a50a1f9e89462ce9667 Author: George Sapountzis Date: Fri Feb 15 18:34:31 2008 +0200 r128: do not compile in PciChipsets twice commit 99cd8ff9a7e15fc2b4e55f8bc020f584173a8c2d Author: George Sapountzis Date: Fri Feb 15 18:33:51 2008 +0200 ati: drop duplicate pci-id defines commit 146b01b51069dc227d0b125babb3f6957c9b9de2 Author: George Sapountzis Date: Fri Feb 15 18:33:29 2008 +0200 mach64: clean probe a little do not report I/O ports now, they are reported later. commit f47d461331a032f9bdcf6f63336e848778cec6cc Author: George Sapountzis Date: Fri Feb 15 18:32:56 2008 +0200 mach64: minor cosmetic, I2C type commit 2c66f2e812195167df9ca113044d46deece776ac Author: Dave Airlie Date: Fri Feb 15 10:59:30 2008 +1000 make distcheck pass commit ed87f367ddab7366f84917b43b31d76df4ce1110 Author: Alex Deucher Date: Wed Feb 13 12:53:46 2008 -0500 RADEON: disable LVDS if panel size is 0x0 if we can't get the panel size from the bios or edid or a user specified option, assume it's not connected. commit 422d7f441fdbb318d22d44db661ac9bd61387bd2 Author: Alex Deucher Date: Tue Feb 12 15:35:46 2008 -0500 R6xx: when both crtcs are in use make sure they are both enabled sometimes setting a mode on one crtc can cuase a blank screen on the other. make sure they are both enabled if they should be. commit 860f5af75274cb236f536e1da09da6bd9a579530 Author: Alex Deucher Date: Tue Feb 12 14:46:49 2008 -0500 R6xx: fix up use of bios scratch regs to reflect the new offsets commit 32f2119b43a0faf6069d8cc0816f0d9f7914c07f Author: Alex Deucher Date: Tue Feb 12 14:20:02 2008 -0500 R6xx: bios scratch regs moved. commit 8d64be6ebd7f50d4bcb587afeee8252c1367dc77 Author: Alex Deucher Date: Tue Feb 12 12:53:09 2008 -0500 RADEON: make sure we always set up the FP crtc shadow registers for crtc0 The behavior changed when I added rmx center mode support. In cases where crtc0 drives a DAC this can lead to a blank screen. commit 810d192ee046077a894e0fb5f2dfd6a7c0130766 Author: Alex Deucher Date: Mon Feb 11 19:23:01 2008 -0500 R6xx: add missing objects commit 85043439426e534e561259ce98bebdd8508b36a9 Author: Alex Deucher Date: Mon Feb 11 16:36:58 2008 -0500 R6xx: make sure we set up the HDP base properly commit 9ab5d2ec7c583c74f364d7cfbb54bcd2cd8ae2f5 Author: Alex Deucher Date: Mon Feb 11 15:26:51 2008 -0500 RADEON: always restore crtc1 before crtc0 when using both crtcs In some rare cases restoring crtc0 first will result in a blank screen on crtc1. If you are having issues with a blank screen on crtc1 that used to work on 6.6.3 or before, this should help. commit e33edca75bd9df0aa19a33e74c38a6d02610befd Author: Alex Deucher Date: Mon Feb 11 00:33:12 2008 -0500 RADEON: Implement proper (hopefully) BIOS/DRIVER interaction for ATOM bios Tested on atom-based Desktop cards. It'd nice to get some testing on atom-based laptops. commit 6524e33435a786f7de0064cdd1b04c1120d21593 Author: Alex Deucher Date: Sun Feb 10 18:52:52 2008 -0500 RADEON: Implement proper (hopefully) BIOS/DRIVER interaction for COM bios Tested on my M10-based laptop. commit 8606c1bd175893c77e8c758246a1aed166c8be51 Author: George Sapountzis Date: Fri Feb 8 19:07:03 2008 +0200 mach64: factor out BIOS panel info parsing commit 9f33218c80f5a6d6d9464aa3db8ae25a4759f351 Author: George Sapountzis Date: Fri Feb 8 19:06:41 2008 +0200 mach64: minor cosmetic, LCD panel id commit 8cd5a465a03834b4b2f3a19f8d36fc9d2e18c6d4 Author: George Sapountzis Date: Fri Feb 8 19:06:27 2008 +0200 mach64: minor cosmetic, DAC type commit 7f4db96123fdcba9874226352802d702c2a498bd Author: Dave Airlie Date: Fri Feb 8 10:47:10 2008 +1000 add rv670 pciids commit e8899b9978291c62a65f468c92f340f65ad5479d Author: Alex Deucher Date: Thu Feb 7 19:27:38 2008 -0500 R6xx: fix ddc after my i2c rework Seems r6xx does something different for its i2c table, revert to the old behavior for now. commit 435de6c4e46ff2bebd4cee58888a66b936cd3fdf Author: Alex Deucher Date: Thu Feb 7 19:14:13 2008 -0500 RADEON: sync up with latest upstream versions atombios.h ObjectID.h commit 692789a293970f70b88ccb6adcf0676d8b495ae2 Author: George Sapountzis Date: Thu Feb 7 18:03:37 2008 +0200 mach64: factor out BIOS multimedia parsing commit 933328ffd6d1d872a18d3de8624c4df845a64588 Author: George Sapountzis Date: Thu Feb 7 18:03:03 2008 +0200 mach64: complement hint for sparc commit 956c8c81f3ff434930a0cb17b027b2f8e4eeabb2 Author: George Sapountzis Date: Thu Feb 7 18:02:31 2008 +0200 mach64: consolidate refclk #2 commit dce4cc26a8e2bf53805ec63763243f3ff6b4a6d3 Author: George Sapountzis Date: Thu Feb 7 18:02:17 2008 +0200 mach64: consolidate refclk #1 commit f7ed807f0d82a7446ebc4acdd4e94df44a675f19 Author: George Sapountzis Date: Thu Feb 7 18:01:59 2008 +0200 mach64: cosmetic commit cda1cd198f33c26ef1b51532a2126468369743b8 Author: George Sapountzis Date: Thu Feb 7 18:01:33 2008 +0200 mach64: factor out BIOS clock parsing commit 73ff279469be9c7cbf9f533b85fcb553694ff413 Author: George Sapountzis Date: Thu Feb 7 18:00:55 2008 +0200 mach64: BIOSBase is no longer used commit caea326cc6f1932bb299f451be013651a5749ea7 Author: Dave Airlie Date: Wed Feb 6 06:36:13 2008 +1000 r300: move fragprog setup code to prepare composite for now commit 470cd6a401c6a3e8fea981a8fe97c28be3cfb81d Author: Dave Airlie Date: Wed Feb 6 06:04:13 2008 +1000 r300: remove r300 specific vertex emission Set the vertex and fragment engine to expect the mask coords. commit f65e8dfac23adfa199026765fe3a1ea08cf4da67 Author: Alex Deucher Date: Sun Feb 3 00:09:59 2008 -0500 RADEON: rework i2c handling Split out clk, data, and lock regs and masks. some cards use different regs and masks for each. For cards with ATOMBIOS, use the i2c bios table to grab the i2c data. commit a38a903debc0a50dbc73f59dc2741bbea76d2bd9 Author: Alex Deucher Date: Fri Feb 1 02:59:07 2008 -0500 RADEON: don't restore LVDS_PLL_CNTL for now seems to cause problems with resume for some users. this needs further investigation. see bug 12596 commit 5d7bea2b62c86868baf1960665a40249a43bafc5 Author: Alex Deucher Date: Fri Feb 1 02:53:22 2008 -0500 RADEON: remove redundant RADEONDisableDisplays() use RADEONBlank() instead commit 73b437ce232c94c0067a0d2f70538b6e1e8c07a7 Author: Alex Deucher Date: Fri Feb 1 02:47:06 2008 -0500 RADEON: remove unused "aspect" scaler option commit f1fb9e4daa29bc379f653f847254db1496b625fd Author: Alex Deucher Date: Fri Feb 1 02:39:18 2008 -0500 RADEON: Implement "center" mode for RMX on legacy radeons commit bcd590103e04bfdb4f12413beacebf344f07e88e Author: Alex Deucher Date: Tue Jan 29 12:12:54 2008 -0500 RADEON: update man page to reflect AGP 1x default revert commit 09348a83d06ba9d3129499c4daedd44a68771530 Author: Alex Deucher Date: Tue Jan 29 12:09:24 2008 -0500 Seems the default is more reliable... we can't win. Revert "radeon: Default to 1x again with non-v3 AGP cards." This reverts commit b653e5a628bfa4dfb168e96f93f41eb910f409fb. commit 0c26806245381b925b73ff9f3b747e3dcf0ebd6f Author: Alex Deucher Date: Tue Jan 29 10:26:48 2008 -0500 RADEON: Add new RV380 pci id bug 14289 commit ce77ed78a877023da72dbe51609aef9a07e250b1 Author: Maciej Cencora Date: Mon Jan 28 19:02:56 2008 -0500 RS690: Implement MC idle check commit b7de4ff52cfbdd85ee65000613632e21b92af24e Author: George Sapountzis Date: Sat Jan 26 19:28:05 2008 +0200 mach64: add hint for sparc and minor cosmetic. commit 09d713aa0ed6367b4457420b3c2832fe8eca9b00 Author: Alex Deucher Date: Wed Jan 23 18:05:41 2008 -0500 Revert "RADEON: adjust PAL mode hstart" This reverts commit 719a9a376e34d99032af75e3f7b002670ccb816b. This breaks TV out on some cards. commit 719a9a376e34d99032af75e3f7b002670ccb816b Author: Alex Deucher Date: Sun Jan 20 18:40:53 2008 -0500 RADEON: adjust PAL mode hstart Most people seem to get a more aligned picture with this setting commit b2db8657fb888cff6d64c6dcb182caac389776ce Author: Alex Deucher Date: Sun Jan 20 18:33:22 2008 -0500 RADEON: re-work i2c for DDC Unify the radeon/avivo paths and grab the data/clk masks from bios if available commit a43003b24022a833e604f41b2873c0350b34181c Author: Alex Deucher Date: Sat Jan 19 18:49:53 2008 -0500 RADEON: get dac2 adj values from the bios tables commit d4596c52ac9994be26e9ec2d7d57b3892c34abdb Author: Alex Deucher Date: Sat Jan 19 17:17:26 2008 -0500 RADEON: grab pll_in_min/pll_in_max from bios tables if available commit 9a0947c812d0d38d1bca6a91140ac210831a6cb4 Author: Alex Deucher Date: Sat Jan 19 13:57:50 2008 -0500 ATOM: Use LVDS edid from bios if available commit 7238258c12def8ef273e5362f716d165f720c5a5 Author: Kusanagi Kouichi Date: Sat Jan 19 15:04:21 2008 +0100 radeon: Partial fix for XVideo RGB image distortions. commit 32be3cf9d6c34e60ff8c3d6cfe9f73f1869c50e4 Author: Brice Goglin Date: Fri Jan 18 14:42:14 2008 -0500 RADEON: print the name of the output when printing the EDID commit 4ba9430ee97dbce8f77db8de6ce9b753a75e453d Author: George Sapountzis Date: Fri Jan 18 18:18:18 2008 +0200 mach64: workaround for corruption at upper-left commit possible workaround, it's reported multiple times ... commit 12c00111b68c9cf4872a424258c6f8b7247aac47 Author: George Sapountzis Date: Fri Jan 18 18:17:40 2008 +0200 use stand-alone drivers for each chip family. Do not load the ati wrapper when the user specifies the sub-driver name in the Driver line of xorg.conf. Also, for -configure cause the wrapper to fail and let each sub-driver speak for themselves. commit 24c7d134cd450f9e2cca85e4a2fc3253d250be04 Author: Alex Deucher Date: Fri Jan 18 09:50:38 2008 -0500 RADEON: make sure EXA Composite is actually disabled on XPRESS chips. commit eaf425436008092abe81208321a2b3b6698a5d79 Author: Dave Airlie Date: Fri Jan 18 20:11:57 2008 +1000 fixup register 6594 save/restore commit 3de2dc88cf26ff5932f11cecdf975777b8aa2a4a Author: Adam Jackson Date: Wed Jan 16 14:55:05 2008 -0500 Bump CRTC size limits on AVIVO chips so 30" displays work without tweaking. Note that the CRTC size limits we're using right now are _not_ the hardware limits, they're just heuristics until we can resize the front buffer properly. commit 2a89a31481d71a56a9930073cf99d3ae7b4290e1 Author: Alex Deucher Date: Thu Jan 17 15:08:17 2008 -0500 RADEON: use radeon_output->Flags for tracking RMX rather than mode->Flags commit 495e3119250ffb48489debbaabe560d23753cc43 Author: Alex Deucher Date: Thu Jan 17 14:56:19 2008 -0500 AVIVO: Add support for RMX Both centered and expansion modes are supported. Select using output attributes. commit 6bd510a211f25d52e74791e4a429cd2218ced541 Author: Alex Deucher Date: Wed Jan 16 18:09:49 2008 -0500 RADEON: add a message about render accel on newer cards commit 85bf3439fe2579aec48f5cd8d65a9d51b1ae8535 Author: Alex Deucher Date: Wed Jan 16 17:52:06 2008 -0500 R300: only init3d on r3xx commit dbb2ca471dfbff245b30c5055871dee0dc0e3d15 Author: Alex Deucher Date: Wed Jan 16 17:10:02 2008 -0500 R300: only enable render accel on non-IGP r3xx/r4xx chips for now commit 3c72b100bcfacee600644669b586e86cfd32754e Author: Alex Deucher Date: Wed Jan 16 16:55:42 2008 -0500 R300: First pass at render accel This first pass is pretty limited. All it currently supports is transforms for rotation. No blending yet. Based on inital implementation from Wolke Liu with additional lock-up fixes by Dave Airlie. commit 2ba3562d2af911fdd90881049599e239d27260bc Author: George Sapountzis Date: Sat Jan 12 17:11:59 2008 +0200 ati wrapper: xf86PciInfo.h is enough commit c2caeb11a97dad5379d70881c5c0fd834a8c3d54 Author: George Sapountzis Date: Sat Jan 12 16:18:34 2008 +0200 ati wrapper: add DriverRec's and use them commit 19e1b180fec6f83a474e125465bc60111c0f43e0 Author: George Sapountzis Date: Sat Jan 12 16:18:07 2008 +0200 mach64: load for both "ati" and "mach64" as driver names similar to r128/radeon commit 92f54400d5450b29b3a76d5ecc927cf0d73e156e Author: George Sapountzis Date: Sat Jan 12 16:17:47 2008 +0200 mach64: add version (need not match with ati) similar to r128/radeon commit 311ec7b6c54a50a4b8a5a445f7283da2b0b2e0f5 Author: George Sapountzis Date: Sat Jan 12 16:17:21 2008 +0200 atimisc: rename to mach64 commit 5244e235262290eab8a3546f449295c12ed8f6c7 Author: Alex Deucher Date: Mon Jan 14 16:11:09 2008 -0500 ATOMBIOS: disable the scaler by default on avivo cards Fixes bug 14001 commit 729da30c80d6545b75c8faea44754634f477cc09 Merge: 000741e 625a885 Author: Alex Deucher Date: Mon Jan 14 10:05:01 2008 -0500 Merge branch 'master' of ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati commit 625a885a964488da2a35065eb597a17ee57b22a9 Author: George Sapountzis Date: Wed Jan 9 17:39:56 2008 +0200 ati wrapper: use pci ids commit 48865200ca9f1daf87e52620b9f8175f88dd886f Author: George Sapountzis Date: Wed Jan 9 19:01:04 2008 +0200 radeon: remove stray include commit a5a6b873353611cb7e46e5e375f039957c7051a7 Author: George Sapountzis Date: Wed Jan 9 13:03:32 2008 +0200 radeon: remove stray _X_EXPORT commit 80c9974b6cdc0147d777df6990b3f3aacd87969d Author: George Sapountzis Date: Tue Jan 8 18:15:47 2008 +0200 r128: pci-rework conversion compile-tested only commit cd4b39403d74f314e1c2cfa4cf0e4fe542891dc3 Author: George Sapountzis Date: Sat Mar 10 23:12:15 2007 +0200 Drop symbol lists from r128, radeon, theatre. compile-tested only commit 63b4b8213fabc5a57f897b60b6eaa9f78d86e6ff Author: George Sapountzis Date: Wed Mar 21 20:24:22 2007 +0200 [mach64] Drop symbol lists. egrep LOADER\|SymLists\|Symbols src/*.[hc] not needed after server commit bca9364f3f4a2376edbcf57a34f704ce28be21ba, i.e. xserver 1.2 compile-tested only commit 000741e250e54122b0adc91694eb4bfa320a70fb Author: Alex Deucher Date: Thu Jan 10 14:49:48 2008 -0500 RADEON: clean up output handling commit 10e7636c02478b8ffe183bb0c46229ca0d6584e1 Author: Kristian Høgsberg Date: Wed Jan 9 12:47:39 2008 -0500 RADEON: fix crtc routing on r4xx cards when using atom to init DVO chip commit 3af671f5963810dbfd63abc9889b1d46b68f404c Author: Alex Deucher Date: Wed Jan 9 11:30:25 2008 -0500 RADEON: restore FP2 regs before external encoders This may fix krh's dvi problem commit 2a54c6bb09ade2ec8f998dfc1624017029d47fa3 Author: Alex Deucher Date: Tue Jan 8 18:43:54 2008 -0500 RADEON: Make default output actually work... commit fa3e2055225c27e25465fc46786da1b7574fd3cc Author: Alex Deucher Date: Mon Jan 7 01:13:09 2008 -0500 RADEON: add default outputs if no connected devices If no connected devices found at server startup, default to something so the server comes up. LVDS on mobility chips, DAC or TMDS on others. commit d972cc9237eb90b49b11f8d2bdc5b61f628911dc Author: Alex Deucher Date: Sat Jan 5 17:19:06 2008 -0500 RADEON: Fix TVStandard option commit 45656b9d5a426053da2a094de39c2690c0c6f799 Author: Alex Deucher Date: Sat Jan 5 12:00:55 2008 -0500 R128: Like powerpc, don't use VGA by default on sparc commit b8e8db4675d07e45782de0d7c67ee0fd85eaedb3 Author: Alex Deucher Date: Fri Jan 4 20:16:19 2008 -0500 RADEON: fix tvdac load detection at server start up commit 3ba7f393d0669df36848715799de8affc10a5534 Author: Alex Deucher Date: Fri Jan 4 20:00:48 2008 -0500 RADEON: further fixup for pScrn->pScreen issue the previous fix seems to cause the driver to hang on some cards. commit a0de9c0844f9e066e0f02e8cd8045bdd278e6494 Author: Alex Deucher Date: Fri Jan 4 19:48:30 2008 -0500 RADEON: improve ntsc image centering commit 03d2f25801c8a8ec15030f06008df112d07c1a2d Author: Alex Deucher Date: Fri Jan 4 18:19:54 2008 -0500 RADEON: fix compile commit 308848783ed9ae27aed7c7de6ee813d375ef495e Author: Dave Airlie Date: Sat Jan 5 09:11:55 2008 +1000 i2c: a line mux of 0 is valid commit 94d5a432f72801f821d1c4ce952baba17552659d Author: Dave Airlie Date: Fri Jan 4 17:16:54 2008 +1000 atombios: i2c lines are all done with sw so we can accept any of them. hch reported this working on his laptop with 0x7e60 as EDID for LVDS commit 2e4473b63d65801ae8ac5a8391de232b2201d958 Author: Alex Deucher Date: Thu Jan 3 15:47:50 2008 -0500 RADEON: fix crash when setting rotation in the config file xf86CrtcRotate() accesses pScrn->pScreen which is not set during ScreenInit(). This should also be fixed in the server. See bug 12129 commit c652208861bffca94f06b7f67688ce220e050bfb Author: Michel Dänzer Date: Thu Jan 3 17:54:58 2008 +0100 radeon: Adapt manpage to reality wrt AGP options. commit ab451e4b7a5423d61b57cf0646599267d8504af4 Author: Michel Dänzer Date: Thu Jan 3 17:52:39 2008 +0100 radeon: Miscellaneous warning fixes. commit 394c52273328e90518568b694ee79dc1a8dab651 Author: Dave Airlie Date: Thu Jan 3 18:56:16 2008 +1000 r500: tvout avoid doing dpms here it makes my tv mode go all crappy need to investigate further commit 1c647279f021d01e110980727b7c7dd7efae1642 Author: Dave Airlie Date: Thu Jan 3 11:55:28 2008 +1000 r600: change devices list depending on connector commit f36db6e10d32a68b32d20ae4ad02cfc0bfd1c9c3 Author: Dave Airlie Date: Thu Jan 3 11:27:47 2008 +1000 r600: fixup crash on unknown output type not sure this is 100% the correct approach commit 1accfdd590828e95e0d68a576c8ee05a06a86e43 Author: Alex Deucher Date: Wed Jan 2 19:48:28 2008 -0500 RADEON: various avivo tv-out related clean-ups commit ce34090c758ac91171cb6adb9b8a36e4adbf99cf Merge: 2180f04 30cab1d Author: Alex Deucher Date: Wed Jan 2 16:41:36 2008 -0500 Merge branch 'master' of git+ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati commit 2180f04b6fb94a638f6274cb4455d5688b324dbc Author: Alex Deucher Date: Wed Jan 2 16:41:06 2008 -0500 RADEON: preliminary support for ATOM RMX not functional yet. commit dab4dc285154d40303aadaa849b85f8e251e578e Author: Alex Deucher Date: Wed Jan 2 16:27:19 2008 -0500 RADEON: add support for ATOM component video table Component output is still not working. commit 30cab1dbebb7bdb925f2fe9f91b84183312bbbfd Author: Alex Deucher Date: Wed Jan 2 15:41:01 2008 -0500 RADEON: Make sure all old IGP chips have HasSingleDac set fix the csv file and re-gen the headers. commit e8e585651215b011e3ad07c59d0eab9107ccd8c6 Author: Dave Airlie Date: Wed Jan 2 10:14:46 2008 +1000 PLL/r600: tweak pll to pick first one found instead of keeping going commit 14aa4060ad27ecb3d40b2b17ee4cf7cc55a121dd Author: Dave Airlie Date: Wed Jan 2 09:49:44 2008 +1000 r600: fix tv-out output naming commit f65374f5e15bfd391a1838a686cd87d3bab8043d Author: Maciej Cencora Date: Mon Dec 31 09:44:34 2007 +1000 atombios: initial rs690 patches commit a674f683e6699c30664d9cd468a64de991c3fd7e Author: Dave Airlie Date: Sun Dec 30 17:43:17 2007 +1000 atombios: enable TV-out detection code - tv out works for me with this commit aa7c28cbd943bb525698515d444cb5097880e364 Author: Dave Airlie Date: Sun Dec 30 17:40:37 2007 +1000 atombios: enable support for using tv timings enable support for the atombios tv timings selection by programming the crtc with the tv timings if a tv is detected on the output commit 0bc3fd595a73e12a424571697d164a09a6a4c072 Author: Dave Airlie Date: Sun Dec 30 16:39:58 2007 +1000 atombios: add support for reading tv standard from atombios fix typo in atombios header file commit bfa22d676a6f333503104041f62222f4de9bb7d8 Author: Alex Deucher Date: Wed Dec 26 12:29:47 2007 -0500 RADEON: fix typo that broke tv load detection commit 0c99554c6fab1192f5e8595469c21b5f33e1eb4f Author: David Miller Date: Wed Dec 26 02:19:12 2007 -0500 [RADEON]: Add missing break in SCLK calculation. commit 6e0d5cc1c62fbfc1962fa0d6333f0c0a8c6327bd Author: David Miller Date: Wed Dec 26 02:17:34 2007 -0500 [RADEON]: Like powerpc, don't use VGA by default on sparc. commit 2b1fae668ddabbc72e5fc31365302ea722174df1 Author: Alex Deucher Date: Wed Dec 26 02:04:06 2007 -0500 RADEON: fix PAL tv-out Many thanks to Andrew Randrianasulu for providing me with pll reg dumps commit d736eb5732da573162c70712dc4e8b0114986702 Author: Alex Deucher Date: Mon Dec 24 12:34:15 2007 -0500 RADEON: default "IgnoreLidStatus" to TRUE Seems there are lots of busted ACPI lid status and people starting X with the lid closed. commit 653da558148cc601bc1f80253e92ef98c75ef37a Author: Alex Deucher Date: Mon Dec 24 01:11:56 2007 -0500 RADEON: restore crtc regs before VGA regs. It seems some radeons don't restore text console properly if the crtc regs are restored after the VGA regs. Thanks to Sverre Froyen for helping me track this down commit ad3325f672a241449ca239c8ee3a24b6d7703d76 Author: Alex Deucher Date: Sun Dec 23 17:18:42 2007 -0500 RADEON: Add "IgnoreLidStatus" option Generally, users that start X with the laptop lid closed want to use one or more external monitors rather than the internal panel and do not want the internal panel to be on by default. Others, it seems, want to always have the internal panel on, regardless of the lid. I can't win. Enable this option to force the latter. commit 20eedf348a527e1e0a5450bc22d7564895034a66 Author: Alex Deucher Date: Sun Dec 23 11:27:55 2007 -0500 RADEON: fix pll input setup on mac cards the function was exiting before the complete setup was finished. commit 4f2e833e8ebaba3ad85ec5314fff8fa05395b679 Author: Arkadiusz Miskiewicz Date: Fri Dec 21 18:56:34 2007 -0500 configure.ac fixes commit 2b6e8e2b8f74e94560de89693ecbc7260536591e Author: Arkadiusz Miskiewicz Date: Fri Dec 21 18:10:17 2007 -0500 RADEON: various cleanups commit 4c6f60e3b19ac55ab1255c79df03b1df5950864e Author: Alex Deucher Date: Fri Dec 21 17:33:04 2007 -0500 RADEON: clean up prototypes commit 8c761afdcb9baf1649b93449692fb9ab67bc2c80 Author: Alex Deucher Date: Fri Dec 21 16:24:49 2007 -0500 RADEON: more re-org move save/restore routines into legacy_crtc/output commit 910773d3a6c717f9d4762ea7b9ee6c3ae061781e Author: Alex Deucher Date: Fri Dec 21 15:53:15 2007 -0500 RADEON: more re-org. move XAA Mem init to radeon_accel.c commit 0631a23bd103f9b74e525da2c41304eab60c6f17 Author: Alex Deucher Date: Fri Dec 21 15:40:18 2007 -0500 RADEON: fix rn50 reversion from last merge commit 5b917797a13c6caa80028d1842a284598e874288 Author: Alex Deucher Date: Fri Dec 21 15:30:20 2007 -0500 RADEON: remove no longer used radeon_display.c commit bf14aa5f88fc3b4e69d71db5b23248b8bb2018d0 Author: Alex Deucher Date: Fri Dec 21 15:29:47 2007 -0500 RADEON: re-org legacy crtc/output code into separate files commit be7f8fd338f5af8b632f16a83db41e15d00af469 Author: Dave Airlie Date: Fri Dec 21 10:03:49 2007 +1000 fix mode bandwidth configure check commit 3f9b597dedc45379b0bc0b631f3f924c403bca48 Author: Dave Airlie Date: Fri Dec 21 09:55:42 2007 +1000 fixup clip test include handling commit 9a5b501332c0a1f10af20845af48c9ddd2ce26a0 Author: Dave Airlie Date: Fri Dec 21 09:45:55 2007 +1000 set ddc line correctly post-merge commit 3c31b96afa20913ad947e68fe0c3a662e5eafbdd Merge: eb99c3c f5e8c18 Author: Dave Airlie Date: Fri Dec 21 09:36:22 2007 +1000 Merge remote branch 'origin/atombios-support' Conflicts: src/radeon_display.c src/radeon_driver.c commit eb99c3c5c9a2249cb84920f0f225e525fc3a4144 Author: Alex Deucher Date: Thu Dec 20 18:14:38 2007 -0500 Bump for RC release commit 8d49ff1da917b7f8240267953ef6ce4ff04daecb Author: Alex Deucher Date: Thu Dec 20 01:09:57 2007 -0500 RADEON: check for xf86_crtc_clip_video_helper() in configure.ac use xf86_crtc_clip_video_helper() from the server if available. commit fb7a4e24f2da3561ef81371ca4013a4f13806e91 Author: Adam Jackson Date: Wed Dec 19 19:15:19 2007 -0500 Fix RN50 mode filtering. The old code would attempt to limit the maximum pixel size of the screen by limiting the maximum PLL frequency. This ends up confusing the PLL computation code since sometimes your maximum freq can be lower than your minimum freq. More to the point it's just wrong, maximum PLL frequency isn't the same thing as maximum pixel clock, and even that isn't the same thing as maximum scanout pixels per second. The correct thing to do is filter by the mode's effective memory bandwidth. commit c1b0b69cc50516c3b7e881b0eb46cb3cd2e9dce6 Merge: 0e66348 ce4fa1c Author: Alex Deucher Date: Wed Dec 19 11:54:50 2007 -0500 Merge branch 'master' of ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati commit 0e6634870d1ab38ee8c83f6bda1ba60364997853 Author: Alex Deucher Date: Wed Dec 19 11:54:27 2007 -0500 RADEON: skip empty connectors when creating outputs commit 6afbf718c151dc3c5c59bd3136b58a93a114d798 Author: Alex Deucher Date: Wed Dec 19 11:48:38 2007 -0500 RADEON: add support for legacy radeons with DVI and no connector table commit f5e8c185001e62e744310667c2d1bd3fe6542a62 Author: Dave Airlie Date: Wed Dec 19 10:38:58 2007 +1000 more endian related fixage commit 98b247066d00db66abe91f518cd93b5c4da4cfb4 Author: Dave Airlie Date: Wed Dec 19 10:25:41 2007 +1000 fix big endian build since zaphod fixups commit ce4fa1cedec0cf56b9979dfaa12a8d3a7c643df4 Author: Arkadiusz Miskiewicz Date: Tue Dec 18 15:34:14 2007 -0500 RADEON: fix fd leak in lid detect code commit 20568f66f9a9a60a33bd9a69ccc14a891c656836 Author: Arkadiusz Miskiewicz Date: Tue Dec 18 15:32:10 2007 -0500 RADEON: more cleanups and warning fixes commit 1496194200adbcb044ec3977367a0908262e389c Author: Arkadiusz Miskiewicz Date: Tue Dec 18 15:29:53 2007 -0500 RADEON: driver cleanups, warning fixes commit bd7206fa120495037e3fea0c920d0031d7715bf6 Author: Alex Deucher Date: Tue Dec 18 03:03:11 2007 -0500 RADEON: fix another merge error this broken legacy radeons commit 65a3ac7530e11bb7d818a988fd0cf1dde7688fa4 Author: Alex Deucher Date: Tue Dec 18 00:15:38 2007 -0500 RADEON: more PLL tweaks commit d93a0e10b8bc6e3797a3cf6c1e28ca413a7c38e4 Author: Alex Deucher Date: Mon Dec 17 20:32:45 2007 -0500 RADEON: post div tweaks for legacy radeon commit 03b8b49f6f502c45552b018fd8c44d366b2d576f Author: Alex Deucher Date: Mon Dec 17 20:20:04 2007 -0500 RADEON: fix typo from merge commit 19b9d3708852b7efe2b05249c8359dadb924dd94 Merge: cf685f3 29706ca Author: Alex Deucher Date: Mon Dec 17 20:07:32 2007 -0500 Merge branch 'atombios-support' of git+ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati into atombios-support commit cf685f37ec874f0aacd09e7c4eb0402c6daec1b0 Merge: 2a134af 44d07c4 Author: Alex Deucher Date: Mon Dec 17 20:07:07 2007 -0500 Merge branch 'master' of git+ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati into atombios-support merge master and fix conflicts commit 29706ca585ebd9b7b3521521a17016322e9ecccb Author: Dave Airlie Date: Tue Dec 18 10:55:38 2007 +1000 fixup shadow setup on !r600 commit 44d07c4ccce9acb5bd21a17acb082e91f7225764 Author: Alex Deucher Date: Mon Dec 17 18:56:12 2007 -0500 RADEON: typo from last commit commit 4da3782239921eb377216d4de4a9cc5bb55e0e8a Author: Alex Deucher Date: Mon Dec 17 18:51:31 2007 -0500 RADEON: add output enable masks add output enable masks for outputs that drive more than one connector. Make sure we don't turn off an output that's driving another connector. commit 5c5d2d19b2b032a06dd333b4ecc029aac342fb93 Author: Alex Deucher Date: Mon Dec 17 18:15:55 2007 -0500 RADEON: whitespace clean-ups commit 9f1d8220315c8894a17f2cc328025dc682b0c6e0 Author: Alex Deucher Date: Mon Dec 17 18:04:05 2007 -0500 RADEON: more PLL fixes - reduce the calculation accuracy - certain LVDS panels seem to only like certain ref_divs - add pll flags to handle special cases - adjust the pll limits on legacy cards commit 2a134af01bc85de758ad83a85b23d1bba4a1a0f5 Author: Dave Airlie Date: Mon Dec 17 15:00:36 2007 +1000 r600: add shadow support to r600 driver to at least make 2d useable commit 614414611a9f246cbc74f579a79987fff97cf571 Author: Dave Airlie Date: Mon Dec 17 11:10:14 2007 +1000 radeon: cleanup pitch calculation and make r600 work again commit 79a375dbc7f323e2f551490a35f44ec36bed877c Author: George Wu Date: Mon Dec 17 10:55:36 2007 +1000 r600: might as well fix VT for R600 commit bc213ee723a45f2c396b4ed211a50f7642349973 Author: Alex Deucher Date: Sun Dec 16 14:54:00 2007 -0500 RADEON: fix sclock printout commit 4747c1f3cd4167b6a51d4864a297719ea48b9346 Author: Alex Deucher Date: Sun Dec 16 14:07:29 2007 -0500 RADEON: Make sure LVDS_EN bit is set when enabling LVDS commit a9817b2cf436a536dbc43ad77abc3bdcc53d346d Author: Alex Deucher Date: Sat Dec 15 20:51:53 2007 -0500 RADEON: clean up units in PLL calculation commit b653e5a628bfa4dfb168e96f93f41eb910f409fb Author: Michel Dänzer Date: Sat Dec 15 00:50:10 2007 +0100 radeon: Default to 1x again with non-v3 AGP cards. Seems more reliable in general than what was set up by firmware - fingers crossed... commit 6229825fa5d6715569098afbb21a40f7a2e7e6be Author: Michel Dänzer Date: Sat Dec 15 00:48:26 2007 +0100 radeon: Warning fixes. The lid detection code probably wouldn't work on other non-x86 platforms though... commit 818ccf0fd4b5879171c5f20526d5a58638f8fde5 Author: Fredrik Höglund Date: Fri Dec 14 23:56:12 2007 +0100 RADEON: Fix the vertex coordinates for transformed pictures This partially fixes transformed pictures on R100/R200 based cards. The texture still doesn't appear to be clamped correctly, but since that doesn't matter for rotations at perpendicular angles, I'm committing this now so randr rotation and reflection will work properly. commit 3cfbcf4cafbdfdb33411d16e51fb1f77cd0f93dd Author: Alex Deucher Date: Fri Dec 14 17:11:00 2007 -0500 RADEON: Fix PLL set up on certain notebooks Some LVDS panels require specific PLL dividers as specified in the bios tables. Make sure to use them if the output is LVDS. commit a84d446fd301d456bcea8f7abdc52e5a30776412 Author: Alex Deucher Date: Fri Dec 14 02:17:14 2007 -0500 RADEON: select fb_div0 for LVDS on RV410 (x700) mobility Fixes bug 8038 I wonder if desktop RV410 need a similar fix. If your x700 laptop panel has problems after this let me know. commit b3eed3d87f76779b5a62a3115f99a31484dc38e0 Author: Alex Deucher Date: Fri Dec 14 00:20:10 2007 -0500 RADEON: fix typo in previous cursor fix commit 814c6c48aebba2e45ce257289b922cd7e92caf2a Author: Alex Deucher Date: Thu Dec 13 18:45:09 2007 -0500 RADEON: rework PLL calculation - Take into account the limits from the bios tables - Unify the PLL calculation between legacy and avivo chips commit f5ac34983411e4c4f41ab1817dce582830f398fd Merge: f2b2e08 6ccf5b3 Author: Alex Deucher Date: Wed Dec 12 22:37:44 2007 -0500 Merge branch 'master' of git+ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati into atombios-support merge and fix conflicts commit f2b2e0804183b52d9d3f56ad85b3552ece76c544 Author: Alex Deucher Date: Wed Dec 12 22:18:37 2007 -0500 RADEON: fix rotation on avivo chips There are still some issues, but this is better than before. commit 6ccf5b33d27218ae1c45ab93c122438ed536d8ba Author: Alex Deucher Date: Wed Dec 12 20:12:06 2007 -0500 RADEON: only enable vblanks if we want them should fix bug 13610 commit 1668f2056f56370f1b5681c13f1e14904e301216 Author: Alex Deucher Date: Wed Dec 12 19:39:08 2007 -0500 RADEON: use /proc/acpi to determine lid status Linux only commit 33a39947f7f79533cd90007a17d57b20126642c6 Author: Alex Deucher Date: Wed Dec 12 18:50:18 2007 -0500 RADEON: fix cursors when using rotation allocate separate cursor buffers for each crtc commit 9e5efdecd12092031a4aebce58747cb4a6f48f28 Author: Arkadiusz Miskiewicz Date: Tue Dec 11 23:53:03 2007 -0500 sparse fixes and cleanups from arekm commit 372bf41818fdafc6a9d2914aee3a8e359f668f02 Author: Alex Deucher Date: Tue Dec 11 14:04:58 2007 -0500 RADEON: handle HMDI properly (untested) and fix some merge leftovers commit 3c22ad977c25d5ca2811821fcac6bb8ecd79994a Merge: c9a0cee f3d2ec3 Author: Alex Deucher Date: Tue Dec 11 13:11:15 2007 -0500 Merge branch 'master' of ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati into atombios-support fix conflicts commit f3d2ec3a5ae61215c792018320158750e7aa937c Author: Alex Deucher Date: Tue Dec 11 11:57:27 2007 -0500 RADEON: rewrite PLL computation Algorithm adapted from BeOS radeon driver with some tweaks by me. Actually calulate and use the reference divider rather than using the bios default. Also, always calculate the PLL, rather than falling back to bios dividers. This should fix bugs 12913, 13590, 13533, possibly others. commit c9a0cee97ca69e8fe1e1937c7670fa903214cded Author: Dave Airlie Date: Tue Dec 11 06:03:46 2007 +1000 more zaphod fixes - some other work maybe needed commit 9b125312ab6edc585e4f5931a6a6de81e13b6acc Author: Alex Deucher Date: Mon Dec 10 13:53:15 2007 -0500 RADEON: only update crtc values when RMX is active commit 3a161e1b5d80361e318ced8da5c19e797749d693 Author: Alex Deucher Date: Mon Dec 10 00:57:26 2007 -0500 RADEON: bios PLL cleanup commit 731830297f2fc4a416882aacfb0d9b5f8ed32520 Author: Dave Airlie Date: Mon Dec 10 15:50:38 2007 +1000 fixup some warnings commit 2818e2b02ca90c9dfa50905b5311b2ae83ac3b0c Author: Dave Airlie Date: Mon Dec 10 15:43:52 2007 +1000 add more to configure.ac for using out-of-tree mode src commit cc3c36100986f9d8060bc2d433373d4806f8e730 Author: Dave Airlie Date: Mon Dec 10 15:25:56 2007 +1000 add support for building against legacy servers similiar to Intel codepaths commit 9c278cb7fa7f18d13bde053fd75221cfba9da377 Merge: 6451ea2 cc167b9 Author: Dave Airlie Date: Mon Dec 10 15:18:03 2007 +1000 Merge branch 'zaphod-lolz' of git://git.freedesktop.org/git/xorg/driver/xf86-video-ati into atombios-support Conflicts: src/radeon.h src/radeon_crtc.c src/radeon_driver.c src/radeon_output.c commit 6451ea2dcc4fac762442f699935864f4a8d445f7 Merge: 0d89556 5896ca4 Author: Dave Airlie Date: Mon Dec 10 15:08:42 2007 +1000 Merge branch 'master' into atombios-support commit 5896ca4097d439f59f90f397939132c061c3c364 Author: LisaWu Date: Fri Dec 7 09:45:05 2007 +0100 radeon: Use %u instead of %d for unsigned value. commit df44f8380268c27d3978c4e91d736f093322b8b8 Author: Michel Dänzer Date: Fri Dec 7 09:41:47 2007 +0100 radeon: Use gettimeofday instead of xf86getsecs. commit cc167b9bb7f1c3b8579e51e7bc2fca2f8eba6bd1 Author: Dave Airlie Date: Fri Dec 7 15:41:36 2007 +1000 disable tiling for zaphod heads commit 2ce8d192533a8c795714c5a9fb308ec74db40287 Author: Dave Airlie Date: Fri Dec 7 15:35:21 2007 +1000 don't add fboffset to info->FB it already is mapped at the offset commit 0dcd926d3092100854b3e362d6659d4950508aeb Author: Dave Airlie Date: Fri Dec 7 14:45:04 2007 +1000 radeon: bring back zaphod all is forgiven. You've whined, you've cried, you've nagged, and you're guilt trippin has made me do it... It actually wasn't as hard as I thought it would be. Still not perfect, couple of things to fix yet commit bb5ede557bf32a42eef158ff0fbcfe1c6ede098a Author: Dave Airlie Date: Fri Dec 7 14:30:32 2007 +1000 radeon: move savedreg/modereg into entity instead of info commit 64ab1cdf343a9a69e7e9e64f0bba77c54a94e9d0 Author: James Cloos Date: Thu Dec 6 15:51:12 2007 -0500 Add missing PHONY line for automatic ChangeLog generation commit 0d89556bfa41a3acbd6afe85b062e3a21f2ca057 Author: Dave Airlie Date: Thu Dec 6 19:23:06 2007 +1100 powerpc: build fixes from last merge commit dbe3d2608ecc9896db9c23b3a347b50748c51e13 Merge: 48e31cd 21ed435 Author: Dave Airlie Date: Thu Dec 6 14:22:03 2007 +1000 Merge branch 'master' into atombios-support Conflicts: src/radeon_output.c commit 21ed435398e4a398dd8a0a5d7c1d4cc45e916332 Author: Alex Deucher Date: Tue Dec 4 17:08:58 2007 -0500 RADEON: add MacModel imac-g5-isight for iMac G5 iSight Thanks to Étienne Bersac for helping to figure this out. commit 54bfd522405d9fdfb69d3a59e111ac3d63483dbb Author: Étienne Bersac Date: Tue Dec 4 14:22:42 2007 -0500 RADEON: fix typo commit 5022d006cfc06ca0395981526b2c2c94c6878567 Author: Michel Dänzer Date: Sun Dec 2 17:27:33 2007 +0100 radeon: Further XVideo fixes. * Make sure pitch constraints are always met for DMA upload blits. * RGB24 is not affected by endianness. commit 6ed55b70b23dfdc7b41103ea59c1df2bda5e41e6 Author: Kusanagi Kouichi Date: Sun Dec 2 17:18:46 2007 +0100 radeon: Fix crash with XVideo 24bit RGB images. See https://bugs.freedesktop.org/show_bug.cgi?id=13274 . commit a697b590899bb7704ec4d7ae9a9c3cbbfcaef382 Author: Michel Dänzer Date: Sun Dec 2 17:11:20 2007 +0100 Fix build against xserver master. (DE)ALLOCATE_LOCAL are gone. commit 48e31cdaa0caa21573879af5b9267773fe89176a Author: George Wu Date: Sun Dec 2 15:25:09 2007 +1000 RADEON/R600: small code cleanup commit 00b4480aa2c5d7f751e34fc964f431b90b14c8d2 Author: Alex Deucher Date: Sat Dec 1 14:18:40 2007 -0500 RADEON: add options for force TV out as detected and to set TV standard Also fix a typo in internal tv-out parsing commit 1e029fef5fe264f2ced445b80bf6070abcb84b82 Author: Alex Deucher Date: Sat Dec 1 00:58:51 2007 -0500 RADEON: move GPIO lookup to a separate function commit dcbef1ba9dfcf35c28e058832a55adf00afb472e Author: Alex Deucher Date: Sat Dec 1 00:35:25 2007 -0500 RADEON: fix typo in previous commit check gpio table revision before connector table revision commit fdce0598a2228c48c84deae1d7bebb2d7b3e979b Author: Alex Deucher Date: Sat Dec 1 00:15:34 2007 -0500 RADEON: convert atombios connector table parsing to use ATOM structs convert and add hpd info commit e3d7de9cc956aec5f940ad6db09e826b3a69523a Author: Alex Deucher Date: Fri Nov 30 20:14:42 2007 -0500 RADEON: remove unused cruft from last atom import commit d5d83411e8a884154d671aad440524507cce313e Author: Alex Deucher Date: Fri Nov 30 20:11:42 2007 -0500 RADEON: save/restore avivo crtc cursor control this should prevent the cursor from showing up on in text mode or vesafb etc. after running the driver. commit af0196f7bf0d1d5d211391149c18935d64ed2b06 Merge: d9858a2 0175b79 Author: Alex Deucher Date: Fri Nov 30 16:40:28 2007 -0500 Merge branch 'master' of ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati into atombios-support merge master and fix conflicts commit d9858a2b3744b99003cfb9f31b743a2d31b322e9 Author: Dave Airlie Date: Sat Dec 1 06:49:59 2007 +1000 radeon: add in pll spread spectrum workaround commit 0175b79987ef4d7b0ce8238c3bdde989e504516a Author: Alex Deucher Date: Fri Nov 30 15:37:42 2007 -0500 RADEON: rework MacModel option this brings in some previous research from Michel Dänzer, Sjoerd Simons, and myself. Hopefully, the driver will pick the correct MacModel in more cases. This also changes the default connector table for desktop Macs to dual DVI rather than DVI+VGA as that seems to be the case more often than not. External TMDS chips are handled separately now as well. Eventually we should add an option to allow the user to specify what external TMDS chip they need, but we don't have enough info yet, so we'll rely on OF to init the external chip in most cases for now. commit e1945f1f25a34310bd58ce128c8ff27ecc985618 Merge: b368b0f df7777b Author: Alex Deucher Date: Fri Nov 30 14:30:55 2007 -0500 Merge branch 'atombios-support' of ssh://agd5f@git.freedesktop.org/git/xorg/driver/xf86-video-ati into atombios-support commit b368b0f22cd1d7ef9b4c65d82929c76f3b82d573 Author: Alex Deucher Date: Fri Nov 30 14:29:27 2007 -0500 RADEON: disable atom pll set for r4xx cards the clocks do not get set correctly in all cases. this needs further investigation. commit 5af15739571c09260750bcfd3620e16fd7fec862 Author: Alex Deucher Date: Fri Nov 30 14:24:30 2007 -0500 RADEON: small cleanup of pll code commit df7777bff40c1feabcc12d2148ad6ac5213efbb3 Author: George Wu Date: Fri Nov 30 17:49:33 2007 +1000 Add LVTMA PWRSEQ registers to fix VT switching for LVDS commit 9840a0fd4fc8c980533fcd4a02c55cd0d5634b6d Author: Alex Deucher Date: Thu Nov 29 13:27:37 2007 -0500 RADEON: add MacModel "mini-internal" for minis with internal TMDS Some macs (minis and powerbooks) use internal tmds, others use external tmds and not just for dual-link TMDS, it shows up with single-link as well. Unforunately, there doesn't seem to be any good way to figure it out. commit 017c939cf0a2b12fbdc1681cc70c28b23ae3b397 Author: Alex Deucher Date: Thu Nov 29 02:52:14 2007 -0500 RADEON: implement CLUT adjust support commit 9963b0fe01feb6dd0cb555b874a48f6fa3b255cb Author: Alex Deucher Date: Thu Nov 29 00:46:23 2007 -0500 RADEON: fix cursor offset on avivo chips commit 6c56e3d7655b17e93e8823aefe34b05291104695 Author: Alex Deucher Date: Tue Nov 27 15:27:36 2007 -0500 RADEON: switch r4xx to atombios load detection works great commit 7561242e5b79bc2798ca3aace2b79e1a36949488 Author: Alex Deucher Date: Tue Nov 27 14:50:36 2007 -0500 RADEON: re-org load detection for legacy chips commit febdcc2dccd42acbcd68ae630b7811cae5c58e8a Author: Dave Airlie Date: Wed Nov 28 05:10:57 2007 +1000 legacy: fix fb/agp read/writes commit bb8545146959b748994be055d5b3de66ec66c8b2 Author: Alex Deucher Date: Mon Nov 26 17:34:51 2007 -0500 RADEON: first pass at TV/Component video Untested and not likely to work just yet. commit e2bde646b864dca9056d9ecfe23a0d905647ea9a Author: Alex Deucher Date: Mon Nov 26 14:35:57 2007 -0500 RADEON: move crtc output source selection into atombios_output.c The function fits better as an output function and should now work with clones as well. commit 16c9be4107678a2a58d3418b7f1cc94d695ca8d6 Author: Alex Deucher Date: Mon Nov 26 14:20:54 2007 -0500 RADEON: add default connector table for avivo chips commit 6f080d00e6f4f84d5e0d6b4eff302bf42c230e81 Author: Arkadiusz Miskiewicz Date: Mon Nov 26 12:43:30 2007 -0500 RADEON: fix backlight control on some laptops It seems the bios scratch regs are involved in backlight control on some laptops. This patch fixes the problematic laptops and doesn't seem to break the previous bios lid and output control fixes. commit dcf22aed87366f4625fb5042cb84fecccd9ceece Author: Alex Deucher Date: Mon Nov 26 11:10:03 2007 -0500 RADEON: only return status unknown for XPRESS chips this seems to cause more issues than it attempted to fix so limit it to XPRESS chips for now. commit 206e280f02324641b4fe5a1986e26adf0e021fd4 Author: Alex Deucher Date: Mon Nov 26 09:39:27 2007 -0500 RADEON: fix typo in man page commit 4e792db655dc92d2864db36b4d8f6714908de8e8 Author: Dave Airlie Date: Fri Nov 23 15:44:44 2007 +1000 r500: set default minimum pll freq commit a13b4c69c105c096dd05e6de2c5c154c9a8bcc71 Author: Dave Airlie Date: Fri Nov 23 15:25:06 2007 +1000 r5xx: cleanup pll code.. Clean the PLL code to use the radeon pll structs. commit 5d792b5673bbf4784eb0ec059221e9b57232a122 Author: Dave Airlie Date: Fri Nov 23 15:03:13 2007 +1000 radeon: fix up memory mapping issues for vt switch commit 558a2ef266c1ca517c7fb464b0ccfef83238c913 Author: Dave Airlie Date: Fri Nov 23 14:39:32 2007 +1000 fix silly spaces commit 1bda4424a7031de437acfca9c41d4b3668e36051 Author: Dave Airlie Date: Fri Nov 23 14:39:19 2007 +1000 r600: add hi agp address for mc commit 133234c31a294f24a3968a576aad2bb8b89d0f6a Author: Dave Airlie Date: Fri Nov 23 14:15:18 2007 +1000 atombios: use values from object header commit dbf6eae7e7a4bd1bc60fefdc7ab6276ed3f097c4 Author: Dave Airlie Date: Fri Nov 23 11:55:05 2007 +1000 atombios: add initial object header parsing for r600 cards commit 6b103915c11fc79d2efc43c44fc2a00c3bc64ede Author: Dave Airlie Date: Fri Nov 23 09:24:20 2007 +1000 r500: make vt switch work again for me commit d24208276aad7669feeed527dced60c76d39eae6 Author: Dave Airlie Date: Fri Nov 23 08:50:25 2007 +1000 avivo: fix typo in register saving commit 197a62704742a4a19736c2637ac92d1dc5ab34ed Author: Adam Jackson Date: Thu Nov 22 20:26:23 2007 +1000 radeon: fix openoffice/render bug on r100 chips commit 64010fc4eae8359c01e430f64252931242c91435 Author: Dave Airlie Date: Thu Nov 22 20:25:31 2007 +1000 Revert "Disable RENDER acceleration by default on some RV200 chips." This reverts commit 145da701bf4fb9c0ad9f95620b20914ae0126852. pull in fix from ajax next commit commit 145da701bf4fb9c0ad9f95620b20914ae0126852 Author: Stefan Dirsch Date: Thu Nov 22 08:38:09 2007 +0100 Disable RENDER acceleration by default on some RV200 chips. Novell Bug #341699: Render acceleration is known to be broken on at least "Radeon 7500 QW" and "Radeon Mobility M7 LW". commit e810c3ae9908cd57e95b1b091cded87cbfc12fdc Author: Roland Scheidegger Date: Thu Nov 22 02:37:55 2007 +0100 really do not set up surface regs for depth buf on r100-class igps (bug #13080) fix the if condition testing for these chips... commit 0cc7e94849c1525750fabd04cf58f2dee88372e0 Author: Alex Deucher Date: Wed Nov 21 17:06:17 2007 -0500 RADEON: reorder crtc/pll setup commit d56bde98efceaa8344e62f8e98db90c4bb642331 Author: Alex Deucher Date: Wed Nov 21 17:03:39 2007 -0500 RADEON: fix crtc to output routing Thanks to AMD for the information commit a12390c832abe423def60e39cd5a9118e5910339 Merge: d531792 e74dca1 Author: Alex Deucher Date: Wed Nov 21 02:24:48 2007 -0500 Merge branch 'atombios-support' of git://git.freedesktop.org/git/xorg/driver/xf86-video-ati into atombios-support commit d5317922f29a57b6c4127826a2fc126c5fd7c117 Author: Alex Deucher Date: Wed Nov 21 02:23:37 2007 -0500 RADEON: attempt to fix crtc to output routing The output routing seems to be based on the output ids from the bios connector tables and the connected status in the bios scratch regs. I don't fully understand this yet, but this seems to work for the most part, however changing modes can sometimes lead to a blanked head. This can be remedied by forcing a dpms off cycle. commit 81ce299bffd75540925b4c8234adf11226147165 Author: Alex Deucher Date: Wed Nov 21 01:35:44 2007 -0500 RADEON: provide clearer debugging info commit e74dca19416b13f97db9d1fc06299b988057d6a4 Author: Dave Airlie Date: Wed Nov 21 16:24:25 2007 +1000 re-enable mobility chips commit 9c5b813dd6b3492cbc9833bc59792a5cec457e51 Author: Alex Deucher Date: Wed Nov 21 01:22:42 2007 -0500 RADEON: major re-org and clean up of atom output control - use radeon_output->devices to determine output - clean up and simplify dpms and mode set commit 7634cb6b96f938bc6615eb2c49ae75aaefd04cce Author: Alex Deucher Date: Wed Nov 21 00:10:14 2007 -0500 RADEON: make naming consistent and remove some cruft commit 908748343fc9a6cdc38af0fc028c63a82766da3f Author: Alex Deucher Date: Wed Nov 21 00:05:42 2007 -0500 RADEON: store devices ids from bios for each driver output commit 3975da2ea8cb628f7f66c3f26c5dfa181cd1c532 Merge: e283aa3 295ce27 Author: Alex Deucher Date: Tue Nov 20 23:52:29 2007 -0500 Merge branch 'atombios-support' of git://git.freedesktop.org/git/xorg/driver/xf86-video-ati into atombios-support commit e283aa332adf0134243a4fa3d14263719cd8a3fd Author: Alex Deucher Date: Tue Nov 20 23:35:46 2007 -0500 RADEON: add LVDS atom support commit e4bc3e1e7bb45571367d41b5328ff2590810b0f9 Author: Alex Deucher Date: Tue Nov 20 18:09:29 2007 -0500 RADEON: enable/disable the right TMDS controller commit 3e47683ffaa44a89cda9bcddf530643befb27efa Author: Alex Deucher Date: Tue Nov 20 18:01:15 2007 -0500 RADEON: fixup for bios tables with wrong connector types commit 7412952eb1d1e9857cdab8417f7305f676900827 Author: Alex Deucher Date: Tue Nov 20 18:00:12 2007 -0500 RADEON: switch to using ATOM defines for bios device table commit 295ce277bb0a44b9539b3dba575e7aff279dc2d0 Author: Dave Airlie Date: Wed Nov 21 08:56:40 2007 +1000 add missing files for make dist noted by ndim on #radeonhd commit 20083b0695987b25e442ecbdec24f3cb6f1ac2ae Author: Dave Airlie Date: Wed Nov 21 08:53:44 2007 +1000 LVDS on r500/r600 needs some work disable mobile chips for now commit e4b8a4479ddea9b083b3a763dc0b9302e7b9a82a Author: Dave Airlie Date: Wed Nov 21 08:06:12 2007 +1000 r600: add memory controller regs from AMD commit aa88da974b97ea1e9bbb47b3494543575c09d912 Author: Dave Airlie Date: Wed Nov 21 08:01:35 2007 +1000 rs690 is !> r600 commit c8872603454e6a4ffed9fc7d9adc2c364a429608 Author: Dave Airlie Date: Tue Nov 20 22:33:39 2007 +1000 radeon: restructure pci ids to avoid effort later This uses a single file with all the pciids and parameters for radeon family and setup in it. I don't run the perl script at build time to avoid a perl dependency on build but adding pci ids should be done via the csv file with openoffice or gnumeric if possible. commit a5b34c2f1f7d5346c4489cb30e07291d1217026c Author: Dave Airlie Date: Tue Nov 20 16:37:29 2007 +1000 r600: use standard memory controller setup paths commit 4a523da5221d53f2efa49da2326500e9b0b9f14d Author: Dave Airlie Date: Tue Nov 20 15:31:11 2007 +1000 r600: get r600 to work non-accelerated. DDC still not working yet commit 80023441ba46882bc810ff3790c7148059f155f5 Author: Dave Airlie Date: Tue Nov 20 14:10:23 2007 +1000 r600: block r600 startup due to lack of memory controller info commit f6fbbacc17bf9b1073d3e993b225987fd9173182 Author: Dave Airlie Date: Tue Nov 20 13:41:55 2007 +1000 atombios: add warnings for r500 and r600 commit 45a8b083c123b820c008f04ab857a64a8facec14 Author: Dave Airlie Date: Tue Nov 20 13:37:00 2007 +1000 atombios: add all r5xx and r6xx pci ids commit 5d023e2c3c2ab44ea57ffadc9607025d602c376c Merge: 0d1e0c7 c887260 Author: Dave Airlie Date: Tue Nov 20 13:02:43 2007 +1000 Merge branch 'master' into atombios-support Conflicts: src/radeon_chipset.h src/radeon_driver.c src/radeon_probe.c commit 0d1e0c7805b3d8e56ccb49465e6b144afb7bdc51 Author: Dave Airlie Date: Tue Nov 20 09:08:04 2007 +1000 r5xx: add 71c5 for macbook pro commit d5909b30595c103bb5f42cd1704330f944bba49c Author: Dave Airlie Date: Tue Nov 20 08:15:58 2007 +1000 r5xx: cleanups after last merge commit fe2f7a09050fb7a345a1f52239f8f3c4f1053891 Merge: 744c8cb 49055d8 Author: Dave Airlie Date: Tue Nov 20 08:04:32 2007 +1000 Merge branch 'master' into agd-atom-merge Conflicts: src/radeon_cursor.c src/radeon_output.c commit 744c8cb6c293fcaa687566f52901644e699baace Merge: e258fbe e530af7 Author: Dave Airlie Date: Tue Nov 20 07:56:33 2007 +1000 Merge branch 'agd-atom' of ssh://people.freedesktop.org/~agd5f/xf86-video-ati-atom into agd-atom commit e258fbe411d255a1044b61d7ff738aee3fb5b7f4 Author: Dave Airlie Date: Mon Nov 19 16:35:05 2007 +1000 makes 2-headed cursor work commit e530af79adf51b3e95a0eca676c915a34dcbf4a7 Merge: 69e197f 52aba8d Author: Alex Deucher Date: Mon Nov 19 00:59:30 2007 -0500 Merge branch 'agd-atom' of /home/alex/git/airlied/xf86-video-ati2 into agd-atom commit 69e197f2c8002aacf2587754c8d3bd63c88f85b1 Merge: 5e8940f 862dcab Author: Alex Deucher Date: Mon Nov 19 00:57:34 2007 -0500 Merge branch 'agd-atom' of /home/alex/git/airlied/xf86-video-ati2 into agd-atom commit fca47ad083449f4cf9063dd970cdcebea6a7f110 Author: Dave Airlie Date: Mon Nov 19 15:53:40 2007 +1000 add z3ro's pciids commit 5e8940fa6e33d09091aa4bcf04b0f9e79596e1b8 Author: Alex Deucher Date: Mon Nov 19 00:52:38 2007 -0500 fix logic in connector table check for TVs and switch counter to symbolic names commit c19123fd9483758eb6b286c3dffcb6d79d5b1ee5 Author: Dave Airlie Date: Mon Nov 19 15:46:58 2007 +1000 add firegl card on ajaxs machine commit f02f340e466a415b4e01648ca1e323f4ce125885 Author: Alex Deucher Date: Mon Nov 19 00:39:19 2007 -0500 Don't assign a gpio for TV commit 52aba8d73189ba959f19c0437499d5e7a8829827 Merge: 862dcab 5e8940f Author: Dave Airlie Date: Mon Nov 19 15:30:46 2007 +1000 Merge branch 'agd-atom' of ssh://people.freedesktop.org/~agd5f/xf86-video-ati-atom into agd-atom commit 862dcabfe0c10751d815e5cdd7436c10c2c2db10 Author: Dave Airlie Date: Mon Nov 19 15:30:08 2007 +1000 r520: nail i2c enable/disable issue commit f3dd7f413b670eeb6b8639f6677d72050ad5fe04 Author: Alex Deucher Date: Mon Nov 19 00:19:39 2007 -0500 Don't detect TV out for now commit 94de0e22d7229ca71e18e1e849d8545d9ca7bafe Author: Dave Airlie Date: Mon Nov 19 14:47:33 2007 +1000 i2c: fix bus enable stuff commit 3f1fc7eef13ea02fa5119e9b51d499841b801f2d Author: Alex Deucher Date: Mon Nov 19 00:02:14 2007 -0500 CRTs/DFPs may share a DVI port, but TV and CV don't commit 8f84c5ad4c4af14612ea68fe6f24d0d527f00acc Author: Alex Deucher Date: Sun Nov 18 23:43:06 2007 -0500 fix typo in loop commit 384cd8f52c89d089c6559e2eedbae45641fcd14e Merge: f3f0e4e 234b607 Author: Dave Airlie Date: Mon Nov 19 14:02:55 2007 +1000 Merge branch 'agd-atom' of ../xf86-video-ati into agd-atom commit f3f0e4ec92c935c89ddb2f4241fe4335a521b439 Author: Alex Deucher Date: Sun Nov 18 23:14:01 2007 -0500 RADEON: unify connectortype handling commit 234b6073054ac7630e82781683e666b94b2f12de Author: Dave Airlie Date: Mon Nov 19 14:02:09 2007 +1000 restore avivo memory map registers at correct places commit 459a30ba511fe2fa8051380a9741fcfd9bb401ef Author: Dave Airlie Date: Mon Nov 19 13:44:38 2007 +1000 fix type for r520 agp code commit 760af92412ef0d5cc44e52e7cec11fd80c4aaaeb Author: Alex Deucher Date: Sun Nov 18 22:34:59 2007 -0500 RADEON: unify DDC line handling commit e73bf6290da20dd61798ace775999ce1cb550934 Author: Dave Airlie Date: Mon Nov 19 13:32:16 2007 +1000 add x1900xt support commit 2e37937bacd624d616b91c41006c113791ebe98d Author: Alex Deucher Date: Sun Nov 18 20:18:50 2007 -0500 RADEON: step one in output rework re-organize the output type commit 679e7a2e0d1b213524b8109193483bc9840fb116 Author: Alex Deucher Date: Sun Nov 18 17:56:51 2007 -0500 Few fixes from the last commit. Update parser works fine on r4xx. commit 1cd7cc3e6758ab1012f3ced6e958a1517f45557f Author: Alex Deucher Date: Sun Nov 18 17:44:36 2007 -0500 WIP: new atom code comples. I commented out the object parsing for the time being as using it will require some thought as to new output related data structures. commit b155fa872ee4ca5d801e942aee6e619cef104f35 Author: Alex Deucher Date: Sat Nov 17 00:34:56 2007 -0500 WIP: more new ATOM integration work commit 67db114d97abed7a607467e5d67c7b4ffa2c347e Merge: 7d06a87 ea15346 Author: Alex Deucher Date: Fri Nov 16 14:29:53 2007 -0500 Merge branch 'agd-atom' of /home/alex/git/airlied/xf86-video-ati2 into agd-atom commit ea1534659de87d3d75eb20d808d039cff22cb537 Author: Dave Airlie Date: Fri Nov 16 18:46:02 2007 +1000 avivo: fixup some i2c stuff commit 7d06a8791839ce6b22e2449646832b79cebf1b21 Author: Alex Deucher Date: Fri Nov 16 02:43:00 2007 -0500 WIP: sync up with the latest ATOM bios code in rhd doesn't compile ATM commit 3614d80ceb9a7b3615b0baab3cf2dd34ed4ab464 Author: Dave Airlie Date: Fri Nov 16 17:22:39 2007 +1000 add missing hpd register commit 9a2715fda97ac0ebcb45650a416e0652aab575b8 Author: Dave Airlie Date: Fri Nov 16 17:22:25 2007 +1000 make i2c unlock/lock registers for gpios commit 20dc549fff9a4137c93ebed449d05e0c437b6bc1 Author: Dave Airlie Date: Fri Nov 16 17:01:33 2007 +1000 avivo i2c: consolidate the avivo i2c code commit 3e62730f79a13883a65a568bc821bc56055a4ab7 Author: Dave Airlie Date: Fri Nov 16 15:19:00 2007 +1000 atombios: fixup warnings in atombios files commit cca7af3c4910983f7f090792986fcbfa0dc97cfb Author: Dave Airlie Date: Fri Nov 16 15:04:01 2007 +1000 remove avivo_reg.h commit d39eb2077c6b2fc094ccd952772528eb9428c587 Author: Dave Airlie Date: Fri Nov 16 15:00:50 2007 +1000 radeon: rename a large section of avivo regs to documented names commit b7774c28dde72a205a40be78003df72eabfb9b1f Author: Dave Airlie Date: Fri Nov 16 14:48:36 2007 +1000 Add copyright headers commit 3cfcd2164b400bd0d1cb4ede8eeb01abba9d75c8 Merge: efac14e 718bfd3 Author: Alex Deucher Date: Thu Nov 15 23:25:39 2007 -0500 Merge branch 'agd-atom' of /home/alex/git/airlied/xf86-video-ati2 into agd-atom commit efac14e669a0c6184f8848191eb49ffb21934ee1 Author: Dave Airlie Date: Thu Nov 15 23:17:25 2007 -0500 r5xx: fix typo for crtc offset commit e6db621c37ff615be286462f000d67a662c5c331 Author: Alex Deucher Date: Thu Nov 15 23:15:56 2007 -0500 fix INMC() and OUTMC() on !AVIVO chips WR_EN is bit 8 so don't use OUTREG8. commit 52ba3fdd1ce05983fabedff234cfaf4c60fba38d Author: Alex Deucher Date: Thu Nov 15 23:12:30 2007 -0500 atombios_dac_detect() takes care of primary vs tv dac itself commit 49055d8aff91ff12186feaf5343c8fd2f96bcba0 Author: Alex Deucher Date: Thu Nov 15 22:56:09 2007 -0500 RADEON: set proper defaults for tv dac BGADJ/DACADJ we should get these values from the bios tables, but for now use some reasonable defaults. This should fix the washed out color problems on bugs 1082 and 12844. commit 821acf38b716ab87c3d07263d6e4a139fe54803f Author: Alex Deucher Date: Thu Nov 15 22:28:42 2007 -0500 RADEON: Make sure we set the MT properly for connected status unknown commit a94123f33ec6584fbdfc4b9ecd543d1357de8814 Author: Alex Deucher Date: Thu Nov 15 22:19:54 2007 -0500 Revert "Portability fix from netbsd" This reverts commit c9264aa53bf1470ad9104d1e7c4a8ce13c49c270. This breaks damage support. See bug 13244 commit 718bfd3b61879172eee819fdab7080d5d4c0a756 Author: Dave Airlie Date: Fri Nov 16 10:37:04 2007 +1000 r5xx: fix typo for crtc offset commit e9d721c31372db045550f9562534b28f16121bb9 Author: Roland Scheidegger Date: Tue Nov 13 23:42:42 2007 +0100 ignore sometime bogus agp_mode bit from chip (bug #13190) bit is wrong on at least X700 cards with rialto pcie-agp bridge chip, should be safe to use just the bit from the bridge hopefully to make agp setup work on these cards and not adversely affect others. commit b865886d00907899297ae864358eb26d9980975d Author: Alex Deucher Date: Sun Nov 11 20:38:41 2007 -0500 bump for RC release commit 7aeb35e5ad1aed6e78a3d8565fbfbfe66232ab45 Author: Alex Deucher Date: Sun Nov 11 19:29:30 2007 -0500 fix from last commit commit 2ea95900547165e86ad3f8a41ce3331a05bad60e Author: Alex Deucher Date: Sun Nov 11 18:43:03 2007 -0500 Add full parsing support for atom bios connector table commit 7ce730828c293f0810dfdc554df48dfd76e35c49 Author: Alex Deucher Date: Sun Nov 11 12:37:01 2007 -0500 rework crtc output source setup commit d61b6c78aa7810a2f9b9e2d9d95aab4295de80ce Author: Alex Deucher Date: Sun Nov 11 11:58:17 2007 -0500 make sure i2c bus exists before using it commit 342e3e207efda42ba679731c30dfb9d5e9d5643f Author: Alex Deucher Date: Fri Nov 9 17:11:43 2007 -0500 combine outputs based on id commit 8078c299d5941460243944d55051547c1a4d3791 Author: Alex Deucher Date: Fri Nov 9 16:35:08 2007 -0500 use atom to program plls on r4xx commit 5febe2c96642f61d006abe6e8081e69d5b95adc0 Author: Alex Deucher Date: Fri Nov 9 16:24:56 2007 -0500 turn off vga control when using ext modes commit 83f170c32c08c74a9e3466ffa0e0a0606c74427b Author: Alex Deucher Date: Thu Nov 8 19:33:13 2007 -0500 add pci ids for X1550PRO commit 5cdcaba0f6e9de2d15cfcc109ab97d9fd423e3bf Author: Alex Deucher Date: Thu Nov 8 19:28:03 2007 -0500 make sure to assign gpio commit 2dcb852778301b9284a2b4906dcf64f95ed638b7 Author: Alex Deucher Date: Thu Nov 8 18:39:23 2007 -0500 pull in another of Dave's fixes commit 96273016a0bbdfa4d3a4e6275a3b09eeeadaa534 Author: Alex Deucher Date: Wed Nov 7 01:22:30 2007 -0500 fix and move crtc source set up atombios_output.c it's really more output related. commit 5c495c81cc3bcd4a38d06954243ed3bdc85bdc07 Author: Alex Deucher Date: Wed Nov 7 01:04:11 2007 -0500 add support for initing external tmds via ATOM commit 5c13d9355280e6de44ebbf8de7ea89a6b91c7388 Author: Alex Deucher Date: Wed Nov 7 00:17:28 2007 -0500 add avivo output stuff commit 68e7f5c67e2e9d2162b469ce31f452f3f89756b5 Author: Alex Deucher Date: Tue Nov 6 23:43:29 2007 -0500 more avivo updates commit 303562dfb57e13c027b2aa9289d54e547c829ff1 Author: Alex Deucher Date: Tue Nov 6 23:06:46 2007 -0500 add additional connector types commit 0d3e0735f710cb7b9505e4330997aa332f73c102 Author: Alex Deucher Date: Tue Nov 6 22:59:25 2007 -0500 First round of avivo support commit 0abfe3150ce3eed4db93ccc2975bd4622dfa54a7 Author: Alex Deucher Date: Tue Nov 6 18:47:00 2007 -0500 Add atombios files commit 20f01950e42babc308b4470df6a3c6628c932003 Author: Alex Deucher Date: Tue Nov 6 18:04:43 2007 -0500 for r4xx ATOM cards, just use ATOM for PLL while crtc timing and pll seem to work fine, output setup and routing don't seem to work too reliably with atom. AMD claims ATOM was still pretty new with r4xx so it's probably better to stick with direct programming for some things. commit 37af2f6b52c8f217b205486742a6b46a864da8ed Author: Michel Dänzer Date: Mon Nov 5 10:58:25 2007 +0100 radeon: Use indirect register access for (un)hiding the cursor. This avoids hangs that occur when touching these registers while the card is busy with some cards. commit 5659e2f1b08e44d0c4f21a403e91b4801ef78f62 Author: Michel Dänzer Date: Mon Nov 5 10:32:04 2007 +0100 radeon: Fix build warning on powerpc. commit d41d73f5f9d8baee7137e94da2c7852ea0412180 Author: Michel Dänzer Date: Mon Nov 5 10:30:23 2007 +0100 Revert "radeon: Reinstate sync in radeon_crtc_show/hide_cursor." This reverts commit 0241cac643fa1c08a45ea44f5c670b290e760ad8. Taking the DRI lock in paths called from the SIGIO handler isn't safe. For example, the SIGIO handler may be called while the lock is held by an AIGLX context, resulting in deadlock. See e.g. https://bugs.freedesktop.org/show_bug.cgi?id=13005 . commit 78a3eabff382e8ebe33df2039076fb083bcc361b Author: Alex Deucher Date: Sun Nov 4 14:11:26 2007 -0500 WIP: get ATOM crtc stuff working on r4xx commit 5e9ebd8e496b72b051053d637c63b2956b7861d3 Author: Alex Deucher Date: Sat Nov 3 20:46:17 2007 -0400 Initial support for r4xx - add r3xx/r4xx MC access macros and functions commit c106075ccb81ca2ee4894743e676fd37653c8dce Author: Alex Deucher Date: Sat Nov 3 18:29:20 2007 -0400 More of Dave's ATOM init code. commit e18f5d61806b445ad77d93e258fbce9422b52bb6 Author: Alex Deucher Date: Sat Nov 3 18:20:55 2007 -0400 Initial integration of Atom code and some of Dave's code. ATOM builds, but it's not hooked up yet. commit aaafc6a8f33d4736c37c43d3fd5e43085a2590fb Author: Brice Goglin Date: Sun Oct 28 21:10:32 2007 +0100 Fix typo in 'disposing cursor' Bug #12984. commit a5c55c418319c1315ad73c305ef48b44fe1d9580 Author: Alex Deucher Date: Sat Oct 27 19:46:11 2007 -0400 RADEON: disable FP DETECT for DVI. These bits don't seem to be reliable or routed right in all cases. commit 49cf7cb3db36ce7734f7e314a040a240191d6477 Author: Alex Deucher Date: Thu Oct 25 21:23:09 2007 -0400 RADEON: Fix IgnoreEDID option commit 70bbc0cfe699588f8ae4123efca0e1baffc91000 Author: Alex Deucher Date: Thu Oct 25 20:56:11 2007 -0400 RADEON: clean up mode handling and improve reliability of DDC - Reduce the number of times we do DDC and don't skip the magical GPIO dance when doing DDC. - If no DDC modes are found, add the screen modes commit 1a4f590c2ac071f0c348f38e9f26fa6093722453 Author: Alex Deucher Date: Thu Oct 25 19:25:36 2007 -0400 RADEON: document DefaultTMDSPLL option commit 2d26e0d0bcf25e210dc7771e76638dcfafcc2356 Author: Alex Deucher Date: Thu Oct 25 19:18:18 2007 -0400 RADEON: Add driver option to force TV DAC load detection on commit a9306b7986467c0794c91625ad2ece597b718462 Author: Alex Deucher Date: Thu Oct 18 20:06:58 2007 -0400 RADEON: fix possible crash in radeon_crtc_mode_set() when radeon_crtc_mode_set() is called during ScreenInit(), we don't have pScrn->pScreen yet. commit 115b4b65ef679a46d90b7fc8ac22ace37038b3fc Author: Alex Deucher Date: Wed Oct 17 20:25:47 2007 -0400 RADEON: Remove LVDSBiosNativeMode Option Shouldn't be needed any longer as I've finally sorted out the LVDS issues due to the crtc setup. commit f2eb5c1cc69a4f7b0754ec6b2efde4fa1650ab6d Author: Alex Deucher Date: Tue Oct 16 18:54:28 2007 -0400 RADEON: finish fixing LVDS/RMX For panels, both the mode and crtc values need to be updated based on the native mode timing. This shoudl fix any remaining problems with RMX. commit 93561688087493fccb7ac387d728feec61212180 Author: Michel Dänzer Date: Tue Oct 16 10:57:06 2007 +0200 radeon: Handle 64 bit PCI resource bases better. commit 08945fc8a14ba57e32350e85daa3354619e9e72e Author: Alex Deucher Date: Mon Oct 15 21:12:46 2007 -0400 RADEON: allow the user to set any tv standard allow the user to set any tv standard rather than limiting it to what the bios says is supported. commit 571548b2b95ce289f26a77c11deb6266f0b18516 Author: Alex Deucher Date: Mon Oct 15 20:33:56 2007 -0400 RADEON: use native timing for RMX RMX should work again with native timings after the previous patch. commit 2f87bff293a343b40c1be096933a5ae126632468 Author: Alex Deucher Date: Mon Oct 15 20:06:28 2007 -0400 RADEON: Fix subtle change in crtc reg init At some point we changed how hsync_wid and vsync_wid were clipped. Previously we used the field size as a mask when building the register. This got changed to setting the value to the field size if it was greater. this probably explains number stange mode bugs. commit fd5bb7bb5e968127b87102320eccc1222f205e5a Author: Michel Dänzer Date: Sat Oct 13 18:56:43 2007 +0200 radeon: Improve detection of default value for Option "MacModel" on Linux. * Detect all PowerBooks with dual link DVI (according to developer.apple.com) and both Mac Mini G4 models. Other PowerBooks and iBooks should be covered by the 'detected as' line in /proc/cpuinfo. * Give specific instructions for overriding and reporting incorrect detection. * Only perform detection when Option "MacModel" isn't present with a valid value. * Close /proc/cpuinfo file handle when done with it. * Coding style cleanups. commit fbf121add5584049627f07345fc502b2aefc88ce Author: Eugen Dedu Date: Sat Oct 13 16:51:58 2007 +0200 radeon: Derive default value of Option "MacModel" from /proc/cpuinfo on Linux. commit 5db3afaa1fdb69d382ac769ef40191a4b964d28e Author: Alex Deucher Date: Thu Oct 11 20:25:20 2007 -0400 RADEON: return status unknown for flaky chip/connector combinations This should at least get something on the screen. XPRESS chips, I'm looking in your general direction... commit 1148d332f52f3780897aae3fcd5d6a67687c42cd Author: Alex Deucher Date: Thu Oct 11 19:09:45 2007 -0400 RADEON: fix potential crash in mode handling commit 905b19df33d6f912336b65895e97775ffec07728 Author: Alex Deucher Date: Thu Oct 11 18:55:08 2007 -0400 RADEON: small cleanup from last commit commit 7afd04c1e4ffa6e4e5ba08ae90ba002237dc282b Author: Alex Deucher Date: Thu Oct 11 00:16:45 2007 -0400 RADEON: tell the bios not to muck with the hardware while the driver is active by toggling the appropriate bios scratch regs you can tell the bios not the touch the hw while the driver is active. This should prevent the bios from scrambling the hardware when users open the lid or toggle bios hotkeys. fixes bug 12567 commit 1b231d28fdda5cdc44bb9d2075d4edfd8f17e21f Author: Alex Deucher Date: Wed Oct 10 21:54:46 2007 -0400 RADEON: attempt to detect lid status on legacy bios I'm not sure how reliable this is. The lid closed bit only seems to be set if the lid is closed at boot so LVDS will default to on if you restart X with the lid closed after boot. commit 47ef583b993607bc3a372dd125c6e5228c4ec7bf Author: Alex Deucher Date: Wed Oct 10 19:35:31 2007 -0400 RADEON: more XPRESS connector table hacks Seems XPRESS desktop chips with DVI-D list a proprietary connector type rather than DVI-D. try and do the right thing. Also, XPRESS chips seem to include connector type 8 and ddc type 8 which are unknown at this time. commit c9264aa53bf1470ad9104d1e7c4a8ce13c49c270 Author: Joerg Sonnenberger Date: Tue Oct 9 23:18:29 2007 -0400 Portability fix from netbsd commit 80eee856938756e1222526b6c39cee8b5252b409 Author: Matthieu Herb <> Date: Tue Oct 9 16:17:50 2007 -0400 RADEON: fix console restore on netbsd Include the mode restore bugfix from monolithic Xorg, that is derived from the version in xsrc which in turn was provided by Matthieu Herb over 3 years ago on the XFree86 lists. Suggested by various developers, hold-back due to the working state in xorg-server 1.1.1. Tracing down the exact change showed that the changed default color depth made this issue a lot more prominent again. Discussed with Eric Anholt. commit 547fef4c6382f8a4951c086ee531b804cba31075 Author: Lars Weiler Date: Tue Oct 9 16:10:34 2007 -0400 include stdint.h to fix the build on some platforms fixes bug 12733 commit ddec5783103045084a66a34d71326cc6e4a3f598 Author: George Sapountzis Date: Tue Oct 9 13:27:27 2007 +0300 theatre compiles with pci-rework. commit 051435610a66735fd455bbb526fa294fcfe8c0b6 Author: Alex Deucher Date: Sun Oct 7 19:39:47 2007 -0400 RADEON: still more LVDS fixes Seems some laptops need the native mode from the bios for LVDS while others seem to prefer a CVT mode. Add an option to pick the preferred mode. The default it to use the bios table timing. commit 0b03a73b7dcb4aa192c42f2a4c842d324c358122 Author: Dave Airlie Date: Sat Oct 6 20:11:19 2007 +1000 radeon: add support for DDC type 6 thanks to arekm on xorg-devel for testing/feedback commit 83d7506a603889b6c18736cff9b2cd3296c95c84 Author: Alex Deucher Date: Fri Oct 5 20:25:04 2007 -0400 Bump for RC release commit fe66cc4e02a52e1d014ae5de192c65e8abd7f58a Author: Tormod Volden Date: Fri Oct 5 20:10:55 2007 -0400 RADEON: rename to PCI_CHIP_RS485_5975 everywhere RS482_5975 is actually RS485. see bug 12048 commit 314e8fdbe5369e4c1786d176d03d0d2a046f25d5 Author: Tormod Volden Date: Fri Oct 5 20:05:54 2007 -0400 RADEON: Disable DRI by default for RS482 cards fixes bug 12048 commit abbafe6db7c0d24efc61a05950d4214c00d3f043 Author: Michel Dänzer Date: Thu Oct 4 11:33:09 2007 +0200 radeon: Fix compile warnings. commit 1110957ba703475847b8e72023c6edcbd1068aef Author: Michel Dänzer Date: Thu Oct 4 11:32:48 2007 +0200 radeon: Fix for pci-rework. Surprisingly easy, thanks to George's pci-rework changes. commit 7addf41885ec5658f531624a9c24ea5bd7d22d19 Merge: 3a958ba 78c6bd3 Author: Michel Dänzer Date: Thu Oct 4 11:06:08 2007 +0200 Merge remote branch 'origin/pci-rework' commit 3a958ba136c3fae5a4ddd56373ac7cd47046f10e Author: Alex Deucher Date: Wed Oct 3 22:59:14 2007 -0400 RADEON: remove some cruft commit b6bda79f72df5e5bf9c6b71fa3298e765da506bd Author: Alex Deucher Date: Wed Oct 3 22:56:27 2007 -0400 RADEON: more fixes for single crtc chips commit 5f5c4e6ad61c45c24f1443b91b4bc5375efdebc0 Author: Alex Deucher Date: Wed Oct 3 22:46:21 2007 -0400 RADEON: remove RADEONSaveMode() It's only called by RADEONSave(), so just move its contents into RADEONSave(). this mirrors RADEONRestore(). commit bfede412b3a3cd11769a580b167c528734146096 Author: Alex Deucher Date: Wed Oct 3 22:19:16 2007 -0400 RADEON: minor fixes for external TMDS commit 597dffce9bdc200003d0be880235258386a0bdd7 Author: Alex Deucher Date: Wed Oct 3 21:43:08 2007 -0400 RADEON: final fix for RMX/LVDS It seems that on quite a few laptops the LVDS H/V timing from the bios tables are way off or just doesn't work period. Either we are using it wrong or we need some additional checks when we parse it. Only the dot clock seems to really matter, so use cvt modes and update the dotclock. This seems to work correctly in all cases. commit cc0c2d8e61600652b1f9cb3dc49db2ef62b1e40d Author: Alex Deucher Date: Wed Oct 3 00:59:37 2007 -0400 RADEON: Finally sort out LVDS modes - The panel timing from the bios tables is for the crtc, not the native panel mode, so add cvt modes for the panel and fix up the crtc values in mode_fixup(). - rename and reconfigure RADEONValidateFPModes() to what it really does: add screen modes. I suppose for backwards compatibility we ought to add the screen modes to every reasonable output, but everyone should really use xrandr or an output monitor section to add custom modes. Hopefully this will go away at some point. commit 0ca184c3c35032df39ea7ce5d2d4aba1a97b6426 Author: Alex Deucher Date: Tue Oct 2 19:38:18 2007 -0400 RADEON: fix RADEONInitDispBandwidth() on single crtc cards Should fix bug 12490 commit a5fb2a5d54cdd562a97881cdea1a4af35b483aab Author: Dave Airlie Date: Mon Oct 1 08:48:27 2007 +1000 radeon: fix powerpc build commit 22519fde1e002f28d6036d448fcd18452d00f1bb Author: Alex Deucher Date: Sun Sep 30 13:11:20 2007 -0400 RADEON: add support for ext tmds table and ext tmds chip init This probably won't work on all chips as the various gpio lines seem to need special magic to to actually talk to the i2c slave chips. commit dcc376e2d2a13329dd03f1bc4b471329757a6f5f Author: Alex Deucher Date: Wed Sep 26 23:27:38 2007 -0400 RADEON: remove cruft commit 99ceaefa18c6e07b55106cca0ea8996fa73667be Author: Alex Deucher Date: Sun Sep 30 12:02:54 2007 -0400 RADEON: more work on LVDS mode validation and fixups Hopefully this will fix up the weird mode issues with LVDS and native and RMX modes, but I can't seem to get quite the right combo to fix everyone. commit d808781d48adf01e80b5bb476bae2d2f599030f1 Author: Dave Airlie Date: Fri Sep 28 14:50:42 2007 +1000 rc410: disable DRI by default due to it not working commit 4d9f944e40c6b9ac7e80428dff49c6e83fda1d8f Author: Michel Dänzer Date: Thu Sep 27 17:50:15 2007 +0200 radeon: Fix build on little endian platforms. This was accidentally broken when moving away from using pixmap data pointers directly. commit 5902e913010a2fb0c17efe01f9aade73f9646f16 Author: Michel Dänzer Date: Thu Sep 27 12:53:34 2007 +0200 radeon: EXA pitch fixes. The combined pitch/offset registers only support pitches up to 16320 bytes. With EXA >= 2.3, set the maxPitchBytes field accordingly. With older versions, limit maxX such that the pitch of 32bpp pixmaps doesn't exceed the limit. Also check the limit in RADEONGetOffsetPitch just in case. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=12551 . commit ca728973bce504e03bf6228d18287906c35eaa3f Author: Michel Dänzer Date: Thu Sep 27 11:14:21 2007 +0200 radeon: Don't use pixmap data pointer directly with EXA. Fixes segfault with current xserver master without AccelDFS. commit 21593d04d222b05dbba9abd31eaa3bfb91d999b6 Author: Alex Deucher Date: Mon Sep 24 23:01:20 2007 -0400 RADEON: more clean up of mode code also print out LVDS mode info from bios for both legacy and atom bioses commit 22cccb99d762567757d3fd38795f71e943f1faf9 Author: Alex Deucher Date: Mon Sep 24 00:10:01 2007 -0400 bump for RC release commit fad9e7b00de051f632000eb2304ac23a524f7c8e Author: Alex Deucher Date: Sun Sep 23 23:43:26 2007 -0400 RADEON: Rework LVDS mode validation The old validation code wasn't really well suited to randr. This fixes several issues: - missing display size for panels with edid - broken duplicate modes commit bf9674b9df351108e069d037ec10869a4154a881 Author: Alex Deucher Date: Sun Sep 23 15:01:34 2007 -0400 RADEON: properly set default RMX types commit b27135bce8b41d69290613b440a338b0a7fe0200 Author: Alex Deucher Date: Sun Sep 23 14:44:38 2007 -0400 RADEON: fix up LVDS handling for r3xx and newer commit d5cf268be2c9b3e320d7101f5213f7d5609b6308 Author: Alex Deucher Date: Sat Sep 22 18:31:51 2007 -0400 RADEON: Fix crash when Xv window is outside of either crtc commit 8aca0ca6be7122e0ece20985a1862553a1b225c0 Author: Alex Deucher Date: Sat Sep 22 17:56:50 2007 -0400 Revert "RADEON: fix crash when Xv window is outside of either crtc" This reverts commit 9109e62e3be7f96b41b534ab517fdf1baf458806. This breaks ABI. better fix to come. commit d6e1d9be1cd5786a24ed4bb8e45fa7e04df56622 Author: Alex Deucher Date: Sat Sep 22 16:14:06 2007 -0400 RADEON: Don't make the entity as shareable This should prevent people from mistakenly trying to run zaphod mode commit 81114af1cdddc0b10d076f2e38c7a00c1223cc48 Author: Alex Deucher Date: Sat Sep 22 15:51:23 2007 -0400 RADEON: preliminary support for mac mini Option "MacModel" "mini" may not be 100% correct yet commit 6c482e453bc8156886294d0c1b8f3f1b3dcf4b36 Author: Alex Deucher Date: Sat Sep 22 15:11:20 2007 -0400 RADEON: Fix RMX on LVDS LVDS + RMX doesn't seem to like having the crtc values tweaked. commit 9109e62e3be7f96b41b534ab517fdf1baf458806 Author: Michel Dänzer Date: Sat Sep 22 14:19:10 2007 -0400 RADEON: fix crash when Xv window is outside of either crtc Should fix bug 12175 commit d2ce4a5003ce1291ea2327b2c00a0b24408fe26c Author: Alex Deucher Date: Sat Sep 22 10:41:55 2007 -0400 RADEON: RMX updates - add option to turn off RMX - turn off RMX by default on DVI - add infrastructure to support more RMX modes commit f95b9ab729376083bf0d12987ee260ec2aba721e Author: Alex Deucher Date: Fri Sep 21 00:12:37 2007 -0400 RADEON: remove more old cruft commit 5a6f74103f0ec0d451d0e2573442efe5922848af Author: Maciej Cencora Date: Thu Sep 20 23:56:08 2007 -0400 RADEON: fix video in on RV380 (tested on X600 VIVO) commit c72a365386e19f9257db041d44b09ad499cc9f6a Author: Alex Deucher Date: Thu Sep 20 23:49:57 2007 -0400 RADEON: fix up dvo support (still no external chip init) commit 5e4d98470b6412a686883c554e7eb7badbe78c4d Author: Alex Deucher Date: Thu Sep 20 23:22:48 2007 -0400 RADEON: round 3 on the PLLs. should fix the LVDS issues commit c5e2a2f09af807006c7ea493a8e90ff77abe207c Author: Alex Deucher Date: Wed Sep 19 19:58:28 2007 -0400 bump for RC release commit 46ff78b9f010ca24178d4363761be00eb3ecb632 Author: Alex Deucher Date: Wed Sep 19 19:49:58 2007 -0400 RADEON: add default connector setup for single crtc chips commit 509ca0cb0e1cde905b47db2bbac6f2a58523b279 Author: Alex Deucher Date: Wed Sep 19 19:41:17 2007 -0400 RADEON: fix external TMDS parsing in legacy bios connector table commit 5a59547ef7e986c9613023d941c3354cd476faf1 Author: Alex Deucher Date: Wed Sep 19 19:28:09 2007 -0400 Revert "RADEON: initial pass at external TMDS support" This reverts commit 4000a710c93dd2d82891e4082bc7fa922ba9c5f4. This needs to be reworked and needs more soak time. so revert for now. commit dc333884c540d536bffe51a5ebfaf1822af6a91c Author: Alex Deucher Date: Tue Sep 18 22:23:12 2007 -0400 RADEON: fix plls again previous fix seemed to break other chips. Lets see how this goes. commit 271e541088f455d1cfedff87e88c9a4fdbdbe424 Author: Alex Deucher Date: Tue Sep 18 22:12:31 2007 -0400 RADEON: Remove more mergedfb cruft commit 8ae69c496eba701e744cca0605f73242673f7b3f Author: Alex Deucher Date: Tue Sep 18 20:12:21 2007 -0400 RADEON: adjust pll restore some chips seem to be pickier than others. fixes bug 12467 commit 8a84dc8ee260716026fa661a6dced2000621efa2 Author: Michel Dänzer Date: Tue Sep 18 11:53:39 2007 +0200 radeon: Remove declaration of unused variable. commit 2fbbd9c5f0ec27e72780e8b054bc59502f1e5651 Author: Alex Deucher Date: Tue Sep 18 00:45:56 2007 -0400 RADEON: note that MergedFB support has been replaced with randr 1.2 commit 81b708dbd35c29bf2d67e8c655af97b60e61498b Author: Alex Deucher Date: Mon Sep 17 23:54:03 2007 -0400 RADEON: turn off load detection on tv dac by default it's just too unreliable and even when it is most people don't want it. enable it via output attribute or force the outputs on with xrandr commit c3ab53159d42157985a25e9125eaa5362273b73d Author: Alex Deucher Date: Mon Sep 17 23:28:51 2007 -0400 RADEON: XPRESS connector tables are crap besides specifying the pimary DAC (which they don't have), most seem to specify DDC_CRT2 for DDC, which does not seem to ever work. Some have reported success with DDC_MONID so lets give that a try. commit 1fafa970fa78ddea29a8804b6cd0aea52e4fa2e1 Author: Alex Deucher Date: Mon Sep 17 23:10:13 2007 -0400 RADEON: ignore edid digital bit on analog ports Some monitors have this bit set even on analog ports commit 4000a710c93dd2d82891e4082bc7fa922ba9c5f4 Author: Alex Deucher Date: Mon Sep 17 23:04:17 2007 -0400 RADEON: initial pass at external TMDS support - Based on Dave Airlie's initial work and the dvo support in the intel driver. - Only sil164 is supported at the moment. - Once we get some testing and such, we ought to move the dvo drivers out of the drivers so they can be shared among all drivers - Doesn't seem to work on my card (r4xx ATOM) card ATM - Legacy bios table programming sequence not implemented yet commit 38515d402555eaa61c686d42973e59f659b07466 Author: Alex Deucher Date: Sat Sep 15 11:39:47 2007 -0400 RADEON: don't restore bios scratch regs Leave them as programmed by the bios fixes bug 12424 commit 78c6bd305f2ea70629d1dda3c0c48c067451f5fb Author: George Sapountzis Date: Mon Sep 10 19:00:16 2007 +0300 [mach64] Revert to multiple mappings per BAR. libpciaccess added subrange mappings and mtrr handling. compile-tested only. commit 0241cac643fa1c08a45ea44f5c670b290e760ad8 Author: Michel Dänzer Date: Sat Sep 8 00:22:40 2007 +0200 radeon: Reinstate sync in radeon_crtc_show/hide_cursor. Make sure the DRI lock is held though, as these can be called asynchronously. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=12245 . commit 49933e2f7d590811f2bc8c0d51a09f3b7f14845e Author: Alex Deucher Date: Sat Sep 1 12:23:07 2007 -0400 RADEON: automatically disable tiling if requested virtual desktop exceeds surface limits Also, tweak default desktop sizes and add some informational messages commit d49a60bc939c9f3e9d57c23e44263f5bb52f09fb Author: Sjoerd Simons Date: Thu Aug 30 11:40:13 2007 +0200 radeon: Fix Option "MacModel". commit 2b860726fff058623e0e8e1b0aca092c246875ce Author: Michel Dänzer Date: Thu Aug 30 11:38:28 2007 +0200 radeon: Don't build currently unused RADEONSavePalette. commit 12187a6aa93049c002a4171344d03c713f7f3c5d Author: Alex Deucher Date: Wed Aug 29 23:11:30 2007 -0400 RADEON: Add quirk and connector tables for apple laptops As far as I can tell there are three apple laptop variants: ibook - LVDS, TVDAC drives TV or VGA via dongle powerbook-duallink - LVDS, TV, External TMDS/Primary DAC powerbook - LVDS, TV, Internal TMDS/Primary DAC use Option "MacModel" "" to enable the appropriate quirks where string is one of the above We can't yet init the external TMDS directly, but if OF inits it, it should work. This should also fix bug 9955. Please test! commit 61c1fdaa8553581944f78a11e6f9aa76163a468a Author: Alex Deucher Date: Tue Aug 28 23:47:19 2007 -0400 RADEON: add option to force tmds pll to default table Also rework the tmds pll output attribute handling a bit commit 0d9087bc60bb95c770b899cfed29699c02bdac49 Author: Alex Deucher Date: Tue Aug 28 23:08:20 2007 -0400 RADEON: remove some cruft forgotten in a previous commit commit 6ff0645ecfe65727e8ef5d5e6215b4e03078e1a5 Author: George Sapountzis Date: Tue Aug 28 15:37:11 2007 +0300 [mach64] Convert to pci-rework, keeping source-code compatibility. It still uses the old probe method though, this is due to the ati wrapper. commit 7b38d9a1209f87255e5bb0aefe46a363ce4fb6ef Merge: 2e3d43a 673f799 Author: George Sapountzis Date: Tue Aug 28 16:01:12 2007 +0300 Merge branch 'master' into pci-rework Conflicts: src/ati.c commit 673f799729824f4439dd5f681f75dd5aab50947f Author: Alex Deucher Date: Tue Aug 28 00:42:30 2007 -0400 RADEON: Update tv attributes immediately commit ad6f7ad1b2ccae0bc0a416b9b0ca22709c9d5199 Author: Alex Deucher Date: Tue Aug 28 00:08:41 2007 -0400 RADEON: remove the "default" tv_standard option commit 17e0f9e6cbfdb115034d327bd34d46339fd632b7 Author: Alex Deucher Date: Mon Aug 27 23:59:03 2007 -0400 RADEON: enable load detection for tvdac if output count for tvdac < 2 commit 42839fb5a8584196e7b18375bff6c426ed0347d9 Author: Alex Deucher Date: Mon Aug 27 23:44:13 2007 -0400 RADEON: make load detection an output attribute for analog outputs Since TV/VGA/DVI-I can share the TV DAC, we often get false detection of all inputs that share that DAC. Make load detection an output attribute. Enabled by default on primary dac and on cards where tv dac is (usually) dedicated to tv (non-IGP mobilities). commit a5a1055d64ab4fa16bfb03a412ae6c4fe69ff65d Author: Alex Deucher Date: Mon Aug 27 22:42:22 2007 -0400 RADEON: make tmds pll an output attribute sometimes the bios tmds plls are busted for certain monitors. sometimes the dirver tables are. Let the user pick at run time. commit a12e4aa01bf1c5723c3c791ff9bdc26eef21d5ea Author: Alex Deucher Date: Sun Aug 26 18:51:29 2007 -0400 Bump for new release commit d43596e5f5d7c60f96b57bc3e743a9b40eb7109d Author: Alex Deucher Date: Sun Aug 26 18:07:50 2007 -0400 RADEON: Fix rotation. works now commit 47eb3327c258bb0cfd9a1d5677624b9988a39057 Author: Alex Deucher Date: Sun Aug 26 15:43:22 2007 -0400 RADEON: minor tweak to tv out commit f36720377737210c985b196d9a988efdd767f1c7 Author: Alex Deucher Date: Sun Aug 26 14:13:06 2007 -0400 RADEON: fix depth 16 palette for real this time commit f2b13f1457bf860b075310d3962254be0ed7bea3 Author: Alex Deucher Date: Sun Aug 26 13:27:19 2007 -0400 RADEON: Only update pixclks_cntl when updating tv routing No need to re-set all of the pll2 stuff commit 5d044b9f74c7aa7e12f2822896fed881e2ca9d19 Author: Alex Deucher Date: Sat Aug 25 21:03:08 2007 -0400 RADEON: fix crtc clipping for Xv commit 3fd2d22a02812d5f86cdc1c9503f48362b0c362b Author: Alex Deucher Date: Sat Aug 25 17:37:35 2007 -0400 RADEON: remove fbdev option FBDev support is currently broken, and it not really compatible with randr commit 3469e1aa08792890fa6a5c72da52a1992a0b382c Author: Alex Deucher Date: Fri Aug 24 20:42:13 2007 -0400 RADEON: add extra green data in depth 16 Apparently some radeons need this? commit 71f650d1bc432514516f7ac64a5e8a54c5227881 Author: Michel Dänzer Date: Fri Aug 24 09:21:39 2007 +0200 Require xorg-server >= 1.3 for RandR 1.2. commit d7230939f523610c57f92bdfc72966bdbc6f1070 Author: Michel Dänzer Date: Fri Aug 24 09:21:14 2007 +0200 64 bit warning fixes. For printf vs. CARD32, use %u or %x and and a cast to unsigned. commit 91c45fedfd155a153dcd2c3f3e30986bfbd44e6f Author: Dave Airlie Date: Fri Aug 24 15:05:01 2007 +1000 radeon: don't disable dac if either tv or vga is using it On my rs480 I had to vt switch to get hotplug VGA working due to the tv-out code turning off the dac when the vga code was actually using it. commit 056ca6bb5adf974290693b55de6cd6880d2132d1 Author: Alex Deucher Date: Thu Aug 23 20:19:47 2007 -0400 RADEON: NONE to None to match other port info commit 13fd53286bdda2c55683bdb5f63e7d345f6c63ef Author: Alex Deucher Date: Thu Aug 23 20:17:51 2007 -0400 RADEON: set (hopefully) reasonable default max desktop sizes Based on the amount of vram. We really need ttm... commit 53bad86ca48a9b6529c1f0989ee568d9d48841c6 Author: Alex Deucher Date: Thu Aug 23 19:24:59 2007 -0400 RADEON: clean up the logic in crtc_mode_set() commit 4712dedea225e9e07177aebda2ffc6290d1f53c7 Author: Alex Deucher Date: Thu Aug 23 18:51:34 2007 -0400 RADEON: Always assume LVDS is connected Not all bioses seem to set the right scratch bits. If we have LVDS (via bios table or otherwise) assume it's connected. commit b0f170c5f736ecba1a5899d602c4173fe9b9b1fa Author: Michel Dänzer Date: Thu Aug 23 12:55:40 2007 +0200 radeon: Remove unnecessary #include . commit ac54c0e4360099697755d14b1030def73d8235b0 Author: Michel Dänzer Date: Wed Aug 22 14:33:59 2007 +0200 radeon: Warning fixes. commit de26e406f52b3b13f03eee2b8023924ec6406f0a Author: Alon Ziv Date: Mon Jul 30 22:47:59 2007 +0300 radeon: Sane handling of timeouts in WaitForVerticalSync(2). RADEONWaitForVerticalSync() and RADEONWaitForVerticalSync2() need to wait for a timeout specified in milliseconds; looping around usleep() causes the timeout to be unnecessarily long, as the OS may sleep longer than requested (on Linux the minimum actual sleep value may be several ms). The new logic uses gettimeofday() in the loop to see when the (absolute) timeout has arrived. Signed-off-by: Alon Ziv commit c66e5de26ae93caa368213f3cce139aacec955d2 Author: Sascha Sommer Date: Thu Aug 23 12:11:51 2007 +0200 radeon: Round down RMX stretch ratios. Fixes issues with RMX scaling, see https://bugs.freedesktop.org/show_bug.cgi?id=8983 . commit 633c1fff10a3be4c9f48c1995e330d60bf6abbb2 Author: Michel Dänzer Date: Thu Aug 23 12:11:41 2007 +0200 radeon: Sync pages when enabling page flipping with EXA as well. Exclude the DRI window(s) though to avoid scribbling over 3D rendering. commit 4f8010ce22043c0f8d60c0f49d270ce98c9d2466 Author: Michel Dänzer Date: Thu Aug 23 12:11:12 2007 +0200 radeon: Don't synchronize DRI windows between pages when possible. commit 7b527054a7c81d1d1dbc79d41b9e53064dab68cb Author: Michel Dänzer Date: Thu Aug 23 12:10:33 2007 +0200 radeon: Restore memmap registers even if only AGP location changed. commit d7ba9f001c0ab645984526afd0e64d1c6a6d654a Author: Michel Dänzer Date: Thu Aug 23 11:39:54 2007 +0200 radeon: Change a test to info->IsIGP from several IGP families. commit 8c7c22e22b6076abc80e4e1aaa8d1f4cf2f3ed14 Author: Michel Dänzer Date: Thu Aug 23 11:38:17 2007 +0200 radeon: Wait for pending overlay flip to finish before emitting new one. commit 92fa7cc00688d7bfc1fb72e645ac30c6d92669c6 Author: Michel Dänzer Date: Thu Aug 23 11:38:16 2007 +0200 radeon: Don't call RADEONDRIRefreshArea when the damaged region is empty. commit 5cb20c2dc5eca9d7d7d78e9924ea1b90076e7253 Author: Dave Airlie Date: Thu Aug 23 18:46:41 2007 +1000 radeon: bug 11899 + debian 435040 - test for usefbdev before calling int10 (cherry picked from commit 3334c247540b113f9c4a5ce1879d8648a45a959a) commit 9d6261c024c697a211da4b6300420153eb72a264 Author: Roland Bär Date: Thu Aug 23 18:33:34 2007 +1000 radeon: bug 11860 fix some mem leaks commit 7bc1f862bc5f992f213143fbafef52459ba7db4a Author: Roland Bär Date: Thu Aug 23 18:37:35 2007 +1000 radeon: bug 11861 - dead code removal in radeon_video.c (cherry picked from commit 8e3a6f83016cd8c4cfd43ceee4cbf0a8dc018b2a) commit 9d38c8aa1a7d6fb1af41ee8abdb4a95f94843538 Author: Dave Airlie Date: Thu Aug 23 20:10:24 2007 +1000 radeon: cleanup some warnings commit e4c8969b48a6c8dcc4e7f9852479d24a0204fc0d Author: Dave Airlie Date: Thu Aug 23 19:56:21 2007 +1000 updated release numbering for randr 1.2 commit 81a8093f2ffdce59d4e8a44f65f3d5c771fd6425 Merge: c08e6ec 53a67e3 Author: Dave Airlie Date: Thu Aug 23 19:51:47 2007 +1000 Merge remote branch 'origin/randr-1.2' commit c08e6ec9e7ac06caee53689b0ec50ef6a7a0ba37 Merge: 5793e87 a0d0fcd Author: Dave Airlie Date: Thu Aug 23 19:42:19 2007 +1000 Merge branch 'master' into randr-merge Conflicts: src/radeon.h src/radeon_bios.c src/radeon_display.c src/radeon_dri.c src/radeon_driver.c src/radeon_modes.c src/radeon_probe.h src/radeon_video.c commit 53a67e31904bec9a3aa1bd24de8034dcafea1d2a Author: Alex Deucher Date: Tue Aug 21 21:20:41 2007 -0400 RADEON: Fix color problem on pre-R3xx chips tv-out commit e9719e8e02eef46717ae9b4d8c7998466dac30cb Author: Alex Deucher Date: Tue Aug 21 21:17:20 2007 -0400 RADEON: more tv out fixes and clean up commit 36c22a49580d86a6518b67f31a78bd53d39491af Author: Alex Deucher Date: Tue Aug 21 20:28:39 2007 -0400 RADEON: fix tv-out on R3xx R3xx apparently needs the tv clock forced on. commit 9470bd67731059f26859ed5f0bea3ade09e2c80c Author: Alex Deucher Date: Mon Aug 20 20:54:06 2007 -0400 RADEON: Add DefaultConnectorTable option This option skips the parsing the BIOS connector table and falls back to chip specific defaults. Also remove man page section for the now gone bioshotkeys option. commit a0d0fcd3bab765b4db25e04884fd8a342abb9c66 Author: iLisa Wu Date: Mon Aug 20 15:44:07 2007 +0200 Fix crash with no valid mode in xorg.conf's modelist and empty Virtual If the resolution defined in xorg.conf failed to find a matching mode in the supported modelist, and no virtual desktop dimensions are defined the xorg.conf either, virtual X and Y dimension will be set to 0 which will cause Xserver crash. (Novell bugzilla #296856, closed) commit b275febdb0918e8cebdffbb433b0eeb3ff4d3746 Author: Alex Deucher Date: Sun Aug 19 20:55:32 2007 -0400 RADEON: turn off TVCLK when blanking tv encoder commit a90d675832ddb02c81ace010ccbf02619b70edac Author: Alex Deucher Date: Thu Aug 16 21:55:14 2007 -0400 RADEON: fix Xv clipping and overlay sourcing - Basically just copied from the intel driver. I'm planning to push this to the server soon, but add it now to get things working and to provide compat for older servers. - Overlay crtc source control attribute now called XV_CRTC The old attribute XV_SWITCHCRT has been removed. If anyone cares, we can add it back as an alias to XV_CRTC XV_CRTC: -1 auto, 0 crtc0, 1 crtc1 commit 5793e8753d11432bf95c7c6dd80c811e16aba058 Author: Alex Deucher Date: Wed Aug 15 19:26:36 2007 -0400 RADEON: Remove RADEONRestoreMode() Since we no longer use it to write modes all it did was restore some of the regs for a console restore. Just move the relevant bits into RADEONRestore() and remove it. commit 6f011aaabaf18d66ffc255ad76aaf938b2396302 Author: Lisa Wu Date: Wed Aug 15 19:17:51 2007 -0400 RADEON: fix console restore on r3xx and r4xx When restoring the console we need to: 1) we need to restore DAC registers after all other registers are restored and CRTCs are enabled. 2) we need to enable CRTC2 registers before CRTC1 registers commit c8dad98abb042c6abbbee18f9ae4db72084bc513 Author: Alex Deucher Date: Wed Aug 15 00:55:24 2007 -0400 RADEON: make sure crtc routing is correct in r300_detect_tv() Also remove some unused variable commit f8cd74435f0072dbf5f6e83d67d2d5e1f4e82c91 Author: Alex Deucher Date: Tue Aug 14 23:50:57 2007 -0400 RADEON: minor cleanup commit 6f398cd07ea734dd66a8eac71b629e59123d75b8 Author: Alex Deucher Date: Tue Aug 14 23:42:32 2007 -0400 RADEON: Implement improved tv load detection for r300 The previous implementation resulted in false positives on occasion. This method works much more reliably. Based on beos code by Thomas Kurschel commit 366a1d4c240ac93622caff97b652696db99bf2e6 Author: Alex Deucher Date: Tue Aug 14 23:25:37 2007 -0400 RADEON: Turn off tv encoder in disableoutputs() commit 5b4a04c23e3f1ec2490418b111f417c16463c709 Author: Alex Deucher Date: Tue Aug 14 23:11:52 2007 -0400 RADEON: Make sure RMX is always programmed for crtc1 If the RMX registers are left as programmed by the bios this can lead to a blank screen when crtc1 is feeding a DAC. Fix found and reported by Lisa Wu Fixes bug 11985 commit db2a828b2f21b92cd654b309d137204334975b89 Author: Alex Deucher Date: Tue Aug 14 22:47:29 2007 -0400 RADEON: Add load detection Based on the beos driver by Thomas Kurschel and the existing load detection code in this driver. commit 6fc3ddbbb6fbbee1f6076c776e5b46c0c772b6d4 Author: Alex Deucher Date: Sun Aug 12 12:00:20 2007 -0400 RADEON: order the VGA and DVI ports correctly commit b7738d2ef82e1759adf78e5db1291f8739b4166f Author: Alex Deucher Date: Sat Aug 11 17:50:42 2007 -0400 RADEON: fix connector setup when there's no bios tables commit d0895f67e327bb268fd59fcfd8fc22678d804f57 Author: Luc Verhaegen Date: Thu Aug 9 12:11:40 2007 +0200 AGPFastWrite risk reduction. Actively warn the user in the log about the effects of AGPFastWrite and sanitise AGPFastWrite handling while we're here. commit c01000bc684f6a23a38a52f0808182cefaa686bb Author: Alex Deucher Date: Wed Aug 8 00:07:16 2007 -0400 RADEON: fix typo in comment commit 5c3f49e651c36f3bd14fa29359e24825d8f7f77f Author: Lisa Wu Date: Wed Aug 8 00:05:47 2007 -0400 RADEON: make sure RADEON_CRTC2_CRT2_ON bit state is properly accounted for - when the TV DAC is used for crtc1 make sure to keep this bit set when initializing crtc2. - fixes bug 11894 commit 08fe7ad00fba523775e95b5e6295fe23a5119d60 Author: Alex Deucher Date: Tue Aug 7 23:16:05 2007 -0400 RADEON: fix ConnectorTable option after connector table re-work We may want to add the possiblity of more connectors to this option commit f56b90a60393ed187c0e39e149b2a3a32331ea52 Author: Alex Deucher Date: Tue Aug 7 23:08:02 2007 -0400 RADEON: Make sure the default TV standard is supported commit a88a0e77eec514325b4d07bf7be9fb04e6f8e244 Author: Alex Deucher Date: Tue Aug 7 00:43:20 2007 -0400 RADEON: minor fix to legacy bios connector table commit 3752808d6c08a9727370ef8d79088e787791e131 Author: Alex Deucher Date: Sun Aug 5 16:13:39 2007 -0400 RADEON: Always set MonType in radeon_detect() - Always set the the MonType in radeon detect even if no monitor is detected so users can still force disconnected outputs on. For DVI-I users will have to set the dvi_monitor_type attribute to force digital or analog, everything else should just work. commit b4ec3e436afb5bc99ec755cbd96eee9a1ec492a5 Author: Alex Deucher Date: Sun Aug 5 15:37:04 2007 -0400 RADEON: add tv out properties commit 1fc2a1120e7c05938e2bd72d3c7837ecff8bc9da Author: Alex Deucher Date: Sun Aug 5 14:41:57 2007 -0400 RADEON: switch DVI-I monitor type attribute to string commit 7d8eb3751d74bd8a1fb9fa2d2fcb9c4c895f6ba4 Author: Alex Deucher Date: Sun Aug 5 14:31:18 2007 -0400 RADEON: make backlight attribute lower case commit e71bb88bc9052af8866fb6945dbc06dbb0e6d1c0 Author: Alex Deucher Date: Sun Aug 5 14:26:15 2007 -0400 RADEON: switch RMX attribute to string type Still not actually hooked up. commit 284323135ec04635dfa9cabd5790a35b953abca2 Author: Alex Deucher Date: Sun Aug 5 04:35:24 2007 -0400 RADEON: typo commit d1abdad167aa24ac970c69422435df443c82ebd6 Author: Alex Deucher Date: Sun Aug 5 03:45:02 2007 -0400 RADEON: fixes - fix output ordering - set tv-out to return un-connected for now in radeon_detect() commit 0cca25d8d6a0cb0d29b68e6cd9c699d1390aede1 Author: Alex Deucher Date: Sun Aug 5 03:19:24 2007 -0400 RADEON: Fix DVI-I support in ATOM bios connector table parsing commit ba5496ae7973786802962bf649dd91c219531749 Author: Alex Deucher Date: Sun Aug 5 02:27:32 2007 -0400 RADEON: refactor output init to handle multiple DVI or VGA - refactor output init to handle multiple DVI or VGA with the new bios table parsing commit 2ec22783ddf4c522df9e5fd1b2003854486d7a2b Author: Alex Deucher Date: Sun Aug 5 01:39:35 2007 -0400 RADEON: attempt to do the right thing for standards other than PAL or NTSC commit cc8e1d95f1b90a259beea4e8cc4d7e29af660919 Author: Alex Deucher Date: Sun Aug 5 01:14:36 2007 -0400 RADEON: Major rework of BIOS table parsing - greatly simplify ATOM and legacy connector table parsing - use bios tables to detect LVDS and TV outputs - add support for TV table parsing (legacy only) commit 1de52d91ff3a04b9b587b858e1e5be40d3a7fd0a Author: Dave Airlie Date: Sat Aug 4 17:58:58 2007 +1000 update configure.ac for 6.6.193 release commit 371001c0433db1d17e468f3ea99ea57f922145a3 Author: Dave Airlie Date: Sat Aug 4 17:51:19 2007 +1000 radeon: remove unused variables commit 90946c53d7a4b23d03270ad6da0450759a11de3d Author: Dave Airlie Date: Sat Aug 4 17:51:06 2007 +1000 ati: add -Wall for gcc As per luc's "suggestion" in Novell bug. This may generate warnings on 64-bit until we get rid of CARD32 commit e30a145934df8f6a7f71290d6c75e4239f9d52f7 Author: Dave Airlie Date: Sat Aug 4 17:44:46 2007 +1000 radeon: cleanup some pieces of the dpms/blank register programming commit a156db5e8b037ed12a448f70045453baf9d0c504 Author: Luc Verhaegen Date: Sat Aug 4 17:37:18 2007 +1000 Clean up PortInfo to CRTC mapping Also sanitise blanking and DPMS functions Fixes from Novell Bug 264720, and fd.o 10772 commit b61a49f2a5401560f85e11bcdd005287433cad12 Author: Alex Deucher Date: Fri Aug 3 19:27:59 2007 -0400 RADEON: Change indexing of TV constants table in preparation for standard re-work commit 288fa627274cb399059262d4f8bd844fc220a042 Author: Alex Deucher Date: Thu Aug 2 02:37:16 2007 -0400 RADEON: avoid a divide by 0 and only save tv out regs if the chip has them commit b66a1bc7994b33d349c1519761e431959311c85f Author: Alex Deucher Date: Thu Aug 2 02:11:20 2007 -0400 RADEON: fix tv-out enable/disable commit d86592c8d5ce45d81d8a726c263e870e94fbcf11 Author: Alex Deucher Date: Thu Aug 2 00:50:51 2007 -0400 RADEON: add missing break commit 971feb34843225030fff05b3f9d3801534fbf2d4 Author: Alex Deucher Date: Thu Aug 2 00:50:04 2007 -0400 RADEON: move tv dac enable to enabledisplay() commit 98d7e00437bea78e03180eb30ff30de3455d9d1a Author: Alex Deucher Date: Thu Aug 2 00:20:50 2007 -0400 RADEON: limit tv modes to the only one we can program at the moment commit 5c549c1d42f7bbc556942af13aff2661fae856f2 Author: Alex Deucher Date: Wed Aug 1 23:45:07 2007 -0400 RADEON: remove unused elements commit b03978028fd975eb6946503d3a56a49c5a67f339 Author: Alex Deucher Date: Wed Aug 1 22:39:16 2007 -0400 RADEON: convert hard coded tv out values to calculations commit cf54222f1fa37366b2c2b39c82f8afc02f32e63c Author: Alex Deucher Date: Tue Jul 31 02:01:49 2007 -0400 RADEON: more fixes... commit 22d460d3ad991223aa1fbd7e5edeb45e36c65dc0 Author: Alex Deucher Date: Tue Jul 31 01:28:05 2007 -0400 RADEON: fix name of tv output commit 4822a2b837334f408f962646ab5ea4f8b0335ac9 Author: Alex Deucher Date: Tue Jul 31 01:18:40 2007 -0400 RADEON: tv-out fixes. works now. tested on rv350. VT siwtch is busted, and xrandr doesn't play nice yet. uncomment code in radeon_output.c to test. commit fe494c9db2995bb8ce7a028ecf9626e0cb0cf506 Author: Alex Deucher Date: Sun Jul 29 15:26:34 2007 -0400 RADEON: add info about tv out code and authorship commit 6b9b7a7bdc290d07de9b226691ec8025af8db896 Author: Alex Deucher Date: Sun Jul 29 15:23:14 2007 -0400 RADEON: Initial pass at integrated tv out support Based on the GATOS tv-out support by Federico Ulivi and information from ati with substantial rework by myself. Code is not actually hooked up yet. commit 8d043db1817d94edeb72ab208dfea60026715d48 Author: Alex Deucher Date: Wed Jul 25 20:37:58 2007 -0400 RADEON: Compute PLL VCO gain commit 62f06d89da3f7160d5e4df8d7ce6fe1a94e9d07c Author: Alex Deucher Date: Wed Jul 25 20:22:25 2007 -0400 RADEON: write out saved vclk and pixclk values commit 165a07cbbfcd94e3d1fac434b8fada8d29428a09 Author: Brice Goglin Date: Wed Jul 25 19:01:02 2007 +0200 Minor fixes in the manpages - ati.man . add references to radeon and r128 manpages in SEE ALSO (Xavier Bestel in Debian bug #386001). . remove the manpage suffix from atimisc reference in the text since there is no such manpage for now. - radeon.man . typo in "specifying" (reported by A. Costa in Debian bug #432059). . replace a non-ascii character with the corresponding groff escape sequence so that it works whatever the locale (Julien Cristau). commit 9cc3ab8320162f371bba15dc131f23c5de2013fc Author: Alex Deucher Date: Wed Jul 25 02:24:14 2007 -0400 RADEON: hack around console restore hang on r4xx r4xx seems to hang when unblanking the crtc(s) when restoring the console. This needs to be investigated further. commit 193d58b0ea9de3e326017e50b88e2f3726854506 Author: Alex Deucher Date: Wed Jul 25 01:27:58 2007 -0400 RADEON: fix randr on r4xx Seems the way we parse the ATOM connector table results in reversed connectors. commit 262e32bd9ea4123b116362b33b5798753b2568fe Author: Alex Deucher Date: Thu Jul 19 23:48:57 2007 -0400 RADEON: fix palette when depth != 24 commit 18b00b47a483e7854727e99126808ddf361e7a4a Author: Alex Deucher Date: Thu Jul 19 19:01:42 2007 -0400 R128: don't clip modes to panel on laptops when only using the CRT port fixes bug 5832 commit 882fe7631586b0a7919f808588a2ea4fb555f7e8 Author: Brice Goglin Date: Thu Jul 19 18:44:27 2007 -0400 MACH64: avoid crash in Xv code fixes bug 11054 commit 7b3e22e96cfc98621bd20fa76317e6d8f7242165 Author: Alex Deucher Date: Thu Jul 5 20:37:10 2007 -0400 RADEON: set default values for crtc_offset_cntls commit 2a35ccfb8ffee9f0ef6f8d4f0eeb80a471543caa Author: Alex Deucher Date: Thu Jul 5 20:04:04 2007 -0400 RADEON: Fix tiling on r1xx and r2xx spotted by Andrew Randrianasulu fixes bug 11357 commit ac9cbaf32176cf144bc694ac879e7c9e2920f762 Author: Michel Dänzer Date: Mon Jul 2 10:06:02 2007 +0200 radeon: Fully zero-initialize info->CRT2pScrn->monitor. This prevents modes from getting rejected due to the uninitialized maxPixClock value. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=9816 . commit bdcae622100c81a4d9a53938542b64908bacd195 Author: Alex Deucher Date: Fri Jun 29 01:15:57 2007 -0400 RADEON: save crtc on/off state for console restore - prevents a possible hang if console is only using 1 crtc commit 21be0d3a1f4700572c6425800596785d6850626f Author: Alex Deucher Date: Fri Jun 29 00:38:50 2007 -0400 RADEON: simplify console restore - still need to track crtcs for blank/unblank when restoring text console commit d9bf28b55d98fea2d285c9c46362aaf2175d0a46 Author: Alex Deucher Date: Thu Jun 28 23:52:28 2007 -0400 RADEON: factor out surface_cntl init into one function commit 9f193985627be8e6ea1418a424e825ddbc4957b2 Author: Alex Deucher Date: Thu Jun 28 23:43:13 2007 -0400 RADEON: move crtc base setups to new functions commit 0f361e9e80a29d287fa42436c32c657e3c102539 Author: Alex Deucher Date: Thu Jun 28 23:08:07 2007 -0400 RADEON: fix corruption after 3D apps run commit 1d4630067d293d26284d5fe230debef3913ec6cf Author: Alex Deucher Date: Thu Jun 28 22:24:04 2007 -0400 RADEON: set info->CurrentLayout.displayWidth in RADEONSetPitch() commit 2754d1ba01fc3367019487e0c0f59d74c950aaa7 Author: Alex Deucher Date: Thu Jun 28 22:15:22 2007 -0400 RADEON: Switch cursor back to memcpy() commit 7901bcafa92dccd319ddb5de4627d806a39f15f9 Author: Alex Deucher Date: Mon Jun 25 18:39:14 2007 -0400 RADEON: make sure we unblank in RADEONRestore() reported by Andrew Randrianasulu (bugs 11357, 11146) commit 6a3599d6155d073a3116c4b13bdf04b44bb9e087 Author: Alex Deucher Date: Mon Jun 25 18:20:54 2007 -0400 RADEON: make sure we set the stride properly commit 771c37fcac8104b894120cc3fc0154b31b0318d1 Author: Alex Deucher Date: Mon Jun 25 17:53:26 2007 -0400 RADEON: attempt to fix cursor on big endian (only tested on x86) commit 5b5b90c2cea7e36895354f5872acd3fc769653f9 Author: Alex Deucher Date: Mon Jun 25 16:27:54 2007 -0400 RADEON: fix possible segfault on mobility chips with MM tables spotted by Stefan Buehler commit 01bd5eb713500d3e3d4351865d460c8d1e476454 Author: Alex Deucher Date: Mon Jun 25 16:16:18 2007 -0400 RADEON: fix possible segfault on mobility chips with MM tables reported by Stefan Buehler commit 52cc1dc1491559a9055f3ba6dd54064bb382ad86 Author: Alex Deucher Date: Mon Jun 25 15:49:19 2007 -0400 RADEON: tiling and FB size fixes - fix tiling on older radeons - allow the user to specify FB size using Virtual line in config Current default is 1600x1200 - reset ecp_div for Xv in randr crtc mode set commit 3bb46c03fddd3bd79bdab887366aeeced0290a3a Author: Alex Deucher Date: Fri Jun 22 01:12:38 2007 -0400 RADEON: bump crtc max to 1200 so 1600x1200 will work out of the box - a better fix will be forthcoming... commit b9fac5695bf8f123b391e3b162c4865258a685dd Author: Andrew Randrianasulu Date: Fri Jun 22 01:01:14 2007 -0400 RADEON: Fix VT switch hangs - re-order DRI resume functions in EnterVT() - fixes bug 11287 commit 92e65d5e0d6817ff4c9a08020a0a9b3a8c3c98b0 Author: Andrew Randrianasulu Date: Fri Jun 22 00:55:00 2007 -0400 RADEON: Fix VT switch hangs - reorder RADEONDRISetVBlankInterrupt() and RADEONDRIResume() - see bug 11287 commit ec1fd2c388ec2c4033644776ee8588405a3d25f1 Author: Alex Deucher Date: Tue Jun 19 00:39:59 2007 -0400 RADEON: Split FP reg restore to only touch regs relevant to the output - only restore output specific regs - restore fp2_gen_cntl on R200 DAC restore as R200 DAC2 is connected via DVO commit 0f5a92667281ca3f80218bc67d4031125a5e4793 Author: Alex Deucher Date: Mon Jun 18 23:35:21 2007 -0400 RADEON: only touch LVDS on mobility chips commit b72ff160f908bf3aa9f64705377e92d80360a4f7 Author: Alex Deucher Date: Mon Jun 18 21:51:45 2007 -0400 RADEON: only touch LVDS on mobility chips commit 80313621ffa8c409ae63fc1b28c15fc4abdc3a7b Author: Henry Zhao Date: Fri Jun 15 17:00:05 2007 -0700 Update CRT2pScrn->monitor->Last to reflect the last mode of CRT2pScrn. See bug 11278. commit 5868af53204e8fc210735e68e891e15085285629 Author: Alex Deucher Date: Tue Jun 12 23:53:48 2007 -0400 RADEON: yet another LVDS... commit f19a6f7ee5bf4ec632e7813359f167599c08e823 Author: Alex Deucher Date: Tue Jun 12 23:44:41 2007 -0400 RADEON: additional LVDS off fix (missed in previous commit) commit 4f2a1ba9c2fc20042d67132f986a86a9783a245e Author: Alex Deucher Date: Tue Jun 12 23:41:24 2007 -0400 RADEON: additional LVDS off fix (missed in previous commit) commit 9fc416ce08cc5d74faa7b184e80ce43ed2f4fbee Author: Michel Dänzer Date: Tue Jun 12 23:35:09 2007 -0400 radeon: Fix panel size detection from registers with stretched mode programmed. commit c4045cbc5e6975520efef422ce9df2a7d99a7ff4 Author: Alex Deucher Date: Tue Jun 12 23:32:18 2007 -0400 RADEON: make sure to clear RADEON_LVDS_ON when turning LVDS off - fixes bug 3483 commit 090888d3baf61a70640d28e99afdce20952cdea0 Author: Tormod Volden Date: Tue Jun 12 23:30:18 2007 -0400 RADEON: limit PanelPwrDly to 2000 ms on ATOM bios as per legacy bios - fixes bug 11238 commit 44748a826b52924a6e050215d8d62755e0ac7fb2 Author: Tormod Volden Date: Tue Jun 12 23:23:49 2007 -0400 RADEON: limit PanelPwrDly to 2000 ms on ATOM bios as per legacy bios - fixes bug 11238 commit c292fc64499ff4cc135c07deda99cf4169f8fef4 Author: Alex Deucher Date: Tue Jun 12 23:20:18 2007 -0400 RADEON: make sure RADEON_LVDS_ON is cleared when turning LVDS off - fixes bug 3483 commit c6a3286d6f6ddda89115d98d45665dadd78bf41d Author: Michel Dänzer Date: Mon Jun 11 09:39:38 2007 +0200 radeon: Fix panel size detection from registers with stretched mode programmed. commit 7a6b3c0f77c69019268f585c51c3dcbcc99014d4 Author: Michel Dänzer Date: Mon Jun 11 09:39:38 2007 +0200 radeon: Don't loop indefinitely if no mode matches detected panel size. commit f31fd9ce598841c505a0b5ed32bf124f49fea332 Author: Michel Dänzer Date: Mon Jun 11 09:39:38 2007 +0200 radeon: Fix some more ErrorFs when setting mode. commit 9dd9f09a9021653e5590d27bd7aa0e7af85416ad Author: Alex Deucher Date: Thu Jun 7 15:32:31 2007 -0400 RADEON: fix some issues with bios table init code - fix some issues with bios table init code - re-org preinit to better handle bios table init of cards commit 9ad311eeb0ac2b70a862dbb9de278154ba9142ec Author: Tilman Sauerbeck Date: Thu Jun 7 11:03:02 2007 +0200 Fixed 'make dist'. commit 2527f2b69aa7dffa3ba4359c45955e3185bdf0e6 Author: Alex Deucher Date: Wed Jun 6 00:08:45 2007 -0400 RADEON: implement support for posting cards based on x86 bios tables (untested) This is based on the netbsd radeonfb driver by Garrett D'Amore. The code is not hooked up yet, but should allow you to post cards without needing to execute bios code. This should be useful on non-x86 platforms, for posting secndary cards, and for suspend/resume. Works on legacy bioses only (no ATOM support). commit e67d1420bf65055ecb6fdfe6b1b1f53aae83854a Author: Alex Deucher Date: Tue Jun 5 22:31:50 2007 -0400 RADEON: fixup RADEONDisplayVideo() to better handle the crtc being used commit 7886405308e3288d5c86b6f2c7dbfa8ff865139c Author: Alex Deucher Date: Mon Jun 4 21:16:56 2007 -0400 RADEON: fix indenting commit f54ad565a69deb52547fd04e123f56fc1294cd0a Author: Alex Deucher Date: Mon Jun 4 21:13:16 2007 -0400 RADEON: no need to go through all the crtcs, we've got what we need commit 687879bff716ad01f9f158860deb8ba770faab99 Author: Alex Deucher Date: Mon Jun 4 21:08:40 2007 -0400 RADEON: add support for RMX on DVI, make sure RMX is only enabled on crtc1 commit e6161e472ff266f69547704a61040228a8704b06 Author: Alex Deucher Date: Mon Jun 4 20:32:55 2007 -0400 RADEON: remove some cruft commit be0ce38232ea4f5679c5829ab663939144c6e617 Author: Alex Deucher Date: Mon Jun 4 20:22:15 2007 -0400 RADEON: number the outputs if there are more than one of the same commit 8ec617f6493dd0aea5d11f92e3d58c3feef8c8fd Author: Dave Airlie Date: Sun Jun 3 17:32:43 2007 +1000 radeon: disable irqs at server start until 3D app starts commit 2d40fa55e8d7a1cfb204d66ca4a4d95a3b13d5b5 Author: Dave Airlie Date: Sun Jun 3 17:32:43 2007 +1000 radeon: disable irqs at server start until 3D app starts commit dcb64a4d3947e5a9fbda4b72e29a5b6102370f07 Author: Dave Airlie Date: Sun Jun 3 17:10:49 2007 +1000 radeon: disable vbl interrupts when no 3d is running on a new enough drm commit 73d8e3ec8536b4777490b7ba457566f02233811f Author: Dave Airlie Date: Sun Jun 3 17:07:59 2007 +1000 randr-1.2 increase dri minor version for mesa to know we can do vbl on both commit 63f0d4ed0a98830ecbe18c6e4174689111a59b68 Author: Dave Airlie Date: Sun Jun 3 16:49:14 2007 +1000 randr-1.2: add support for vblank on both heads Also disable vbl when 3D isn't running commit d7775c1b38b5bdc439a27ec2c3c3a03a5b24cf57 Author: Dave Airlie Date: Sun Jun 3 12:46:31 2007 +1000 randr-1.2: make native mode preferred If we have a native mode from the BIOS make it preferred mode commit 5a9516fe4f17854acd4fbf3a8eadf5139081dbd4 Author: Paul TBBle Hampson Date: Sat Jun 2 14:28:18 2007 -0400 RADEONProbePLLParameters sets pll->reference_div, and RADEONGetPanelInfoFromReg uses it. This ensures that the former is called before the latter. (this should fix randr on ppc) commit 802804461ebdca9a951e7e562ec68fd08d8eae01 Author: Matthieu Herrb Date: Thu May 31 22:23:57 2007 -0600 Fix build whithout XF86DRI commit 0e0946e0aa2527794e07473199e851bbfbc47cb1 Author: Michel Dänzer Date: Wed May 30 18:56:53 2007 +0200 radeon: Lots of warning fixes. Move code where it's used, remove unused variables, etc. commit 31c1be420d5277dd15505bd73e6144827a0580cd Author: Dave Airlie Date: Wed May 30 17:49:01 2007 +1000 remove these syncs, at least on rs480 it doesn't break probably requires testing on other r300 based cards, with the syncs in we hang when moving the cursor into the second CRTC. commit 7fc02657c4d740941fbda5a8823cf45de3eca3f8 Merge: 800bf53 4c61c0e Author: Dave Airlie Date: Wed May 30 17:27:22 2007 +1000 Merge branch 'origin' into randr-1.2-test Conflicts: src/radeon_cursor.c src/radeon_display.c src/radeon_driver.c commit 800bf53279e2c2bf854682bbfd6fa16d03afed00 Author: Matthieu Herrb Date: Tue May 29 23:31:13 2007 -0600 Fix build without XF86DRI commit 4c61c0ee91a2ffeefce30972a584486f1df1d1ae Author: Matthieu Herrb Date: Tue May 29 21:35:35 2007 -0600 Fix build without XF86DRI commit 5337e7bd0069a3f2c4ab22b21a19471427ad3d81 Author: Dave Airlie Date: Wed May 30 08:10:44 2007 +1000 radeon: add bios quirk for nx6125 monid commit bff809dc8ed07ac39e9b576a87916486a5e37156 Author: Dave Airlie Date: Wed May 30 08:02:26 2007 +1000 rs480: more unknown regs Hardcode the values from a working fglrx run, this works for me now I've no idea what it might do for anyone else commit 104105fee5c3945d3f210e6a4cb73ab492c61543 Author: Dave Airlie Date: Tue May 29 19:09:33 2007 +1000 rs480: make second crtc work with magic number in magic register. I've no idea why or what this does. commit 5aa603bcabbb077dec169c48438c2e2ebe1195d7 Author: Dave Airlie Date: Tue May 29 07:23:24 2007 +1000 rs480: only has single dac commit c52322354fe64725733842b3356798c50e7735d5 Merge: dd6a966 975da59 Author: Dave Airlie Date: Tue May 29 07:21:48 2007 +1000 Merge branch 'origin' commit c2637a01f9aca4032262c66ade305f5fe2c54294 Author: Alex Deucher Date: Sat May 26 18:26:35 2007 -0400 RADEON: remove some dead code from the last commit commit bbb769c4107bfcae682e46d026e54cbfb67d62cd Author: Alex Deucher Date: Sat May 26 18:25:06 2007 -0400 RADEON: more rotation work (still not there) - once again borrowed heavily from intel commit a69f90be9384244744fabfa76469ede9cd26ac98 Author: Alex Deucher Date: Sat May 26 17:54:48 2007 -0400 RADEON: first pass at rotation (not working yet) - based heavily on intel commit 3b619d88a65a5801c85d120f2d39704194433f10 Author: Alex Deucher Date: Sat May 26 17:06:18 2007 -0400 RADEON: clean up and add comment regarding clones commit 089ae4afd23322bf602d340c531c36a4c8b461ed Author: Alex Deucher Date: Sat May 26 15:49:11 2007 -0400 RADEON: Switch SetOutputType() to use names rather than numbers commit c4cef0c9481257a744ac99dfc7beb988ce51a8ee Author: Alex Deucher Date: Sat May 26 13:12:37 2007 -0400 RADEON: make sure we have the lock when SYNCing commit 899c62e987d5c7524817ba85675e39a8a28e0232 Author: Alex Deucher Date: Sat May 26 12:54:01 2007 -0400 RADEON: Make sure LVDS and FP2 routing info gets written commit 18857184ffa6847815d349c020b003f8401e36ee Author: Alex Deucher Date: Sat May 26 12:27:00 2007 -0400 RADEON: fix handling of DRI lock commit 3a61453efb4f04492cef823b6dd1273b55c6a785 Author: Alex Deucher Date: Sat May 26 01:38:09 2007 -0400 RADEON: implement backlight control for LVDS This code is currently disabled as I'm not sure which laptops actually use this method for backlight control. My laptop seems to use another method as adjusting the backlight level doesn't seem to touch LVDS_GEN_CNTL. Maybe just macs? commit ceec3f62257bafe4771e75d3c4f1d2a517d7acf8 Author: Alex Deucher Date: Fri May 25 23:29:51 2007 -0400 RADEON: implement auto/analog/digital output property for DVI-I (untested) commit e3e9c608651e7cbb9851489274815f47d2a8dbbb Author: Alex Deucher Date: Fri May 25 19:26:24 2007 -0400 RADEON: more clean of last commits commit a7d2c9c0f6155c4e65a2e73f3832c0d8ca7af5fc Author: Alex Deucher Date: Fri May 25 19:09:11 2007 -0400 RADEON: fixup last commit and add support for ext TMDS detect commit e50ca35ce2ea79dadb38ce14e459eed836452ff7 Author: Alex Deucher Date: Fri May 25 18:56:32 2007 -0400 RADEON: clean up non-DDC probe, add detect for DVI commit abb9b57e7b4162ab6c21fd1e809d24f13f7e1ea1 Author: Alex Deucher Date: Wed May 23 21:37:58 2007 -0400 RADEON: clean up some logic commit 679236defd28bea8874004377436347950ff7bec Author: Alex Deucher Date: Wed May 23 21:18:40 2007 -0400 RADEON: add output properties (not functional yet) commit 975da595f032c145ad74079ff8edeaead779dc7b Author: Michel Dänzer Date: Tue May 22 10:56:47 2007 +0200 radeon: Provide new DRI texOffsetStart hook when available with EXA. commit e38cad5633c974467f6417051eda8d487ac3686e Author: Alex Deucher Date: Tue May 22 00:09:46 2007 -0400 RADEON: Only add valid connectors commit 8275151baac22c34149cef0b7d922771d24abc3e Author: Michel Dänzer Date: Mon May 21 10:25:48 2007 +0200 radeon: HW cursor cleanup. Don't needlessly turn the HW cursor on/off in RADEONLoadCursor*(). Besides cleaning up the code, this semms to avoid some HW cursor related 3D lockups, see https://bugs.freedesktop.org/show_bug.cgi?id=10815 . My best guess is that this is because the engine is now always idled before touching the CRTC registers. commit 137e3fc1899078af0f72303ab0a4e6cf35804a7b Author: Michel Dänzer Date: Mon May 21 10:25:48 2007 +0200 radeon: Suppress debugging output by default. It can be enabled at runtime by increasing the log verbosity level. Also change the prefix from (**) to (II) to make grepping the log file for defaults overridden by xorg.conf more useful again. Turn some MC related debugging output into normal informational output as it's useful for recognizing corner cases that can cause stability issues. commit aed193a47a939451d9a6d05b02653b1d73e1d523 Author: Alex Deucher Date: Sun May 20 21:13:59 2007 -0400 RADEON: fix crtc1 (un)blanking code after last commit - crtc1 MC control is on CRTC_GEN_CNTL - fix indenting commit 870c8043068a0f44b53d1148371b2cc1e3970a7b Author: Alex Deucher Date: Sun May 20 21:03:10 2007 -0400 RADEON: several updates - move output init from InitCrtc() functions to the output mode_set() - take the crtc off the MC when blanking - move EnableDisplay() to output commit() - clean up some dead code - don't enable dacs in initcrtc() functions, this is taken care of in EnableDisplay() commit 09bfc8ed000f95ede5b73f2bad69edc1a4d9bac6 Author: Alex Deucher Date: Sun May 20 18:06:22 2007 -0400 update to 6.6.192 for rc release commit 764cb73e8dec4040cdd418d249fc504399fca3ee Author: Alex Deucher Date: Sun May 20 17:26:26 2007 -0400 Fix regular/"xinerama"/zaphod dualhead mode - logic in RADEONUnblank() was wrong - Calling RADEONSetupConnectors() on second instance screwed up the port info - still seem to be HW cursor issues with zaphod mode commit 9a147fef8e0e2ede2a0008c4ecfbd9b00c8dc5f6 Author: Alex Deucher Date: Fri May 18 23:45:11 2007 -0400 RADEON: if connector is VGA set TMDS to none commit bbd6faff4c6acb48970d774375c8a61861405f96 Author: Alex Deucher Date: Fri May 18 23:30:19 2007 -0400 RADEON: Change default LVDS i2c line for powerpc commit 7940ec364f3cbf02ba64b92c74cbaad4555baf38 Author: Alex Deucher Date: Fri May 18 00:23:08 2007 -0400 RADEON: cleanup commit f71bfde7352ef858c1041037d7dc77c237e315a4 Author: Alex Deucher Date: Fri May 18 00:12:03 2007 -0400 RADEON: more cleanup commit f711e266d6927dec648f6ff26f15c6f48643f78c Author: Alex Deucher Date: Thu May 17 23:59:07 2007 -0400 RADEON: turn off all outputs in screeninit(). We'll turn on the ones we want later commit bfc1c372d7475b7fa6bffb8a79dec1dc2f11ec59 Author: Alex Deucher Date: Thu May 17 23:45:29 2007 -0400 RADEON: More cleanup commit c60b3bc9e3e7463bdb42e2478be8cc3f22c63c68 Author: Paul TBBle Hampson Date: Thu May 17 23:26:54 2007 -0400 Fix for infinite loop in RADEONGetLVDSInfo commit 11289f8206cab1a94bd64a3938cf9af50f19497e Author: Alex Deucher Date: Tue May 15 00:48:31 2007 -0400 RADEON: remove some debugging code commit fba1a11e287ebf04cf311645d31299896bad7283 Author: Alex Deucher Date: Tue May 15 00:44:29 2007 -0400 RADEON: Move DAC regs to their own Save() function commit 9ed00e959fcdab2739a7e64ca1e303a6faf28f15 Author: Alex Deucher Date: Tue May 15 00:36:05 2007 -0400 RADEON: Lots of small fixes - remove extra crtc2_base set - remove some debugging code - clean up RestoreMode() - make sure a DDC reg gets assigned for LCD_DDC - make sure we adjust the right frame in AdjustFrame() - rename RADEONMapControllers() to RADEONPrintPortMap() to reflect what it actually does now - make i2c bus name match the DDC port - remove or comment out un-needed code commit 5106c8fe5f74865cac8b00937739a4efde9fc254 Author: Alex Deucher Date: Sun May 13 21:48:26 2007 -0400 RADEON: Further cleanup commit 224a73e41e9be344d5644203e7ebd5a3a8272604 Author: Alex Deucher Date: Sun May 13 21:41:59 2007 -0400 RADEON: remove remnants of "old" multi-head support The old screen based multi-head code is broken at this point and I have no intention of fixing it, so to clean things up I've removed it. commit 9c2f20a83a5fed14225f4c3ebcd8ca41e9d4bd48 Author: Alex Deucher Date: Sun May 13 21:13:23 2007 -0400 RADEON: additional cleanups commit e187321ab8dd58d2b2fe92c062d070ba4820a2bf Author: Alex Deucher Date: Sun May 13 19:49:10 2007 -0400 RADEON: add new ConnectorTable option and re-add PanelSize option commit e60a7bcaf5611ad4706b1d1442ce4cae49145f42 Author: Alex Deucher Date: Sun May 13 18:14:29 2007 -0400 RADEON: remove mergedfb, etc. cruft from man page commit 51caa5dccc4a2e14d1b41bb7868ad20468dd4cfe Author: Alex Deucher Date: Sun May 13 18:10:02 2007 -0400 RADEON: remove old mergedfb and dualhead options that are no longer used commit c5da9d4040cb08598d171d20f84d3f6c20a033e0 Author: Alex Deucher Date: Sun May 13 18:05:38 2007 -0400 RADEON: remove more dead code commit e776fa9ecc53d63f916a5447a76fb2bb3b824167 Author: Alex Deucher Date: Sun May 13 15:43:39 2007 -0400 RADEON: re-org randr code - move crtc stuff to radeon_crtc.c - move output stuff to radeon_output.c commit 58ce388452b7bc790c438d75c9cf4a0f69f0d7b2 Author: Alex Deucher Date: Sun May 13 15:05:01 2007 -0400 RADEON: Remove dead code commit 66e8e6c8348d007930730e90295588efe8108844 Author: Alex Deucher Date: Sun May 13 14:25:03 2007 -0400 RADEON: several fixes - give better DDC names - disable DAC if connector is DVI-D - fix indentation in ProbeDDCModes() commit 1c16c2ce9c5b02b03d23da965127d82eea4c4039 Author: Alex Deucher Date: Sun May 13 13:54:04 2007 -0400 RADEON: fix VT switch commit 7c66e903368f77ecc4d3bd1c9f08d2adbd85e83c Author: Alex Deucher Date: Sun May 13 13:37:59 2007 -0400 RADEON: move crtc offset handling into init/save/restore functions commit aec078eb0740651fba8ec602e8239bd679efc8ad Author: Alex Deucher Date: Sun May 13 11:57:57 2007 -0400 RADEON: fix up DDCConnected() commit 0550c37ecc434b8075fb3c367d100ff27625bb64 Author: Alex Deucher Date: Sun May 13 11:44:50 2007 -0400 RADEON: don't need to pass pScrn to EnableDisplay() commit 117220527de9fd3158f600645bcfcaf46847f45f Author: Alex Deucher Date: Sun May 13 11:37:35 2007 -0400 RADEON: remove hardcoded output limit and PortInfo stuff commit 7e5c29961ac2a9e9dbe5d6d2d73d11cd018d62b5 Author: Alex Deucher Date: Fri May 11 18:00:40 2007 +0200 RADEON: Fix RMX after the last commit commit ab5603edd8fc3ef0560bdfb6a6d9c6af2a49d1e5 Author: Alex Deucher Date: Fri May 11 17:34:35 2007 +0200 RADEON: Move LVDS, TMDS, DAC properties to the output rec commit 94eb0681de0641e490f06486468617a727fefe86 Author: Alex Deucher Date: Fri May 11 14:39:48 2007 +0200 RADEON: switch output dpms to use RADEONEnableDisplay() commit 673ede5578d5d9caf2adf0445fe1e684b034eea5 Author: Alex Deucher Date: Fri May 11 14:28:17 2007 +0200 RADEON: re-arrange output mode setting commit 0070a7d787adaae99f7bc2659be4b0f49f439db5 Author: Alex Deucher Date: Fri May 11 13:06:15 2007 +0200 RADEON: more re-org - move crtc mode setting around - add dri lock/unlock to crtc lock/unlock calls commit bba456232ac9a6218aa7fbd504d6093fa72860cf Author: Alex Deucher Date: Thu May 10 15:33:51 2007 +0200 RADEON: fix VT switch commit 1779a12a947401e5c6bcf784b47e9b3c80d37204 Author: Jesse Barnes Date: Thu May 10 06:22:35 2007 -0700 Add cscope files to .gitignore commit 0cb23277666db3b30438c6f88840d861e04df414 Author: Alex Deucher Date: Thu May 10 15:20:56 2007 +0200 RADEON: randr driver re-org checkpoint - split the mode setting per-crtc - reduce start up flicker commit 33c370b1d8350945f80ac12097d3e91243a400f2 Author: Jesse Barnes Date: Wed May 9 16:16:39 2007 -0700 RADEON: - fix an ugly modesetting bug: if we happened to set the mode on CRTC1 before CRTC2, CRTC2's RestoreMode function would clobber CRTC1's CRTC_OFFSET register since we never updated ModeReg.crtc_offset... so make AdjustFrame use ModeReg and pull the call to it up before RestoreMode, seems to work ok here. commit 6263248a0044777a352e4ee7380b4b8f9afd091b Author: Jesse Barnes Date: Wed May 9 14:52:00 2007 -0700 RADEON: - use fixup_mode hook to set RADEON_USE_RMX flag so panel scaling works - use valid_mode hook to prune invalid default modes from list - use adjusted_mode in crtc_mode_set (using adjusted_mode from fixup hook) commit d2497009e395800fbde5777465f3087a54b94418 Author: Alex Deucher Date: Wed May 9 22:23:45 2007 +0200 randr checkpoint - server still hangs if you start with external monitor connected - RMX not working - more than 2 outputs now possible (untested) commit 4488f0737d5268168eab41440b7a3b5732efb15e Author: Alex Deucher Date: Wed May 9 16:41:13 2007 +0200 more randr re-work - remove RADEONQueryConnectedDisplays(); randr takes care of this now - print edid after randr detection commit 4d992386e2ab9d8c50f0484445564325dfb42930 Author: Alex Deucher Date: Wed May 9 16:12:21 2007 +0200 enable all outputs on each crtc on mode restore commit 2618cf2aa8ed76411b943eb90c95869814c2f151 Author: Alex Deucher Date: Wed May 9 15:48:40 2007 +0200 More re-org to allow more than 2 outputs - Move radeon output crtc map into crtc_set_mode - in modeinit, set up all outputs attached to crtc commit 61b9e79cbeee6f735a4c82ec8a802aee85d8b890 Author: Alex Deucher Date: Wed May 9 15:11:23 2007 +0200 start to clean up MapControllers commit 6a724dd798c1a7b461672993c02be83a7bccded6 Author: Alex Deucher Date: Wed May 9 14:48:17 2007 +0200 minor cleanup commit 03860fed24b4f76cc7f1f4210ec8f8040fa04777 Author: Alex Deucher Date: Tue May 8 19:27:48 2007 +0200 remove some old mergedfb cruft commit 76670f665ebec7cdf40a04bf9379cb3ad4417507 Merge: 83f81ed a3ee422 Author: Alex Deucher Date: Tue May 8 18:41:25 2007 +0200 Merge branch 'master' into randr-1.2 and fix conflicts commit 83f81ed5e3c33c94c80500316c37a7cbfc51f41f Author: Alex Deucher Date: Mon May 7 22:54:16 2007 +0200 RADEON: Fix cursor handling for randr commit 5fc21cd34436919300018d8d4850fc67db284eb3 Author: Jesse Barnes Date: Mon May 7 13:31:20 2007 -0700 - fix randr 1.2 on pre-RV350 chips by enabling DAC_MACRO_CNTL writes - set dac_cntl on non-primary crtcs - set XCRT_CNT_EN in CRTC_EXT_CNTL just because - fix warnings in calls to xf86PrintModeline (wants screen index not pScrnInfo) commit 99b3df154317f0209618e532282a3e7ad091c00f Author: Alex Deucher Date: Mon May 7 19:02:35 2007 +0200 RADEON - update randr cursor handling, LVDS setup fix - quick fix for the cursor handling to update to the latest server bits - make sure connector type is CONNECTOR_PROPRIETARY for LVDS. commit a3ee42207aab77d93655a82fdcb32be38268b85f Author: Dave Airlie Date: Wed Apr 25 09:52:22 2007 +1000 radeon: another attempt at fixing the mergedfb refresh rate This attempts to keep it inside the 32-bit limit when multiplying things out later in the randr tree. Let me know if I screwed this up.. commit 3828237200fc16d4d32664fb8358950c213d4897 Author: Dave Airlie Date: Sun Apr 22 11:36:00 2007 +1000 radeon: add support for DDC on some laptop chipsets I noticed fglrx has DDC for the panel in the rs480 laptop, however radeon didn't pick it up, so I valgrinded fglrx and spotted 0x1a0/0x1a4 accesses I actually noticed this before from the BIOS but never figured it out. So now I get DDC from the LCD on this laptop. commit dd6a966e862b774a8e8b9e1a085309219673efad Author: Dave Airlie Date: Sun Apr 22 11:36:00 2007 +1000 radeon: add support for DDC on some laptop chipsets I noticed fglrx has DDC for the panel in the rs480 laptop, however radeon didn't pick it up, so I valgrinded fglrx and spotted 0x1a0/0x1a4 accesses I actually noticed this before from the BIOS but never figured it out. So now I get DDC from the LCD on this laptop. commit c81ed9bd7b37c9d02141d10f6c7bad3d0c57032f Author: Dave Airlie Date: Sat Apr 21 18:58:40 2007 +1000 radeon: fix build on older server commit 406eec71116a58d42288a7f1c809a92d5bda7350 Author: Dave Airlie Date: Sat Apr 21 18:56:28 2007 +1000 radeon: fix build since patches for IBM don't actually build commit ad119960095b4b64f4c6793f65950c9967ce4989 Author: Matthias Hopf Date: Thu Apr 19 11:54:46 2007 +0200 Disable RMX for IBM Lewis server. Due to the hardware layout RMX ddc_mode has to be set. If ddc_mode is set, RADEONValdiateFPModes() shouldn't be called. Bugzilla #10620 (3). commit 16ef77df4ebaf5ea13baa82972aaf98e71ac32ee Author: Matthias Hopf Date: Wed Apr 18 17:36:15 2007 +0200 Set sync polarity restriction flags even for non-"digital separate" monitors. According to Lisa Wu, this is correct regarding the VESA EEDID standard. Bugzilla #10620 (2), original patch by Lisa Wu @ATI commit 0abce69f0d826a7ca1a41d963cd4730b6e01c145 Author: Matthias Hopf Date: Wed Apr 18 17:32:52 2007 +0200 Fix inconsistent use of Mode lists. Some scans used to only check every second entry, some stopped at the entry before the last entry. Bugzilla #10620 (1), original patch by Lisa Wu @ATI commit aea801cf9a5ce519a53d6fffd9a3a2e526ec79ea Author: Matthias Hopf Date: Fri Apr 13 16:16:05 2007 +0200 Fix crash if MergedFB and secondary head not found If the secondary head isn't found (Monitor unplugged etc.) but MergedFB is configured, the driver segfaults because it tries to access the mode list private structures, which are not filled in. commit 07ddffb32e6293c77b32c94b87ec468caef3d6f5 Author: Matthias Hopf Date: Wed Apr 11 14:36:51 2007 +0200 Fixed typo in mode list generation. commit 4effa67ea75736a31b9e78a7b35acf74b067c43e Author: Dave Airlie Date: Mon Apr 9 22:08:31 2007 +1000 radeon: add support for enabling direct rendering on RS480 Thanks to Matthew Garrett and Ubuntu for the hw loan to get this working. Still no 3D driver support but at least you should get CP acceleration for 2D now. commit 6b25a4c48796e022a093f3072574ffe9709ecaf4 Author: Michel Dänzer Date: Wed Apr 4 10:47:29 2007 +0200 radeon: Link nearest modes by default for clone mode. This makes sure all modes of both CRTCs will be available by default with MergedFB. commit 3c892f163ec1fa9be6e733aab091c9b718f41efc Author: Michel Dänzer Date: Wed Apr 4 09:52:37 2007 +0200 radeon: Always sort modes when adding to list. This makes sure mode lists will always be sorted from larger to smaller. commit 3a8190ccc79969925257e7b980b78d79053d208d Author: Michel Dänzer Date: Wed Apr 4 09:47:07 2007 +0200 radeon: Don't shrink virtual size based on secondary modes. commit 9b1e97284ce185d358ca756a235d2cee346fa53f Author: Henry Zhao Date: Sat Mar 31 23:01:52 2007 -0800 10205: Radeon driver's own mode validation code does not work properly commit 9c2dcd19be8fc2cc29e637d1e9748e66196e3900 Author: Henry Zhao Date: Sat Mar 31 20:10:03 2007 -0800 9337: EDID modes do not participate in validation for CRT monitor commit 1acd6d6fa42acec07fb11aeb189f492ddb021cb4 Author: Michel Dänzer Date: Fri Mar 30 11:06:10 2007 +0200 radeon: Guard some MergedFB specific code with info->MergedFB tests. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=10442 . commit 1a71106c0e4fe5f650239dc694163fdf52d33663 Author: Michel Dänzer Date: Tue Mar 27 10:13:21 2007 +0200 radeon: Fix typo. commit f87e57d4d773a019d1cc8a10425c57480430f6a4 Author: Dave Airlie Date: Tue Mar 27 18:08:54 2007 +1000 radeon: fix up crtc debug dereference problem commit 66b4a571a4e7960da6807d3f30955aa08e89ccc6 Author: Dave Airlie Date: Tue Mar 27 17:00:37 2007 +1000 update number to 6.6.191 for rc release commit fca30a6b581cb6c1466ab1bc316df8fed5d82b60 Author: Alex Deucher Date: Mon Mar 26 23:26:51 2007 -0400 fix NULL dereference when IsSecondary is true, crtc1 is NULL Noticed by Sverre Froyen. commit 97d8d1ed10d069343f2b3172ba64ca421821a602 Author: George Sapountzis Date: Sat Mar 24 20:02:12 2007 +0200 Move atichip.c from ati to atimisc. commit aa8f5b02ebc9be60df48722588261627d6a457e8 Author: George Sapountzis Date: Sat Mar 24 19:53:02 2007 +0200 [mach64] Use Mach64Chipsets[] instead of ATIChipNames[]. atimisc is PCI-only now, we can get the chip name with xf86TokenToString(). commit 39e896a1e688ea2d2d21f88c1c5d34c5810aac1c Author: George Sapountzis Date: Sat Mar 24 19:47:18 2007 +0200 [mach64] Set pATI->ChipRevision correctly, instead of overriding. There is no need to override pATI->ChipRevision for GX/CX, as it is only reported with a printf. commit f046a910ca117279fbabc6281b2e23439ec9ea4e Author: George Sapountzis Date: Fri Mar 23 22:19:17 2007 +0200 Drop probing by driver name from "Device" section. atimisc is PCI-only now, so we only need to scan the PCI space. commit 9cd175d9cd4ed710fccb303664c77519ecaf1e21 Author: George Sapountzis Date: Fri Mar 23 22:12:48 2007 +0200 Fold FillIn() back to Probe(). commit d7a8cd0e476034796fc38e25a28cd28d05ea4a13 Author: George Sapountzis Date: Fri Mar 23 22:10:03 2007 +0200 Drop now unneeded _X_EXPORT's. commit 58626d8b78f26f0d9c480033d3c3a12e541342b1 Author: George Sapountzis Date: Fri Mar 23 21:30:19 2007 +0200 Move {atimach64,r128,radeon}_probe.c from ati to subdrivers. Subdrivers are now loaded from the wrapper Probe function rather than at screen creation time. The wrapper Identify callback only prints chip families now, chip lists are printed when a subdriver is loaded. This also avoids duplication of subdriver Identify callbacks. Unknown radeons should still get a list of known radeon and then probe fails... Probe for atimisc last to avoid needless loading in most cases (r128, radeon). commit 2e3d43af1e5077cc61dd8668551a6291368d9ed2 Author: George Sapountzis Date: Mon Mar 19 19:05:04 2007 +0200 [mach64] Compute MMIO address once for each case (PIO, MMIO). For an MMIO-only driver, the extra MMIO address probing is not needed since we already compute the MMIO address during probe and do not make any BIOS calls. For a PIO driver, this extra probing could even result in a wrong MMIO address since the checking is done by reading through PIO, not MMIO. The MMIO address is later corrected but having the extra probe there is useless. commit e7defc0e930f1b2d83623a769b2bfdb05c66a5fe Author: George Sapountzis Date: Mon Mar 19 19:04:10 2007 +0200 [mach64] Move setting of PIO and MMIO addresses up, after BIOS init. Partially revert "Minor refactoring of pATI->Block0Base computation." This parially reverts commit 2c8b33b761e4411451aea1eea3a89d629aeea40d. commit 3dfdba195f1ff794ab00585ab80e7ea6ac92fcf4 Author: George Sapountzis Date: Sun Mar 18 16:40:07 2007 +0200 [mach64] Make mapping code friendlier to pci-rework source-code compatibility. commit 321db6d87c9110654ab386e5ec270116eca1e04f Author: George Sapountzis Date: Sun Mar 18 16:15:20 2007 +0200 [mach64] Add macros for pci-rework source-code compatibilty. commit dfd07b6e99020d1db43d7ce0cae4423d8c6b1f05 Author: George Sapountzis Date: Sun Mar 18 16:38:26 2007 +0200 [mach64] Drop checking that BAR base + size fits in 32 bit. I can't see how these tests could fail on 32-bit. OTOH they are potentially problematic with 64-bit PCI addresses. commit e674338a98c50800637b8ebc01adf3aec2a3eb38 Author: George Sapountzis Date: Sun Mar 18 15:50:41 2007 +0200 [mach64] Single mapping per BAR. - We reset write-combining of the FB when MMIO registers fall in the linear aperture. - We set MMIOInLinear in all three aperture mappings since the mapping code depends on it. - We map the linear aperture in its entirety for MMIOInLinear also. This simplifies mapping of HW cursor and the LE aperture on BE archs, as they always fall in the linear aperture. - I assumed that BAR[2] is page-aligned (we know it's 4K-aligned for sure). commit e7969de8ec572d8801806f9525a9a081a58a03f1 Author: George Sapountzis Date: Sun Mar 18 15:35:25 2007 +0200 [mach64] Drop poking the VGA MMIO aperture. We will not be able to handle this when we do mappings for PCI BARs only and it should be handled with a CPIO driver anyway. commit 166c760a86165330175023e07c4b2bd6891633c5 Author: Michel Dänzer Date: Tue Mar 20 09:16:02 2007 +0100 Fix advertised minimum minor version of the DRI module. We don't automatically require bumped minor versions. commit 1bdd376dbd57de8925244f0808f974d6d8cff39d Author: Michel Dänzer Date: Tue Mar 20 09:14:39 2007 +0100 radeon: Only sync to hardware when really necessary with EXA. In particular, don't sync again after accelerated DownloadFromScreen, which syncs implicitly. This avoids calling into the kernel when it's not necessary, which can be relevant in some situations. commit 3cfa3a5c8daf03aaad6fc30d275709f6eb717d29 Author: Michel Dänzer Date: Tue Mar 20 09:13:24 2007 +0100 radeon: Unify code to release the CP. commit e174d8df8c801fad95e5f79cff69187c200bee6e Author: Michel Dänzer Date: Tue Mar 20 09:12:51 2007 +0100 radeon: Minor BlockHandler cleanups. Don't flush indirect buffer in BlockHandler; it's done in LeaveServer. Also set the EXA engine mode to unknown only at the end. commit 113fb4b61e709a9b54fc2ef73efce06011e771c1 Author: Michel Dänzer Date: Tue Mar 20 09:12:09 2007 +0100 radeon: Disable CP line acceleration on RV280s. There have been several reports of stability issues with things like the xscreensaver hack hypercube. commit 4651d00b183cb498879d605c4b93cd3a0c63cb33 Author: Michel Dänzer Date: Tue Mar 20 09:10:19 2007 +0100 radeon: Make sure 3D clients will re-upload textures to video RAM after LeaveVT. Walk the SAREA texList and bump the age of every active object, so their owners will consider them kicked out when they grab the HW lock next time. commit 2d2fb54ba370c1df9ef5102e83c17a7ff5c55403 Author: Michel Dänzer Date: Thu Mar 15 17:26:56 2007 +0100 atimisc: Fix strict aliasing violation flagged by -Wall. commit cfb82631fb683a0dc9bbc8f2d214646a8f1bca0b Author: Michel Dänzer Date: Thu Mar 15 17:12:43 2007 +0100 radeon: Fix build warnings. commit 50a524445ed1ea3c4fab56de772921ba86a21d35 Author: George Sapountzis Date: Thu Mar 8 17:43:48 2007 +0200 Move atioption.c from ati to atimisc. commit 52684241ba1ffb393cb655ecc09cbd0cef5b1717 Author: George Sapountzis Date: Thu Mar 8 07:07:02 2007 +0200 Move atiprobe.c from ati to atimisc. commit 2a1cd107a593630001799d6cd9e72c64222553b2 Author: Jesse Barnes Date: Tue Mar 6 14:35:50 2007 -0800 Add prepare/commit hooks to output and crtc func table commit 703c6fc0142ffc600285c13fe6dafecf988c0a1d Author: Jesse Barnes Date: Tue Mar 6 10:12:42 2007 -0800 Update for new CRTC resize hooks. commit 1e270b411cf691c69194932b864ee2c9db292263 Author: George Sapountzis Date: Sun Mar 4 18:21:49 2007 +0200 [mach64] Bug 5586: overlay scaler limited to 720 pixels on ATI Rage Pro. commit 54f9b8c1d01ecb97e2d4d247918f0efc86ed6037 Author: George Sapountzis Date: Sun Mar 4 18:16:40 2007 +0200 [mach64] Xv: use single surface and encoding structs. commit e1e55b533d3ae528c8da37dcb77ed906d05697fb Author: Dave Airlie Date: Sun Mar 4 19:11:34 2007 +1100 radeon: add option to set pci aperture size from config file This requires a drm > 1.26 to work commit 58ee31d015cf8bec0edca62a46faec0b3505be8c Author: Dave Airlie Date: Sun Feb 25 23:29:09 2007 +1100 fix typo commit 3cfe94d5438961b869766dacbcd13fde8b770ca2 Merge: 31c018c 3b43788 Author: Dave Airlie Date: Sun Feb 25 23:27:19 2007 +1100 Merge branch 'radeon-randrv12-v4' Conflicts: src/radeon_display.c src/radeon_driver.c commit 3b43788c45f51ad2d3e8e64383c412f4ddd97207 Author: Dave Airlie Date: Sun Feb 25 23:17:31 2007 +1100 cleanup radeon code against master server commit 24c6fa7cfac5602ba9e6e2f331bcac52fab258e5 Author: Dave Airlie Date: Sun Feb 25 21:43:54 2007 +1100 make radeon randr build against master server commit 4374895d393bf170134ccffc188521fe515d5a77 Author: George Sapountzis Date: Sat Feb 24 21:25:13 2007 +0200 [mach64] Consolidate adjustments of mode timings, part 3. Cosmetic. commit 8b9a4ec8af90b2f9f0d0a3a7f6627061df7e01b3 Author: George Sapountzis Date: Sat Feb 24 21:22:49 2007 +0200 [mach64] Consolidate adjustments of mode timings, part 2. Factor out to seperate function. commit bb226c9e7218d2a65c056fe74cb7eece0550670f Author: George Sapountzis Date: Sat Feb 24 21:20:53 2007 +0200 [mach64] Consolidate adjustments of mode timings, part 1. Move LCD block from atimode.c to atimach64.c . commit 31c018ca4a18ce426b29006f103f56eee7f985fa Author: Roland Scheidegger Date: Wed Feb 21 13:47:37 2007 +0100 add missing part of last commit... commit df07fa14da73e92d1a6ee0173468ab5c075d1cbb Author: Roland Scheidegger Date: Wed Feb 21 13:05:42 2007 +0100 fix alignment issues with planar yuv and a bug with packed uyvy respect that all source planar yuv planes are already dword aligned. Some attempts to fix up odd widths and odd heights (which are a bit strange for 4:2:0 formats). They still don't quite work 100% correctly (at the borders) but neither do they with packed yuv formats. While here, fix totally broken packed UYVY format by inserting missing break... Both bugs reported by Felipe Contreras. commit dfcb431adfbbaaee0d262d32735585555a0cbde4 Author: Dave Airlie Date: Tue Feb 20 21:20:28 2007 +1100 radeon: move some i2c registers out into common register file These regs are more useful than just multimedia commit 7a25512415bb40b772491bb4a773dfe02ac8b71a Author: Alex Deucher Date: Fri Feb 16 00:44:11 2007 -0500 Add "DRI" option This option allows you to disable the DRI per card. It also removes the "RN50Force3D" option as it is now covered by this option. RN50 users should set this to TRUE if they want to force the DRI on. commit fa30ec6d5cd9bf4eb1a960592ca7311175219e4b Author: George Sapountzis Date: Tue Feb 13 15:35:32 2007 +0200 [mach64] PreInit: maxPitch, minor cosmetic. commit 1777dcc1956d910073e13322767d9a3de41a949b Author: George Sapountzis Date: Tue Feb 13 15:03:40 2007 +0200 [mach64] PreInit: pitchInc is local. commit 9cdf4fcc3a93a4e20244286392dc31a0b8e6a10a Author: George Sapountzis Date: Tue Feb 13 11:53:42 2007 +0200 [mach64] PreInit: Use goto bail. Match ATILock - ATIUnlock. commit 482b85144fee42b6543dcc97a75899e363e05e9e Author: George Sapountzis Date: Mon Feb 12 14:27:37 2007 +0200 [mach64] Enable RENDER acceleration on the Pro variants. commit 63248f0b4308a4487cda3aa22daa36e3e0d38d14 Author: Dave Airlie Date: Mon Feb 12 19:37:36 2007 +1100 fix LVDS by moving bios reading around commit 6a25f620d40cbb063de94aa6b5267296cd5a0670 Author: David Airlie Date: Mon Feb 12 15:59:43 2007 +1100 remove assignments to pOutput before it is created commit 9234d8045c5fefbd1a781209409e55a13e3e5370 Author: David Airlie Date: Mon Feb 5 11:53:18 2007 +1100 remove all the locking glxgears runs fine over screen changes without it commit eda9fb15e8bc042661a91a3d8c921006dfb3ddd9 Author: George Sapountzis Date: Tue Nov 21 04:02:41 2006 +0200 Consolidate atixv.c w/ atimach64xv.c, part 2. Move {Initialize,Close}XVideo from atixv.c to atimach64xv.c . commit 67b240ddd4a6549a23885afc723b6efa7c52db4c Author: George Sapountzis Date: Tue Oct 31 16:44:10 2006 +0200 Consolidate atixv.c w/ atimach64xv.c, part 1. Merge ATIXVInitializeAdaptor() in ATIMach64XVInitialiseAdaptor(). commit 4dac7896549392f7378cad9620618cec28f41a16 Author: George Sapountzis Date: Sun Oct 29 03:55:39 2006 +0200 Consolidate aticursor.c w/ atimach64cursor.c commit 23b12b9ff55224e8c3c45eb58ea5fbf2f747d82e Author: George Sapountzis Date: Tue Oct 31 16:10:07 2006 +0200 Consolidate atiaccel.c w/ atimach64accel.c, part 2. Merge ATIInitializeAcceleration() in ATIMach64AccelInit(). commit bc3b222b57d7edf7bdce00a53e8abd9047c314a4 Author: George Sapountzis Date: Sat Oct 28 19:29:12 2006 +0300 Consolidate atiaccel.c w/ atimach64accel.c, part 1. Move ATIResizeOffscreenLinear() from atiaccel.c to atimach64xv.c and make it static. It is only used by XV memory management functions. commit d876889add41c8052d4f3feaa21ddf384f5a7054 Author: George Sapountzis Date: Tue Nov 21 04:47:06 2006 +0200 Drop non-PCI support from atividmem.c - we require a PCI device (pVideo != NULL) - map the VGA framebuffer with xf86MapDomainMemory() commit 2c8b33b761e4411451aea1eea3a89d629aeea40d Author: George Sapountzis Date: Tue Nov 21 04:51:02 2006 +0200 Minor refactoring of pATI->Block0Base computation. commit a659b7235332e19659c56cc9d7af362bd8885a29 Author: George Sapountzis Date: Sun Feb 4 11:28:54 2007 +0200 Cleanup checks for pATI->PCIInfo. Fixes a bug where shadowfb would not be enabled by default in the non-accel case because pATI->PCIInfo is now set after ATIProcessOptions() is called. commit 9d77aabdff919360f0c9333105436c31f1f5749a Merge: ff8ea19 57822be Author: George Sapountzis Date: Mon Feb 5 19:16:51 2007 +0200 Merge branch 'mach64-pci-1' commit d7317604c843e21c1df048a9253ed55a1957cccd Author: David Airlie Date: Fri Feb 2 14:54:00 2007 +1100 get rid of mergetype and displaytype from radeon.h commit 15c68ac19ff9971ae02cf52036ba36ddea1a6759 Author: David Airlie Date: Fri Feb 2 14:30:16 2007 +1100 rename some variables to output from connector commit 72ef23ef7dd159d827e8e122482a58928d532268 Author: David Airlie Date: Fri Feb 2 14:26:29 2007 +1100 fixup mode probing a bit neater commit 96acf6b2b242454345cc4b9cfc7ca07e0b597b43 Author: David Airlie Date: Fri Feb 2 14:26:19 2007 +1100 bring over setproperty from intel code commit 76bc53f9b153880730ab61dcd2b6e4e7717e4058 Author: David Airlie Date: Fri Feb 2 14:15:03 2007 +1100 move i2c buses into outputs commit 47fb9ce657f018177a35b449a4d716dc03be9327 Author: David Airlie Date: Fri Feb 2 11:45:40 2007 +1100 fixup callers to crtcsetmode fixes my cursors commit 720730b1b0de632488d3b9818210ec5e9c7f07ae Author: David Airlie Date: Thu Feb 1 16:43:38 2007 +1100 add locks for crtcs and some missing lines from intel update commit 6748732658850ea506f623a3622aa7135513ffd0 Author: David Airlie Date: Thu Feb 1 16:26:31 2007 +1100 update to latest intel codebase modulo using their mode set and it breaks my cursor commit a77f08298dc7e097025e3f7f92e3665c0ef30095 Author: David Airlie Date: Mon Jan 29 16:12:24 2007 +1100 radeon: always reset cursor regs commit ff8ea19fcdce099732f9359e53cd62b9a04bfa6d Author: Alex Deucher Date: Tue Jan 30 21:11:09 2007 -0500 add option to force the DRI on for RN50 chips Allow user to force the DRI on for RN50 chips. 3D is not guaranteed to work on these chips, however in some cases it does. fixes bug 9802. commit 57822be75740f339445f2375d44632560f4bbe57 Author: George Sapountzis Date: Tue Nov 21 03:08:26 2006 +0200 Drop pATI->Chipset, no longer used. commit 8b7c88e9ed549777413136c0f2ccc61747b010d8 Author: George Sapountzis Date: Thu Dec 28 14:46:10 2006 +0200 Add option "probe_sparse" to force probing sparse I/O bases. commit 3654b786f1ad1f4e6bfb2fff5ff057254958f7c0 Author: George Sapountzis Date: Wed Dec 27 17:59:14 2006 +0200 Sane probe, based on work by Luc Verhaegen . commit 0117c9bde0d0bbb487bc259cf55e8066ebd63f6a Author: George Sapountzis Date: Wed Dec 27 17:49:45 2006 +0200 Drop checking of sparse I/O bases conflicts This will be handled with an option somehow. commit 87cf2f1874ca8a7cc492d2e2b6918ba69a8aa713 Author: George Sapountzis Date: Mon Aug 14 17:55:14 2006 +0300 Minor refactoring of module (un)loading for TV_OUT. commit 0b31333c9147af21c50493872779da12a3668e5d Author: George Sapountzis Date: Mon Nov 20 22:08:49 2006 +0200 Drop support for non-programmable clocks. From README.ati: Clocks for supported programmable clock generators: The driver currently supports all programmable clock generators known to exist on Mach64 adapters. Clocks for unsupported programmable clock generators: This case is unlikely to occur, but is documented for the sake of completeness. Thus: - check for (pATI->ProgrammableClock > ATI_CLOCK_FIXED) && (pATI->ProgrammableClock < ATI_CLOCK_MAX) - drop "probe_clocks" option - pATIHW->ClockUnmap is no longer used - pATIHW->ClockMap is only used with NewHW.crtc which is always ATI_CRTC_MACH64 and has the identity map, so drop it - (pATI->ProgrammableClock != ATI_CLOCK_INTERNAL) => (pATI->depth <= 8) commit c9a9ea5ebd1c27881c1fac19842cfa3af55c126e Author: George Sapountzis Date: Mon Nov 20 15:09:41 2006 +0200 Banked memory is no longer needed. - (pATI->BankInfo.BankSize = 0) in all cases, cull pATI->BankInfo - only keep the minimal pATIHW.SetBank interface for save/restore - clean ATISwap() a little, (NewHW.crtc != ATI_CRTC_VGA) - (UseSmallApertures == TRUE) <=> pATI->VGAAdapter commit 383e963e275d351ea3631c352f5795340162d69f Author: George Sapountzis Date: Sun Jan 28 00:44:31 2007 +0200 Always use the linear aperture. - drop (pATI->OptionLinear == FALSE) - AcceleratorVideoRAM is always set, i.e. VGAVideoRAM is not used - pATI->LinearBase is always set - xf86LinearVidMem() is now checked in atipreinit() for both CPIO and MMIO commit 9b126f45db27496c1ad16db65a61fe641a018983 Author: George Sapountzis Date: Mon Nov 20 20:38:59 2006 +0200 We always use the accelerator CRTC within the xserver. - cull (pATI->NewHW.crtc != ATI_CRTC_MACH64). commit 0abcb2b2c84a50e64bb6aa9e94760659ecf33add Author: George Sapountzis Date: Sun Jan 28 00:19:15 2007 +0200 Clean pATI->Adapter and pATI->VGAAdapter. - cull (pATI->Adapter != ATI_ADAPTER_MACH64) - treat pATI->VGAAdapter as Bool commit 817b4b5338dba4d8eb862f1f79ef0edb75aad7f4 Author: George Sapountzis Date: Wed Dec 27 21:16:18 2006 +0200 Keep PCI mach64 only, drop: - Chip < ATI_CHIP_88800GXC - Chipset != ATI_CHIPSET_ATI - Adapter != ATI_ADAPTER_MACH64 - depth < 8 commit d350860e29f043e98bfb1da74b26280f1755ab6f Author: George Sapountzis Date: Wed Dec 27 20:56:45 2006 +0200 Keep PCI mach64 only (atipreinit.c, atimode.c), drop: - Chip < ATI_CHIP_88800GXC - Chipset != ATI_CHIPSET_ATI - Adapter != ATI_ADAPTER_MACH64 - depth < 8 atimode.c only: - NewHW.crtc != ATI_CRTC_MACH64 This allows to drop VGACalculate(), VGAWonderCalculate() cruft early. commit 5fa77f2d122e7267911a15235338d8d3f9eece2e Author: George Sapountzis Date: Wed Dec 27 14:50:48 2006 +0200 Drop probing for VGA, VGAWonder, 8514, Mach32. - ChipHasSUBSYS_CNTL - Coprocessor - SharedAccelerator - SharedVGA <=> (VGAAdapter != ATI_ADAPTER_NONE) commit 1b2a9e1735da63bbb8cb41939668f789cee22579 Author: George Sapountzis Date: Mon Nov 20 02:35:56 2006 +0200 Drop AVOID_NON_PCI. This was not set anyway, because configure.ac would compute ATIMISC_NON_PCI and then test ATI_AVOID_NON_PCI to set AVOID_NON_PCI... commit 2fb84dd2fc1a663c7b9d77e706189439ffe08381 Author: Alex Deucher Date: Thu Jan 25 02:01:42 2007 -0500 I think we can say r300 support is not experimental commit e155659f4b006edff31f1fda88b32bf608dbeece Author: Alex Deucher Date: Thu Jan 25 01:59:27 2007 -0500 update man page. fixes bug 6457 Most cards support 2D and 3D now commit fa12fe1cc90dd745f3eea35a07d4f3efd652e7b4 Author: Dave Airlie Date: Tue Jan 23 19:37:51 2007 +1100 remove unused restore palette function commit 4d3649b84a3325043c38cece4499de0095cebd71 Author: Dave Airlie Date: Tue Jan 23 19:37:21 2007 +1100 remove isused and isactive commit 9149e763865598c307cbefc753ff6ebdeeaf32ae Author: David Airlie Date: Tue Jan 23 15:20:11 2007 +1100 radeon: fixup problem with cursor not going off Also fixup secondary dac detect to return unknown for now commit 2a13a3b641d9acf4f50472e1c8ba07633c3b78d6 Author: David Airlie Date: Tue Jan 23 10:36:06 2007 +1100 fixup init disp bandwidth This probably break old-style dualhead badly commit cbd84bed13582e82f8b2e84aa152602474c09cd4 Author: Dave Airlie Date: Mon Jan 22 22:19:46 2007 +1100 removed even more mergedfb remains commit 6296882135b183425a219efb75374d3b172de370 Author: Dave Airlie Date: Mon Jan 22 22:14:48 2007 +1100 remove more mergedfb relics commit 26e1bab2c7a4ad52710746265b3da495b54dab36 Author: Dave Airlie Date: Mon Jan 22 22:11:55 2007 +1100 radeon: fixup some of the video code after randr This may not be complete, I need to test on dual-head system later commit 9008e1caa45e4a18e6f3289c7b17036730fe578a Author: Dave Airlie Date: Mon Jan 22 21:16:47 2007 +1100 remove unused merged code commit e29a32d711553fcb4ca9928122ac285fe0b0c1a7 Author: Dave Airlie Date: Mon Jan 22 21:09:53 2007 +1100 add back overlay CRTC chooser this may not work yet commit aa9d04ba94a3cd60b248231da517e2817591fc69 Author: Dave Airlie Date: Sun Jan 21 20:29:56 2007 +1100 remove alot more mergedfb support commit e8be0056e8ff666f63a294691661f5dab289203e Author: Dave Airlie Date: Thu Jan 18 16:41:25 2007 +1100 remove mergedfb commit a648050a3cc60f92b1ca0b3d707aadf93d076d91 Author: Dave Airlie Date: Wed Jan 17 17:28:07 2007 +1100 move some cursor code around for show/hide commit d2ecfb507282726122bb8b0d17fd3637d0ae7d46 Author: Dave Airlie Date: Wed Jan 17 17:16:27 2007 +1100 make dri work again commit 369f7c85ceff983defb7657b80ec9cd3e5440b07 Author: Dave Airlie Date: Wed Jan 17 11:14:09 2007 +1100 comment out unblanking on VT switch commit bdb66a2042f02c4b57bd3c0181a00b39fcbdb232 Author: Dave Airlie Date: Sun Jan 14 21:07:05 2007 +1100 radeon: get randr-1.2 mode switching mostly working on my laptop The main change is to fix the dac macro + cntl register writes for rv350 and above, this still has a problem with resetting the same mode after connect disconnect cycle, need to talk to keithp commit aa0e7337815d4daca4df0671768621330b759011 Author: Dave Airlie Date: Sun Jan 14 19:17:32 2007 +1100 use more randr-ish names for variables commit 9d37f23aea43b74a7ec640e6b03617c8392e2572 Author: Dave Airlie Date: Sun Jan 14 19:10:11 2007 +1100 radeon: move blank/unblank to use randr commit 6bd4fe42789c38e7e804826715214ce6badcca6a Author: Dave Airlie Date: Sun Jan 14 18:38:59 2007 +1100 disable dpms on/off as it was writing regs before we wanted to commit 3949288ed26a91e180b178f4796f2f7e1bdc8ed6 Author: Dave Airlie Date: Sun Jan 14 16:26:39 2007 +1100 radeon: destroy and fixup LVDS crtc commit f5ffb9fb3bdd7cec020240c5831ae92ee744972c Author: Timo Jyrinki Date: Fri Jan 12 23:08:50 2007 +1100 ati: fix detection of some newer radeons using ati wrapper This is mainly due to the cards having a different resource 1. Fixes 6796 commit 1e690c57ad1dfaeb760ef6e799faa6398e9a0551 Author: Dave Airlie Date: Fri Jan 12 23:03:10 2007 +1100 always create a second CRTC I think this should solve any problems commit 25b36a4c56422ad8e25a4a1c55055c2f062213ca Author: Dave Airlie Date: Fri Jan 5 16:13:16 2007 +1100 minor randr1.2 fixups commit abe8791e4f9fa3e88273897b351387cd33822734 Author: Dave Airlie Date: Fri Jan 5 15:09:43 2007 +1100 hook up DPMS through xf86 commit 8a9c68c2234b91ed38555f892afdad30b9e4b455 Author: Dave Airlie Date: Fri Jan 5 15:09:15 2007 +1100 set binding for new heads commit d6a2b8aeb5a97ee907fd45b574bc6e4ab4b3aede Author: Dave Airlie Date: Fri Jan 5 09:33:54 2007 +1100 fix LUT commit ef1d36e56dec1fec37cee2dfd9cb5bf8ce2c485c Author: Roland Scheidegger Date: Wed Jan 3 15:56:23 2007 +0100 fix uninitialized mode regs (bug 9495) Since the reorganization of the mode setting code, the mode registers relying on state already set (by bios) were not read, thus clearing out all bits the driver does not touch. At the very least, this could lead to completely nonfunctional to misbehaving dvi output (see bug 9495). Fix this by using the SavedReg values, which also makes it more obvious that those are bits which were not set by the driver previously, but come from register readback. (cherry picked from 9506f7015a1e442f4ca0bd3bfae555ec7e8a5f37 commit) commit 55aa832157bdebcba2d58896777942d108c352b0 Author: Dave Airlie Date: Thu Jan 4 17:57:31 2007 +1100 fix cursor handling commit 4f8a7cafdc77e98dc44f9eced876560b1ee01117 Author: Dave Airlie Date: Thu Jan 4 16:23:39 2007 +1100 hook up crtc modesetting commit 52f749c8a613ee316044abe82156ee270412ced8 Author: Dave Airlie Date: Thu Jan 4 16:23:26 2007 +1100 fix typo commit d7ff61c6822cbede7f5b59b411048d33dbae9ee4 Author: Dave Airlie Date: Thu Jan 4 13:38:26 2007 +1100 hook up detection of output commit 50439d7e9f4f6f9933bacd59f8bb3e655a35dbc2 Author: Dave Airlie Date: Thu Jan 4 13:21:57 2007 +1100 fixup some function calls commit e067bfee92f2b0877108355619b2fb9188a9d15a Author: Dave Airlie Date: Thu Jan 4 13:21:45 2007 +1100 add more files for back compat commit f1f34627ffbe2136ac3e023c01c0430412919ded Author: Dave Airlie Date: Thu Jan 4 12:50:03 2007 +1100 make restore mode non-static commit 249ec67c296b34d0c7c1d78602628d2f7ce6a045 Author: Dave Airlie Date: Thu Jan 4 12:43:03 2007 +1100 more minor fixes to get radeon up to speed commit a43c1d55f5f855d9e6ae939dd4eec1c607b6d514 Author: Dave Airlie Date: Thu Jan 4 12:29:51 2007 +1100 bring radeon randr code inline with intel randr code commit c54a31565e3ea50f1af7b81b1bf0c0e437099f47 Author: Dave Airlie Date: Thu Jan 4 10:39:01 2007 +1100 radeon: fixup fastwrites to be always off My 8500 in i845 doesn't work with fastwrites even setup by the firmware. commit dda2bbfdc2e0da6e8b9cb8d1bf78b91f1bb8131f Author: Dave Airlie Date: Thu Jan 4 10:29:54 2007 +1100 radeon: don't touch Controller[1] on single CRTC cards. This might fix bug 9371 commit 9506f7015a1e442f4ca0bd3bfae555ec7e8a5f37 Author: Roland Scheidegger Date: Wed Jan 3 15:56:23 2007 +0100 fix uninitialized mode regs (bug 9495) Since the reorganization of the mode setting code, the mode registers relying on state already set (by bios) were not read, thus clearing out all bits the driver does not touch. At the very least, this could lead to completely nonfunctional to misbehaving dvi output (see bug 9495). Fix this by using the SavedReg values, which also makes it more obvious that those are bits which were not set by the driver previously, but come from register readback. commit d5c6306385cbc7b13a132ae72ed04e04e24d9886 Author: George Sapountzis Date: Tue Dec 19 09:45:24 2006 +0200 Use portable XORG_RELEASE_VERSION macro. commit 97df0a32b14e34f22dce9cd3b375c1ac5fb1c5eb Author: Michel Dänzer Date: Tue Dec 19 11:28:21 2006 +0100 radeon: Advertise 2D engine limits to EXA when we're not using the 3D engine. Also round up to the maximum width and height, as that's what EXA compares. commit 295823d0879a5b574bb79843a6acd43adb9259e5 Author: Michel Dänzer Date: Tue Dec 19 11:19:20 2006 +0100 radeon: Default to leaving AGP transfer mode and fast writes unchanged. Based on the assumption that firmware should have set up the card and host bridge appropriately for these settings, this may actually be safer, at least for the transfer rate; leaving fast writes enabled is hopefully safe as well, it certainly is on my sytem. See https://bugs.freedesktop.org/show_bug.cgi?id=9284 . commit 81f3b4070b70483d6da4f7587e52a64ac69c8ca0 Author: Eamon Walsh Date: Mon Dec 18 14:06:15 2006 -0500 Revert "Convert callers of LookupWindow() to dixLookupWindow()." This reverts commit 48ff33a1770f3684cd50184db8f1944a456d9974. commit 87592ffb717da1f0a1767a38918d16d60953599c Author: Dave Airlie Date: Sun Dec 17 20:10:58 2006 +1100 add setdpi call commit 41cd50487bc85708a3f791dfa70bf85223d91a65 Author: Dave Airlie Date: Sun Dec 17 20:08:07 2006 +1100 add displayWidth set commit 555e0f988c571aa47bc62ec6d9612a71f1a1f59b Author: Dave Airlie Date: Sun Dec 17 19:59:19 2006 +1100 add randr pre init commit 3e2c72d7ac80ed874bcf2887a5253dac1c9bb02c Author: Dave Airlie Date: Sun Dec 17 19:49:08 2006 +1100 fixup even more remnants of old code commit 4356b031886e00b3ed5ac1dbceeadebd7fc29fc2 Author: Dave Airlie Date: Sun Dec 17 19:47:45 2006 +1100 fix remnant of old code commit 17d39502a8dbea395051007aebffdf23644e9ee1 Author: Dave Airlie Date: Sun Dec 17 19:44:39 2006 +1100 use getddcmodes properly commit bf0b364cbd8682f297e2d110ece1f72e7151340d Author: Dave Airlie Date: Sun Dec 17 17:31:08 2006 +1100 fix up output namings commit 4962a5430844114de864418d803f3182b90792ff Author: Dave Airlie Date: Sun Dec 17 16:58:07 2006 +1100 remove some code that moved into server commit b47013f41249516ae82e22bd75caf573da2cc13c Author: Dave Airlie Date: Sat Dec 16 12:02:37 2006 +1100 hook up mode detect to new randr code commit 48ff33a1770f3684cd50184db8f1944a456d9974 Author: Eamon Walsh Date: Fri Dec 15 17:43:39 2006 -0500 Convert callers of LookupWindow() to dixLookupWindow(). commit 62a5e7565b66d7b7d65609c034f34b55bd266617 Author: Dave Airlie Date: Fri Dec 15 19:48:42 2006 +1100 bring over latest code from Intel git repo. this code doesn't work yet just realigns with intel work commit 29124400c7f193317d41d8cfd748371a239cfea1 Author: Dave Airlie Date: Sun Dec 10 18:00:17 2006 +1100 hook up randr crtc setting commit 120c854f185c1e7711cf0dee19303fdb8894d49d Author: Roland Scheidegger Date: Fri Dec 8 02:51:52 2006 +0100 radeon: avoid unnecessary OUTPLL/INPLL calls when displaying video It is not necessary to always emit a OUTPLL/INPLL pair when we display a video frame. On some chips there are erratas for which the workarounds cause a 10ms delay by those calls. This is related to #5876 though those affected may suffer from other slowness issues too. commit ccd37b3e88cdcfe03b7c707b6082339eb8f11e6b Author: Michel Dänzer Date: Thu Dec 7 18:41:48 2006 +0100 radeon: Move Xv option handling code into RADEONPreInitXv(). This unclutters RADEONPreInit() somewhat, but more importantly moves comparison against info->ChipFamily after that's initialized. commit 02be8c04a268eaa71bdfe891331758715fef4e71 Author: Michel Dänzer Date: Thu Dec 7 18:31:58 2006 +0100 radeon: Make cache flushing for R300 series less invasive. Instead of calling the DRM CP idle ioctl, just emit the cache flush commands into the CP stream. commit be46f7b6f7a729695a0affe2328077666283af12 Author: Michel Dänzer Date: Thu Dec 7 16:27:10 2006 +0100 Fix radeon compile warnings. commit 59c5b4f69c97fb233144677ab18095f88aed006b Author: Daniel Stone Date: Wed Dec 6 18:48:55 2006 +0200 Makefile.am: re-add ChangeLog to CLEANFILES commit 7611f14dc697b75cd7bb6493bb65b3a7ead379b8 Author: Daniel Stone Date: Wed Dec 6 18:47:33 2006 +0200 Makefile.am: fix changelog hook Make changelog hook safe for all situations. commit f2a9d2d61addc4e3d5e128d8078a04c9a136be6a Author: Roland Scheidegger Date: Wed Dec 6 00:16:41 2006 +0100 radeon: fix up packed yuv broken by planar yuv patch fix the forgotten leftuv value for packed yuv which is needed to get correct uv starting pixel (fixes broken clipping / non-null src start pixel as tvtime uses) commit d2aa57a4bdd4a0deb2c659bb07f3f57d1116f0d1 Author: Roland Scheidegger Date: Tue Dec 5 01:30:13 2006 +0100 radeon: use overlay scaler native planar yuv capability. Radeons can do planar yuv just fine, there is no need to convert all data to packed yuv manually. This saves some cpu cycles as well as some (graphic card) ram. commit 5d5fa1b86e5179b061f0db47fe0227d1b84c37f8 Author: Dave Airlie Date: Mon Dec 4 18:53:33 2006 +1100 update radeon driver to Intel driver xf86Crtc interfaces commit 51d1cf19e71dd5de47f2c6467f4a1685eefd9e1e Author: Dave Airlie Date: Sun Dec 3 16:30:01 2006 +1100 Add radeon randr 1.2 initial attempt at support This doesn't do a huge amount yet commit eb17c9aed2144701ad7bd1042b2905446e4d708a Author: airlied Date: Sat Nov 18 15:48:02 2006 +1100 move radeon over to not using X's mode management like the intel driver. this builds and at least seems to pick a mode.. might be near to hooking up randr1.2 soon commit 941b5120916ebff69ec0ee4ca7a46105d5306e5d Author: airlied Date: Sat Nov 18 10:41:12 2006 +1100 make radeon modes use generic code commit 608427283ea59cdfe3d85e1cf32719bc3809dc16 Author: airlied Date: Sat Nov 18 10:35:31 2006 +1100 add more functions from i830 driver This adds more generic functions from the i830 driver to the radeon commit d5b8cafc185b7d9fb909cb18a08615f81d89eaf8 Author: airlied Date: Sat Nov 18 10:22:38 2006 +1100 add generic mode handling code from Intel driver commit 9cfa82e1670ad85746926995972a535ddf03ee07 Author: Dave Airlie Date: Sun Dec 3 15:56:38 2006 +1100 move monitor detection into single function commit 032a00d155ecdcdcab3ca0d047f552fe6b338a97 Author: airlied Date: Sat Nov 18 10:23:12 2006 +1100 make DDC function more generic commit 2632ae24b3b50c69567e92611ce7c2cd2ee98baa Author: Dave Airlie Date: Sun Dec 3 15:22:38 2006 +1100 re-program bios 4 scratch so we know if the LCD panel is there post startup commit ddec94e8f2f5746bad0e998d15303e771803d22b Author: Dave Airlie Date: Sun Dec 3 11:07:23 2006 +1100 move crtc to connector mapping to a connector to crtc mapping. Still not allowing any clone modes, but heading in the correct direction I hope... there is a chance this will regress something from superpatch.. commit 218cb7f8db35d0ce8f9fc4ece72bd5ec3f52106f Author: Dave Airlie Date: Sun Dec 3 09:53:35 2006 +1100 radeon: dynamically allocate connectors commit f22fd02bc7f7ef67e33c9bd93eae2d7488669b5e Author: Dave Airlie Date: Sat Dec 2 19:48:00 2006 +1100 make CRTCs malloc'ed rather than part of Ent This is leading towards randr-1.2 believe me :-) commit 13efd1f75fbd29a4d1f69d7d5a5bb2b8d90ad820 Author: Dave Airlie Date: Sat Dec 2 19:16:41 2006 +1100 move HasCRTC2 to pRADEONEnt from info commit 3933b86390eb2f4198d490acd4914fb470c40f47 Author: Michel Dänzer Date: Fri Dec 1 18:00:17 2006 +0100 Make log file output clear about origin of used overlay scaler buffer width. commit 563dfb52f5b24d2f765fae0394e599c11dcf0b5b Author: Michel Dänzer Date: Fri Dec 1 17:56:19 2006 +0100 Increase default overlay scaler buffer width for RV350. Works with 1920x1080 video on my M10. commit 984ea3d9b7c27d8183ca94ad9d7905f03613fe10 Author: Michel Dänzer Date: Fri Dec 1 17:42:23 2006 +0100 Fix build warning. commit 9f5ea3981449f29ff204eb154166e8fc813205fa Author: Roland Scheidegger Date: Wed Nov 29 16:46:57 2006 +0100 radeon: bug #1462, predownscale to make HD video work. Use the overlay scaler's predownscale capability to make videos with large horizontal resolution work if it exceeds the scaler buffer width. Make the scaler buffer width user-configurable since we don't know it for all chips, and using predownscaling may otherwise reduce quality even if it wouldn't be needed. This should fix bug #1462. commit 35a5eaf5adf103ef57f8d4590dae25b0c50bd780 Author: airlied Date: Tue Nov 28 17:31:05 2006 +1100 fixup EXA after previous commit commit ba047ae863aac869595a31ea94f102084636fd29 Author: airlied Date: Tue Nov 28 17:26:10 2006 +1100 radeon: initial move framebuffer away from zero prep. In theory the driver should be able to handle the front buffer not at VRAM 0 In practice it didn't.. this is cleanup for at least XAA parts of the driver to allow for the frontbuffer to move. It has to re-organise a large part of ScreenInit so things happen in the correct order otherwise some things get setup in-correctly. (not sure EXA with fb not at 0 works yet...) commit 0d42cab2d889070ab6de05990e2b19724595f7af Author: Alex Deucher Date: Wed Nov 22 13:44:49 2006 -0500 clean up previous VIP commit. commit 8e0f57571228729cc40ed59266484ecc43819f44 Author: Alex Deucher Date: Wed Nov 22 13:38:01 2006 -0500 Don't mess with the VIP bus on mobility chips. Seems to cause fan problems on asus laptops (see bug 7463). We don't support video-in on any laptops at the moment anyway. commit e4850610596a08082a528c38186268b72012e78c Author: Alain Péteut Date: Wed Nov 22 12:54:55 2006 -0500 enable i2c for PCI_CHIP_RV250_If. allows AIW fuctionality to work. patch and testing from Alain Péteut commit ff38c2c9cf0c6acbdaf53b681ec721487cf411f8 Author: Michel Dänzer Date: Sun Nov 19 17:11:46 2006 +0100 radeon: Bug #8989: Fix page flipping artifacts with XAA. We still have to force-sync the pages on enabling page flipping with XAA as the second page may have been clobbered by the offscreen pixmap cache since they were last synced. commit 2dd0892817090709b2fb7ffba920595ada00fcad Author: Michel Dänzer Date: Sun Nov 19 17:09:11 2006 +0100 Fix compile warnings. commit 8c1b9269aaac746989bdb9be02915722bcf6fec0 Author: airlied Date: Fri Nov 17 18:47:50 2006 +1100 forgot SetPitch function is called commit 3a0338bb487739a1740ddfb4d36d53cfa7f798c6 Author: airlied Date: Fri Nov 17 18:37:00 2006 +1100 split mode handling code into separate modes source file commit 13e0a95564220d42ad8060b43b0aaaba3002157a Author: David Airlie Date: Mon Nov 13 09:35:18 2006 +1100 fix up issue with bindings and mergedfb commit 63444770ff30afeb134befed5bb3a5c28b7bc4e9 Author: George Sapountzis Date: Thu Nov 9 22:01:28 2006 +0200 [mach64] Prefer double-buffered visuals for GLX. So that 3D apps apropriately fail in DRI... commit 0411f68d71c75cda38ad46ad5c0f5cc3cda64464 Author: George Sapountzis Date: Thu Nov 9 22:00:56 2006 +0200 [mach64] Use asynchronous DMA mode by default. commit 8dd668db05e8f1282fa0e29a91e38c7cbdc97aa1 Author: Dave Airlie Date: Sun Nov 12 16:33:21 2006 +1100 radeon: abstract init display bandwidth from mergedfb commit 45a9f434b77ad892efcdba267a935135b972dd42 Author: Dave Airlie Date: Sun Nov 12 16:12:56 2006 +1100 add radeon Init2 function, to abstract some mergedfb mode setting commit d0828804aec0852afaca44ee41c4792edc40dbb4 Author: Dave Airlie Date: Sun Nov 12 15:59:02 2006 +1100 add initial controller binding, remove uses of mergedfb test commit 78061ca460c9d6fd338ccf273bbfa152f471622e Author: Dave Airlie Date: Mon Oct 23 16:49:59 2006 +1000 radeon: separate static controller setup from non-static commit f917f65e8d2b13d8b9bfc4320f4a935f5a5c4bff Author: George Sapountzis Date: Thu Nov 2 21:16:53 2006 +0200 Officially require libdrm 2.2.0 Note that this is only for the headers at compile-time. The driver still uses libdrm 1.2.0 from Xserver at run-time. commit ca8c148942371c9445f32985625ce38eabc016e1 Author: George Sapountzis Date: Thu Oct 26 15:40:46 2006 +0300 Handle .99 in version patch level. commit 23cec754158c94b43225b2070fc0a0b003e7bd25 Author: George Sapountzis Date: Thu Oct 26 15:39:49 2006 +0300 [mach64] EXA: reserve DRI buffers only when DRI is active. commit 9cd78af1d06f753e7bd7e1acaff25398bde45f6e Author: Dave Airlie Date: Mon Oct 23 16:52:07 2006 +1000 radeon: set preferred modes commit 914a5f0117ccb76292bdd81ea4a2a79d33319550 Author: Michel Dänzer Date: Mon Oct 23 10:13:24 2006 +0200 radeon: Pitch doesn't matter when height == 1. commit 2bcb51d66edaa944379cf8c8ca1ba91fffdc20a8 Author: Michel Daenzer Date: Sun Oct 22 17:26:28 2006 +0200 Bug #6756: Attempt to fix repeat picture acceleration. Always use normalized texture coordinates on R200 and fall back if a POT texture pitch doesn't match the HW's implicit pitch. commit dabffb8335027b60ca1fc554423e196dfb9acd6d Author: Henry Zhao Date: Tue Oct 17 21:17:47 2006 -0400 improved results for mergedfb xrandr refresh rates - bug 6966 commit 831fc4a009841f68fe161b6e0db5b212d7d8079b Author: Henry Zhao Date: Sun Oct 15 17:12:06 2006 -0400 fix bug 6966 (Henry Zhao, Shem Multinymous) commit 5425be996692425e57884e5a4c159fc79510e89f Author: Alex Deucher Date: Sun Oct 15 16:49:24 2006 -0400 clean up magic number commit 457178f418983041ea59df703a17513a47d17044 Author: Alex Deucher Date: Sun Oct 15 16:40:08 2006 -0400 Disable all ouputs on initial mode set. The ones we want will get enabled by RADEONEnableDisplay(). commit 3fb3f410931a13542fdd4c51c4c9ecada7b37d76 Author: Alex Deucher Date: Sun Oct 15 13:29:48 2006 -0400 Rework the output init code. Divide into separate functions for each output. commit 45e13f3c8786e75276cce85de4af653713d9b4d8 Author: Alex Deucher Date: Sun Oct 15 13:18:01 2006 -0400 Remove paneloff option. This is already covered by monitorlayout and shouldn't be needed with xrandr++. Also remove commented out Bioshotkey code. commit 4abb5b7afea8d37e95461335e52b16168e555dab Author: Alex Deucher Date: Sun Oct 15 13:10:22 2006 -0400 Remove Bioshotkeys option. Leave the bios as configured at boot. Most distros enable this option by defalt anyway, and with xrandr++ it won't be an issue anyway. commit 2933140b5f1f8a6e270460d8918a14943bd0f174 Author: Michel Dänzer Date: Sun Oct 15 17:05:02 2006 +0200 radeon: Use xf86XVFillKeyHelperDrawable() when available. commit 4edbfb9eb952f9b3f5f597749192c17baf15cdce Author: Michel Dänzer Date: Sun Oct 15 17:03:13 2006 +0200 radeon: Track screen damage all the time for page flipping. This way we don't ever have to forcedly synchronize the pages so we hopefully never clobber one page's contents when we shouldn't. commit c9c2ac2b42398f5bfad909f3289e2545bb7b3888 Author: Michel Dänzer Date: Sat Oct 14 15:49:22 2006 +0200 radeon: Don't try to synchronize pages when the CP isn't running. Also move the DamageEmpty() call into RADEONDRIRefreshArea(). commit c19915a401ccf69046bed03c8d5067f2e72a094e Author: Dave Airlie Date: Fri Oct 6 09:55:40 2006 +1000 always turn on DAC for scanning the CRT connect. Ubuntu 63994 - myself and BenH discussed this as a good idea on irc commit b8547aa89f93a7fefbefb1c0d2743999930ac785 Author: Dave Airlie Date: Wed Oct 4 01:44:24 2006 +1000 update version number to 6.6.99 in preparation for a 6.7 branch at some stage commit 23a6f97e08fd49e1cae03cd97cae67a5f06b7634 Author: Alex Deucher Date: Tue Oct 3 13:48:09 2006 -0400 FP timing regs required for both internal and external TMDS commit 829be884702043fe4c9e349488d2585bf0561ae9 Author: Alex Deucher Date: Tue Oct 3 13:41:21 2006 -0400 remove bogus registers commit cd900580dbc8928ebc28514162b4c1dbfe9fd5ae Author: George Sapountzis Date: Tue Oct 3 00:32:22 2006 +0300 [mach64] Fix build for !defined(USE_EXA). commit 22860a3c0685a25f982983654303ad02aedc02ec Author: George Sapountzis Date: Sun Jul 16 19:23:56 2006 +0300 Bug 6242: [mach64] Use private DMA buffers. Map the DMA buffers read-only. This eliminates a security problem where a client can alter the contents of the DMA buffer after submission to the DRM. commit cb53fe7c1e45937746e43437ae6adb0355306ae9 Author: Alex Deucher Date: Sun Oct 1 18:46:05 2006 -0400 fix LVDS plus internal TMDS commit 145c716de6d42778e447581578f3e4db13c9a653 Author: David Woodhouse Date: Sun Oct 1 18:22:14 2006 +0200 Fix radeon vs fbdev pitch calculation. Fetch the correct displayWidth from fbdevhw after setting the mode. commit d43ad88fa3913437f6987ab5ab46a38f0cb555a8 Author: Michel Dänzer Date: Sat Sep 30 19:25:20 2006 +0200 radeon: Add support for page flipping with EXA. Also use the damage layer directly instead of via shadowfb and blit dirty rectangles to the second page in LeaveServer in order to try and improve the tradeoff between performance and correctness. commit 146ea328b7962f56c6ab47fbe2adc7561b36189c Author: Michel Dänzer Date: Sat Sep 30 19:22:26 2006 +0200 radeon: Fix function name typo which could probably lead to an unresolved symbol. Also remove declaration of an unused variable. commit 6671c1b01bf29d8f1cacf9306ef658b967d8a3cf Author: Michel Dänzer Date: Sat Sep 30 18:29:45 2006 +0200 radeon: Always call RADEONGetAccessibleVRAM(). This fixes issues with Option "UseFBDev" and the new memmap code. OTOH, there is potential for this to break IGPs, but that's what Bugzilla and git-bisect are for... commit c979c7f87fc449cc9631820101edff82c3013e66 Author: Roland Scheidegger Date: Sat Sep 30 15:14:42 2006 +0200 radeon: Check ROM more thoroughly before treating it as an x86 BIOS. This prevents the ROMs on some Mac cards getting treated as x86 BIOSen, resulting in garbage values. commit 37c114acbabe35881c39642e293519e2635907aa Author: Michel Dänzer Date: Sat Sep 30 15:11:42 2006 +0200 Remove some dead code. Fix two compile warnings. commit 6d7b0763173f56050411d7bdf9a583b9bfc050c4 Author: Adam Jackson Date: Fri Sep 29 18:50:44 2006 -0400 Undo unintended configure.ac change. Dammit, git, grow a sensible UI already. commit f96ddd32d3a9e64dc0adec5c50386d6db5b182ee Author: Ronald Wahl Date: Fri Sep 29 17:51:42 2006 -0400 Hook up DFP power to DPMS events. commit f6b42149c5a3fee663575fe6bbe78b62695bdbc8 Author: Alex Deucher Date: Fri Sep 29 00:44:36 2006 -0400 tvdac handling was reversed between r200 and other chips commit c0660495080719c052d6393ede707755929102cd Author: Dave Airlie Date: Wed Sep 27 18:12:52 2006 +1000 radeon: check DDC info for both connectors not just the pScrn one. Otherwise we disable DDC before we've checked the CRT if LVDS is in use commit 5b98545618141e86164f3ce66469f9e16b1cf6d4 Author: Dave Airlie Date: Wed Sep 27 18:10:30 2006 +1000 radeon: don't move connectors around if LVDS connector is connector 1 On my laptop this allow me to plug or not plug a monitor without affecting my lvds commit 74c725bd86348b5bf9bba0c50e8a6a7885d7ff7b Author: Dave Airlie Date: Mon Sep 25 11:35:32 2006 +1000 radeon: cleanup some bits from superpatch commit 9827afaa40720a58e2fc029c0bf92ad2fe223d11 Merge: 10b4b46 ad8259c Author: Dave Airlie Date: Mon Sep 25 11:25:17 2006 +1000 Merge branch 'radeon-sp' commit ad8259c814629e741ed5567923f40879cc0c7051 Author: Dave Airlie Date: Mon Sep 25 11:25:03 2006 +1000 radeon : add back tv-dac register write commit 10b4b46c16ff3748856b732f9a39de40ba197112 Author: Dave Airlie Date: Mon Sep 25 09:08:47 2006 +1000 remove all CVS annotations from the ATI driver files commit 976dec04786e9b050945c290840b4cdc978c0b23 Author: Dave Airlie Date: Mon Sep 25 09:00:21 2006 +1000 radeon: put back in reverseddc code BenH claims it is needed, agd5f can fix it up later if it isn't. commit 980fb2f6bd7641c8c57769b0c67e3561903e89a9 Author: Dave Airlie Date: Sat Sep 23 08:31:56 2006 +1000 radeon: add some missing bits of superpatch for crtc registers commit 1ba4f36821e60289cad937abbb0edb273c88436c Author: Dave Airlie Date: Sat Sep 23 08:25:42 2006 +1000 radeon: finish radeon_driver.c import for register changes commit 547543bbefe605a453bfa5ae6d063ae02c5f040e Author: Alex Deucher Date: Sat Sep 23 08:21:59 2006 +1000 radeon: re-organise FP and CRTC register setting routines commit fd978140bcb7670f28c684c06c2b6c611c26bef4 Author: Dave Airlie Date: Sat Sep 23 08:09:57 2006 +1000 radeon: initial CRTC register setting alignment commit 406f4911e7ce821002c111d6bcdec35f5b56c943 Author: Dave Airlie Date: Sat Sep 23 07:59:24 2006 +1000 radeon: setup the radeon init function to use secondary commit 452f0f8079d65679905ed5178a256534ef0db0e4 Author: Dave Airlie Date: Sat Sep 23 07:41:57 2006 +1000 radeon: bring over final set of changes for radeon_display.c from susperpatch This brings over Alex's final set of changes... i'm unsure about the disappearance of reverseddc - alex to review commit a8b9aa69259a0706d0688d2656ece5a292799242 Author: Dave Airlie Date: Sat Sep 23 07:38:25 2006 +1000 radeon: align tabs and make display detection like superpatch commit 8d4ae98c528a2309dc3c545893dbba2e7f76916c Author: Dave Airlie Date: Sat Sep 23 07:26:44 2006 +1000 radeon: align some output with superpatch commit 65b54847c5e79b2ec3cb1a08b265229443c9deb9 Author: Dave Airlie Date: Sat Sep 23 07:22:31 2006 +1000 radeon: change function name to Displays rather than Monitors commit 7e16d9fff96dcdff8c25dbbe2a51be0023b7985a Author: Dave Airlie Date: Sat Sep 23 07:21:15 2006 +1000 radeon: make GetConnectedMonitors a static void commit 6f63b3dc8b3e2299f5f02abc1c565176d2d46cee Author: Dave Airlie Date: Sat Sep 23 07:19:43 2006 +1000 radeon: some minor alignments and cleanups for info-> commit c9f3ced3b1c194cacf1ab9436ee6c2d4efd3a8e9 Author: Alex Deucher Date: Sat Sep 23 07:16:10 2006 +1000 radeon: add reverse display option to switch displays on non-mobility cards commit e752443c540d9a94522050c61ef7c33d912fece5 Author: Dave Airlie Date: Fri Sep 22 07:10:10 2006 +1000 radeon: flesh out mapcontrollers commit 7a0e4eb47655c4701fc3a4b33b6c8e9f378ccc9e Author: Dave Airlie Date: Fri Sep 22 07:05:56 2006 +1000 radeon: add some info to the map controllers commit 75bf69c868be6164d0041a32f52244f1ef83e050 Author: Dave Airlie Date: Fri Sep 22 07:03:52 2006 +1000 radeon: add simple map controllers call commit 8ba5abd1329347c7fbf4b4d09c95da0d23b4884a Author: Dave Airlie Date: Fri Sep 22 06:58:41 2006 +1000 radeon: move comment commit e8d77b7c36fa791a2350a6f4b15728b15d8f3de0 Author: Dave Airlie Date: Fri Sep 22 06:55:51 2006 +1000 radeon: refactor blank/unblank commit 8534723f5710e2916b4a22efe22a6b7365cc8db6 Author: Alex Deucher Date: Fri Sep 22 06:36:03 2006 +1000 radeon: make DVI_I default connector commit d7fc79fd9f094ac462de0883af7e6030cb6195a6 Author: Dave Airlie Date: Fri Sep 22 06:35:34 2006 +1000 radeon: add enable display function commit 4a54886d510f26b29d27e5c9a73647554291b1a6 Merge: 70264d6 9fa176c Author: Dave Airlie Date: Fri Sep 22 06:00:04 2006 +1000 Merge branch 'master' into radeon-spm1 Conflicts: src/radeon_driver.c commit 9fa176c7989030e7340cc9b85d0b6a7b34303091 Author: Alex Deucher Date: Tue Sep 19 13:58:17 2006 -0400 Provide all resolutions (instead only the largest one) in MergedFB clone mode without config file (Henry Zhao) commit e742aeb28c7d9d6e75932c408bcc7c44af52e303 Author: Alex Deucher Date: Tue Sep 19 13:45:33 2006 -0400 fix large negative refresh rates with mergedfb (Henry Zhao) fixes bug 6966 commit 9c0c805704f1df1b66adc2a6b9313597ae5b86cc Author: Dave Airlie Date: Mon Sep 18 19:41:21 2006 +1000 radeon: fix rn50 memmap This should fixup the rn50/m6/m7 memory map problem that has been reported since BenH's memory mapping changes commit 70264d645724718a48ca229fedc04e33681b7d31 Author: Dave Airlie Date: Mon Sep 18 09:56:25 2006 +1000 radeon; put back old TV DAC code for now commit 53eb843ad8ec5a292dff0844330ecfa9b7b2a0cb Author: Dave Airlie Date: Mon Sep 18 07:55:21 2006 +1000 radeon: move code around in InitCrtcRegisters commit bcae4352079109a9dd16117bf9ec19dd215180bf Author: Dave Airlie Date: Mon Sep 18 07:33:48 2006 +1000 radeon: cleanup DPMS set on/off code to use new controller structure commit 87622f56b3dd7e2d2f00ad71e5b569eac31fb2b1 Author: Dave Airlie Date: Mon Sep 18 07:15:54 2006 +1000 radeon: cleanup DacPowerSet commit a417fa081926b2f84e2cbdc355cc7462d1ebdfad Author: Dave Airlie Date: Mon Sep 18 07:15:41 2006 +1000 radeon: fixup InitFPRegisters function call to not pass info commit 8bff57a938e92dfc8729e40f7aa9ad9a96262131 Author: Dave Airlie Date: Mon Sep 18 07:02:35 2006 +1000 radeon: copy of overupdated bios hotkeys code from Alex commit 76352c684d5e840c9f7ac0781e3ecb32951b32db Author: Dave Airlie Date: Mon Sep 18 06:54:28 2006 +1000 radeon: minor cleanup of masking for crtc registers commit a7b97697ed13ac25844890439ffba31524e03a16 Author: Dave Airlie Date: Mon Sep 18 06:53:23 2006 +1000 radeon: initialise controller structures commit 362ee3778764633cb4c9388aa329c5b715885038 Author: Dave Airlie Date: Mon Sep 18 06:41:14 2006 +1000 radeon: move InitFPRegisters up to align with superpatch commit 11fb9a14741746c752b0001c1b1d39a54e69657a Author: Dave Airlie Date: Mon Sep 18 06:35:50 2006 +1000 radeon: add tv dac adj lookup commit a15ac59c4d1a15380910be2a7438111b09161c81 Author: Dave Airlie Date: Mon Sep 18 06:35:28 2006 +1000 radeon: re-add ATI patch for rn50 modes commit d80ea2d67b63ea2f2ce0277952af186b69b19e7d Author: Dave Airlie Date: Mon Sep 18 06:30:30 2006 +1000 radeon: re-add DAC power on/off code around detect commit 0a93936f9f048b8837f1c765fea7ccb61f072697 Author: Dave Airlie Date: Mon Sep 18 06:25:15 2006 +1000 radeon: restore secondary head behaviour commit 6da5a0bfdedb2062ec835f45514c22917abdcf4c Author: Alex Deucher Date: Mon Sep 18 06:16:58 2006 +1000 radeon: move to using Alex's controller structure commit cd1bc1d1febf0a79d835c7dc8b353123278dec51 Author: Alex Deucher Date: Mon Sep 18 02:44:09 2006 +1000 radeon: add save/restore of some new registers move some registers about commit 9b5c4cf8a98b0c20bb821f5003495481fbd0c10c Author: Alex Deucher Date: Mon Sep 18 02:28:32 2006 +1000 radeon: add pre init controller function commit 311e776c4429485d29aaf11d350cab8e6fe7564b Author: Alex Deucher Date: Mon Sep 18 02:21:49 2006 +1000 radeon: add missing tv-out registers to register list commit 65cb77c79c2c5cb536494200d4fba6815d7e771c Author: Alex Deucher Date: Mon Sep 18 02:21:29 2006 +1000 radeon: restructure files along lines of Alex's superpatch commit 25fa71ca0a24190cc8be2e80769443e0e09303b3 Author: Henry Zhao Date: Mon Sep 18 03:15:54 2006 +1000 Power up DAC around check for CRT connectedness commit 39fcac431eba60adf2d4e357cfc811dbae36a4e1 Author: Henry Zhao Date: Mon Sep 18 03:09:43 2006 +1000 Bump up clock rate for ES1000 to allow higher resolutions commit 7d9e2b450f0fa42553156f57572a6dab70a0ea13 Author: Dave Airlie Date: Tue Sep 12 07:04:23 2006 +1000 radeon: this stops mergedfb working on my ATI M7 development board I've no idea what this is for, it came from an ATI codedrop and it may fix some laptop or production system, but it looks to me more like a dirty hack than a true fix, as I have an M7 which I need to specify CRT for the second head and it breaks mergedfb for me. commit ad1778eb1eb59de14ec309b99131931cbccf64e9 Author: Michel Dänzer Date: Sun Sep 10 23:32:44 2006 +0200 Revert "* [ Bug 6966 ] large negative refresh rates reported" This reverts caaed927a07ffbac68b08246185ef93c1e7bb98c commit. See https://bugs.freedesktop.org/show_bug.cgi?id=8137 . commit 6e92981b024b59c2237f949321f6b2591dada519 Author: Tilman Sauerbeck Date: Sun Sep 3 21:11:10 2006 +0200 Removed the warning re. the r300 DRI driver status. commit caaed927a07ffbac68b08246185ef93c1e7bb98c Author: Henry Zhao Date: Thu Aug 31 13:27:45 2006 -0700 * [ Bug 6966 ] large negative refresh rates reported * [ Bug 6309 ] radeon/r128 fails to read hsync/vsync rates when rang * descriptor is missing * [ Bug 5473 ] Blank screen with Radeon Mobility X700 (Acer Ferrari 4005) * Reboot should not be needed for external CRT to function when connected later on Ferrari 4000 * Modes need to be sorted, and sorted correctly * Provide all resolutions (instead only the largest one) in MergedFB clone mode without config file * Bump up clock rate for ES1000 to allow higher resolution commit 6d2028b84ff2b82c849b74776258f8e52c952e36 Author: Dave Airlie Date: Fri Aug 25 10:05:44 2006 +1000 and of course it takes two commits to do a simple commit commit e90c6feddbcd719fda3bbc3d48fd55045e9d5adc Author: Dave Airlie Date: Fri Aug 25 09:59:58 2006 +1000 add changelog hook from nv driver commit 1e06212f792d1ed1f7545e16824b86fbd34fa284 Author: Adam Jackson Date: Thu Aug 24 19:52:30 2006 -0400 Enable CPIO in the atimisc driver on ia64 platforms. This fixes many mach64s, but potentially breaks mach32. Mach64 is widespread on ia64 machines but PCI mach32's are quite rare on any platform. commit dfa47b09b5b8d7eeaa3f8ae629ebb3c7efb51511 Author: Adam Jackson Date: Thu Aug 24 19:50:46 2006 -0400 Disable DRI on xpress 200{,m} since we know it's broken. commit 1dcd9b1f75ba2307beb42556aa7f2f945171d5fb Author: Adam Jackson Date: Thu Aug 24 19:42:26 2006 -0400 Disable DRI on RN50 in a more pleasant way. Rather than publish a non-existant driver name for RN50, just don't bother initializing it in the first place. commit 64b18e246586b1043a12f381a9d4c834464ed9b5 Author: Dave Airlie Date: Fri Aug 25 09:40:04 2006 +1000 update version numbers for release commit be229d97e1f0282f2099c7ace7cb257a2738a58f Author: Dave Airlie Date: Fri Aug 25 09:39:46 2006 +1000 make colortiling default to on all cards commit 750ed51bc3d5119e2d2a91a05ae5a971dcd3b88a Author: George Sapountzis Date: Mon Aug 7 17:09:02 2006 +0300 [mach64] RENDER support: drop caching DP_WRITE_MASK. Caching DP_WRITE_MASK causes artifacts, e.g. with evas_xrender_x11_test. commit b2beea2fa8949874d3d57fb9b43fe85cc08a8bff Author: George Sapountzis Date: Sat Aug 5 18:36:24 2006 +0300 [mach64] RENDER support: save/restore, cache texture registers. commit 43aaed99950640c3695b3c2b91faabf00c6338a7 Author: George Sapountzis Date: Sat Aug 12 22:12:07 2006 +0300 [mach64] RENDER support (bug #6877). RENDER accleration is disabled by default. It is strongly recommended that the patch from bug #6772 and the 'exa-damagetrack branch' are merged in the xserver before enabling RENDER acceleration. To enable RENDER acceleration, add the following in xorg.conf: Section "Device" [...] Option "AccelMethod" "exa" Option "RenderAccel" "true" EndSection commit d113f40fd97408661193895ff3aa82262f100143 Author: Dave Airlie Date: Sat Aug 12 17:16:33 2006 +1000 radeon: make some local data static This is inspired by a patch in XFree86 from David Dawes, it isn't the same as we have different gamma curves. commit a1da2b5e0a38feae01107676a76bdc5c185ad34b Author: George Sapountzis Date: Sat Aug 5 03:18:34 2006 +0300 [mach64] Halve max w/h for hardware-accelerated operations. EXA hits these limits for some operations on offscreen pixmaps and GTPRO seems to support the reduced limits. commit a66c8d2f9855caa10142b39f155dd8232b1f2389 Author: George Sapountzis Date: Sat Aug 5 03:16:56 2006 +0300 [mach64] EXA: add memcpy-based UTS/DFS. EXA hits more optimized paths when it does not have to fallback because of missing UTS/DFS. commit 0fb8503d60cf646c91a806f9ed322f9ceff18baa Author: George Sapountzis Date: Sat Aug 5 03:16:15 2006 +0300 [mach64] XAA: minor refactoring of memory manager setup. - DRI: factor out to separate function and add comments on layout - no DRI: factor out to separate function, maxScanlines is always equal to ATIMach64MaxY commit e203d86643d5d70bf18248712d05b72b79aee705 Author: George Sapountzis Date: Sat Aug 5 03:15:42 2006 +0300 [mach64] EXA support. commit dc1e289a611a17090e6dc7ae8a8d3f26d20df4eb Author: Samuel Thibault Date: Sat Jul 29 01:05:35 2006 +0300 Bug #6623: Fix I2C bus Mach64 initialisation failure. commit b377f403e0cd5253402ef3945e5944d1a2763a94 Author: Marc Aurele La France Date: Sat Jul 29 01:03:34 2006 +0300 Fix warnings for Option:1 bit fields. commit 91b8b0ca41ad0b9659f0982a05148cab8558e9d5 Author: Marc Aurele La France Date: Sat Jul 29 01:02:48 2006 +0300 Bug #807: copy throttling. Fix corruption associated with the engine randomly not waiting for a copy operation to commit its results. commit 7800407a2db4b7307192bf3b43fffb9c4748b9c0 Author: Marc Aurele La France Date: Sat Jul 29 01:00:56 2006 +0300 Bug #807: invalidate read-back cache. Fix corruption when scaling 1-pixel wide pixmaps, in which case the first CPU read of the framebuffer will return stale data. This bug always manifests itself in mach64 EXA (to be committed soon), with this patch mach64 EXA passes rendercheck. commit 49b11c540d37152eee4907ab30353ede01e4fb56 Author: George Sapountzis Date: Sat Jul 29 00:52:28 2006 +0300 Bug #807: split out TestRegisterCaching block for DP regs. commit 290c5aaa580428bc4748a47e4b9bcc22b90fc8d4 Author: George Sapountzis Date: Sat Jul 29 00:51:53 2006 +0300 Bug #807: split out TestRegisterCaching block for DP regs. commit fba8c839b47e2c8d6a6d65950c3431ff5b870aa0 Author: Michel Dänzer Date: Sun Jul 23 18:51:47 2006 +0200 Bug #6819: Fix broken rendering with *8b8g8r8 source formats. Use the corresponding texture formats with R200 family. Unfortunately, it looks like the R100 family can't accelerate these source formats, so we have to fall back for them. commit 60ebe97e2d5d27c2bf4213e201cef74503809cb6 Author: Tilman Sauerbeck Date: Mon Jul 3 19:37:28 2006 +0200 Move variable declarations before statements to be C89 compatible commit 6900ff3c5e574881b1470e2363b200e99ab8bf3e Author: Alex Williamson Date: Mon Jul 3 13:09:47 2006 +0200 Bug #6872: Disable digital output while reading ROM with Radeon 7000. This is a workaround for ATI Radeon 7000 erratum F1. commit 920ac1f56fad6f48a30e65836ce054815f270738 Author: Michel Dänzer Date: Mon Jul 3 01:21:18 2006 +0200 Do even less cache flushing when the previous engine mode is known. OTOH, flush everything when the previous engine mode is unknown, and mark the engine mode as unknown in a couple more cases. commit dd0dd4bab76907b4b1b6d814f24e73e57d71f587 Author: Eric Anholt Date: Mon Jul 3 01:10:10 2006 +0200 Bug #6762: Remove gratuitous cache flushing. commit 22f165f290f57e638d198f24a37f62fc16b72bae Author: Michel Dänzer Date: Mon Jul 3 00:39:45 2006 +0200 Build and warning fixes for !defined(USE_XAA). commit ea5105230c7c3519730b8d3c250e9ba9a4e4374a Author: Michel Dänzer Date: Mon Jul 3 00:03:22 2006 +0200 Reserve HW cursor memory statically instead of from EXA offscreen. As a result, quite a bit of code can be removed that attempted to deal with the EXA offscreen memory disappearing, with varying success. Because the HW cursor memory is now always immediately after the front buffer and before the back buffer, this also fixes bug #6808. As the HW cursor memory is now reserved statically with EXA and XAA, change RADEONUseHWCursor() to check info->cursor instead of info->cursor_offset, for which 0 might become valid with HW cursor enabled in the future. Change info->cursor_offset from unsigned long to CARD32 as the corresponding register is 32 bits wide, and to avoid issues with printf. commit 66586f905857ea5bf37cb5d34949cd450a9ed067 Author: Michel Dänzer Date: Sun Jul 2 23:38:20 2006 +0200 Clean up some redundant code. commit 1159c85861dc507ebf323aca82e32fcc67726420 Author: Michel Dänzer Date: Sun Jul 2 18:24:28 2006 +0200 Bug #6548: Fix playback of interlaced video with more than 1023 lines. This will still break with 2048 lines... commit 11bedb7c845fc6074383890d5525315aebe05f2c Author: Michel Dänzer Date: Sun Jul 2 17:03:23 2006 +0200 Bug #6939: Disable RENDER acceleration by default on RN50. Based on patch from Weixing Zhang, but still allows enabling it with Option "RenderAccel". commit 4a0c22e32901a510c7aad070be25c31519c284e3 Author: Weixing Zhang Date: Sun Jul 2 16:55:25 2006 +0200 Bug #6939: Disable 3D acceleration on RN50 by setting invalid ClientDriverName. commit 9c4a1e3300d30b23806988aa9328fc6ef92e2663 Author: Frank Gevaerts Date: Thu Jun 29 18:21:22 2006 +0200 Fix build for !defined(USE_EXA). commit ee0544b670567491b7770f469a64a6cd85519ba1 Author: Michel Dänzer Date: Thu Jun 29 18:19:58 2006 +0200 Remove unused variables. commit 15c556f5a8c9069d3dd00ce139d46c39b7298951 Author: Michel Dänzer Date: Thu Jun 29 18:18:21 2006 +0200 Don't declare unused variables on __powerpc__ and __alpha__. commit 055ac2836ec0afd51cf554d043a59068c36a07d3 Author: Michel Dänzer Date: Thu Jun 29 18:14:45 2006 +0200 Fix strict aliasing violation flagged by gcc -Wall. commit 4b1904017caa976c138594a86e75feaf470e72b5 Author: Dave Airlie Date: Mon Jun 26 20:34:34 2006 +1000 radeon: force CP and VIP clocks on some r300 and rv100 chips. fglrx appears to do this on r300 and Jerome Glisse has spent most of his life tracking down what caused the 9800 to lockup. This is my attempt to fix this. Please report if it works for you. Signed-off-by: Dave Airlie commit c5d8c8db3e75976687bfb364f0a7b235c7ae8793 Author: Michel Dänzer Date: Sat Jun 24 16:01:19 2006 +0200 Bug #7274: Fix corruption with 'small' accelerated DownloadFromScreen transfers. commit f25ba3dc0e7850f0b1b78f54c0e7211bf2e81b3a Author: Tilman Sauerbeck Date: Fri Jun 16 11:38:18 2006 +0200 Remove obsolete FIXME. commit 764013ec61b9043f1487513658e374569f7154a9 Author: Tilman Sauerbeck Date: Fri Jun 16 10:56:02 2006 +0200 Use AC_CHECK_HEADER() to check for exa.h commit 3c701d49b3eb7adb82267cec53163e475913aca3 Author: Tilman Sauerbeck Date: Fri Jun 16 09:59:29 2006 +0200 Use AC_MSG_RESULT() instead of echo for check results. commit dbef62615f38aebf4cdc579e3b26a7e7c719abc4 Author: Tilman Sauerbeck Date: Fri Jun 16 08:50:49 2006 +0200 conditionally declare pPCI and PciReg, too commit a01c01787cfbe3706ae7747cde1657abd79ecdaa Author: Michel Dänzer Date: Wed Jun 21 09:38:47 2006 +0200 Bug #7283: Build fixes for !defined(XF86DRI). Thanks to Matthieu Herrb for pointing out some of these. commit 79d1c573133e64ddf4446b6bb0eaab4a5a6c73ab Author: Michel Dänzer Date: Sun Jun 18 17:39:09 2006 +0200 Implement accelerated EXA DownloadFromScreen hook. x11perf -getimage numbers only increase by about 20-30% on my PowerBook with an M9, but by about 100 times(!) with a PCIe X550. I suspect the former could perform better with PCI as opposed to AGP transfers, which would also remove the need to disable this by default with AGP. commit 2bcdc7cfd013bd457d35f927390e5cc3544f30f1 Author: Michel Dänzer Date: Sun Jun 18 16:01:00 2006 +0200 Remove #include , not used here. commit 25a5ccb63a9e3074b4c8eaf48844877d84ff76bb Author: Michel Dänzer Date: Sun Jun 18 15:26:55 2006 +0200 Prefer visuals with stencil when it's hardware acclerated. Also make the formatting of the if statements consistent. commit 8fcc436f19f9c1371295af2d0c45608fb43c584b Author: Michel Dänzer Date: Sun Jun 18 15:16:08 2006 +0200 Take part of the blame for the radeon driver. commit c8366d7b457565a06acdf6b40c5448c7f13f1641 Author: Michel Dänzer Date: Sun Jun 18 14:24:14 2006 +0200 Add Option "DepthBits". This allows getting higher depth buffer precision and stencil hardware acceleration in depth 16 or saving some video RAM at the cost of these features in depth 24. commit 23a21d00db6f3b88b54c44648f968018a03677d3 Author: Tilman Sauerbeck Date: Fri Jun 16 16:37:07 2006 +1000 [PATCH] move the declaration of pMach64 into the correct ifndef statement Signed-off-by: Tilman Sauerbeck Signed-off-by: Dave Airlie commit c6b33db9d2c751e34c2152b0bb7e0e84a812589f Author: Dave Airlie Date: Fri Jun 16 16:22:03 2006 +1000 ati: prepare for release Update some versions for release commit 9c534b5330534fc6cf392936a9b200a5128c787c Author: Michel Dänzer Date: Thu Jun 15 16:09:55 2006 +0200 Some more ignores. commit 3d68698647fb17a6f5ae9a225f552cb0130fa946 Author: Michel Dänzer Date: Thu Jun 15 16:07:15 2006 +0200 Fix semantic glitches pointed out by gcc -Wall. The radeon driver builds warning-free with gcc -Wall here now. commit ab2b48e0df328fd08a2412911126b3184a601aea Author: Michel Dänzer Date: Thu Jun 15 16:06:13 2006 +0200 Remove another unused variable. commit 56bd5a370472663af5607cd327f757367b238db0 Author: Michel Dänzer Date: Thu Jun 15 15:35:05 2006 +0200 Fix some more cosmetic warnings. commit ec93e08b24f7c0e583970d08bfe18ad142e6b047 Merge: 051c49d 6ca9862 Author: Michel Dänzer Date: Thu Jun 15 15:03:27 2006 +0200 Merge branch 'master' of ssh+git://git.freedesktop.org/git/xorg/driver/xf86-video-ati commit 6ca986242c80bcfe7ca2d435a772bbdf034892c4 Author: Dave Airlie Date: Thu Jun 15 21:24:46 2006 +1000 remove unused variable commit 9a5f5bc0d3f5e62b79355993ca6246382394daee Author: Dave Airlie Date: Thu Jun 15 21:24:16 2006 +1000 remove all printf specifier warnings on Linux commit 051c49d0f002c72d1d8f15f6df264d8b093d4e95 Merge: a840afc dfac819 Author: Michel Dänzer Date: Thu Jun 15 13:10:44 2006 +0200 Merge branch 'master' of ssh+git://git.freedesktop.org/git/xorg/driver/xf86-video-ati commit dfac8191dbda29ef7f6ce33d7356fee89c17d59b Author: Dave Airlie Date: Thu Jun 15 21:05:16 2006 +1000 fix last ati*.[ch] format specifiers commit 33525540f3a9d6760c6edcfe765d2a004a6b894f Author: Dave Airlie Date: Thu Jun 15 21:03:01 2006 +1000 fix more printf formats commit 6bcf6f29af24b6725e097dd72af8e8b9f6d0676c Author: Dave Airlie Date: Thu Jun 15 20:59:33 2006 +1000 some more unused variable cleanups commit a840afc75a0453b4694e3f987ebdbddc6844a169 Merge: c90c49d d511ef4 Author: Michel Dänzer Date: Thu Jun 15 12:46:58 2006 +0200 Merge branch 'master' of ssh+git://git.freedesktop.org/git/xorg/driver/xf86-video-ati commit d511ef486a15b582e5d1708a17a00701f5cf1ccd Author: Dave Airlie Date: Thu Jun 15 20:39:22 2006 +1000 ati/r128: add includes to get C function decls Also fix a void pointer cast commit f46c3bebe821ee0031770d98d04bd406d1abb9ed Author: Dave Airlie Date: Thu Jun 15 20:34:56 2006 +1000 fix some more unused variables and bad parameter passing commit 6c3f81683abab8ff6b8f2fcaf01a2a1a63af5ef6 Author: Dave Airlie Date: Thu Jun 15 20:25:00 2006 +1000 ati: fix -Wall in atidri.c atidri.c has some parameter passing bugs, fixed those and cleaned other warnings. commit 58c6aac0669101481ef6b8217e5cede4573ece42 Author: Dave Airlie Date: Thu Jun 15 19:58:11 2006 +1000 theatre: fix all -Wall warnings in theatre* This fixes all the warnings, it doesn't clean up the horrible mess that is theatre*.[ch]. commit c90c49da3844f93d2d29070b15bb7def72b98b0f Author: Michel Dänzer Date: Thu Jun 15 10:29:46 2006 +0200 Collapse .gitignore files into single toplevel file, sorted with LC_ALL=C. Suggested by Keith Packard. commit b7a3e4c9b33f72ae447f99c0c765f24fce988142 Author: Michel Dänzer Date: Thu Jun 15 09:45:12 2006 +0200 Fix some implicit function declarations. commit 556ddc9c41020271e92389a3900d097ec443c625 Author: Michel Dänzer Date: Thu Jun 15 09:30:43 2006 +0200 .cvsignore -> .gitignore commit 4708327969a21fc171dcd80a1b506028cc8e4f90 Author: Dave Airlie Date: Thu Jun 15 07:37:03 2006 +1000 ati: remove Changelog from ATI driver. commit ecbec8379c24bd6c16ced674d5e6affcd3985e46 Author: Michel Daenzer Date: Thu Jun 8 17:29:12 2006 +0000 Bug #5678: Fix setting of transfer mode for AGPv3 devices (Tilman Sauerbeck). commit 874ff105bc63c4fc242fbabaec04fde2cb81fdd4 Author: Daniel Stone Date: Sat Jun 3 10:50:33 2006 +0000 Bug #1889: Stop the CCE before an engine reset. (Conn) commit f9db5595fe4d62c54b3a501b2af64b4e2b7035cd Author: Michel Daenzer Date: Sun May 21 14:33:34 2006 +0000 Derive ATI_VERSION_{MAJOR,MINOR,PATCH} from package version in order to hopefully confuse bug triagers a little less. commit 25ba85cab8b3d831da646fef19f01769410fc958 Author: Alex Deucher Date: Wed May 10 02:46:37 2006 +0000 - remove obsolete option "OverlayOnCRT2" (bug 6488) commit ede75fe2b1850a4d9f03c724b7c1d1ed65e60f2f Author: Michel Daenzer Date: Tue May 9 14:40:23 2006 +0000 Drop support for radeon DRM <= 1.7. The 2.4 kernel has version 1.7, and various problems up to system hangs on X server startup have been reported with that and DRI enabled. commit bc93a46c4fe499f23b9c0ff52e2e36b4c587f7d6 Author: Michel Daenzer Date: Mon May 8 09:29:34 2006 +0000 Bugzilla #4640 Patch #5273 : Add cases for FOURCC_RGBA32 and FOURCC_RGB24. This prevents clients from receiving incorrect data sizes with these formats. (Jan Schmidt) commit 2b0cdd9448a24ea067b0d78f319b99c1041df2e0 Author: Benjamin Herrenschmidt Date: Wed May 3 04:25:27 2006 +0000 Enable decoding of version 4 TMDS PLL config tables, they actually work, the problem in the comment only concerned pre-production cards that Hui tested apparently. Also set back the default value to what it was initially, fixes some more cards that don't have a proper table (Mac Mini for example) commit 36c04b88416905b9ae305583e8e34fefdbfafc50 Author: Michel Daenzer Date: Mon May 1 17:49:41 2006 +0000 Bugzilla #6755 Patch #5536 : Change HostDataBlit interface to take dst_offset_pitch and coordinates instead of just a destination pointer, as the latter is not sufficient with tiling. Also, use HW clipping to avoid overwriting destination data outside of the specified width. Adapt to new HostDataBlit interface. This fixes corruption with UploadToScreen to the front buffer (from exaPutImage). commit b90d3710e67caad0686efab491c2b76ae877920c Author: Michel Daenzer Date: Sat Apr 29 21:30:23 2006 +0000 Bugzilla #1992 Patch #4988 : Fix Option "DisplayPriority" "HIGH" for R300 family. commit 30f3ce5c5ba205a23748def11de019ee727897f3 Author: Michel Daenzer Date: Sat Apr 29 20:34:57 2006 +0000 Properly de-initialize EXA driver data, so EXA can be initialized again in the next generation. commit d705429c230c9cc1645ae540a51dba62cae9f23e Author: Michel Daenzer Date: Sat Apr 29 20:18:48 2006 +0000 Fix tests for (un)forcing HW cursor. The broken tests caused problems when switching to console with 3D clients running. commit 6142cb079d4a5844e4863c800baf4ae19c636af5 Author: Michel Daenzer Date: Sat Apr 29 20:12:38 2006 +0000 Prefer double-buffered visuals. As a consequence, the root window's visual is double-buffered by default, which is desirable in a number of situations, in particular when running a GLX compositing manager with AIGLX. commit eb841974d041b19461b7fb726687df8938b2e39b Author: Eric Anholt Date: Fri Apr 28 02:55:08 2006 +0000 Bug #6761: Fix font rendering in non-DRI mode by replacing RB2D_DSTCACHE_* with RB3D_DSTCACHE_*. The RB2D versions are read-only mirrors of the RB3D. This is masked when DRI is enabled because the DRM uses the right registers in its flushing. commit 85e2ee6de6fd347aad66785ec7119f92013cd994 Author: Dave Airlie Date: Wed Apr 26 08:38:47 2006 +0000 Make the ATI driver use the PCI BAR size to determine the MMIO register aperture size. Otherwise it tries to overmap things if they are up near the end of memory. commit 13b19edf5accb7427436d3f0b1c9a9efb4fe98fa Author: Eric Anholt Date: Wed Apr 26 07:26:15 2006 +0000 Add support for some component-alpha operations (InReverse, OutReverse) necessary for testing upcoming general component alpha acceleration assistance in EXA. Tested with rendercheck on an r100. commit 44a45bcb82d49349f4fdfae3e4b8f24f98d99b46 Author: Eric Anholt Date: Tue Apr 25 23:31:56 2006 +0000 Use a CPPFLAGS with XORG_CFLAGS so that the exa test can actually find its headers and not fail. Also correct some nearby spelling. commit cc1825b503ce7e785cbb4611fd177477a1081b6e Author: Benjamin Herrenschmidt Date: Mon Apr 24 07:44:52 2006 +0000 Fix enabling of external VGA output on some cards with dual entity setup instead of MergedFB. This was broken due to bogus manipulations of a register between the 2 entities. This fix is a big "violent" in that it always enables the analog output regardless of what is plugged. It should work though (at the expense of some additional power consumption). A proper fix should be easy to do once Alex gets his output mapping rework in. commit a66145bc9d487f7e19237cf292f12750cb959f61 Author: Dave Airlie Date: Fri Apr 21 00:38:44 2006 +0000 Bugzilla 6672: fix interrupts on radeon since memmap changes commit f1f057df9aaba42986d9e20afe6f609a90318333 Author: Dave Airlie Date: Fri Apr 21 00:34:43 2006 +0000 Add support for backing up the PCIE GART table on VT switch. This makes suspend/resume work a lot better on PCIE cards. commit 31396df3b0101571bb85a4a66b67f5a8b0c992a9 Author: Adam Jackson Date: Sat Apr 8 01:19:17 2006 +0000 Bump to 6.6.0 and release. This module's versioning is completely screwed, so until we split out mach64/r128/radeon please just increment the package number whenever you make significant changes. commit d706f494ed22afd369991e8c75a2d4f5aed15305 Author: Aaron Plattner Date: Fri Apr 7 23:06:02 2006 +0000 Add a DrawablePtr argument to the XV functions to pave the way for redirected video. commit f94685aec26b65f60c00a4b1bcd8f26bd80eb6e4 Author: Eric Anholt Date: Tue Apr 4 07:42:36 2006 +0000 Bug #5632: Fix up ati.4 to explain that it is a wrapper driver for the other three. While here, touch up radeon.4, and add an authors list gleaned from checking copyright headers. commit 58c9b1d84f514755945e7a0d25fd5530af34ce95 Author: Eric Anholt Date: Sun Apr 2 21:45:12 2006 +0000 Add missing .cvsignore lines. commit f1ce6170ef21e1f9769337c3138cd8d65c33e40a Author: Alex Deucher Date: Sat Apr 1 23:02:40 2006 +0000 - Fix dpi when switching from clone to dualhead with MergedFB. - Add ConstantDPI option to force a particlar dpi across mode changes Both based on Thomas Winischhofer's sis code. commit 607f18cfbfc2a7b5509f8b567bf510fce31b361e Author: Benjamin Herrenschmidt Date: Mon Mar 27 06:12:57 2006 +0000 Fix a regression of my latest fix that broke color tiling on some setups. RADEONRestoreMemMapRegisters() must not clear CRTC_OFFSET_CNTL and friends unconditionally but only when there is a map change or it will clear them after the DRI updates the AGP location, thus turning tiling back off on the CRTC. Also remove a duplicate call to RADEONInitCommonRegisters(). commit bf1c4471137f10b7de9d79519ca2240058997e18 Author: Roland Scheidegger Date: Thu Mar 23 18:04:17 2006 +0000 commit the actual changes instead of just the Changelog... commit aa5fff9bae4818bbf99e8d9caa8f2ce9905294ca Author: Roland Scheidegger Date: Thu Mar 23 17:59:25 2006 +0000 Use programmable tap coefficients for (hopefully) better video image quality when downscaling. Remove unnecessary code programming the tap coefficients twice. Disable some code which is supposed to improve filtering quality but causes very visible image quality problems at least with rv250 when upscaling. Fix potentially broken FOURCC_RGB16T format (untested if it was broken, untested if it works now...). Change some magic numbers to (new) macro defines. commit 17c52ff15ebe2cf220d5988ee13b599c41799886 Author: Benjamin Herrenschmidt Date: Thu Mar 23 01:37:15 2006 +0000 Call RADEONRestoreCommonRegisters() before RADEONRestoreCrtc2Registers() instead of after. I can't find any good reason why we did it backward until now and it definitely causes problems as the workaround for VT switch in RADEONRestoreCommonRegisters() will break output to the secondary head in various situations. Also does an unrelated minor update to a comment. commit 673e4d7501861066fdd0874919a4524b820b944b Author: Kristian Høgsberg Date: Thu Mar 23 00:06:56 2006 +0000 Add atipciids.h. commit 5dcb4152dca6ac1fe9342f44eb48c0198b15772e Author: Kristian Høgsberg Date: Wed Mar 22 22:30:14 2006 +0000 Convert use of xf86fopen() and other xf86 wrapped libc symbols to use libc symbols directly. The xf86* versions aren't supposed to be used directly. Drop libc wrapper; don't include xf86_ansic.h and add includes now missing. commit 21acdf371e3cf913c5affbd3e86641cfb115311c Author: Benjamin Herrenschmidt Date: Sat Mar 18 00:08:24 2006 +0000 Clear the offsets when updating the memory map instead of when enabling the CRTCs and try to make that code more reliable. Doesn't disable the CRTCs beforehand. commit 323ecb92e40d71c5ef994b41b6d8dedba6dd6203 Author: Roland Scheidegger Date: Fri Mar 17 03:00:53 2006 +0000 Fix various small cosmetic issues. Change a driver message, get the order right for requesting drm versions, replace the use of some numbers with the respective macro defines in radeon_video.c, and add some more macro defines. None of that really matters. commit dc552edf191e14249421f8b27146874f16b80c1a Author: Benjamin Herrenschmidt Date: Thu Mar 16 21:53:58 2006 +0000 Add missing return statement (the driver would not start randomly), add RV410 to the list of new generation cards for the memory map setup and fix a bogus message. commit 901409f47cc990721c1648b1c08e23450e6a4452 Author: Benjamin Herrenschmidt Date: Thu Mar 16 04:32:22 2006 +0000 Fix incorrect CRTC2_OFFSET values when using old-style dual head (not MergedFB). Fixes Xinerama for me. commit 4d6656062129da0489eb4bc898871379ba891d8f Author: Benjamin Herrenschmidt Date: Thu Mar 16 03:09:34 2006 +0000 Add various workarounds that seem to fix some remaning lockup scenarios I'm experiencing with the driver when setting the memory map. Some of the magic delays are a bit dodgy but they seem to work, I suppose I can't do better now without help from ATI. Also removed some really too noisy debug messages. commit 36799e3ea7ddde5fce528e8bc17ea942933a9111 Author: Benjamin Herrenschmidt Date: Wed Mar 15 04:03:37 2006 +0000 Fix various issues with DRI & server recycle by putting DRICloseSreen in the normal CloseScreen callback chain at a spot that matches the call to DRIFinishScreenInit in order to unwrap at the right time. commit 50923b6a9325592edc8b02b17646f96b9b8c4a01 Author: Luc Verhaegen Date: Wed Mar 15 00:46:33 2006 +0000 Add some autoconf to keep this driver from building EXA when a slightly older server with older exa is installed. The way in which this problem was treated by the actually related developers explains a lot about this driver. commit 74f4ed4275866475b3c182fae962df2fc0946b85 Author: Benjamin Herrenschmidt Date: Mon Mar 13 02:57:17 2006 +0000 Fix typo in the function setting the color space transformation factors for old radeon commit 65625c6c2053792cd14b54c904bf46f360ef1565 Author: Benjamin Herrenschmidt Date: Mon Mar 13 00:09:44 2006 +0000 Earliest fix introduced a bug due to another chicken & egg problem in card detection. Now split PreInitConfig into PreInitChipType and PreInitVRAM so that PreInitDRI can be done just in between. Restores proper AGPx4 functionality (when enabled) commit 3a290115af41b0ecb94eb201d7e7abb42ebbfec6 Author: Benjamin Herrenschmidt Date: Sun Mar 12 06:53:27 2006 +0000 Stop using xf86PciInfo.h, instead use a local copy of the PCI IDs we need in atipciids.h so we can update the ATI driver independently of the server when new chips are added commit d6b8f0a5eeb332563ec3ec7082f03be1797d26d8 Author: Alan Coopersmith Date: Sat Mar 11 04:19:47 2006 +0000 Add #ifdef XF86DRI guards around references to info->allowPageFlip and info->depthMoves, since they are only defined if building with DRI. commit 69fe90bc501df9bd9e74b894bfca79a4025725bd Author: Roland Scheidegger Date: Fri Mar 10 13:00:49 2006 +0000 Use "FBTexPercent" option for XAA too (only for increasing memory reserved for textures). commit 8033d7423267fc1b3725df6a077dd910b586daaf Author: Benjamin Herrenschmidt Date: Thu Mar 9 23:26:27 2006 +0000 More memory map fixes !!! This time, we add a way to get the DRM kernel module version early, in order to properly limit the framebuffer size when a module that doesn't support the new map is loaded. That will improve backward compatibility. I also made the minimum required kernel module version 1.3 which hopefully shouldn't be a problem for anybody, and cleaned up the ordering in which we test for DRM version to enable features commit c637939d3c4ce5cdddbc5200d5ffbca4c3927050 Author: Michel Daenzer Date: Thu Mar 9 15:41:16 2006 +0000 RN50: Skip modes that exceed memory bandwidth. Bugzilla #5766 Patch #4636 - Acknowledge that RN50 only has one CRTC, and use this to distinguish it from RV100. - Fix detection of RN50 memory type and bus width. - Model RN50 memory bandwidth limits by capping the pixel clock range based on memory clock, bpp and memory bus width. (ATI Technologies Inc.) commit 890b95a3ddad7634f3aea635cb236b221e902acc Author: Eric Anholt Date: Thu Mar 9 06:06:25 2006 +0000 Update drivers that support EXA for the new EXA ABI. This consists of moving all the accel and card members into the driver ptr, filling in the exa_major/ exa_minor fields, and always using LoadSubModule so we can check the module version up front. Only tested on ATI. commit e19ccfa18fee046c54d7a9401e4e0098b2300598 Author: Michel Daenzer Date: Fri Mar 3 16:41:41 2006 +0000 Add Option "FBTexPercent" to override the amount of video RAM reserved for OpenGL textures with EXA. commit ca00035eccb6e3495b27f8e64f2d016d8d2a9ce2 Author: Benjamin Herrenschmidt Date: Thu Mar 2 02:05:17 2006 +0000 Fix the fix ... I didn't interpret PciInfo->size properly and forgot that the function works in Kb not bytes... Ooops. commit b2145aea36bb035bff048366c607b967d70fff49 Author: Benjamin Herrenschmidt Date: Wed Mar 1 21:35:14 2006 +0000 Extend the alignement workaround to post-rv280 chips as well (thanks Hui) and also limit the CPU accessible memory to the size of the PCI BAR size (yeah, it was passed to the driver, I just got blind for a while it seems) commit 163581a82fe9395672c31b41cd67aa44158f5201 Author: Benjamin Herrenschmidt Date: Tue Feb 28 23:34:03 2006 +0000 Workaround for rv280 bug which needs the framebuffer memory mapping to be aligned to its own size. Also add back limit of 128Mb of mapped fb space for now until I fully sort out what's up with dual function cards. I would really need to access the PCI BAR sizes here but that information seem to be missing from the PCI info passed to the driver. commit 5ff8fb2bea1fe7d14db53c19ff3a3a56668ec417 Author: Roland Scheidegger Date: Tue Feb 28 00:52:53 2006 +0000 Add the newly added (and tons of previously forgotten ones) pci ids to the ati wrapper too (probably not required for it to work as everything should default to radeon anyway there). commit 1574b41a0f894f9b6e30d3ee94e596695a4c64f0 Author: Benjamin Herrenschmidt Date: Sun Feb 26 10:01:32 2006 +0000 Fix page flipping with XAA. The new code ended up calling ShadowFBInit() before XAAInit(), which breaks ShadowFB. commit 1f43a584a684af8078631425886cce236500e0e6 Author: Roland Scheidegger Date: Sat Feb 25 01:57:05 2006 +0000 Add pci ids known to exist (see #4284 for instance). There are still entries which probably don't really exist (cancelled cards and such), leave them as-is. Fix the name of some entries, mostly based on the .inf file of the newest catalyst driver. Use own family id for rv410 and rs400, though there is no different code (yet?). commit 5c141bb15d1163e04c012a0cdf0699d534f0be37 Author: Benjamin Herrenschmidt Date: Thu Feb 16 23:27:44 2006 +0000 Memory map and misc fixes. This completely reworks the way the driver detects available & accessible video memory and initializes the card internal memory map. Along the way, I re-ordered some of the stuffs in pre-init in order to remove some dodgy codepath, fixed various init, exit and vt switch issues, and overall made the driver more robust. The full memory map fix requires an updated DRM. The X driver no longer tries to position the AGP aperture, this becomes entirely DRM responsibility. commit 8c6e5a6eb50d371fd4ec700c26aa628cb5f45731 Author: Benjamin Herrenschmidt Date: Wed Feb 15 23:36:55 2006 +0000 The engine setup would trigger a bogus line write before the proper addresses are setup, thus causing the card to try to bus master over the system bus to some stale location (usually 0 but could depend on whatever was used before X). Remove that useless init bit, and always setup some good enough engine source & destination pointers in case we have some other spurrious engine activity going on. commit d4ec0223029d8fe03a836a5a6e9a7cc8897b4c90 Author: Benjamin Herrenschmidt Date: Mon Feb 13 05:30:13 2006 +0000 Fix EXA acceleration of textures with byteswap or tiling From John Clemens commit 79c60ebbc34aaf0ac0b0723898d5b63015547178 Author: Eric Anholt Date: Tue Feb 7 04:39:59 2006 +0000 Fix a copy'n'paste-o in the EXA render implementation that resulted in [ax]8b8g8r8 pict formats not being supported on r200, but no other issues. commit 8d74f3d49e73626f5d658ba6586a7c1487dae141 Author: Daniel Stone Date: Thu Jan 19 14:20:37 2006 +0000 Bug #5656: Set all Radeon XPRESS 200 R[CS]4xx-based chips to have IsIGP = 1, fixing modesetting issues. commit e490f4b86e6bba70f7c884fca3cf41d159323689 Author: Alan Coopersmith Date: Fri Jan 13 01:37:43 2006 +0000 XF86_VERSION_CURRENT -> XORG_VERSION_CURRENT commit ac296d9137b02753bc79a9930d168855adea9c95 Author: Alan Coopersmith Date: Fri Jan 13 01:02:01 2006 +0000 When failing to parse MetaModes, reset CRT2pScrn to NULL after free'ing it so we don't crash when trying to use it later (such as in RADEONFreeRec). commit dd98ce78407c9eddd7adaad1d73d6910e6949b87 Author: Adam Jackson Date: Sun Jan 8 19:02:16 2006 +0000 Bug #5523: Make radeon compile without USE_XAA. (Tilman Sauerbeck) commit a99429b2bc6407ff2a094e6ee30ce2032f734966 Author: Kevin E Martin Date: Wed Dec 21 02:29:59 2005 +0000 Update package version for X11R7 release. commit 96e225b950c74e64f3f788be8a8489c5075ea55a Author: Adam Jackson Date: Mon Dec 19 16:25:52 2005 +0000 Stub COPYING files commit 6bea785ea0bdf01673a6ddc45765ae7372fdd371 Author: Alan Coopersmith Date: Mon Dec 19 09:07:50 2005 +0000 Typo fixes, mailing list & url updates, and other changes to prepare for X11R6.9 & 7.0 releases. commit 07d5cf8fc37eb72dbb344081ff07d59dbf568e9c Author: Alan Coopersmith Date: Thu Dec 15 23:15:37 2005 +0000 Bugzilla #5238 Patch #3978 r128 man page dualhead note update (Alex Deucher) commit 6db5cbfbf6d405d9871892d1255dd7442e4539e9 Author: Kevin E Martin Date: Thu Dec 15 00:21:32 2005 +0000 Update package version number for final X11R7 release candidate. Bump driver version number. commit 726fd3a81dfbd1b0c8e4ede104a48523daecab92 Author: Adam Jackson Date: Wed Dec 14 19:41:28 2005 +0000 Bug #1760: Fix ati wrapper multihead to be dlloader friendly. commit 328a2d74dabe32ce35e879799412666feedb0eef Author: Adam Jackson Date: Fri Dec 9 18:25:02 2005 +0000 Bug #3869: Don\'t walk off the end of an array in connector detection. (Eric Anholt) commit 03961a05438e916b6725f4e547f23a84ead13c5e Author: Adam Jackson Date: Fri Dec 9 18:15:31 2005 +0000 Bug #1106: Fix memory allocation for Render. (Michel Daenzer) commit 091e5c584124f9b849c0f46802b2f0d8b0cc2388 Author: Kevin E Martin Date: Thu Dec 8 17:55:18 2005 +0000 Add configure options to allow hard-coded paths to be changed. commit e38e2df15c9a4b08dee6386a225e98827bb35aad Author: Kevin E Martin Date: Thu Dec 8 17:54:40 2005 +0000 Allow hard-coded paths to be configurable. commit b8203604bf9bd3813668313a1c8c17040b9d93ce Author: Kevin E Martin Date: Tue Dec 6 22:48:33 2005 +0000 Change *man_SOURCES ==> *man_PRE to fix autotools warnings. commit a86920e812bfd40ec9facfc234220e83066dd263 Author: Kevin E Martin Date: Sat Dec 3 05:49:32 2005 +0000 Update package version number for X11R7 RC3 release. commit 010adc8988846e6f76f111a9fd32eca021d12fbc Author: Kevin E Martin Date: Sat Dec 3 05:45:17 2005 +0000 Bump version numbers for X11R6.9/X11R7 RC3. commit a5efa6724e7fd8318e262060b084630632dfcb44 Author: Kevin E Martin Date: Fri Dec 2 02:16:07 2005 +0000 Remove extraneous AC_MSG_RESULT. commit feeef3cba1f4736a96daf3002ec902ced2874198 Author: Adam Jackson Date: Wed Nov 30 18:51:22 2005 +0000 Bump libdrm dep to 2.0. commit 7ca2b3fa30fedd07951f7c6e73ed4d2a6f6606ea Author: Adam Jackson Date: Tue Nov 29 23:29:58 2005 +0000 Only build dlloader modules by default. commit e167e5151e32d54919e96cbfdcf932e16b1cab2a Author: Alan Coopersmith Date: Mon Nov 28 22:04:08 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 0015b1a007bed61aaf389f8f927e4ae0568d7da7 Author: Eric Anholt Date: Mon Nov 21 10:49:09 2005 +0000 Add .cvsignores for drivers. commit 00b8f6ccfbb5163c47e9def0e4ecc6ac7be7e8af Author: Eric Anholt Date: Fri Nov 11 11:05:42 2005 +0000 Bug #1028: Don't (incorrectly) mark the 24/8 z/stencil case as slow, which resulted in whining at runtime about the visual not being supported. commit 33326847ccc9cf4cd6a23a257e5392e348e6dd22 Author: Kevin E Martin Date: Wed Nov 9 21:31:20 2005 +0000 Bump version numbers for X11R6.9/X11R7 RC2. commit 68e11246bd6f6a641807230834dce4e7fd6911af Author: Kevin E Martin Date: Wed Nov 9 21:15:14 2005 +0000 Update package version number for X11R7 RC2 release. commit 1582d3b34643babcbb794d2df8d7c9a755d569c9 Author: Matthias Hopf Date: Wed Nov 9 17:42:57 2005 +0000 Bug #4998: Add ';' and ',' as valid separators for MetaModes as well. commit 2d22d78d157e07e6ec6a3e2d03fc17f102f6e00e Author: Kevin E Martin Date: Wed Nov 9 07:30:03 2005 +0000 Fix DoLoadableServer NO build. commit 999f67763a5ea9fef7b7b576262f0da079efcfee Author: Michel Daenzer Date: Tue Nov 8 16:30:48 2005 +0000 bugzilla #988 (https://bugs.freedesktop.org/show_bug.cgi?id=988) Fix typo which may or may not have had a negative impact on stability with R300 class cards. commit 5aa401efa0b8d81da418eafeb857142a33f85da9 Author: Michel Daenzer Date: Tue Nov 8 14:05:00 2005 +0000 bugzilla #4494 (https://bugs.freedesktop.org/show_bug.cgi?id=4494) Call RADEONDGAInit() even if EXA is enabled; the problematic DGA acceleration hooks are already disabled in that case. This fixes DGA issues such as DGA mouse (typically used by games in fullscreen mode) not working. Fix suggested by Eric Anholt. commit 345180131a7b2752773dc2a3ee1221ad1e05c815 Author: Michel Daenzer Date: Tue Nov 8 13:35:23 2005 +0000 bugzilla #4916 (https://bugs.freedesktop.org/show_bug.cgi?id=4916) Fix segfault with MergedFB and EXA enabled and HW cursor temporarily disabled. commit 23911421ffa7bdd2e191a72c41bf1f26c92c1a67 Author: Michel Daenzer Date: Tue Nov 8 09:44:41 2005 +0000 bugzilla #4951 (https://bugs.freedesktop.org/show_bug.cgi?id=4951) attachment #3689 (http://bugs.freedesktop.org/attachment.cgi?id=3689) Fix HW cursor getting silently disabled with EXA. commit e1259c0117a190cf4c6e7be07d5aa83e03afb3a0 Author: Bogdan Diaconescu Date: Mon Nov 7 19:28:40 2005 +0000 Replaced the variadic macros(gcc) by macros according to C99 standard commit 67bdaae04ab37f38a6d0c8dc4b6328c3ba3b3393 Author: Alan Coopersmith Date: Sun Nov 6 07:41:29 2005 +0000 Sun bug #6325220: Xorg dumps core in dual monitor configuration with radeon driver if CRT2Position not specified in xorg.conf (Stuart Krietman - Sun Microsystems) commit 733ebf6e4a7c7b2f1a861077d43da2a853e4c0d7 Author: Kevin E Martin Date: Tue Nov 1 15:08:52 2005 +0000 Update pkgcheck depedencies to work with separate build roots. commit dd0eb76337bfdaec8f456380a6ced9e0487e190f Author: Adam Jackson Date: Fri Oct 21 18:40:18 2005 +0000 Bug #4829: Remove some useless DRI symbol checks. commit e6c1859e3a7c84b882e0c30d0783255ed1258d9e Author: Donnie Berkholz Date: Thu Oct 20 23:01:58 2005 +0000 Bug #4831 . Check for x86_64 in addition to amd64 in host_cpu. commit 33460fb393c9591babcc43b30a73eef3971765c2 Author: Kevin E Martin Date: Wed Oct 19 02:48:02 2005 +0000 Update package version number for RC1 release. commit 77d5c3549db4f6a7ff9f969f885d7a4e58ab2b16 Author: Kevin E Martin Date: Tue Oct 18 15:46:37 2005 +0000 Do the following to make the drivers pass distcheck: - Only define EXTRA_DIST when there are actually man pages to be processed - Add missing man pages to keyboard and ati drivers EXTRA_DIST commit 35e717078c840414b0d6a0e37b3ffed0a7b102aa Author: Alan Coopersmith Date: Tue Oct 18 00:01:52 2005 +0000 Use @DRIVER_MAN_SUFFIX@ instead of $(DRIVER_MAN_SUFFIX) in macro substitutions to work better with BSD make commit ff6e5b0412fe347575992c83bb7cb47b6f96f390 Author: Adam Jackson Date: Mon Oct 17 22:57:32 2005 +0000 More 1.7 braindamage: define EXTRA_DIST in terms of @DRIVER_NAME@ instead of indirectly commit a2e7c55850d383e3af948d445b1645d8a47811cf Author: Alan Coopersmith Date: Mon Oct 17 00:09:01 2005 +0000 Use sed & cpp to substitute variables in driver man pages commit 524fb1440760a14c53fb3f238aad6c3cdb7e6a08 Author: Dave Airlie Date: Sun Oct 9 10:36:50 2005 +0000 Secure the Radeon PCIE GART tables in framebuffer memory by not allowing the clients to get access to a secure area of framebuffer. commit e526211b86ec5343002978debfcf78f74a10c69e Author: Søren Sandmann Pedersen Date: Tue Oct 4 20:01:03 2005 +0000 Check in generated README files commit 431d0e144ae4c294e1f6110fc3db497ce9bd9cfd Author: Søren Sandmann Pedersen Date: Mon Oct 3 21:22:07 2005 +0000 - For all drivers that have a .sgml file, add code in their build system to build the README file at make dist time - in util/macros/xorg-macros.m4, add a new XORG_CHECK_LINUXDOC macro that will check if the required tools and files exist, and if so set a conditional. - util/modular/symlink.sh - Link all the .sgml to xf86-video-/README.sgml - Add all the README. to the list of excluded files - xc/programs/Xserver/hw/xfree86/doc/sgml/SiS.sgml: Various changes to make it spew less warnings when the text file is built. commit 9147c20e5ff662ac511a19e7623b406dffee2242 Author: Adam Jackson Date: Mon Oct 3 06:14:58 2005 +0000 Bug #4001: Don't crash when PanelSize is unset. (Alan Coopersmith) commit 7e2090e3ebf0bd699d66d336353c097d658a86ae Author: Matthieu Herrb Date: Sat Oct 1 20:42:06 2005 +0000 missed one missing return value. commit a843e4281134de1545d538cb8970179b1d6977f6 Author: Matthieu Herrb Date: Sat Oct 1 17:09:48 2005 +0000 add missing return value on success in RADEONSetupMemXAA(). commit 98f7d043f894c73fecaf14440c1a24b6c2fc4b06 Author: Søren Sandmann Pedersen Date: Wed Sep 28 15:10:38 2005 +0000 Make ati driver distcheck radeon_commonfuncs.c \ radeon_exa_render.c \ radeon_exa_funcs.c \ commit e7b1af5d1677e53820dd1c0926cc8b5a4284901e Author: Roland Scheidegger Date: Tue Sep 27 23:55:15 2005 +0000 Move the RADEONEnablePageFlip/RADEONChangeSurfaces calls back to the end of the function (the code above will cause pixmap cache to be freed and copied around, and these functions must be called after that otherwise pixmap damage will occur). May be related to #4440, #4456 (unclear if these setups involve 3d apps) commit bc3c26fe365347c427e04385c1df95a5eec14f28 Author: Eric Anholt Date: Tue Sep 27 23:34:11 2005 +0000 Fix Radeon MMIO Render acceleration with EXA by writing out floating- point coordinates rather than integers. commit 58dfb95c446b73fbc34784f0894cf89152dab043 Author: Adam Jackson Date: Sat Sep 24 18:45:45 2005 +0000 Disable the {Open,Close}FullScreen DRI protocol. Remove empty FullScreen stubs from drivers, comment the non-empty ones. commit 65b5f0017e29903565aff0b7527d955ed016c9a6 Author: Alan Coopersmith Date: Tue Sep 20 16:53:34 2005 +0000 Only include radeon_dri.h & radeon_sarea.h if XF86DRI is defined. Include "compiler.h" to define __inline__ on non-gcc compilers commit 0b7441b19a1a5df91aca6b1a02944afb636bc523 Author: Eric Anholt Date: Sun Sep 18 02:32:23 2005 +0000 Break EXA ABI while we still can. Add coordinates to the UploadToScreen hook so we can upload a subset of a pixmap, and convert the current drivers to respect that. Use this support to directly UploadToScreen in exaGlyphs, providing a 47.4% +/-2.4% decrease in wall time for ls -lR programs/Xserver in an antialiased gnome-terminal on an M6 (n=3, caches hot). I would have bumped major version, only I can't tell what the EXA_VERSION_* is supposed to be doing as opposed to the module version. commit 64e7db2698ee48af92594c16d72e33c16372c9d7 Author: Eric Anholt Date: Sat Sep 17 20:02:01 2005 +0000 - Don't try to upload 0 byte-per-pixel (PICT_a1) data using RADEONHostDataBlit. - Disable the shortcut for switching from 3d to 3d in radeon_exa.c. It appears that we do need the cache flush here, thought it's not clear why. Disable the 2d to 2d shortcut while here, since I'm unsure of what we're doing. Exposed by the following bit: - Bug #4485: Add a new routine, exaGlyphs, to handle font drawing. Glyphs were being accumulated in from non-migratable scratch pixmaps, causing the destination pixmap to move towards screen but the migration necessary for source never to happen, leading to abysmal performance. Instead, copy the scratch glyph data into a real pixmap first, then composite from that into the destination, allowing for migration. time ls -lR from programs/Xserver showed 26.9% (+/- 6.3%) decrease in wall time (n=3). - Create exaDrawableUse* wrapping exaPixmapUse*, but which are aware of windows needing backing store. Makes migration code prettier, and ensures that composited windows will be migrated as normal when we turn off cw for EXA. (issue brought up by keithp) commit 3c71198a088e71a105e274f176c8ceb503615d46 Author: Dave Airlie Date: Sat Sep 17 07:47:51 2005 +0000 Switch radeon driver to using a card type rather than having a IsPCI flag, allow for PCI/AGP/PCIE cards. Set PCI gart allocation to only happen on PCIE cards. Add Radeon PCIE card detection using capability bits. commit 10cf3523f236a017a1ca7e5ee57e02176b924059 Author: Eric Anholt Date: Wed Sep 14 22:06:41 2005 +0000 Bug #2573: Remove the disabling of automatic cache flushing on non-r300 cards. It has been implicated in hanging at least r300s and some r100s, and seemed to be the cause of some bad rendering for me. commit d68894a463a3bb08c97e91ff6fc4b65b29183ff6 Author: Eric Anholt Date: Tue Sep 13 22:04:12 2005 +0000 Remove the hardcoded USE_EXA/USE_XAA defines now that they've been hardcoded in configure.ac (config.h). commit baa9b5b6e19cf9794bf810e3c582bf1d7f808663 Author: Dave Airlie Date: Mon Sep 12 09:27:07 2005 +0000 Fix Radeon EXA for when RENDER isn't defined commit 8c89610389197dc94d3bceaf44d9d2ea91848f1b Author: Dave Airlie Date: Mon Sep 12 09:17:42 2005 +0000 Move GART offset/size outside XAA commit eba44d9747adde8385f2a242dee5a8e73ce5a205 Author: Daniel Stone Date: Mon Sep 12 09:04:36 2005 +0000 Define USE_XAA and USE_EXA for the time being. commit a255e7b0984890daad98b74ace0c572965fe61f5 Author: Eric Anholt Date: Sun Sep 11 21:00:44 2005 +0000 Attempt to fix up the modular pieces for EXA support. (untested) commit 3e0d9c945a6a71cc476d27341ef18618529a91a8 Author: Eric Anholt Date: Sun Sep 11 20:58:53 2005 +0000 Add support for EXA to the radeon driver. Building EXA and XAA support is controlled at compile time, plus the runtime option of Option "AccelMethod" "EXA" or "XAA". The XAA support appears to remain as before, while the EXA pieces need just a little more polishing. Notable features: - Render acceleration working on Radeon 100 and 200-series with DRI on. - DRI works with EXA Notable issues: - DGA disabled in the EXA case. - Backbuffer moves disabled in the EXA case. - No textured XVideo. - MMIO render acceleration is close but still has some issues. - Memory pressure while using Composite is really troublesome with DRI on. This patch is based on an initial patch by Zack Rusin, with significant work by Benjamin Herrenschmidt and myself. commit fd62082b68ac3aadd8ffc441352d75d88334904e Author: Dave Airlie Date: Sun Sep 11 08:51:38 2005 +0000 Add support for allocating PCI GART table in framebuffer memory. This is needed to support PCIE Radeons using a new DRM. commit cb63f8d9c0563fb0eff28e2be6d4adf5666540d2 Author: Dave Airlie Date: Tue Sep 6 10:03:19 2005 +0000 Handle VIP timeouts more gracefully -- impose a hard limit of 10ms on waiting for VIP_BUSY so we don't lock up hard, spinning. commit dbd83cf18e1bf5e7e31e1ac150227bd27e8b1739 Author: Adam Jackson Date: Sun Aug 28 20:51:14 2005 +0000 Bug #4148: Bump required DRM version for r300 to 1.17. commit ce0589ff3b9fcf8c6bab64da4dba40ba540a6a03 Author: Adam Jackson Date: Sun Aug 28 18:10:34 2005 +0000 Bug #1109: Fix VGA init on Rage Mobility 7500 (Marc Le France) commit 250c8732a54924eeb459880f2905f8e59d038e60 Author: Bogdan Diaconescu Date: Sun Aug 28 18:00:23 2005 +0000 Modified the licens type from GPL to a X/MIT one commit 94c0196652c3cfa0558f61b55f5df9bf50f9ac49 Author: Alan Coopersmith Date: Fri Aug 26 20:04:01 2005 +0000 #include "extensions/dpms.h" -> commit 107e42cabe1cc41fe86b0218c3229b5f34b2df84 Author: Daniel Stone Date: Fri Aug 26 07:00:24 2005 +0000 Fix 'ugly' warning in r128. (Branden Robinson, Debian #069) commit d3f5911c85ccfaaf50c05ce80d56dac13fd15701 Author: Daniel Stone Date: Fri Aug 26 05:30:52 2005 +0000 Only use vgahw symbols if we're building vgahw for this architecture. TODO: Fix this for the modular tree (maybe an unconditional yes?). Define that we're using a DPMS server and include DPMS headers. (Debian #024b) commit 879213455740d2d653d38c712275f07610e4dc9c Author: Alex Deucher Date: Fri Aug 26 02:11:24 2005 +0000 - fix pitch increment (Aapo Tahkola, Roland Scheidegger) commit 6519cc71e4387ef979de90be517145611511ff1a Author: Daniel Stone Date: Thu Aug 25 03:34:58 2005 +0000 Fix bug in Radeon connector table parsing -- parse all entries, not just the first. (Ben Herrenschmidt) commit 8734a5d0bafb60f5e38b2cee10587f01fc016379 Author: Daniel Stone Date: Thu Aug 25 03:07:50 2005 +0000 Blacklist Radeon M300 from multimedia I2C code. Handle I2C timeouts more gracefully -- impose a hard limit of 10ms on waiting for I2C_GO so we don't lock up hard, spinning. commit 578564b4f7fce1f02d056c2b12ffb7803d268829 Author: Adam Jackson Date: Mon Aug 22 03:05:52 2005 +0000 Explicit license statement. commit c9005c91bf6aaf4728a6606284f5d24e0b4a8282 Author: Daniel Stone Date: Thu Aug 18 09:03:46 2005 +0000 Update autogen.sh to one that does objdir != srcdir. commit 508a7421a1386b5b783a867d860b858a55f216d3 Author: Alan Hourihane Date: Mon Aug 15 07:30:05 2005 +0000 Egbert's 64bit fixes for mixed 32/64bit clients commit 204290412fbe8b4ac1a0f4f97bc7aec2847a1df7 Author: Daniel Stone Date: Sun Aug 14 16:14:51 2005 +0000 Make DGA, CPIO, non-PCI, and TV-Out support detected per-platform, using the same semantics as in drivers/ati/Imakefile. commit adb093bdf3cea8108a40bcd72f09924b416de0c1 Author: Alex Deucher Date: Mon Aug 8 23:42:36 2005 +0000 - radeon XPRESS chips are actually RV3xx based commit 9c11018beb186b4b303524685fb62629b9ca863e Author: Vladimir Dergachev Date: Sun Aug 7 14:46:55 2005 +0000 Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c Update warning about DRI support on R300 and later cards. commit a28b2c76c7df2fe65a93eed34bc85c2cf5afb314 Author: Vladimir Dergachev Date: Sun Aug 7 14:40:58 2005 +0000 Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c Properly configure fbLocation and related registers for R300 cards. (Dave Airlie) commit 692fb0f8b51abeccaf70b51fc1defc62132b15e9 Author: Alex Deucher Date: Sat Aug 6 17:23:16 2005 +0000 - missing line in mergedfb option parsing. Spotted by Christoph Bauer commit 14e77a39320a7a074b5c2eeeea9750b469abc978 Author: Ian Romanick Date: Fri Aug 5 23:04:32 2005 +0000 I have resolved this by making all the "Direct rendering disabled" messages X_WARNING and all the "Direct rendering enabled" messages X_INFO. Ideally, we need to factor some of this stuff out to common code. There is a *LOT* of duplication among the *_dri.c files under programs/Xserver/hw/xfree86/drivers. I'm trying to clean up as much low hanging fruit as I can and got tired of waiting for ajax. :P commit 8e88d36f78c13025847310b411402f1d46a2e0cd Author: Adam Jackson Date: Sun Jul 31 17:19:27 2005 +0000 Post-merge fixups: - Disable building the gamma driver - Fix numerous Imakefiles to get header paths and subdirs right - Symlink client-side GLX lib source from Mesa - Add new shader subdirs to the Mesa core build - Tweak the DDX drivers to not ask for "xf86dri.h"; they don't need it, since they don't generate protocol, and it was breaking the build. commit fb9f712fd1044feb8ce6a99aabaeb5966123e268 Author: Kevin E Martin Date: Fri Jul 29 21:22:42 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 ee45e1fb5da793fa14770b28fd662e69d52b2c6a Author: Michel Daenzer Date: Fri Jul 29 19:45:14 2005 +0000 bugzilla #3911 (https://bugs.freedesktop.org/show_bug.cgi?id=3911) attachment #3191 (http://bugs.freedesktop.org/attachment.cgi?id=3191) Disable bus mastering while updating MC_FB_LOCATION and friends to prevent the X server from hanging on startup every now and then under some circumstances. (ATI Technologies Inc.) commit 44a66ec5a01c3b4dfa046a66b80a3b7e9dfff537 Author: Søren Sandmann Pedersen Date: Fri Jul 15 15:02:47 2005 +0000 Install theathre drivers in @moduledir@/multimedia commit dbcf104689ca368523715eb5945bcd800985799b Author: Kevin E Martin Date: Fri Jul 15 03:39:58 2005 +0000 Fix filename typo commit 2256fabf1cd69c950639f236f61e59e68cc8e6fa Author: Kevin E Martin Date: Thu Jul 14 22:30:47 2005 +0000 Fix check for headers. Use {XORG,DRI}_CFLAGS subst instead of replacing CFLAGS. commit 520317863ffb365eca17c96b4d545adb554bbbd6 Author: Kevin E Martin Date: Thu Jul 14 19:35:48 2005 +0000 Make compiling with DRI support configurable/autodetecable. Autodetect DRI sdk headers. Expand help string for xorg-module-dir option. commit ab5264838ae34bb29791bc08d5a4f853a995faf1 Author: Søren Sandmann Pedersen Date: Thu Jul 14 17:10:01 2005 +0000 fuck you cvs commit a608c4422665ce1e933483b7c2a25ab2daae5930 Author: Søren Sandmann Pedersen Date: Thu Jul 14 16:03:36 2005 +0000 Try adding build system for ATI driver again. Who knows, maybe CVS works today. commit d715561d28d82591adf5c7504068c1818eb2245c Author: Adam Jackson Date: Mon Jul 11 02:29:45 2005 +0000 Prep for modular builds by adding guarded #include "config.h" everywhere. commit 5b37b695019b7a4522a96a63f1f6b035160e6a25 Author: Roland Scheidegger Date: Mon Jul 4 23:44:59 2005 +0000 Bug #2604: Disable workaround for horrible flickering when scrolling vertically in a virtual screen when color tiling and page flip are both enabled, as it potentially does more harm than good. The flickering still needs fixing probably though. commit 08b886850f115f404187acd619aa2c2ca18ae3c7 Author: Daniel Stone Date: Fri Jul 1 22:43:11 2005 +0000 Change all misc.h and os.h references to . commit 1c7c3372776d6d116facabbf055f27af3e96f59f Author: Alex Deucher Date: Fri Jul 1 04:16:42 2005 +0000 - fix depth tiling for r3/4xx chips (Aapo Tahkola) - adjust limits for tiled surfaces on r3/4xx commit e8c2574557950bfa150806432d566cd38c47158f Author: Alex Deucher Date: Fri Jul 1 02:56:04 2005 +0000 - Fix Support for Philips FM1236/F tuner on ATI AIW 9600 XT (Jeff Smith) Bug 3401 commit d258e1c1566d005693260230712c9d78f1447dba Author: Alex Deucher Date: Thu Jun 30 04:46:11 2005 +0000 - change back part of a comment I seem to have accidently changed. commit 6d9c02d58eae1966e8fa8d7d305849c6e57434ad Author: Alex Deucher Date: Thu Jun 30 02:02:10 2005 +0000 - small mergedfb fix from Thomas Winischhofer commit 85365b791542cab221c37c9b3b4593ea0c6c9e2d Author: Alex Deucher Date: Thu Jun 30 01:40:17 2005 +0000 - add support for colortiling on r3/4xx hardware (disabled by default). In order for pageflipping to work on r3/4xx we will need to update the the sarea and drm so that the crtc1/2 xytiling regs get updated. Initially worked out by Aapo Tahkola. commit 3ec99c9cd821aeacdd57a9bbc20c4e4ec4711790 Author: Alex Deucher Date: Thu Jun 30 00:56:01 2005 +0000 - Increase the priority of display 0/1 in the memory controller for r3/4xx hardware when displaypriority is set to HIGH. Fixes display problems in high res modes. Originally reported by Aapo Tahkola. commit a7523e6c0be7a600963e9de10cf0060d16117bf6 Author: Alex Deucher Date: Thu Jun 30 00:33:36 2005 +0000 - fix some OUTREGs that should be OUTPLLs in dynamicclocks code commit c7e1d31c6aec3a99061c77c4d6f57e2e874e37f1 Author: Adam Jackson Date: Sun Jun 26 04:38:12 2005 +0000 Bug #3628: Fix video driver submodule visibility. commit 1beca962ecee5b5c51eb2fb8451fcc2a2ed4b97c Author: Adam Jackson Date: Sat Jun 25 21:16:53 2005 +0000 Bug #3626: _X_EXPORT tags for video and input drivers. commit 9a4895c4c2fd9614d83adfe3967f4f46dc4dfff6 Author: Eric Anholt Date: Wed Jun 22 22:50:49 2005 +0000 Add missing detection of the PCI ID for 0x5b62, Radeon X600 (Vladimir Kushnir). commit 43e3cc7c21160f4536ed860f97d02545c267dfbc Author: Alex Deucher Date: Wed Jun 15 23:40:50 2005 +0000 Sync up radeon mergedfb with Thomas' latest sis mergedfb changes: - non-rectangular mergedfb desktops - screen offsets commit b67f9f5c875efaa41bded7ed2f38b2a5fbd17597 Author: Alan Coopersmith Date: Sat Jun 4 20:26:28 2005 +0000 Sync with 6.8.2 branch: Bug #591 (https://bugs.freedesktop.org/show_bug.cgi?id=591) attachment #308 (https://bugs.freedesktop.org/attachment.cgi?id=308): Fix video timing problems with Sony PCG-C1VN Vaio Picturebook notebook && co. Patch by Marc Aurele La France commit daae70d9083e9c15358f160f0df3176e344f1cb9 Author: Alan Coopersmith Date: Sat Jun 4 20:04:36 2005 +0000 Sync with 6.8.2 branch: Bugzilla #1306 (https://bugs.freedesktop.org/show_bug.cgi?id=1306) attachment #1291 (https://bugs.freedesktop.org/attachment.cgi?id=1291): Fix SEGV in "radeon" driver. Patch by Kevin E. Martin commit c27c193f192b117232dbe39575d3d5ab7c6a1b1e Author: Felix Kuehling Date: Fri May 27 22:33:23 2005 +0000 Fix for bugzilla https://bugs.freedesktop.org/show_bug.cgi?id=3414 (patch https://bugs.freedesktop.org/attachment.cgi?id=2782): Don't use RMX if we are Dell Server. commit 3b674815e0a6d19b0719e71261c0909b92173aed Author: Adam Jackson Date: Tue May 24 23:26:50 2005 +0000 Typo fix from bug #3163 commit commit 0845d1db801ae74688464bd4c41a7e40e4b50186 Author: Egbert Eich Date: Mon May 23 09:50:20 2005 +0000 Explicitely disable DPMS power states during close screen. Fix macro that takes a value and a mask of bits to modify to be behave evquvalently if the bits that should remain unchanged are set or unset in the value (Bugzilla #3369). commit 74b86b036def72e5180a46871b8452ba9eea9bb1 Author: Adam Jackson Date: Wed May 18 17:47:35 2005 +0000 Bug #3163: Create new DRIINFO_*_VERSION macros to indicate the version number of the DRIInfoRec, disambiguating it from the XF86DRI protocol version number. Modify DRIQueryVersion to return the libdri version number, which all DDXes were requesting implicitly. Fix the DDXes to check for the DRIINFO version they were compiled against. commit 0f4a8fc6aa5157a8b48beb49f30511665cfa4b63 Author: Matthieu Herrb Date: Wed Apr 20 21:07:44 2005 +0000 programs/Xserver/hw/xfree86/drivers/ati/theatre.h Build fix for DoLoadableServer = NO systems. commit 3355d12f832909b05e8b022fad784c9f7af7341f Author: Daniel Stone Date: Wed Apr 20 12:25:22 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 31cb4758eae4703d4de31a0b291847cefa855fc3 Author: Bogdan Diaconescu Date: Sun Apr 17 23:28:09 2005 +0000 Added fifo_read and fifo_write in tge generic bus definition commit 2b363e02c7c122f07e6fc406fb8ee52d97b55cad Author: Bogdan Diaconescu Date: Sun Apr 17 23:26:36 2005 +0000 Added new options for the ATI driver: RageTheatreMicrocPath and RageTheatreMicrocType commit 6286efeba564c63ec198c091e4bba22027586901 Author: Bogdan Diaconescu Date: Sun Apr 17 23:23:45 2005 +0000 Addeded support for FI1216ME (PAL) version of the tuner, detection of UDA1380 sound processor commit 9a63c216e90622cd96d4555155df06dd66c3235b Author: Bogdan Diaconescu Date: Sun Apr 17 23:18:26 2005 +0000 Use the theatre_detect to determine the chip ID and then load the coresponding theatre module commit 247057762813f12f171b1fa05f31c5ace4c245a7 Author: Bogdan Diaconescu Date: Sun Apr 17 23:15:31 2005 +0000 Added functions that access the FIFO on RT200 commit bcccf9259784f21d84d52c526aa68df0787118b4 Author: Bogdan Diaconescu Date: Sun Apr 17 23:13:45 2005 +0000 Added RT200 registers commit da9d27f8c8cccf2f40a244b25ffe0d3162c41a63 Author: Bogdan Diaconescu Date: Sun Apr 17 23:09:28 2005 +0000 This is the theatre chip detection module commit e4623bbce161c41ccac65210fd2539211e8af715 Author: Bogdan Diaconescu Date: Sun Apr 17 23:07:54 2005 +0000 Now the detection of the theatre chip is in other module called theatre_detect commit 405b4dcb067346fce7fd9f6d8a6507a58c740ac7 Author: Bogdan Diaconescu Date: Sun Apr 17 23:06:17 2005 +0000 Added the RageTheatre200 video demodulator support commit 310eb24a45b145efbd47196a1c3ec750cf004154 Author: Daniel Stone Date: Mon Apr 4 23:07:08 2005 +0000 Release SDA/SDL I2C lines from an asserted-low state after a DDC probe, which caused Apple Studio Display monitors to shut off after a second or so (Ben Herrenschmidt). commit a416667f980a8679352be897af2fb3215da2d000 Author: Alex Deucher Date: Thu Mar 31 23:18:10 2005 +0000 - Add new Radeon pci ids (ATI devrel), bug 2827 commit 2e7365ffb767099faf3f191dc65341dbb3ef6247 Author: Vladimir Dergachev Date: Thu Mar 31 18:26:05 2005 +0000 Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c Patch from Antti Ajanki - provide VBI capture support for PAL and SECAM (You need GATOS km module to actually get at the data, the change merely configures the hardware to handle it correctly). commit 9a3c1c8e4cba2885b707db0f855e11dc6e640b49 Author: Michel Daenzer Date: Tue Mar 29 06:14:34 2005 +0000 bugzilla #2844 (https://bugs.freedesktop.org/show_bug.cgi?id=2844) attachment #2230 (http://bugs.freedesktop.org/attachment.cgi?id=2230) Wait for idle before uploading HW cursor data to the framebuffer to avoid lockups when moving the mouse on some machines. commit 97863f112850be5206ea555297354c1c104fcdbe Author: Kevin E Martin Date: Tue Mar 29 03:49:04 2005 +0000 bugzilla #2840 (https://bugs.freedesktop.org/show_bug.cgi?id=2840) attachment #2227 (https://bugs.freedesktop.org/attachment.cgi?id=2227) Fix build problems introduced by previous Radeon PLL errata workarounds. commit 04cbb8d174cc5e3c7ecdd4e171170213ecb3c7ed Author: Dave Airlie Date: Sat Mar 26 00:53:01 2005 +0000 bugzilla #2057 (https://bugs.freedesktop.org/show_bug.cgi?id=2057) attachment #1516 (https://bugs.freedesktop.org/attachment.cgi?id=1516) Add TVOUT Support for Mach64 (Leif Delgass, fixed up for Xorg by me). commit 5be4bf9000bdf58584a10a6b8e285d0f173304fa Author: Alex Deucher Date: Thu Mar 24 06:45:52 2005 +0000 - radeon PLL access errata workarounds (Benjamin Herrenschmidt, acked by Hui Yu) commit 34af3da80304a13b6407dcc0f4db54d6c8bb7a41 Author: Michel Daenzer Date: Fri Mar 18 22:36:47 2005 +0000 Add support for production version of ATI RN50/ES1000. (ATI Technologies Inc.) commit b56a5f96048b920a7751318dde211e881f53b2bb Author: Vladimir Dergachev Date: Thu Mar 17 03:36:25 2005 +0000 Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_mergedfb.c Back out RadeonWaitForIdleMMIO that I put in earlier. From discussion on dri-devel we do not need to be as careful with INREG() access on Radeons as we are on mach64 chips. The fix is backed out due to: it breaks DRI on SMP systems (due to absense of the lock in mouse handling functions) I am no longer able to reproduce the lockup I saw before commit 01a9c1157cdfbc5f74b035383e060b8419979563 Author: Roland Scheidegger Date: Tue Mar 8 23:41:37 2005 +0000 Fix accidentally removed depth pitch adjustment if displayWidth is not a multiple of 32 pixels (bug #788) commit 9b994b40710103b263364153429ebdb9ea3f58ed Author: Vladimir Dergachev Date: Fri Mar 4 22:21:40 2005 +0000 programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c Let through all chips R300 and above - presumably the filtering should take place at the DRM driver level. Correct cut'n'paste position misprint. Big thanks for Michel Danzer for pointing out both improvements. commit 7d37a9f1f9fffe98067c3b5bc4749cc799fb0c77 Author: Vladimir Dergachev Date: Fri Mar 4 05:48:31 2005 +0000 programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c Turns out Radeon R420 chips work fine with R300 microcode. Thanks go to Rune Petersen for careful investigation. commit f1edbb7852d85f660188498f578a0a697c2094fe Author: Roland Scheidegger Date: Tue Feb 22 00:39:15 2005 +0000 Fix building radeon driver with BuildXF86DRI set to NO, the breakage was caused by the tiling support (bug #2481) commit b853dbb50fb7c46fb5a70f349a3f264f0bb94e8c Author: Vladimir Dergachev Date: Sat Feb 19 16:00:12 2005 +0000 Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c Fix an INREG without WaitForIdleMMIO. This one should be unlikely to trigger, but we should still do this in the name of correctness. commit 84290849b4aee336e9db0779d93fc2d7ed8881b1 Author: Vladimir Dergachev Date: Sat Feb 19 00:57:23 2005 +0000 Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_mergedfb.c Add a call to RADEONWaitForIdleMMIO() within RADEONChooseCursorCRTC() as this function uses OUTREGP() which, internally, calls INREG(). Thus (due to SilkenMouse) INREG() could be called while CP engine was busy. I have observed this lockup on RV350 + R300 3d driver and have no idea why no issues were reported for R200 cards. Perhaps, few of them have enough memory to run merged fb and 3d simultaneously ? This fix is the right thing to do, however, we might also need to put fifo management calls into other cursor handling functions (in particular those that write cursor image directly to video memory). commit 60070063e2130af0b9d5d34eed7adbae0c0fa67b Author: Michel Daenzer Date: Fri Feb 18 19:55:35 2005 +0000 Bug #2576: Add support for ATI RN50/ES1000. (ATI Technologies Inc.) commit 32032cdc78097840b7e2685fdec11bc0816aa0ac Author: Adam Jackson Date: Fri Feb 18 16:42:11 2005 +0000 Bug #2567: Fix reversed memset arguments. (David Krause) commit d5fadd6d86ae2a2f8c1bb55e36ab3d6d49649b46 Author: Roland Scheidegger Date: Wed Feb 9 02:22:39 2005 +0000 do not enable color tiling on r300 chips and newer, since it doesn't work (yet) (Bugzilla #2504) commit 5ff35300e66a81ecc17c4e9396eb6d158f5c8e1b Author: Roland Scheidegger Date: Wed Feb 2 21:35:30 2005 +0000 fix error with color tiling and hw scrolling, it looks like rv100 doesn't need the special treatment, after all (reported by Stephane Marchesin) commit 7a9031683914bb1d17d223634e5dbf2e18955651 Author: Roland Scheidegger Date: Mon Jan 31 20:10:28 2005 +0000 change option EnableColorTiling to ColorTiling commit a2b123f7672ea678290798786ecb408a86d8c683 Author: Roland Scheidegger Date: Wed Jan 26 18:23:41 2005 +0000 (Stephane Marchesin, me) Add support for color (framebuffer) tiling. Convert all XAA accel code to use explicit dst and src offset pitch control to make it work. Use the new drm surface ioctls to set up the tiled surfaces (if dri is enabled). commit e0df1e41724cd009fe7c833d2f9555f5d87e3202 Author: Roland Scheidegger Date: Wed Jan 26 17:39:56 2005 +0000 fix issues with mergedfb + pageflip (fix up sarea frame values) commit aeb01807263c47f49abaf00031d8505e8ebda82c Author: Egbert Eich Date: Mon Jan 24 15:40:21 2005 +0000 Don't exclude 'RADEONInfoPtr info = ...' declaration even when not building with DRI support (Bugzilla #2370) commit c6c30cfa354eb456638f10771a7cb02271696af2 Author: Vladimir Dergachev Date: Thu Jan 13 17:35:49 2005 +0000 Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c Some of the newer Radeons (R420 for example) have MM_TABLE's with size 0x33 (instead of 0x0c that we know). Furthermore, they lockup during access of I2C bus ! Add a check to validate MM_TABLE. Note: the check is not more stringent as other card manufacturers (like Asus or Tekram) might make cards with slightly different MM_TABLE. commit 414c035a965b9db15656058c0e9cfeb3acf0158f Author: Alex Deucher Date: Fri Dec 24 18:26:19 2004 +0000 - Fix MCLK / SCLK calculation (Benjamin Herrenschmidt) bug 2144 - formatting cleanup commit 7c7b278883676412f5709cf812587b1408628133 Author: Alex Deucher Date: Sun Dec 19 19:49:33 2004 +0000 - Add support for Dualhead on M3/M4 (bug 1760) commit 08a45118b53129f3b9c30004404b906c7d7690be Author: Alex Deucher Date: Sun Dec 19 19:29:10 2004 +0000 - Make dualhead ram allocation cleaner and related messages clearer commit 97cfd7b1489a9510cd233d6dc7154c210f32b9f5 Author: Alex Deucher Date: Sun Dec 19 06:56:37 2004 +0000 - Add DRI resume support (Micha Feigin) bug 2063 commit 5b8577ae3200d967b4316156f16028cbcfd21983 Author: Alex Deucher Date: Sun Dec 19 06:11:06 2004 +0000 - fix warnings (Ronny V. Vindenes) commit 447124a663a24a7fffb0cd241d18dd896a43098b Author: Alex Deucher Date: Sat Dec 18 21:37:48 2004 +0000 - fix warning and potential error in radeon_driver.c commit ac6166158a58b377e7383950c169956f78b62093 Author: Alex Deucher Date: Fri Dec 17 19:19:32 2004 +0000 - Add VGAAccess option to r128 driver. Based on Benh's radeon patch. r128 should now work on ppcs without usefbdev. To use this on ppc make sure you set "usefbdev" to false. (bug 2089) - Apply Benjamin Herrenschmidt's radeon patches (bug 2064) commit ac860ed6bbed84f6fc39a9acf53ee87646cfc8dc Author: Vladimir Dergachev Date: Fri Dec 17 16:50:36 2004 +0000 Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c Move DMA robustness fix into radeon_dri.c::RADEONEnterServer() as per suggestion by Michel Dänzer. I could not trigger a lockup, even with r300_demo (possibly it has code that flushes cache inside ?), so this must be good enough.. commit 3ba5b525c4d6390184fdf79b28c954d5caadc6a4 Author: Vladimir Dergachev Date: Thu Dec 16 16:26:56 2004 +0000 Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c Add DMA robustness fix from Nicolai Haehnle. TODO: move this fix into DRM driver or other parts of Xserver when R300 support is more stable. This fix affects only R300 and later variants and results in small slowdown when using CP acceleration in comparison to the previous version of the driver. We are still a lot faster in CP mode than using MMIO register access. commit c7b5f4a9eb49c0edd690c972be1015c98408ffaf Author: Adam Jackson Date: Wed Dec 15 19:35:33 2004 +0000 Bug #2008: Fix gcc4 compile problem. commit 8c1969f22fba2e1c9ed34d5ca77bee3a9f577640 Author: Vladimir Dergachev Date: Sun Dec 12 20:42:29 2004 +0000 Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_render.c programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c Make DMA blitting code more robust. commit 8a9077bc70fd800983f138a224b95301992a2296 Author: Vladimir Dergachev Date: Sun Dec 12 19:28:37 2004 +0000 Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c Enable DRM support permanently, allowing its use for any CHIP_FAMILY > R300. Fix bug in naming Mesa3d driver (it was defaulting to r200) commit 845df6dd96785b59c44c670009c4fcdb20e147ab Author: Alex Deucher Date: Sun Dec 12 17:29:45 2004 +0000 - missing diff from agp 8x support commit 36b92808e4ff1311f91543388c18cbe8e9eb4aab Author: Vladimir Dergachev Date: Sun Dec 12 16:05:35 2004 +0000 Modified: programs/Xserver/hw/xfree86/drivers/ati/radeon_accel.c programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.c programs/Xserver/hw/xfree86/drivers/ati/radeon_common.h programs/Xserver/hw/xfree86/drivers/ati/radeon_version.h Add R300 (and later) DRM support, protected by X_R300_DRM option. Note: at the moment this is for 2d support only, if enabled running glxgears locks up my machine, but DMAForXv=yes works fine. commit 68ea67ce98b8f3ad4c17f987e0e2b92f79a96fbf Author: Alex Deucher Date: Sun Dec 12 02:00:48 2004 +0000 - add AGP 8x support (Hui Yu, Michel Daenzer) bug 1819 commit 93675d288d5ebb35d4724ebbfc455a703e25a311 Author: Alex Deucher Date: Sun Dec 12 00:14:32 2004 +0000 - only mess with Dynamicclocks on mobility chips (Benh, me) bug 1912 - fix display detection (Hui Yu) bug 1559 - Add new option "BIOSHotkeys" to allow the bios to control output switching (off by default) bug 2000 - update the savage man page to document the "CrtOnly" option commit ed217003127028483fd2956851d438977169d154 Author: Daniel Stone Date: Mon Dec 6 13:27:56 2004 +0000 Apply Debian patch to re-POST via VBE if driver thinks it has no video memory (a symptom of incompletely coming up from D3 power state), which fixes some Dell laptops (closes: #1890). commit 2b8ab42b05b32710fa4f71a25e2f84192e637fbd Author: Michel Daenzer Date: Mon Dec 6 06:27:53 2004 +0000 When direct rendering is enabled, use hostdata blits to transfer data from system memory to video RAM, which should reduce CPU usage especially with larger videos. Can be disabled via Option "DMAForXv" if there should be any stability issues, but it's been stable for me during a week of testing. Based on a patch by Nikolaus Meine . Probably fix endianness issues in some newer XVideo code, untested. Also use hostdata blits to transfer RENDER image data to video RAM to avoid idling the accelerator engine. Increases RENDER performance significantly for me. These changes were only tested on an M9 in a Titanium PowerBook but should work with all Radeons where direct rendering is supported. commit 960d15ae3a44efe7c02a3d6d0acbabe63e07be74 Author: Daniel Stone Date: Sat Dec 4 22:34:54 2004 +0000 Disable interrupt handling after the DRM handler has been removed, preventing lockups (closes: #1886). Allow pitches with a granularity of 32, rather than 64, because some clamshell iBooks have 800-byte pitches. Change Xv allocation granularity to 8 bytes, rather than 16 bytes, also (closes: #1888). commit 4706dfb7804a46e3cc5aafc3644f5a1134ab3d19 Author: Daniel Stone Date: Sat Dec 4 22:24:06 2004 +0000 Retry CCE idle commands until the (higher) timeout is reached, and properly stop the engine if we totally fail -- gets rid of serious performance issues and lockups with r128 DRI. commit bce508a288d6b95708dbbfc6b235e2d95b6b96ad Author: Markus Kuhn Date: Sat Dec 4 00:42:59 2004 +0000 Encoding of numerous files changed to UTF-8 commit e9c9fd279ed43cc0d779266efcea69a67541c794 Author: Egbert Eich Date: Tue Nov 30 08:38:44 2004 +0000 Make Xorg the default server to install. Avoid PIO access on IA64. Some IA64 machine check if legacy ports outside the VGA range are accessed. The ATi driver however does this to probe for ISA Mach8/32/64. Since no IA64 has ISA slots this restriction should not be relevant to the user. Avoid recursive calls of xf86scanpci(). This function normally detects that it has been called before by checking if the PCI structure is filled out. So far if this was not the case (because PCI probing has failed for some reason) the function is traversed again. With the chipset specific PCI bus probing this can lead to an endless recursive loop as the post-probing code calls xf86scanpci() from within this function. The OS specific PCI code for Linux worked only if bus 0 was populated as it checked for the presence of /proc/bus/pci/00. Fixed to check for /proc/bus/pci/ instead. commit fffbcb761c178e025e3d55d428a803b1284481e0 Author: Matthieu Herrb Date: Sat Nov 27 15:14:15 2004 +0000 xc/programs/Xserver/hw/xfree86/driver/ati/radeon.man xc/programs/Xserver/hw/xfree86/driver/voodoo/voodo.man xc/programs/Xserver/hw/xfree86/driver/wsfb/wsfb.man XF86Config -> __xconfigfile__ commit ad6347d187f9afa053c755aa3a2da9d821916cb2 Author: Daniel Stone Date: Tue Nov 23 21:27:43 2004 +0000 Use fp_horz_stretch instead of fp_vert_stretch for horizontal stretch factor calculation in panel size derivation in the Radeon driver (closes: #1881). commit ac054e427c6ce8cd5b89459dd3f16ca20e6b2d6a Author: Vladimir Dergachev Date: Sun Oct 24 18:17:36 2004 +0000 Add registers to facilitate work with stereo 3d. commit 445ed4b9b61347c866ee67dc0cb110904d667b84 Author: Alex Deucher Date: Fri Oct 22 03:51:58 2004 +0000 - make the overlay work on crtc2 again - make PutVideo() MergedFB aware commit 54cffc3fe273cf3c9ed2a8aef833d4bd337a8a09 Author: Egbert Eich Date: Mon Oct 18 15:19:44 2004 +0000 Fixing one of the infamous 'control reaches end of non void function problems'. commit 7a97d363327e0b2c8646d961e00d05f99766b54f Author: Egbert Eich Date: Mon Oct 18 14:21:45 2004 +0000 Made handling of DevelDrivers for x86-64 more conformant to other platforms. Compress all font encodings (Stefan Dirsch). Fixed warnings. Turn on forwarding XNSpotLocation event to XIM server in OffTheSpot and Root mode (bugzilla #1580, James Su). Added another compose key combination for the Euro symbol (Stefan Dirsch). Added support for UTF-8 in ja_JP, ko_KR and zh_TW locales (Mike Fabian). Changed default encoding for ru from KOI8-R to ISO8859-5 (Mike Fabian). This is the encoding that is also used by glibc. We may break other libcs - lets see who complains. Added explanation for DESTDIR to install to a different directory than /. Added some early bailouts to atiprobe if PCI structure pointer is NULL to prevent sig11. XV support doesn't depend on 2D acceleration any more. This patch removes this limitation from the NSC driver. This is a patch that I have committed to XFree86 a while ago but never ported over to X.Org. Matthieu Herrb contributed some build fixes. Fixing SetDPMSTimers() so that DPMS*Time == 0 disables the appropriate timer. This takes advantage of the fact that TimerSet() with a timeout argument 0 behaves like TimerCanel(). Use /dev/xconsole (named pipe) or devpts for system logger (Werner Fink). Create missing links for backward compatibility to XFree86 (Stefan Dirsch). Changed comment to mention xorg. Changed cursor for the 'kill' action from XC_draped_box to XC_Pirate. If you don't like it we can change it back (original author unkown). Added 'pic' to the man page rendering command pipeline (Werner Fink). Added missing return value (Stefan Dirsch, Roland Mainz) commit c7ab340fecb94a89c25d6bc7f686b7c97cd3067f Author: Alex Deucher Date: Sun Oct 17 22:45:57 2004 +0000 - Fix DFP detection in r128 driver (bug 1386, Klaus Kusche) - Fix EmulateWheelInertia defaults (bug 1115, Andrew Pimlott) commit ace6e1b7933cb415b8efc41dffa335938f9c89b5 Author: Vladimir Dergachev Date: Sun Oct 17 17:57:33 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c On my Inspiron 8600 both internal and external ports are marked DAC_PRIMARY in BIOS. So be extra careful - only swap when the first port is not DAC_PRIMARY commit 22405e81b812c239b5d8653b402b5f846e6e10b1 Author: Alex Deucher Date: Sun Oct 17 16:52:02 2004 +0000 - Add Thomas' latest sis MergedFB enhancements to the radeon driver commit 186efa31b2cb7285717678bb1c4df4cd9e182395 Author: Vladimir Dergachev Date: Wed Oct 13 23:02:42 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c xc/programs/Xserver/hw/xfree86/drivers/i2c/fi1236.h Squash annoying warning about fi1236_dump_status commit 43b24861e36023613a99627c57ac44721ed1a548 Author: Egbert Eich Date: Tue Oct 12 19:13:43 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 515b7c4b748f70c17aee149a33ee1b41632daa1a Author: Alex Deucher Date: Mon Oct 11 23:20:26 2004 +0000 - fix resume on radeons (bug 1220) - clean up some old cruft in the savage i2c code commit 07e1aaee862c4835601c704e14fcb12e28f4e78e Author: Egbert Eich Date: Mon Oct 11 09:58:04 2004 +0000 Improving DPMS handling on VT swich and server termination/abort: previous version called the driver directly and too late. Unblank secondary screen explicitely. Don't rely on the value read during register save as the BIOS have blanked the secondary head. Checking if server isn't switched away before calling sync. Sanity check for possible bugs in aother areas of the code. Fixing default amount of of allocated video memory from AGP for i810: Use 16MB if less than 192MB are installed else use 24MB (Matthias Hopf). commit a8c77480e7f4ddf8c45bea3ecec7b6564c0d6452 Author: Vladimir Dergachev Date: Fri Oct 8 00:56:05 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c Remove redundant and incorrect line. commit ec831d4fba23dc5f4d0a1450aa63efe5ff5937a2 Author: Vladimir Dergachev Date: Tue Oct 5 01:16:01 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/theatre.h Patch from Matthieu Herrb - fix compilation with DoLoadableServer=NO commit f1dadde8f642b332a2dcd2e2a5779f25fec7a3de Author: Adam Jackson Date: Mon Oct 4 21:52:47 2004 +0000 Correct radeon man page, IGP is supported for 3D but R400 is not. commit e3dba9841521466629828501c4fdccbba3d6af89 Author: Vladimir Dergachev Date: Mon Oct 4 15:24:34 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c Do not probe for Rage Theatre if no multimedia table is present and no parameters have been specified. commit 4aadb784928ebbd60dce172c9a9a80e8d84e943f Author: Vladimir Dergachev Date: Mon Oct 4 14:53:11 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c This is really embarassing - I found a part of code that had at the end of the lines. I am certain I never saw it before - talk about code rot ! commit db5a27081d9d3ab4cc1481a7d110d11103b3de19 Author: Vladimir Dergachev Date: Sun Oct 3 23:54:40 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_mm_i2c.c Remove debugging statement that cause loading of DLL modules to fail. commit 37a8d8a53f12f829783011c1e077fefb5729e618 Author: Vladimir Dergachev Date: Sun Oct 3 14:41:45 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c Fix compilation with gcc 3.4.x (patch by Ronny V. Vindenes) commit 6dbcd503fe21c6dec27c2b97adc0f39ba0a7ab2a Author: Vladimir Dergachev Date: Sun Oct 3 03:07:17 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.[c,h] xc/programs/Xserver/hw/xfree86/drivers/ati/theatre.c xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h Port the rest of GATOS Radeon-specific code. Remove "checkpoint" noise from logs. Test with AIW Radeon 7500 commit 7cb911291d459f08f54444d09081d3378fe73b8b Author: Vladimir Dergachev Date: Sun Oct 3 00:01:14 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.[c,h] xc/programs/Xserver/hw/xfree86/drivers/ati/theatre.c Detect and initialize Rage Theatre (RT100) commit 6c1996174b9f7afc8f4e33c35e4864b31696d4d6 Author: Vladimir Dergachev Date: Sat Oct 2 20:55:42 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/Imakefile xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_reg.h xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.[c,h] xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_vip.c Add VIP bus access code, hook it into initialization system. commit 136649a1c2065624a9cf17386054c6595aa6d85e Author: Vladimir Dergachev Date: Sat Oct 2 20:35:04 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/theatre* xc/programs/Xserver/hw/xfree86/drivers/ati/generic_bus.h Add Rage Theatre (RT100) module code and hook it into the build system commit 7a17b1c294fa8c7af0b1cdea0618cb6060479356 Author: Vladimir Dergachev Date: Sat Oct 2 01:59:13 2004 +0000 Modified: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.c xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_video.h xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_mm_i2c.c Add code to access and initialize multimedia i2c bus. Hook it up. commit e0123e24b6895dde7b385528da24c4e6e9d5a4cb Author: Vladimir Dergachev Date: Sat Oct 2 01:36:43 2004 +0000 Add more multimedia registers. commit 576f53be4f0fa54bde7167872b7508b98e5c9454 Author: Vladimir Dergachev Date: Sat Oct 2 00:43:08 2004 +0000 xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c xc/programs/Xserver/hw/xfree86/drivers/ati/radeon.h Add TV-in specific options. Add TV-in specific fields to radeon per-screen structure, add code to initialize them. Preserve MM_TABLE (instead of whole VBIOS as was done in GATOS drivers) commit 9a9ba82172428b09312fdd6e11da04b21c8529fc Author: Adam Jackson Date: Wed Sep 22 04:38:03 2004 +0000 Bug #1252, #1253, #1255, #1256: Various typo fixes from Dave Jones. commit 700b0dc5148d0170c9223765d208ccef447242df Author: Adam Jackson Date: Tue Sep 21 18:10:34 2004 +0000 Convert the ATI drivers to ANSI function prototypes. commit 17e5f3c1169066be1004306d12b5398cf01cbd35 Author: Eric Anholt Date: Fri Sep 17 05:16:45 2004 +0000 Bugzilla #1170: Fix an overcounting of DMA in BEGIN_RING that wasn't harmful. Bugzilla #1169: Add counting for BEGIN_RING/OUT_RING/ADVANCE_RING to avoid these sorts of problems in the future. commit 29bbee6b8a8dd1b883e07547691ff8e1289459ce Author: Adam Jackson Date: Fri Sep 17 03:04:50 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 cec06d4126f5f31d14ace73798c71ec75e544c45 Author: Alex Deucher Date: Thu Sep 16 22:15:05 2004 +0000 Update comment commit dbeb8d28ac3469f4a7d7d8dae979ae876d4cdcba Author: Kevin E Martin Date: Fri Sep 3 23:26:19 2004 +0000 Updated release notes for bug #999. Update Radeon man page to note that RenderAccel is now enabled by default on certain chips. commit c829f667c8a79bbdd40e1f924d57638e7bd425dc Author: Michel Daenzer Date: Mon Aug 30 04:31:50 2004 +0000 Hotfix for Eric Anholt's fix for bug #1156 : Clear the RADEON_NONSURF_AP0_SWP_16BPP bit for 4 bpp data, otherwise it breaks at depth 16. commit 677246740b5b538e73a7fbde661ec6a97319430b Author: Adam Jackson Date: Fri Aug 27 20:31:26 2004 +0000 Back out my last change, dupe. commit a8eaa15264ff0db1596d653e91260c9a39a8b5ee Author: Adam Jackson Date: Fri Aug 27 18:32:40 2004 +0000 Bug #1061 (documentation-only update): Document the RenderAccel option in the radeon manpage. commit 360dab062f895c19e1784146e6684f75a20c5b24 Author: Eric Anholt Date: Fri Aug 27 03:36:28 2004 +0000 Bug #1156: Fix the build on PPC by splitting the byte-order-setting code into a separate routine. While here, fix the byte swapping in the 32bpp case. (Michel Daenzer) commit 9b19bbb4d37b79c97365aa492cd93931d492b3a8 Author: Eric Anholt Date: Fri Aug 27 03:23:47 2004 +0000 Bug #1157: Fix Radeon line acceleration in the DMA case (Michel Daenzer). commit 838488b6b46359334e5e781589dbee3832909628 Author: Kevin E Martin Date: Fri Aug 27 02:38:56 2004 +0000 Fix Radeon compilation without Xinerama (Bug #1179, Simon Schubert). commit 5f54d4f45e2adc6b15e98152db88743c243aa128 Author: Kevin E Martin Date: Wed Aug 25 00:30:41 2004 +0000 Fix hangs during startup with Radeon driver (Bug #1007, Sjoerd Simons). Fix i810 driver startup on Sony VAIO laptop (Bug #1084, Dave Airlie). Fix several library build problem (Bug #1147). Fix build problems (Bugs #1148 and #1149). commit dde880e876f455f1fd66efbcc055e177886397c9 Author: Eric Anholt Date: Tue Aug 17 20:22:55 2004 +0000 Reenable Radeon Render acceleration now that interactions with 3D clients should be resolved. commit 279efef503fdbd442a9bd00f0073d9f6006d9e61 Author: Eric Anholt Date: Sun Aug 15 00:44:57 2004 +0000 Fix unresolved symbol warnings in r128 driver (Adam Jackson) commit 955f2b89f94aaa20b5eafd045b01e3eeef3d29ad Author: Kevin E Martin Date: Thu Aug 12 05:00:22 2004 +0000 Fix context switching on Radeons and build problem when XF86DRI is not defined (Bug #922, Eric Anholt). commit 8f3ea53f26493a5f02410297a587d1d95c067094 Author: Adam Jackson Date: Thu Aug 12 02:23:46 2004 +0000 oops, these didn't added somehow. commit 6ec74414bd33e9d8dfd5119058d15f3a6206e9d9 Author: Adam Jackson Date: Thu Aug 12 01:03:06 2004 +0000 Factor out R{128,ADEON}Chipsets into their own headers so they can be sanely included in both the ati core and the r128/radeon submodules; r128 and radeon can now be directly loaded under dlloader. Teach imstt about the dlloader- frendly way to talk to fbdevhw. (Partial for bugs #393 and #400.) commit a5b1e4dd7adacd17b63582e477df3a585efb249a Author: Adam Jackson Date: Wed Aug 11 01:20:28 2004 +0000 Bug #978: Silence more unresolved symbol warnings from the ati driver. Patch from Stefan Dirsch. commit 1356884132491010a2e41eb2b5be4a227b9b8138 Author: Kevin E Martin Date: Wed Aug 11 01:14:14 2004 +0000 Fix Radeon build problem with #define DoLoadableServer NO commit f5c93cb015e334975c2797a23b68798372a284c9 Author: Adam Jackson Date: Tue Aug 10 04:01:42 2004 +0000 Bug #978: Silence unresolved symbol warnings from the ati driver. Reported by Michel Daenzer. commit a2da1caf5848a78b10afd99811fd1a5677af6786 Author: Kevin E Martin Date: Mon Aug 9 22:37:22 2004 +0000 Fix install problem on platforms not using xorg.cf/xfree86.cf (Bug #339, Harold L. Hunt II, Alexander Gottwald). Fix crash when using X core font in zh_CN.UTF-8 locale (Bug #368, Yu Shao, David Dawes). Fix glXMakeCurrent(Dpy, None, NULL) crash (Bug #719, Adam Jackson). HP-PA build fix (Bug #828, Guy Martin, Paul Anderson). Fix SDK build for GATOS and Wacom driver (Bug #829, Bryan Stine). Fix attempt to read video ROM before enabling it (Bug #843, Ivan Kokshaysky, Mike A. Harris). Fix detection of primary adapter (Bug #843, Ivan Kokshaysky, Mike A. Harris). Clarify xset man page description of how to use the keyboard repeat rate settings (Bug #846, Mike A. Harris). Fix problem where print-screen key would get remapped to sys-req in certain keymaps, which broke GNOME printscreen functionality (Bug #847, Owen Taylor). Fix several render problems: - MMIO mode support - Hang on IGP chips - VT switching hang - 3D render corruption (Bug #922, Hui Yu). commit 3171664c6a02424736864204b731249097fa7aae Author: Kevin E Martin Date: Fri Aug 6 20:07:35 2004 +0000 Disable Render acceleration in Radeon driver temporarily until it no longer conflicts with the 3D code. commit 27ef7adf3c1f6c3ca79b42b468d08b8542348cdd Author: Michel Daenzer Date: Wed Aug 4 13:17:31 2004 +0000 Use info->ModeReg.surface_cntl to restore byte swapping for the framebuffer aperture on big endian machines, remove superfluous local variables and register reads. Adapt framebuffer aperture byte swapping to texture format before copying data to offscreen area and restore it afterwards on big endian machines, fixes Render acceleration there. reviewed by: Hui Yu , Kevin E. Martin commit 2efdc9f847fa9ff3096667b16df84817fc65605d Author: Eric Anholt Date: Wed Aug 4 10:05:37 2004 +0000 - Add two new XAA hooks, SetupForCPUToScreenTexture2 and SetupForCPUToScreenAlphaTexture2. These add a dstFormat argument after the previous format argument, which the driver needs to use to properly set up the destination format. Two new arrays are added for the list of destination formats supported that correspond to the previous format arrays for sources. - Make Render acceleration only occur when the new hook for that acceleration type is supplied and the dst format list is set, along with the src format list being set. Without knowing the destination format, the Render acceleration couldn't properly support all the destinations it might encounter. - Bump XAA module minor version. - Update the Radeon Render acceleration to use the new hooks when the XAA module is sufficiently new. Fix a bug in the src/dst alpha booleans for ops, and use them to set blend_cntl to support destinations without alpha. Add missing PICT_a1r5g5b5 texture format, and add list terminator. (!) commit 1e16c66551eed750330bb74a92208c45a7112cd0 Author: Matthieu Herrb Date: Tue Aug 3 09:42:20 2004 +0000 programs/Xserver/hw/xfree86/drivers/ati/radeon_merged_fb.c Add missing argument to xf86DrvMsg(). commit fd440a1e2110e05d116207800c123c281fbf5e19 Author: Matthieu Herrb Date: Tue Aug 3 09:38:03 2004 +0000 programs/Xserver/hw/xfree86/drivers/ati/r128_driver.c programs/Xserver/hw/xfree86/drivers/ati/r128_probe.h programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c programs/Xserver/hw/xfree86/drivers/ati/radeon_probe.h Fix Constification problems. commit dd0f86c4cb046c79a65144f767e97fd99e7f61c9 Author: Kevin E Martin Date: Sun Aug 1 23:22:01 2004 +0000 Fix Radeon crash on server exit or generation commit c64f90b673f5c487dfe059f1636b04a1c2ab7dc2 Author: Adam Jackson Date: Sat Jul 31 01:21:18 2004 +0000 Change several LoaderSymbol calls introduced by the bug #400 patch to *Weak() resolver functions. commit b091b4b074cd61c9067ba95ef016f7a29a38c38d Author: Hui YU Date: Fri Jul 30 22:20:21 2004 +0000 Support for New radeon chips: R420/M18, R423, RV370/M22, RV380/M24, RS300. Add special handlings for DELL triple-head server (RV100). Misc. bug fixes for flat panel, host aperture, etc (Bug #946) commit d04f61bfaf6952e832d52e1cd6014e86435aebd9 Author: Adam Jackson Date: Fri Jul 30 20:30:51 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 6dcb78bb818c3c1c7fe406bee5379f9bef023f4b Author: Alex Deucher Date: Wed Jul 28 02:35:30 2004 +0000 - add gamma correction support to the radeon video overlay commit 26029dc9378bbd95835d397402bfc9e6b4f1a478 Author: Alex Deucher Date: Mon Jul 26 23:14:37 2004 +0000 - Add Radeon DynamicClocks option - Add small fixes and clean ups from ati's last code drop (typo_fixes, remove_fudge, laptop, xvfix) - fix possible segfault in mga_dri.c (Ryan Underwood) - Add Xv support to pre-nm2160 neomagic chipsets commit 9f251b16e702da486f824307e72a6f80c6987b5d Author: Adam Jackson Date: Mon Jul 26 19:14:58 2004 +0000 Bug #848: Clean up gatos notice messages. commit 6f1e01ecdb11913fd768b9918f516b8379b7858f Author: Eric Anholt Date: Fri Jul 23 05:36:14 2004 +0000 - Add a new option, BuildDevelDRIDrivers, which controls whether DevelDRIDrivers is non-empty. DevelDRIDrivers contains those drivers aren't built by default either due to being unusable on that architecture (but buildable for testing) or due to security concerns, as in the mach64 and savage cases. - Merge the Mach64 DDX's DRI support, under the XF86DRI_DEVEL define, which is set only when BuildDevelDRIDrivers is set. - Fix up of the sets of DRI drivers built for various architectures. - Fix build of unichrome DRI driver, which is now enabled on x86. commit b68322f467b7e524092af15e33ab872abb99b6a2 Author: Eric Anholt Date: Thu Jul 22 07:03:04 2004 +0000 Merge and resolve conflicts from DRI/DRM/Mesa 20040721 imports. commit 57de5e285d6271fc4b2bc8a951a98be6308d649d Author: Eric Anholt Date: Fri Jul 16 04:38:54 2004 +0000 Bugzilla #803,804: Fix build in the !XF86DRI case after DRI and Radeon Render acceleration merges. commit 9b0ec803bd588d9af778bfd307ee6d958e4a1e73 Author: Adam Jackson Date: Sat Jul 10 14:22:35 2004 +0000 Bugzilla #849: Fix DRI pagesize assumptions in radeon and r128 drivers. from mharris@, reviewed and applied to DRI by airlied@. commit ccd95bfb291a0c70272fab6822ef379b83dc298d Author: Egbert Eich Date: Tue Jul 6 14:37:47 2004 +0000 Separated Intel drivers from default DriDrivers to avoid building them on IA64 (Egbert Eich). Fixed wrong function prototype (Egbert Eich). Don't test for generic VGA on IA64 (Egbert Eich). Fixed a segfault when accessing a structure before verifying the pointer exists (Egbert Eich). Added a showcache option for debugging (Egbert Eich). Increase default video RAM size to 16MB when DRI is enabled and more than 128MB are available (Egbert Eich). Fixed lockups during mode switch. Problem was introduced when attempting to copy the behavior during LeaveVT()/EnterVT() but but forgetting to call I810DRILeave() before I810DRIEnter(). The entire DRILeave()/Enter() scenario has been commented out as it didn't seem to be necessary (Egbert Eich). Fix TweakMemorySize() (tested with i855/i865) (Egbert Eich). increased MAX_DEVICES to 128 (Egbert Eich). Use OS provided PCI config space access as default method (Egbert Eich). Added support for Linux 2.6 proc file format. Fixed unaligned accesses to pieces of the VBE info block. VESA did not align elements to size (Egbert Eich). commit 6bdf3d36ea3086432af5157540fde4e0aa0c44dc Author: Eric Anholt Date: Sun Jun 20 07:34:55 2004 +0000 Add file missed in last commit: Bug #748: - Add Render acceleration for Radeon 100 and 200-series cards, enabled by default. Notable performance gains include 27fps in cairogears instead of 6fps (compared to 50 with glitz), and my disks are now the bottleneck in an ls -lR in gnome-terminal. Only supported in DRI mode because the MMIO submission hangs the card so far, but the code is left in because it may be supportable soon. - Add xorg.conf options to disable Render acceleration and to force the subpixel order in the server (Hui Yu). Many thanks to Hui Yu at ATI for the code this was based off of, Michel Daenzer for bugfixes and suggestions, and LinuxFund for sponsoring the work. commit 8c1b37420ea890f76edb97aed61ee427a871cd3f Author: Eric Anholt Date: Sun Jun 20 07:26:08 2004 +0000 Bug #748: - Add Render acceleration for Radeon 100 and 200-series cards, enabled by default. Notable performance gains include 27fps in cairogears instead of 6fps (compared to 50 with glitz), and my disks are now the bottleneck in an ls -lR in gnome-terminal. Only supported in DRI mode because the MMIO submission hangs the card so far, but the code is left in because it may be supportable soon. - Add xorg.conf options to disable Render acceleration and to force the subpixel order in the server (Hui Yu). Many thanks to Hui Yu at ATI for the code this was based off of, Michel Daenzer for bugfixes and suggestions, and LinuxFund for sponsoring the work. commit 6ecf374d500afe6da494dfdd6566396ec65b6d6a Author: Eric Anholt Date: Wed Jun 16 09:43:59 2004 +0000 Merge DRI-trunk-20040613 changes in programs/Xserver/hw/xfree86/drivers, with the following notes: - Savage and Mach64 (= ati/ati*.[ch] changes) DRI not merged due to insecurity. - VIA driver converted to new drmContext and drmHandle names. - Radeon driver merge conflicted in many places, and MergedFB at least could probably use some checking at this point. commit bea8085e04136b0ef513c17bb65c54069ec531e1 Author: Eric Anholt Date: Wed Jun 16 09:25:58 2004 +0000 DRI trunk-20040613 import commit 7b588cda922992a8ee2d04853ba1533cf43592a3 Author: Eric Anholt Date: Wed Jun 16 09:25:58 2004 +0000 Initial revision commit 6cbb5bbff43d65a762d432659793333868837f0b Author: Eric Anholt Date: Wed Jun 16 09:22:56 2004 +0000 DRI XFree86-4_3_99_12-merge import commit 3586c3c7955365a2af0b8a286ea0d0488ddfd137 Author: Egbert Eich Date: Fri Apr 23 19:26:46 2004 +0000 Merging XORG-CURRENT into trunk commit 538768e0f472026325be9dd37dc4bfe7ea7d3b75 Author: Egbert Eich Date: Sun Mar 14 08:33:20 2004 +0000 Importing vendor version xf86-4_4_99_1 on Sun Mar 14 00:26:39 PST 2004 commit 5f179e796d1cd310790d06eebb474ad67114ec84 Author: Egbert Eich Date: Wed Mar 3 12:12:18 2004 +0000 Importing vendor version xf86-4_4_0 on Wed Mar 3 04:09:24 PST 2004 commit 493c44580191beff63575c4032f772fbbf1b06eb Author: Egbert Eich Date: Thu Feb 26 13:35:52 2004 +0000 readding XFree86's cvs IDs commit 942a47fd3c5e8df85642672c01072bf97285bc30 Author: Egbert Eich Date: Thu Feb 26 09:23:18 2004 +0000 Importing vendor version xf86-4_3_99_903 on Wed Feb 26 01:21:00 PST 2004 commit dda79b5ee3eb49f924a3213592d93ba981c99394 Author: Kaleb Keithley Date: Mon Feb 23 20:35:02 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 08104f18ac497561c969694ff709da6c361ccea7 Author: Egbert Eich Date: Thu Jan 29 08:08:34 2004 +0000 Importing vendor version xf86-012804-2330 on Thu Jan 29 00:06:33 PST 2004 commit 162d76b9c48ed17d6e645057db58c9f13436f25f Author: Kaleb Keithley Date: Fri Dec 19 20:55:06 2003 +0000 XFree86 4.3.99.902 (RC 2) commit 195772ec74f7a9b7d5bf294b3bc2c3b960e08a31 Author: Kaleb Keithley Date: Thu Dec 4 22:03:16 2003 +0000 XFree86 4.3.99.901 (RC 1) commit 73105e438e90f950249cb265ba99001d4db3dc60 Author: Kaleb Keithley Date: Tue Nov 25 19:28:36 2003 +0000 XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks commit 0a53864f9581196604d04fd28b4e94a9b0b73d18 Author: Kaleb Keithley Date: Tue Nov 25 19:28:36 2003 +0000 Initial revision commit c56aaef79028261e0a3be0c86ffd3f16b6bdd9ba Author: Kaleb Keithley Date: Fri Nov 14 16:48:55 2003 +0000 XFree86 4.3.0.1 commit d09f463a5d1ce73e0b65d5276fbcca393fa2da46 Author: Kaleb Keithley Date: Fri Nov 14 16:48:55 2003 +0000 Initial revision commit d9af6dc32652502d84ea8da5d57a5ab45429c4ad Author: Kaleb Keithley Date: Fri Nov 14 15:54:49 2003 +0000 R6.6 is the Xorg base-line xf86-video-ati-7.3.0/README0000664000175000017500000000131212177731114011777 00000000000000xf86-video-ati - ATI Radeon video driver for the Xorg X server All questions regarding this software should be directed at the Xorg mailing list: http://lists.freedesktop.org/mailman/listinfo/xorg Please submit bug reports to the Xorg bugzilla: https://bugs.freedesktop.org/enter_bug.cgi?product=xorg The master development code repository can be found at: git://anongit.freedesktop.org/git/xorg/driver/xf86-video-ati http://cgit.freedesktop.org/xorg/driver/xf86-video-ati For patch submission instructions, see: http://www.x.org/wiki/Development/Documentation/SubmittingPatches For more information on the git code manager, see: http://wiki.x.org/wiki/GitPage xf86-video-ati-7.3.0/configure.ac0000664000175000017500000001654412270502140013407 00000000000000# 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-ati], [7.3.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-video-ati]) AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR(.) # Initialize Automake AM_INIT_AUTOMAKE([foreign dist-bzip2]) AC_SYS_LARGEFILE AM_MAINTAINER_MODE # 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])]) XORG_MACROS_VERSION(1.8) XORG_DEFAULT_OPTIONS # Initialize libtool AC_DISABLE_STATIC AC_PROG_LIBTOOL # Checks for programs. AM_PROG_CC_C_O if test "x$GCC" = "xyes"; then CPPFLAGS="$CPPFLAGS -Wall" fi 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) # Checks for libraries. PKG_CHECK_MODULES(LIBDRM, [libdrm >= 2.4.46]) PKG_CHECK_MODULES(LIBDRM_RADEON, [libdrm_radeon]) # Obtain compiler/linker options for the driver dependencies PKG_CHECK_MODULES(XORG, [xorg-server >= 1.7 xproto fontsproto xf86driproto $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" ]) AC_ARG_ENABLE([udev], AS_HELP_STRING([--disable-udev], [Disable libudev support [default=auto]]), [enable_udev="$enableval"], [enable_udev=auto]) if test "x$enable_udev" != "xno"; then PKG_CHECK_MODULES(LIBUDEV, [libudev], [LIBUDEV=yes], [LIBUDEV=no]) if test "x$LIBUDEV" = xyes; then AC_DEFINE(HAVE_LIBUDEV, 1,[libudev support]) elif test "x$enable_udev" != "xauto"; then AC_MSG_ERROR([Building with udev requested but libudev not found]) fi fi AM_CONDITIONAL(LIBUDEV, test x$LIBUDEV = xyes) SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $XORG_CFLAGS" AC_MSG_CHECKING([whether to include GLAMOR support]) AC_ARG_ENABLE(glamor, AS_HELP_STRING([--disable-glamor], [Disable glamor, a new GL-based acceleration [default=enabled]]), [GLAMOR="$enableval"], [GLAMOR=yes]) AC_MSG_RESULT([$GLAMOR]) AM_CONDITIONAL(GLAMOR, test x$GLAMOR != xno) if test "x$GLAMOR" != "xno"; then PKG_CHECK_MODULES(LIBGLAMOR, [glamor >= 0.6.0]) PKG_CHECK_MODULES(LIBGLAMOR_EGL, [glamor-egl]) AC_DEFINE(USE_GLAMOR, 1, [Enable glamor acceleration]) fi AC_CHECK_HEADERS([list.h], [have_list_h="yes"], [have_list_h="no"], [#include #include "xorg-server.h"]) if test "x$have_list_h" = xyes; then AC_CHECK_DECL(xorg_list_init, [AC_DEFINE(HAVE_XORG_LIST, 1, [Have xorg_list API])], [], [#include #include "xorg-server.h" #include "list.h"]) fi CPPFLAGS="$SAVE_CPPFLAGS" PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0]) XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS" # Checks for headers/macros for byte swapping # Known variants: # bswap_16, bswap_32, bswap_64 (glibc) # __swap16, __swap32, __swap64 (OpenBSD) # bswap16, bswap32, bswap64 (other BSD's) # and a fallback to local macros if none of the above are found # if is found, assume it's the correct version AC_CHECK_HEADERS([byteswap.h]) # if is found, have to check which version AC_CHECK_HEADER([sys/endian.h], [HAVE_SYS_ENDIAN_H="yes"], [HAVE_SYS_ENDIAN_H="no"]) if test "x$HAVE_SYS_ENDIAN_H" = "xyes" ; then AC_MSG_CHECKING([for __swap16 variant of byteswapping macros]) AC_LINK_IFELSE([AC_LANG_PROGRAM([ #include #include ], [ int a = 1, b; b = __swap16(a); ]) ], [SYS_ENDIAN__SWAP='yes'], [SYS_ENDIAN__SWAP='no']) AC_MSG_RESULT([$SYS_ENDIAN__SWAP]) AC_MSG_CHECKING([for bswap16 variant of byteswapping macros]) AC_LINK_IFELSE([AC_LANG_PROGRAM([ #include #include ], [ int a = 1, b; b = bswap16(a); ]) ], [SYS_ENDIAN_BSWAP='yes'], [SYS_ENDIAN_BSWAP='no']) AC_MSG_RESULT([$SYS_ENDIAN_BSWAP]) if test "$SYS_ENDIAN_BSWAP" = "yes" ; then USE_SYS_ENDIAN_H=yes BSWAP=bswap else if test "$SYS_ENDIAN__SWAP" = "yes" ; then USE_SYS_ENDIAN_H=yes BSWAP=__swap else USE_SYS_ENDIAN_H=no fi fi if test "$USE_SYS_ENDIAN_H" = "yes" ; then AC_DEFINE([USE_SYS_ENDIAN_H], 1, [Define to use byteswap macros from ]) AC_DEFINE_UNQUOTED([bswap_16], ${BSWAP}16, [Define to 16-bit byteswap macro]) AC_DEFINE_UNQUOTED([bswap_32], ${BSWAP}32, [Define to 32-bit byteswap macro]) AC_DEFINE_UNQUOTED([bswap_64], ${BSWAP}64, [Define to 64-bit byteswap macro]) fi fi AC_SUBST([moduledir]) DRIVER_NAME=ati AC_SUBST([DRIVER_NAME]) AC_MSG_NOTICE( [The atimisc sub-driver has been split out to xf86-video-mach64:] [ git://anongit.freedesktop.org/git/xorg/driver/xf86-video-mach64] [Please install that driver as well for mach64-based cards.] ) AC_MSG_NOTICE( [The r128 sub-driver has been split out to xf86-video-r128:] [ git://anongit.freedesktop.org/git/xorg/driver/xf86-video-r128] [Please install that driver as well for rage128-based cards.] ) 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-ati" echo "" xf86-video-ati-7.3.0/ltmain.sh0000644000175000017500000105152212177036367012756 00000000000000 # libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010, 2011 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --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 # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed 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) # $progname: (GNU libtool) 2.4.2 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION=2.4.2 TIMESTAMP="" package_revision=1.3337 # 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 # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # 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" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: 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. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # 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" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname 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). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # 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. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # 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 "$removedotparts" -e "$collapseslashes" -e "$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 "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$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_normal_abspath_result=$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_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { 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 "x$func_relative_path_tlibdir" = x ; 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 "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. 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 # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to 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 '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && 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_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_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 "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and 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_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent 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 () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent 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 () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi 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 () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # 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. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" 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= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "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 "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; 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 } # 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 ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-warning|--no-warn) opt_warning=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # 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 if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; 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." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # 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 \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # 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 "$lalib_p" = yes } # 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 () { func_lalib_p "$1" } # 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 () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" 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 () { $opt_debug 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 () { $opt_debug 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 "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; 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 "$lt_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 () { $opt_debug # 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 () { $opt_debug 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 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug $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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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 () { $opt_debug 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_mode_compile arg... func_mode_compile () { $opt_debug # 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 "$build_libtool_libs" != yes && \ func_fatal_configuration "can not 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_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_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 "$build_old_libs" = yes; 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 "$pic_mode" = no && test "$deplibs_check_method" != pass_all; 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 "$compiler_c_o" = no; 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 "$need_locks" = yes; 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 "$need_locks" = warn; 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_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; 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 "$need_locks" = warn && 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 "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; 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 "$need_locks" = warn && 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 "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && 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 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 -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 -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 () { $opt_debug # 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 test "X$opt_dry_run" = Xfalse; then 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" else # 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 fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug 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_silent && 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 "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_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_for_eval "$arg" func_append install_prog "$func_quote_for_eval_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=no 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=yes ;; -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$prev" = x-m && 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_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_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_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_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=yes if test "$isdir" = yes; 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 ;; 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 "$build_old_libs" = yes; 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=yes 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'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; 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_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_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 "$opt_mode" = install && 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 () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; 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$TIMESTAMP) $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 con'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 /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; 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 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[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," 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" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; 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"' # 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_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 () { $opt_debug 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 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 } }'` 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 () { $opt_debug 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 () { $opt_debug 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 which possess that section. Heuristic: eliminate # all those which 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_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 () { $opt_debug 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 () { $opt_debug 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_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 () { $opt_debug 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 () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; 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 "$lock_old_archive_extraction" = yes; 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 () { $opt_debug 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` darwin_base_archive=`basename "$darwin_archive"` 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 "$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 in which 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$TIMESTAMP) $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\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $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/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which 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$TIMESTAMP) $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 "$fast_install" = yes; 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 "$shlibpath_overrides_runpath" = yes && 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 /* 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 platforms) ... */ #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 # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #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 ((void *) 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]; int 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 = 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 (strcmp (str, pat) == 0) *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 int 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) { int orig_value_len = strlen (orig_value); int 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 #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\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 () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug 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 # which 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 which 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= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no 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 "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && 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_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_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) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; 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 ;; 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 "$pic_object" = none && test "$non_pic_object" = none; 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 "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; 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 "$prev" = dlprefiles; 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 "$non_pic_object" != none; 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 "$pic_object" = none ; 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 ;; 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 "$prev" = rpath; 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 ;; 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$arg" = "X-export-symbols"; 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$arg" = "X-lc" || test "X$arg" = "X-lm"; 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$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && 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$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" 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 ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-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 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 ;; -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_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_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_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_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 # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -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*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_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 "$pic_object" = none && test "$non_pic_object" = none; 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 "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; 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 "$prev" = dlprefiles; 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 "$non_pic_object" != none; 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 "$pic_object" = none ; 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 "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; 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_for_eval "$arg" arg="$func_quote_for_eval_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 "$export_dynamic" = yes && 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\" 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 "$linkmode" = lib; 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=no 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 "$linkmode,$pass" = "lib,link"; 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 "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; 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 "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; 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 "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # 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 "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; 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=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; 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 "$pass" = conv && 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 "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; 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 "$pass" = link; 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 "$pass" = conv; 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=no 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=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then 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." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; 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=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # 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 "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; 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 "$linkmode" != prog && test "$linkmode" != lib; 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 "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; 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 "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; 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 "X$installed" = Xyes; 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 "X$hardcode_automatic" = Xyes && 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 "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; 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 "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; 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 "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes 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 test "$linkalldeplibs" = yes; 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 "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || 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 test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && 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 "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; 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 "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; 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 "$linkmode" = lib && test "$hardcode_into_libs" = yes; 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*) 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 "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; 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 can not # 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 "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; 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 "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; 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 "$linkmode" = prog; 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 "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; 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 "$linkmode" = prog; 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 "$linkmode" = prog; 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 "$hardcode_direct" != unsupported; 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 "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; 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 can not 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 "$module" = yes; 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 "$build_old_libs" = no; 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 "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; 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 "$link_static" = no && 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 "$link_all_deplibs" != no; 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 "$pass" = link; then if test "$linkmode" = "prog"; 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 "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # 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= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_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 # 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 "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; 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 "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; 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 "$deplibs_check_method" != pass_all; 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 "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; 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 # which has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|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" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; 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 "$loop" -ne 0; 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 "$loop" -ne 0; 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" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. 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 "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; 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 "X$precious_files_regex" != "X"; 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 "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; 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 "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; 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 "$build_libtool_libs" = yes; 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*) # 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 "$build_libtool_need_lc" = "yes"; 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 "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; 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 "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; 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 "X$deplibs_check_method" = "Xnone"; 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 "$droppeddeps" = yes; then if test "$module" = yes; 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 "$build_old_libs" = no; 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 "$allow_undefined" = no; 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 "$build_old_libs" = no; 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 "$build_libtool_libs" = yes; then # Remove ${wl} instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && 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 "$opt_mode" != relink && 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 if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # 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 fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || 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 "$try_normal_branch" = yes \ && { 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 "X$skipped_export" != "X:"; 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 "X$skipped_export" != "X:" && 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 "$compiler_needs_object" = yes && 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 "$thread_safe" = yes && 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 "$opt_mode" = relink; 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 "$module" = yes && 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 "X$skipped_export" != "X:" && 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 "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; 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 "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; 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 "X$objlist" = X || 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 "$k" -eq 1 ; 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 if ${skipped_export-false}; then 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 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_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; 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 if ${skipped_export-false}; then 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 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 "$module" = yes && 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="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; 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 "$opt_mode" = relink; 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 "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; 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= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` 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 "$build_libtool_libs" != yes && 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" ### testsuite: skip nested quoting test 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 if test "$build_libtool_libs" != yes; then 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 fi if test -n "$pic_flag" || test "$pic_mode" != default; 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" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ 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 "$tagname" = CXX ; 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 "$build_old_libs" = yes; 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@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # 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 fi 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 "$no_install" = yes; 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 if test "$hardcode_action" = relink; then # 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" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # 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_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` 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 if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi 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 "$build_libtool_libs" = yes; 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 "X$oldobjs" = "X" ; 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 "$build_old_libs" = yes && 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_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; 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 "x$bindir" != x ; 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$TIMESTAMP) $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 can not 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 "$installed" = no && test "$need_relink" = yes; 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 } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= 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=yes ;; -*) 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 "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; 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 test "$rmforce" = yes; 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" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || 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 "$pic_object" != none; 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 "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; 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 "$fast_install" = yes && 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 } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} 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 # in which 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: # vi:sw=2 xf86-video-ati-7.3.0/depcomp0000755000175000017500000004271311120403101012457 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2007-03-29.01 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 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, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # 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 outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac 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" # 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 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 -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## 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). ## - 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 -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## 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. tr ' ' ' ' < "$tmpdepfile" | ## 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. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -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 -eq 0; then : else 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 ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; 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. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` 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 -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else 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. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` 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 -eq 0; then : else 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,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile" else echo "#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. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # 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.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #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 $1 != '--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:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. 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 $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac 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. -*|$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" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. 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 $1 != '--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, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: xf86-video-ati-7.3.0/Makefile.am0000664000175000017500000000242012177731114013154 00000000000000# 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. SUBDIRS = src man MAINTAINERCLEANFILES = ChangeLog INSTALL .PHONY: ChangeLog INSTALL INSTALL: $(INSTALL_CMD) ChangeLog: $(CHANGELOG_CMD) EXTRA_DIST = ChangeLog INSTALL xf86-video-ati-7.3.0/config.guess0000755000175000017500000012753411120403074013440 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2008-01-23' # 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 2 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, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # 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 Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -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 (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 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 trap 'exit 1' 1 2 15 # 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. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { 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) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; 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 ; set_cc_for_build= ;' # 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) >/dev/null 2>&1 ; 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 # 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 tupples: *-*-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". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-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. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null 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 # 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/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) 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. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; 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. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; 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'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; 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) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # 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:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $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; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include 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 echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) 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 [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 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 [ -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 [ "${HP_ARCH}" = "" ]; then eval $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 [ ${HP_ARCH} = "hppa2.0w" ] then eval $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 __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $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; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; 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*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; 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:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; 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/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 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/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` 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 ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; 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. echo i386-sequent-sysv4 exit ;; 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. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; 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 echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; 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 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; 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 i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; 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; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *: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 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif 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 (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #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 printf ("vax-dec-ultrix\n"); exit (0); # 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; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp 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` /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 exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: