aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--X11/ChangeLog52
-rw-r--r--X11/Makefile.in362
-rw-r--r--X11/Xfuncproto.h.in9
-rw-r--r--X11/Xmd.h81
-rw-r--r--X11/Xproto.h13
-rw-r--r--X11/aclocal.m4707
-rwxr-xr-xX11/compile347
-rw-r--r--X11/config.guess196
-rw-r--r--X11/config.sub117
-rw-r--r--X11/configure558
-rw-r--r--X11/configure.ac5
-rw-r--r--X11/install-sh14
-rw-r--r--X11/keysymdef.h6
-rw-r--r--X11/missing461
-rwxr-xr-x[-rw-r--r--]X11/xtrans/Xtrans.c7
-rw-r--r--X11/xtrans/xtrans.pc.in2
-rw-r--r--fontconfig/configure.ac4
-rw-r--r--fontconfig/doc/Makefile.am1
-rw-r--r--fontconfig/doc/fcpattern.fncs27
-rw-r--r--fontconfig/doc/fcrange.fncs64
-rw-r--r--fontconfig/doc/fontconfig-devel.sgml7
-rw-r--r--fontconfig/fontconfig/fcprivate.h3
-rw-r--r--fontconfig/fontconfig/fontconfig.h28
-rw-r--r--fontconfig/src/Makefile.am1
-rw-r--r--fontconfig/src/fccfg.c48
-rw-r--r--fontconfig/src/fcdbg.c13
-rw-r--r--fontconfig/src/fcdefault.c47
-rw-r--r--fontconfig/src/fcfreetype.c35
-rw-r--r--fontconfig/src/fcint.h85
-rw-r--r--fontconfig/src/fclist.c2
-rw-r--r--fontconfig/src/fcmatch.c45
-rw-r--r--fontconfig/src/fcname.c49
-rw-r--r--fontconfig/src/fcobjs.h2
-rw-r--r--fontconfig/src/fcpat.c73
-rw-r--r--fontconfig/src/fcrange.c207
-rw-r--r--fontconfig/src/fcxml.c108
-rw-r--r--libXfont/ChangeLog126
-rw-r--r--libXfont/Makefile.am6
-rw-r--r--libXfont/aclocal.m495
-rw-r--r--libXfont/config.h.in38
-rw-r--r--libXfont/configure1806
-rw-r--r--libXfont/configure.ac7
-rw-r--r--libXfont/src/FreeType/ftfuncs.c17
-rw-r--r--libXfont/src/FreeType/xttcap.c61
-rw-r--r--libXfont/src/FreeType/xttcap.h13
-rw-r--r--libXfont/src/Makefile.am6
-rw-r--r--libXfont/src/bitmap/bdfread.c16
-rw-r--r--libXfont/src/builtins/buildfont2
-rw-r--r--libXfont/src/fontfile/fontdir.c10
-rw-r--r--libXfont/src/util/atom.c20
-rw-r--r--libXfont/src/util/miscutil.c2
-rw-r--r--mesalib/SConstruct7
-rw-r--r--mesalib/configure.ac2
-rw-r--r--mesalib/docs/README.WIN3216
-rw-r--r--mesalib/docs/install.html4
-rw-r--r--mesalib/m4/ax_python_module.m449
-rw-r--r--mesalib/src/glsl/glsl_parser.yy1
-rwxr-xr-xmesalib/src/glsl/glsl_symbol_table.cpp25
-rw-r--r--mesalib/src/glsl/glsl_symbol_table.h2
-rw-r--r--mesalib/src/glsl/ir.h36
-rw-r--r--mesalib/src/glsl/ir_clone.cpp10
-rwxr-xr-xmesalib/src/glsl/ir_constant_expression.cpp205
-rw-r--r--mesalib/src/mapi/glapi/gen/glX_XML.py55
-rw-r--r--mesalib/src/mapi/glapi/gen/glX_doc.py280
-rw-r--r--mesalib/src/mapi/glapi/gen/glX_proto_common.py13
-rw-r--r--mesalib/src/mapi/glapi/gen/gl_XML.py217
-rw-r--r--mesalib/src/mesa/drivers/common/meta.c33
-rw-r--r--mesalib/src/mesa/drivers/common/meta.h2
-rw-r--r--mesalib/src/mesa/main/api_validate.c15
-rw-r--r--mesalib/src/mesa/main/context.c16
-rw-r--r--mesalib/src/mesa/main/fbobject.c94
-rw-r--r--mesalib/src/mesa/main/ff_fragment_shader.cpp8
-rw-r--r--mesalib/src/mesa/main/format_pack.c714
-rw-r--r--mesalib/src/mesa/main/format_unpack.c470
-rw-r--r--mesalib/src/mesa/main/formats.c20
-rw-r--r--mesalib/src/mesa/main/get.c21
-rw-r--r--mesalib/src/mesa/main/get_hash_params.py3
-rw-r--r--mesalib/src/mesa/main/mtypes.h27
-rw-r--r--mesalib/src/mesa/main/pipelineobj.c396
-rw-r--r--mesalib/src/mesa/main/pipelineobj.h3
-rw-r--r--mesalib/src/mesa/main/shaderapi.c144
-rw-r--r--mesalib/src/mesa/main/shaderapi.h3
-rw-r--r--mesalib/src/mesa/main/state.c14
-rw-r--r--mesalib/src/mesa/main/texstate.c6
-rw-r--r--mesalib/src/mesa/main/transformfeedback.c4
-rw-r--r--mesalib/src/mesa/main/uniform_query.cpp81
-rw-r--r--mesalib/src/mesa/main/uniforms.c66
-rw-r--r--mesalib/src/mesa/main/uniforms.h2
-rw-r--r--mesalib/src/mesa/main/varray.c7
-rw-r--r--mesalib/src/mesa/program/ir_to_mesa.cpp6
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_clip.c2
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_constbuf.c6
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_texture.c216
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_drawpixels.c2
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_queryobj.c18
-rw-r--r--mesalib/src/mesa/state_tracker/st_context.c17
-rw-r--r--mesalib/src/mesa/state_tracker/st_draw.c2
-rw-r--r--mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp2
-rw-r--r--mesalib/src/mesa/state_tracker/st_program.c2
-rw-r--r--mesalib/src/mesa/state_tracker/st_texture.c7
-rw-r--r--mesalib/src/mesa/state_tracker/st_texture.h4
-rw-r--r--mesalib/src/mesa/swrast/s_fragprog.c2
-rw-r--r--packages.txt4
-rw-r--r--xorg-server/dix/gc.c8
-rw-r--r--xorg-server/fb/fbblt.c60
-rw-r--r--xorg-server/glamor/Makefile.am5
-rw-r--r--xorg-server/glamor/glamor.c32
-rw-r--r--xorg-server/glamor/glamor.h7
-rw-r--r--xorg-server/glamor/glamor_core.c45
-rw-r--r--xorg-server/glamor/glamor_fbo.c3
-rw-r--r--xorg-server/glamor/glamor_fill.c3
-rw-r--r--xorg-server/glamor/glamor_glyphs.c2
-rw-r--r--xorg-server/glamor/glamor_gradient.c60
-rw-r--r--xorg-server/glamor/glamor_largepixmap.c10
-rw-r--r--xorg-server/glamor/glamor_pixmap.c14
-rw-r--r--xorg-server/glamor/glamor_points.c129
-rw-r--r--xorg-server/glamor/glamor_polyops.c82
-rw-r--r--xorg-server/glamor/glamor_priv.h65
-rw-r--r--xorg-server/glamor/glamor_program.c394
-rw-r--r--xorg-server/glamor/glamor_program.h94
-rw-r--r--xorg-server/glamor/glamor_render.c29
-rw-r--r--xorg-server/glamor/glamor_segment.c39
-rw-r--r--xorg-server/glamor/glamor_transform.c215
-rw-r--r--xorg-server/glamor/glamor_transform.h87
-rw-r--r--xorg-server/glamor/glamor_trapezoid.c6
-rw-r--r--xorg-server/glamor/glamor_vbo.c6
-rw-r--r--xorg-server/hw/dmx/dmxinit.c4
-rw-r--r--xorg-server/hw/kdrive/ephyr/Makefile.am2
-rw-r--r--xorg-server/hw/kdrive/ephyr/ephyrinit.c5
-rwxr-xr-xxorg-server/hw/kdrive/ephyr/hostx.c10
-rw-r--r--xorg-server/hw/kdrive/src/kxv.c27
-rw-r--r--xorg-server/hw/kdrive/src/kxv.h36
-rw-r--r--xorg-server/hw/vfb/InitOutput.c5
-rw-r--r--xorg-server/hw/xfree86/Makefile.am2
-rw-r--r--xorg-server/hw/xfree86/common/xf86Extensions.c5
-rw-r--r--xorg-server/hw/xfree86/dixmods/glxmodule.c8
-rw-r--r--xorg-server/hw/xfree86/doc/ddxDesign.xml4
-rw-r--r--xorg-server/hw/xquartz/quartz.c5
-rw-r--r--xorg-server/hw/xwin/InitOutput.c5
-rw-r--r--xorg-server/include/extension.h3
-rw-r--r--xorg-server/include/opaque.h1
-rw-r--r--xorg-server/include/os.h6
-rw-r--r--xorg-server/include/xkbsrv.h3
-rw-r--r--xorg-server/mi/mibitblt.c2
-rw-r--r--xorg-server/mi/miinitext.c46
-rw-r--r--xorg-server/os/connection.c41
-rw-r--r--xorg-server/os/utils.c4
-rw-r--r--xorg-server/test/Makefile.am1
-rw-r--r--xorg-server/xkb/xkbUtils.c6
149 files changed, 6893 insertions, 4105 deletions
diff --git a/X11/ChangeLog b/X11/ChangeLog
index bfbeb8931..c0568e139 100644
--- a/X11/ChangeLog
+++ b/X11/ChangeLog
@@ -1,3 +1,55 @@
+commit a7fa86998c873ce7463d169b4bd423898ca2bae1
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Nov 22 22:14:24 2013 -0800
+
+ xproto 7.0.25
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit a8aa17cb63493b4b756587ddc884a9055dba14da
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Sat Oct 26 09:42:05 2013 -0400
+
+ config: replace deprecated use of AC_OUTPUT with AC_CONFIG_FILES
+
+ Fix Automake warning: AC_OUTPUT should be used without arguments.
+ www.gnu.org/software/autoconf/manual/autoconf.html#Configuration-Files
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit ed5a86761d96d4bdebda4f09071a49cbf4688d1b
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Mar 1 20:05:12 2013 -0800
+
+ Remove WORD64, MUSTCOPY, and other CRAY leftovers
+
+ Leaves behind several no-op macros for compatibility with existing
+ code that uses them.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 6d4acb0e3a6568a8faaa651d4e3d32f917b9067b
+Author: Benno Schulenberg <bensberg@justemail.net>
+Date: Sat Aug 31 17:00:34 2013 +0200
+
+ Additional dead keysyms to complete the German DIN T3 keyboard layout.
+
+ Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
+ Signed-off-by: James Cloos <cloos@jhcloos.com>
+
+commit 043ed78ce03febd113615f5920bc9dffaf7f0b16
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Apr 19 14:45:28 2013 -0700
+
+ Add _X_COLD attribute for branch prediction hints
+
+ Unfortunately the Solaris Studio equivalent is a pragma taking the
+ function names as arguments, so doesn't translate cleanly into a
+ common macro form.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
commit d103af8068fb90494cbd6e1ff950850369bbf95f
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Mar 29 16:20:49 2013 -0700
diff --git a/X11/Makefile.in b/X11/Makefile.in
index 984d26448..6de714cf7 100644
--- a/X11/Makefile.in
+++ b/X11/Makefile.in
@@ -1,9 +1,8 @@
-# Makefile.in generated by automake 1.11.2 from Makefile.am.
+# Makefile.in generated by automake 1.14 from Makefile.am.
# @configure_input@
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
-# Foundation, Inc.
+# 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.
@@ -17,6 +16,51 @@
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@
@@ -36,12 +80,12 @@ POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
subdir = .
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(srcdir)/Xfuncproto.h.in \
- $(srcdir)/Xpoll.h.in $(srcdir)/do-not-use-config.h.in \
- $(srcdir)/xproto.pc.in $(top_srcdir)/configure \
- $(xproto_HEADERS) AUTHORS COPYING ChangeLog INSTALL \
- config.guess config.sub install-sh missing
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+ $(top_srcdir)/configure $(am__configure_deps) \
+ $(srcdir)/do-not-use-config.h.in $(srcdir)/Xfuncproto.h.in \
+ $(srcdir)/Xpoll.h.in $(srcdir)/xproto.pc.in $(xproto_HEADERS) \
+ AUTHORS COPYING ChangeLog INSTALL README compile config.guess \
+ config.sub install-sh missing
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
@@ -52,21 +96,33 @@ mkinstalldirs = $(install_sh) -d
CONFIG_HEADER = do-not-use-config.h Xfuncproto.h
CONFIG_CLEAN_FILES = Xpoll.h xproto.pc
CONFIG_CLEAN_VPATH_FILES =
-AM_V_GEN = $(am__v_GEN_$(V))
-am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
-am__v_GEN_0 = @echo " GEN " $@;
-AM_V_at = $(am__v_at_$(V))
-am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+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 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 uninstall-recursive
+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
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -100,19 +156,44 @@ DATA = $(pkgconfig_DATA)
HEADERS = $(nodist_xproto_HEADERS) $(xproto_HEADERS)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
-AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
- $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
- distdir dist dist-all distcheck
+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)do-not-use-config.h.in Xfuncproto.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 = \
- { test ! -d "$(distdir)" \
- || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
- && rm -fr "$(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,'; \
@@ -140,6 +221,7 @@ am__relativize = \
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$$'
@@ -342,8 +424,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
do-not-use-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
+ @test -f $@ || rm -f stamp-h1
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
stamp-h1: $(srcdir)/do-not-use-config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
@@ -354,8 +436,8 @@ $(srcdir)/do-not-use-config.h.in: $(am__configure_deps)
touch $@
Xfuncproto.h: stamp-h2
- @if test ! -f $@; then rm -f stamp-h2; else :; fi
- @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h2; else :; fi
+ @test -f $@ || rm -f stamp-h2
+ @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h2
stamp-h2: $(srcdir)/Xfuncproto.h.in $(top_builddir)/config.status
@rm -f stamp-h2
@@ -369,8 +451,11 @@ xproto.pc: $(top_builddir)/config.status $(srcdir)/xproto.pc.in
cd $(top_builddir) && $(SHELL) ./config.status $@
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
- test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@@ -387,8 +472,11 @@ uninstall-pkgconfigDATA:
dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
install-nodist_xprotoHEADERS: $(nodist_xproto_HEADERS)
@$(NORMAL_INSTALL)
- test -z "$(xprotodir)" || $(MKDIR_P) "$(DESTDIR)$(xprotodir)"
@list='$(nodist_xproto_HEADERS)'; test -n "$(xprotodir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(xprotodir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(xprotodir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@@ -405,8 +493,11 @@ uninstall-nodist_xprotoHEADERS:
dir='$(DESTDIR)$(xprotodir)'; $(am__uninstall_files_from_dir)
install-xprotoHEADERS: $(xproto_HEADERS)
@$(NORMAL_INSTALL)
- test -z "$(xprotodir)" || $(MKDIR_P) "$(DESTDIR)$(xprotodir)"
@list='$(xproto_HEADERS)'; test -n "$(xprotodir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(xprotodir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(xprotodir)" || exit 1; \
+ fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
@@ -423,22 +514,25 @@ uninstall-xprotoHEADERS:
dir='$(DESTDIR)$(xprotodir)'; $(am__uninstall_files_from_dir)
# 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.
-$(RECURSIVE_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
+# 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//`; \
- list='$(SUBDIRS)'; for subdir in $$list; do \
+ 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; \
@@ -453,57 +547,12 @@ $(RECURSIVE_TARGETS):
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
-$(RECURSIVE_CLEAN_TARGETS):
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- dot_seen=no; \
- case "$@" in \
- distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
- *) list='$(SUBDIRS)' ;; \
- esac; \
- rev=''; for subdir in $$list; do \
- if test "$$subdir" = "."; then :; else \
- rev="$$subdir $$rev"; \
- fi; \
- done; \
- rev="$$rev ."; \
- target=`echo $@ | sed s/-recursive//`; \
- for subdir in $$rev; do \
- echo "Making $$target in $$subdir"; \
- if test "$$subdir" = "."; then \
- local_target="$$target-am"; \
- else \
- local_target="$$target"; \
- fi; \
- ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
- || eval $$failcom; \
- done && test -z "$$fail"
-tags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
- done
-ctags-recursive:
- list='$(SUBDIRS)'; for subdir in $$list; do \
- test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
- done
+ID: $(am__tagged_files)
+ $(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) do-not-use-config.h.in Xfuncproto.h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
@@ -519,12 +568,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) do-not-use-config.h.in Xfuncproto.h.i
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
- list='$(SOURCES) $(HEADERS) do-not-use-config.h.in Xfuncproto.h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(am__define_uniq_tagged_files); \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
@@ -536,15 +580,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) do-not-use-config.h.in Xfuncproto.h.i
$$unique; \
fi; \
fi
-ctags: CTAGS
-CTAGS: ctags-recursive $(HEADERS) $(SOURCES) do-not-use-config.h.in Xfuncproto.h.in $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- list='$(SOURCES) $(HEADERS) do-not-use-config.h.in Xfuncproto.h.in $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+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
@@ -553,9 +593,31 @@ 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)
@@ -591,13 +653,10 @@ distdir: $(DISTFILES)
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
- test -d "$(distdir)/$$subdir" \
- || $(MKDIR_P) "$(distdir)/$$subdir" \
- || 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; \
@@ -629,36 +688,41 @@ distdir: $(DISTFILES)
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
-dist-lzma: distdir
- tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
- $(am__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__remove_distdir)
+ $(am__post_remove_distdir)
dist-tarZ: distdir
+ @echo WARNING: "Support for shar distribution archives is" \
+ "deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-shar: distdir
+ @echo WARNING: "Support for distribution archives compressed with" \
+ "legacy program 'compress' is deprecated." >&2
+ @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
- $(am__remove_distdir)
+ $(am__post_remove_distdir)
-dist dist-all: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
- $(am__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
@@ -669,8 +733,8 @@ distcheck: dist
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
- *.tar.lzma*) \
- lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+ *.tar.lz*) \
+ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
@@ -680,9 +744,9 @@ distcheck: dist
*.zip*) \
unzip $(distdir).zip ;;\
esac
- chmod -R a-w $(distdir); chmod u+w $(distdir)
- mkdir $(distdir)/_build
- mkdir $(distdir)/_inst
+ 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,^[^:\\/]:[\\/],/,'` \
@@ -714,7 +778,7 @@ distcheck: dist
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
- $(am__remove_distdir)
+ $(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'
@@ -854,14 +918,13 @@ ps-am:
uninstall-am: uninstall-nodist_xprotoHEADERS uninstall-pkgconfigDATA \
uninstall-xprotoHEADERS
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
- ctags-recursive install-am install-strip tags-recursive
+.MAKE: $(am__recursive_targets) all install-am install-strip
-.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
- all all-am am--refresh check check-am clean clean-generic \
- ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
- dist-hook dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
- distcheck distclean distclean-generic distclean-hdr \
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+ am--refresh check check-am clean clean-cscope clean-generic \
+ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
+ dist-gzip dist-hook dist-lzip dist-shar dist-tarZ dist-xz \
+ dist-zip distcheck distclean distclean-generic distclean-hdr \
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 \
@@ -872,9 +935,8 @@ uninstall-am: uninstall-nodist_xprotoHEADERS uninstall-pkgconfigDATA \
install-xprotoHEADERS installcheck installcheck-am installdirs \
installdirs-am maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
- tags-recursive uninstall uninstall-am \
- uninstall-nodist_xprotoHEADERS uninstall-pkgconfigDATA \
- uninstall-xprotoHEADERS
+ tags-am uninstall uninstall-am uninstall-nodist_xprotoHEADERS \
+ uninstall-pkgconfigDATA uninstall-xprotoHEADERS
.PHONY: ChangeLog INSTALL
diff --git a/X11/Xfuncproto.h.in b/X11/Xfuncproto.h.in
index 8256fecd9..dac92291e 100644
--- a/X11/Xfuncproto.h.in
+++ b/X11/Xfuncproto.h.in
@@ -97,6 +97,7 @@ in this Software without prior written authorization from The Open Group.
# define _X_INTERNAL
#endif /* GNUC >= 4 */
+/* Branch prediction hints for individual conditionals */
/* requires xproto >= 7.0.9 */
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 303)
# define _X_LIKELY(x) __builtin_expect(!!(x), 1)
@@ -106,6 +107,14 @@ in this Software without prior written authorization from The Open Group.
# define _X_UNLIKELY(x) (x)
#endif
+/* Bulk branch prediction hints via marking error path functions as "cold" */
+/* requires xproto >= 7.0.25 */
+#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 403) /* 4.3+ */
+# define _X_COLD __attribute__((__cold__))
+#else
+# define _X_COLD /* nothing */
+#endif
+
/* Added in X11R6.9, so available in any version of modular xproto */
#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 301)
# define _X_DEPRECATED __attribute__((deprecated))
diff --git a/X11/Xmd.h b/X11/Xmd.h
index 96cc08ffd..492465e6c 100644
--- a/X11/Xmd.h
+++ b/X11/Xmd.h
@@ -70,15 +70,6 @@ SOFTWARE.
# endif
/*
- * Stuff to handle large architecture machines; the constants were generated
- * on a 32-bit machine and must correspond to the protocol.
- */
-# ifdef WORD64
-# define MUSTCOPY
-# endif /* WORD64 */
-
-
-/*
* Definition of macro used to set constants for size of network structures;
* machines with preprocessors that can't handle all of the sz_ symbols
* can define this macro to be sizeof(x) if and only if their compiler doesn't
@@ -100,29 +91,15 @@ SOFTWARE.
* need them. Note that bitfields are not guaranteed to be signed
* (or even unsigned) according to ANSI C.
*/
-# ifdef WORD64
-typedef long INT64;
-typedef unsigned long CARD64;
-# define B32 :32
-# define B16 :16
-# ifdef UNSIGNEDBITFIELDS
-typedef unsigned int INT32;
-typedef unsigned int INT16;
-# else
-typedef signed int INT32;
-typedef signed int INT16;
-# endif
-# else
-# define B32
-# define B16
-# ifdef LONG64
+# define B32 /* bitfield not needed on architectures with native 32-bit type */
+# define B16 /* bitfield not needed on architectures with native 16-bit type */
+# ifdef LONG64
typedef long INT64;
typedef int INT32;
-# else
+# else
typedef long INT32;
-# endif
-typedef short INT16;
# endif
+typedef short INT16;
typedef signed char INT8;
@@ -130,10 +107,8 @@ typedef signed char INT8;
typedef unsigned long CARD64;
typedef unsigned int CARD32;
# else
-typedef unsigned long CARD32;
-# endif
-# if !defined(WORD64) && !defined(LONG64)
typedef unsigned long long CARD64;
+typedef unsigned long CARD32;
# endif
typedef unsigned short CARD16;
typedef unsigned char CARD8;
@@ -145,43 +120,23 @@ typedef CARD8 BYTE;
typedef CARD8 BOOL;
/*
- * definitions for sign-extending bitfields on 64-bit architectures
+ * was definitions for sign-extending bitfields on architectures without
+ * native types smaller than 64-bit, now just backwards compatibility
*/
-# if defined(WORD64) && defined(UNSIGNEDBITFIELDS)
-# define cvtINT8toInt(val) (((val) & 0x00000080) ? ((val) | 0xffffffffffffff00) : (val))
-# define cvtINT16toInt(val) (((val) & 0x00008000) ? ((val) | 0xffffffffffff0000) : (val))
-# define cvtINT32toInt(val) (((val) & 0x80000000) ? ((val) | 0xffffffff00000000) : (val))
-# define cvtINT8toShort(val) cvtINT8toInt(val)
-# define cvtINT16toShort(val) cvtINT16toInt(val)
-# define cvtINT32toShort(val) cvtINT32toInt(val)
-# define cvtINT8toLong(val) cvtINT8toInt(val)
-# define cvtINT16toLong(val) cvtINT16toInt(val)
-# define cvtINT32toLong(val) cvtINT32toInt(val)
-# else
-# define cvtINT8toInt(val) (val)
-# define cvtINT16toInt(val) (val)
-# define cvtINT32toInt(val) (val)
-# define cvtINT8toShort(val) (val)
-# define cvtINT16toShort(val) (val)
-# define cvtINT32toShort(val) (val)
-# define cvtINT8toLong(val) (val)
-# define cvtINT16toLong(val) (val)
-# define cvtINT32toLong(val) (val)
-# endif /* WORD64 and UNSIGNEDBITFIELDS */
+# define cvtINT8toInt(val) (val)
+# define cvtINT16toInt(val) (val)
+# define cvtINT32toInt(val) (val)
+# define cvtINT8toShort(val) (val)
+# define cvtINT16toShort(val) (val)
+# define cvtINT32toShort(val) (val)
+# define cvtINT8toLong(val) (val)
+# define cvtINT16toLong(val) (val)
+# define cvtINT32toLong(val) (val)
-
-
-# ifdef MUSTCOPY
-/*
- * This macro must not cast or else pointers will get aligned and be wrong
- */
-# define NEXTPTR(p,t) (((char *) p) + SIZEOF(t))
-# else /* else not MUSTCOPY, this is used for 32-bit machines */
/*
* this version should leave result of type (t *), but that should only be
* used when not in MUSTCOPY
*/
-# define NEXTPTR(p,t) (((t *)(p)) + 1)
-# endif /* MUSTCOPY - used machines whose C structs don't line up with proto */
+# define NEXTPTR(p,t) (((t *)(p)) + 1)
#endif /* XMD_H */
diff --git a/X11/Xproto.h b/X11/Xproto.h
index 495d44194..76e2c9972 100644
--- a/X11/Xproto.h
+++ b/X11/Xproto.h
@@ -625,13 +625,9 @@ typedef struct _xQueryFontReply {
CARD16 sequenceNumber B16;
CARD32 length B32; /* definitely > 0, even if "nCharInfos" is 0 */
xCharInfo minBounds;
-#ifndef WORD64
CARD32 walign1 B32;
-#endif
xCharInfo maxBounds;
-#ifndef WORD64
CARD32 walign2 B32;
-#endif
CARD16 minCharOrByte2 B16, maxCharOrByte2 B16;
CARD16 defaultChar B16;
CARD16 nFontProps B16; /* followed by this many xFontProp structures */
@@ -674,13 +670,9 @@ typedef struct {
CARD16 sequenceNumber B16;
CARD32 length B32; /* definitely > 0, even if "nameLength" is 0 */
xCharInfo minBounds;
-#ifndef WORD64
CARD32 walign1 B32;
-#endif
xCharInfo maxBounds;
-#ifndef WORD64
CARD32 walign2 B32;
-#endif
CARD16 minCharOrByte2 B16, maxCharOrByte2 B16;
CARD16 defaultChar B16;
CARD16 nFontProps B16; /* followed by this many xFontProp structures */
@@ -1447,12 +1439,7 @@ typedef struct {
CARD16 length B16;
Window destination B32;
CARD32 eventMask B32;
-#ifdef WORD64
- /* the structure should have been quad-aligned */
- BYTE eventdata[SIZEOF(xEvent)];
-#else
xEvent event;
-#endif /* WORD64 */
} xSendEventReq;
typedef struct {
diff --git a/X11/aclocal.m4 b/X11/aclocal.m4
index f3b8dc249..65942c419 100644
--- a/X11/aclocal.m4
+++ b/X11/aclocal.m4
@@ -1,8 +1,7 @@
-# generated automatically by aclocal 1.11.2 -*- Autoconf -*-
+# generated automatically by aclocal 1.14 -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009, 2010, 2011 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.
@@ -12,33 +11,31 @@
# 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.68],,
[m4_warning([this file was generated for autoconf 2.68.
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'.])])
+To do so, use the procedure documented by the package, typically 'autoreconf'.])])
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
-# Foundation, Inc.
+# 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.
-# serial 1
-
# 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.11'
+[am__api_version='1.14'
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.11.2], [],
+m4_if([$1], [1.14], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -54,24 +51,22 @@ m4_define([_AM_AUTOCONF_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.11.2])dnl
+[AM_AUTOMAKE_VERSION([1.14])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, 2003, 2005, 2011 Free Software Foundation, Inc.
+# 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.
-# serial 1
-
# 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/../..'.
+# $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
@@ -90,7 +85,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
#
# 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
+# 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,
@@ -116,22 +111,19 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
# AM_CONDITIONAL -*- Autoconf -*-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
-# Free Software Foundation, Inc.
+# 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.
-# serial 9
-
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
- [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+[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
@@ -150,16 +142,14 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
-# 2010, 2011 Free Software Foundation, Inc.
+# 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.
-# serial 12
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# 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
@@ -169,7 +159,7 @@ fi])])
# _AM_DEPENDENCIES(NAME)
# ----------------------
# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# 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
@@ -182,12 +172,13 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl
-ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
- [$1], CXX, [depcc="$CXX" am_compiler_list=],
- [$1], OBJC, [depcc="$OBJC" 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=])
+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],
@@ -195,8 +186,8 @@ AC_CACHE_CHECK([dependency style of $depcc],
# 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'.
+ # 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
@@ -236,16 +227,16 @@ AC_CACHE_CHECK([dependency style of $depcc],
: > 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 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
+ # 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"
+ # 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
+ # 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
@@ -254,8 +245,8 @@ AC_CACHE_CHECK([dependency style of $depcc],
test "$am__universal" = false || continue
;;
nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
+ # 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
@@ -263,7 +254,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
fi
;;
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
- # This compiler won't grok `-c -o', but also, the minuso test has
+ # 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}
@@ -311,7 +302,7 @@ AM_CONDITIONAL([am__fastdep$1], [
# AM_SET_DEPDIR
# -------------
# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+# 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
@@ -321,9 +312,13 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
# AM_DEP_TRACK
# ------------
AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[ --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors])
+[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='\'
@@ -338,20 +333,18 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# Generate code to set up dependency tracking. -*- Autoconf -*-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# 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.
-#serial 5
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[{
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # 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
@@ -364,7 +357,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
# 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
+ # 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.
@@ -376,21 +369,19 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
+ # 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
+ test -z "$am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //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' -e 's/\$U/'"$U"'/g'`; do
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`AS_DIRNAME(["$file"])`
@@ -408,7 +399,7 @@ AC_DEFUN([_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
+# 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],
@@ -418,18 +409,21 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# Do all the work for Automake. -*- Autoconf -*-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+# 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.
-# serial 16
-
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
@@ -442,7 +436,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# 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.62])dnl
+[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
@@ -471,31 +465,40 @@ AC_SUBST([CYGPATH_W])
# Define the identity of the package.
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+[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], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+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
+[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)
+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([AM_PROG_MKDIR_P])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:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+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
@@ -506,34 +509,78 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
[_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
- [_AM_DEPENDENCIES(CC)],
- [define([AC_PROG_CC],
- defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+ [_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)],
- [define([AC_PROG_CXX],
- defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+ [_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)],
- [define([AC_PROG_OBJC],
- defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+ [_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
])
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
-dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+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
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+ fi
+fi])
+
+dnl 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.
@@ -555,15 +602,12 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
-# Inc.
+# 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.
-# serial 1
-
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
@@ -577,16 +621,14 @@ if test x"${install_sh}" != xset; then
install_sh="\${SHELL} $am_aux_dir/install-sh"
esac
fi
-AC_SUBST(install_sh)])
+AC_SUBST([install_sh])])
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+# 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.
-# serial 2
-
# Check whether the underlying file-system supports filenames
# with a leading dot. For instance MS-DOS doesn't.
AC_DEFUN([AM_SET_LEADING_DOT],
@@ -602,14 +644,12 @@ AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
-# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+# 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.
-# serial 4
-
# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
@@ -627,7 +667,7 @@ am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
+# 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
@@ -654,15 +694,12 @@ rm -f confinc confmf
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
-# Free Software Foundation, Inc.
+# 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.
-# serial 6
-
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
AC_DEFUN([AM_MISSING_PROG],
@@ -670,11 +707,10 @@ AC_DEFUN([AM_MISSING_PROG],
$1=${$1-"${am_missing_run}$2"}
AC_SUBST($1)])
-
# AM_MISSING_HAS_RUN
# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
+# 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
@@ -687,54 +723,22 @@ if test x"${MISSING+set}" != xset; then
esac
fi
# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
+if eval "$MISSING --is-lightweight"; then
+ am_missing_run="$MISSING "
else
am_missing_run=
- AC_MSG_WARN([`missing' script is too old or missing])
+ AC_MSG_WARN(['missing' script is too old or missing])
fi
])
-# Copyright (C) 2003, 2004, 2005, 2006, 2011 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.
-
-# serial 1
-
-# AM_PROG_MKDIR_P
-# ---------------
-# Check for `mkdir -p'.
-AC_DEFUN([AM_PROG_MKDIR_P],
-[AC_PREREQ([2.60])dnl
-AC_REQUIRE([AC_PROG_MKDIR_P])dnl
-dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
-dnl while keeping a definition of mkdir_p for backward compatibility.
-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
-dnl Makefile.ins that do not define MKDIR_P, so we do our own
-dnl adjustment using top_builddir (which is defined more often than
-dnl MKDIR_P).
-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
-case $mkdir_p in
- [[\\/$]]* | ?:[[\\/]]*) ;;
- */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-])
-
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
-# Foundation, Inc.
+# 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.
-# serial 5
-
# _AM_MANGLE_OPTION(NAME)
# -----------------------
AC_DEFUN([_AM_MANGLE_OPTION],
@@ -744,7 +748,7 @@ AC_DEFUN([_AM_MANGLE_OPTION],
# --------------------
# 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)])
+[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
# _AM_SET_OPTIONS(OPTIONS)
# ------------------------
@@ -758,24 +762,82 @@ AC_DEFUN([_AM_SET_OPTIONS],
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) 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. We rewrite AC_PROG_CC
+# to automatically call this.
+AC_DEFUN([_AM_PROG_CC_C_O],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+ [whether $CC understands -c and -o together],
+ [am_cv_prog_cc_c_o],
+ [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+ # Make sure it works both with $CC and with simple cc.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i])
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+AC_LANG_POP([C])])
+
+# For backward compatibility.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
-# Free Software Foundation, Inc.
+# 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.
-# serial 5
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ (exit $ac_status); }])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996-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])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
@@ -786,32 +848,40 @@ case `pwd` in
esac
case $srcdir in
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
- AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+ AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
esac
-# Do `set' in a subshell so we don't clobber the current shell's
+# 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 (
- 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
- rm -f conftest.file
- 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
-
+ 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
@@ -821,73 +891,118 @@ else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
-AC_MSG_RESULT(yes)])
+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 Free Software Foundation, Inc.
+# 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.
-# serial 1
-
# AM_SILENT_RULES([DEFAULT])
# --------------------------
# Enable less verbose build rules; with the default set to DEFAULT
-# (`yes' being less verbose, `no' or empty being verbose).
+# ("yes" being less verbose, "no" or empty being verbose).
AC_DEFUN([AM_SILENT_RULES],
-[AC_ARG_ENABLE([silent-rules],
-[ --enable-silent-rules less verbose build output (undo: `make V=1')
- --disable-silent-rules verbose build output (undo: `make V=0')])
-case $enable_silent_rules in
-yes) AM_DEFAULT_VERBOSITY=0;;
-no) AM_DEFAULT_VERBOSITY=1;;
-*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+[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, 2003, 2005, 2011 Free Software Foundation, Inc.
+# 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.
-# serial 1
-
# AM_PROG_INSTALL_STRIP
# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
+# 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
+# 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
+# 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'.
+# 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, 2008, 2010 Free Software Foundation, Inc.
+# 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.
-# serial 3
-
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
@@ -901,18 +1016,16 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+# 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.
-# serial 2
-
# _AM_PROG_TAR(FORMAT)
# --------------------
# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
+# 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
@@ -922,75 +1035,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# 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.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
- [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
- [m4_case([$1], [ustar],, [pax],,
- [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
+[# 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'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-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
+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
- # 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])
+ # 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 <conftest.tar])
+ AM_RUN_LOG([cat conftest.dir/file])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+ done
rm -rf conftest.dir
- if test -s conftest.tar; then
- AM_RUN_LOG([$am__untar <conftest.tar])
- grep GrepMe conftest.dir/file >/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_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
@@ -1154,7 +1306,7 @@ fi[]dnl
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
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
@@ -1187,10 +1339,10 @@ dnl DEALINGS IN THE SOFTWARE.
# [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
+# 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.17])
+m4_define([vers_have], [1.17.1])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,,
@@ -1210,7 +1362,7 @@ m4_undefine([maj_needed])
# such as man pages and config files
AC_DEFUN([XORG_PROG_RAWCPP],[
AC_REQUIRE([AC_PROG_CPP])
-AC_PATH_PROGS(RAWCPP, [cpp], [${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,
@@ -2473,7 +2625,8 @@ AC_ARG_ENABLE(malloc0returnsnull,
AC_MSG_CHECKING([whether malloc(0) returns NULL])
if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
- AC_RUN_IFELSE([AC_LANG_PROGRAM([
+AC_CACHE_VAL([xorg_cv_malloc0_returns_null],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([
#include <stdlib.h>
],[
char *m0, *r0, *c0, *p;
@@ -2483,9 +2636,9 @@ if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
c0 = calloc(0,10);
exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
])],
- [MALLOC_ZERO_RETURNS_NULL=yes],
- [MALLOC_ZERO_RETURNS_NULL=no],
- [MALLOC_ZERO_RETURNS_NULL=yes])
+ [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])
@@ -2696,11 +2849,11 @@ fi
found="no"
m4_foreach([flag], m4_cdr($@), [
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; 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_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
fi
@@ -2967,7 +3120,7 @@ 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`],
diff --git a/X11/compile b/X11/compile
new file mode 100755
index 000000000..531136b06
--- /dev/null
+++ b/X11/compile
@@ -0,0 +1,347 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand '-c -o'.
+
+scriptversion=2012-10-14.11; # UTC
+
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# 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 <http://www.gnu.org/licenses/>.
+
+# 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 <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+nl='
+'
+
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" "" $nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+ file=$1
+ case $file in
+ / | /[!/]*) # absolute file, and not a UNC file
+ if test -z "$file_conv"; then
+ # lazily determine how to convert abs files
+ case `uname -s` in
+ MINGW*)
+ file_conv=mingw
+ ;;
+ CYGWIN*)
+ file_conv=cygwin
+ ;;
+ *)
+ file_conv=wine
+ ;;
+ esac
+ fi
+ case $file_conv/,$2, in
+ *,$file_conv,*)
+ ;;
+ mingw/*)
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+ ;;
+ cygwin/*)
+ file=`cygpath -m "$file" || echo "$file"`
+ ;;
+ wine/*)
+ file=`winepath -w "$file" || echo "$file"`
+ ;;
+ esac
+ ;;
+ esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+ func_file_conv "$1"
+ if test -z "$lib_path"; then
+ lib_path=$file
+ else
+ lib_path="$lib_path;$file"
+ fi
+ linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+ lib=$1
+ found=no
+ save_IFS=$IFS
+ IFS=';'
+ for dir in $lib_path $LIB
+ do
+ IFS=$save_IFS
+ if $shared && test -f "$dir/$lib.dll.lib"; then
+ found=yes
+ lib=$dir/$lib.dll.lib
+ break
+ fi
+ if test -f "$dir/$lib.lib"; then
+ found=yes
+ lib=$dir/$lib.lib
+ break
+ fi
+ if test -f "$dir/lib$lib.a"; then
+ found=yes
+ lib=$dir/lib$lib.a
+ break
+ fi
+ done
+ IFS=$save_IFS
+
+ if test "$found" != yes; then
+ lib=$lib.lib
+ fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+ # Assume a capable shell
+ lib_path=
+ shared=:
+ linker_opts=
+ for arg
+ do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ eat=1
+ case $2 in
+ *.o | *.[oO][bB][jJ])
+ func_file_conv "$2"
+ set x "$@" -Fo"$file"
+ shift
+ ;;
+ *)
+ func_file_conv "$2"
+ set x "$@" -Fe"$file"
+ shift
+ ;;
+ esac
+ ;;
+ -I)
+ eat=1
+ func_file_conv "$2" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -I*)
+ func_file_conv "${1#-I}" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -l)
+ eat=1
+ func_cl_dashl "$2"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -l*)
+ func_cl_dashl "${1#-l}"
+ set x "$@" "$lib"
+ shift
+ ;;
+ -L)
+ eat=1
+ func_cl_dashL "$2"
+ ;;
+ -L*)
+ func_cl_dashL "${1#-L}"
+ ;;
+ -static)
+ shared=false
+ ;;
+ -Wl,*)
+ arg=${1#-Wl,}
+ save_ifs="$IFS"; IFS=','
+ for flag in $arg; do
+ IFS="$save_ifs"
+ linker_opts="$linker_opts $flag"
+ done
+ IFS="$save_ifs"
+ ;;
+ -Xlinker)
+ eat=1
+ linker_opts="$linker_opts $2"
+ ;;
+ -*)
+ set x "$@" "$1"
+ shift
+ ;;
+ *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+ func_file_conv "$1"
+ set x "$@" -Tp"$file"
+ shift
+ ;;
+ *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+ func_file_conv "$1" mingw
+ set x "$@" "$file"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+ done
+ if test -n "$linker_opts"; then
+ linker_opts="-link$linker_opts"
+ fi
+ exec "$@" $linker_opts
+ exit 1
+}
+
+eat=
+
+case $1 in
+ '')
+ echo "$0: No command. Try '$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand '-c -o'.
+Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file 'INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit $?
+ ;;
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+ func_cl_wrapper "$@" # Doesn't return...
+ ;;
+esac
+
+ofile=
+cfile=
+
+for arg
+do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as 'compile cc -o foo foo.c'.
+ # So we strip '-o arg' only if arg is an object.
+ eat=1
+ case $2 in
+ *.o | *.obj)
+ ofile=$2
+ ;;
+ *)
+ set x "$@" -o "$2"
+ shift
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ set x "$@" "$1"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+ # If no '-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # '.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use '[/\\:.-]' here to ensure that we don't use the same name
+# that we are using for the .o file. Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
+while true; do
+ if mkdir "$lockdir" >/dev/null 2>&1; then
+ break
+ fi
+ sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+ test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+ test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook '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:
diff --git a/X11/config.guess b/X11/config.guess
index 8152efd67..b79252d6b 100644
--- a/X11/config.guess
+++ b/X11/config.guess
@@ -1,14 +1,12 @@
#! /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, 2009, 2010,
-# 2011 Free Software Foundation, Inc.
+# Copyright 1992-2013 Free Software Foundation, Inc.
-timestamp='2011-11-11'
+timestamp='2013-06-10'
# 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
+# 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
@@ -17,26 +15,22 @@ timestamp='2011-11-11'
# 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.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# 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 (context
-# diff format) to <config-patches@gnu.org> and include a ChangeLog
-# entry.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
#
-# 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.
+# Originally written by Per Bothner.
#
# You can get the latest version of this script from:
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
+
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -56,9 +50,7 @@ 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, 2009, 2010, 2011 Free
-Software Foundation, Inc.
+Copyright 1992-2013 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."
@@ -140,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+ # If the system lacks a compiler, then just pick glibc.
+ # We could probably try harder.
+ LIBC=gnu
+
+ eval $set_cc_for_build
+ cat <<-EOF > $dummy.c
+ #include <features.h>
+ #if defined(__UCLIBC__)
+ LIBC=uclibc
+ #elif defined(__dietlibc__)
+ LIBC=dietlibc
+ #else
+ LIBC=gnu
+ #endif
+ EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ ;;
+esac
+
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
- # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
@@ -202,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
@@ -304,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -803,6 +820,9 @@ EOF
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
@@ -854,15 +874,22 @@ EOF
exit ;;
*:GNU:*:*)
# the GNU system
- echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`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
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
exit ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit ;;
+ aarch64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
@@ -874,59 +901,54 @@ EOF
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
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
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
- echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
else
- echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
cris:Linux:*:*)
- echo cris-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
crisv32:Linux:*:*)
- echo crisv32-axis-linux-gnu
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
exit ;;
frv:Linux:*:*)
- echo frv-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
hexagon:Linux:*:*)
- echo hexagon-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:Linux:*:*)
- LIBC=gnu
- eval $set_cc_for_build
- sed 's/^ //' << EOF >$dummy.c
- #ifdef __dietlibc__
- LIBC=dietlibc
- #endif
-EOF
- eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
- echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
exit ;;
ia64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m32r*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
m68*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
@@ -945,54 +967,63 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
;;
+ or1k:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+ exit ;;
or32:Linux:*:*)
- echo or32-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
padre:Linux:*:*)
- echo sparc-unknown-linux-gnu
+ echo sparc-unknown-linux-${LIBC}
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ echo hppa64-unknown-linux-${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 ;;
+ PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+ PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+ *) echo hppa-unknown-linux-${LIBC} ;;
esac
exit ;;
ppc64:Linux:*:*)
- echo powerpc64-unknown-linux-gnu
+ echo powerpc64-unknown-linux-${LIBC}
exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
+ echo powerpc-unknown-linux-${LIBC}
+ exit ;;
+ ppc64le:Linux:*:*)
+ echo powerpc64le-unknown-linux-${LIBC}
+ exit ;;
+ ppcle:Linux:*:*)
+ echo powerpcle-unknown-linux-${LIBC}
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
- echo ${UNAME_MACHINE}-ibm-linux
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
exit ;;
sh64*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sh*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
tile*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
vax:Linux:*:*)
- echo ${UNAME_MACHINE}-dec-linux-gnu
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
exit ;;
x86_64:Linux:*:*)
- echo x86_64-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
xtensa*:Linux:*:*)
- echo ${UNAME_MACHINE}-unknown-linux-gnu
+ echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
@@ -1196,6 +1227,9 @@ EOF
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@@ -1222,19 +1256,21 @@ EOF
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
- case $UNAME_PROCESSOR in
- i386)
- eval $set_cc_for_build
- if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
- if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
- (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
- grep IS_64BIT_ARCH >/dev/null
- then
- UNAME_PROCESSOR="x86_64"
- fi
- fi ;;
- unknown) UNAME_PROCESSOR=powerpc ;;
- esac
+ eval $set_cc_for_build
+ if test "$UNAME_PROCESSOR" = unknown ; then
+ UNAME_PROCESSOR=powerpc
+ fi
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ case $UNAME_PROCESSOR in
+ i386) UNAME_PROCESSOR=x86_64 ;;
+ powerpc) UNAME_PROCESSOR=powerpc64 ;;
+ esac
+ fi
+ fi
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
@@ -1251,7 +1287,7 @@ EOF
NEO-?:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk${UNAME_RELEASE}
exit ;;
- NSE-?:NONSTOP_KERNEL:*:*)
+ NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk${UNAME_RELEASE}
exit ;;
NSR-?:NONSTOP_KERNEL:*:*)
@@ -1320,11 +1356,11 @@ EOF
i*86:AROS:*:*)
echo ${UNAME_MACHINE}-pc-aros
exit ;;
+ x86_64:VMkernel:*:*)
+ echo ${UNAME_MACHINE}-unknown-esx
+ 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 <<EOF
#ifdef _SEQUENT_
diff --git a/X11/config.sub b/X11/config.sub
index e76eaf472..8b612ab89 100644
--- a/X11/config.sub
+++ b/X11/config.sub
@@ -1,38 +1,31 @@
#! /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, 2009, 2010,
-# 2011 Free Software Foundation, Inc.
+# Copyright 1992-2013 Free Software Foundation, Inc.
-timestamp='2011-11-11'
+timestamp='2013-04-24'
-# 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
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
+# 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.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
#
# 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.
+# the same distribution terms that you use for the rest of that
+# program. This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
-# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted GNU ChangeLog entry.
+# Please send patches with a ChangeLog entry to config-patches@gnu.org.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -75,9 +68,7 @@ Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
-Software Foundation, Inc.
+Copyright 1992-2013 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."
@@ -125,13 +116,17 @@ esac
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
+ android-linux)
+ os=-linux-android
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+ ;;
*)
basic_machine=`echo $1 | sed 's/-[^-]*$//'`
if [ $basic_machine != $1 ]
@@ -154,7 +149,7 @@ case $os in
-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 | -microblaze)
+ -apple | -axis | -knuth | -cray | -microblaze*)
os=
basic_machine=$1
;;
@@ -223,6 +218,12 @@ case $os in
-isc*)
basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
;;
+ -lynx*178)
+ os=-lynxos178
+ ;;
+ -lynx*5)
+ os=-lynxos5
+ ;;
-lynx*)
os=-lynxos
;;
@@ -247,11 +248,14 @@ case $basic_machine in
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
+ | aarch64 | aarch64_be \
| 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 \
- | be32 | be64 \
+ | arc | arceb \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | avr | avr32 \
+ | be32 | be64 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
@@ -264,7 +268,7 @@ case $basic_machine in
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep | metag \
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -282,16 +286,17 @@ case $basic_machine in
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
+ | mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
- | nios | nios2 \
+ | nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
| open8 \
- | or32 \
+ | or1k | or32 \
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pyramid \
@@ -319,8 +324,7 @@ case $basic_machine in
c6x)
basic_machine=tic6x-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12 | picochip)
- # Motorola 68HC11/12.
+ m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
@@ -333,7 +337,10 @@ case $basic_machine in
strongarm | thumb | xscale)
basic_machine=arm-unknown
;;
-
+ xgate)
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
xscaleeb)
basic_machine=armeb-unknown
;;
@@ -356,9 +363,10 @@ case $basic_machine in
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
+ | aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
- | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| be32-* | be64-* \
@@ -377,7 +385,8 @@ case $basic_machine in
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | microblaze-* | microblazeel-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@@ -395,12 +404,13 @@ case $basic_machine in
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipsr5900-* | mipsr5900el-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
- | nios-* | nios2-* \
+ | nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
| orion-* \
@@ -719,7 +729,6 @@ case $basic_machine in
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
@@ -777,9 +786,13 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
- microblaze)
+ microblaze*)
basic_machine=microblaze-xilinx
;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
mingw32)
basic_machine=i386-pc
os=-mingw32
@@ -1008,7 +1021,11 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
- rdos)
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=-rdos
+ ;;
+ rdos32)
basic_machine=i386-pc
os=-rdos
;;
@@ -1335,21 +1352,21 @@ case $os in
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
- | -sym* | -kopensolaris* \
+ | -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -openbsd* | -solidbsd* \
+ | -bitrig* | -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* | -cegcc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-uclibc* \
+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1481,9 +1498,6 @@ case $os in
-aros*)
os=-aros
;;
- -kaos*)
- os=-kaos
- ;;
-zvmoe)
os=-zvmoe
;;
@@ -1532,6 +1546,9 @@ case $basic_machine in
c4x-* | tic4x-*)
os=-coff
;;
+ hexagon-*)
+ os=-elf
+ ;;
tic54x-*)
os=-coff
;;
@@ -1559,9 +1576,6 @@ case $basic_machine in
;;
m68000-sun)
os=-sunos3
- # This also exists in the configure program, but was not the
- # default.
- # os=-sunos4
;;
m68*-cisco)
os=-aout
@@ -1575,6 +1589,9 @@ case $basic_machine in
mips*-*)
os=-elf
;;
+ or1k-*)
+ os=-elf
+ ;;
or32-*)
os=-coff
;;
diff --git a/X11/configure b/X11/configure
index db0ae82dd..d99dc9a05 100644
--- a/X11/configure
+++ b/X11/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for Xproto 7.0.24.
+# Generated by GNU Autoconf 2.68 for Xproto 7.0.25.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@@ -621,8 +621,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='Xproto'
PACKAGE_TARNAME='xproto'
-PACKAGE_VERSION='7.0.24'
-PACKAGE_STRING='Xproto 7.0.24'
+PACKAGE_VERSION='7.0.25'
+PACKAGE_STRING='Xproto 7.0.25'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
PACKAGE_URL=''
@@ -685,8 +685,6 @@ HAVE_XMLTO_TEXT_TRUE
XMLTO
ENABLE_SPECS_FALSE
ENABLE_SPECS_TRUE
-AM_BACKSLASH
-AM_DEFAULT_VERBOSITY
MAN_SUBSTS
XORG_MAN_PAGE
ADMIN_MAN_DIR
@@ -736,6 +734,10 @@ CPPFLAGS
LDFLAGS
CFLAGS
CC
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
am__untar
am__tar
AMTAR
@@ -800,10 +802,10 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
+enable_silent_rules
enable_dependency_tracking
enable_selective_werror
enable_strict_compilation
-enable_silent_rules
enable_specs
with_xmlto
with_fop
@@ -1369,7 +1371,7 @@ 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 Xproto 7.0.24 to adapt to many kinds of systems.
+\`configure' configures Xproto 7.0.25 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1439,7 +1441,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of Xproto 7.0.24:";;
+ short | recursive ) echo "Configuration of Xproto 7.0.25:";;
esac
cat <<\_ACEOF
@@ -1447,16 +1449,18 @@ 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]
- --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors
+ --enable-silent-rules less verbose build output (undo: "make V=1")
+ --disable-silent-rules verbose build output (undo: "make V=0")
+ --enable-dependency-tracking
+ do not reject slow dependency extractors
+ --disable-dependency-tracking
+ speeds up one-time build
--disable-selective-werror
Turn off selective compiler errors. (default:
enabled)
--enable-strict-compilation
Enable all warnings from compiler and make them
errors (default: disabled)
- --enable-silent-rules less verbose build output (undo: `make V=1')
- --disable-silent-rules verbose build output (undo: `make V=0')
--enable-specs Enable building the specs (default: yes)
--enable-function-prototypes
force function prototypes (default: auto)
@@ -1558,7 +1562,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-Xproto configure 7.0.24
+Xproto configure 7.0.25
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1963,7 +1967,7 @@ 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 Xproto $as_me 7.0.24, which was
+It was created by Xproto $as_me 7.0.25, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2311,7 +2315,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
-am__api_version='1.11'
+am__api_version='1.14'
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
@@ -2437,9 +2441,6 @@ 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; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
@@ -2450,32 +2451,40 @@ case `pwd` in
esac
case $srcdir in
*[\\\"\#\$\&\'\`$am_lf\ \ ]*)
- as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+ as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
esac
-# Do `set' in a subshell so we don't clobber the current shell's
+# 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 (
- 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
- rm -f conftest.file
- 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
-
+ 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
@@ -2487,6 +2496,16 @@ 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.
@@ -2509,12 +2528,12 @@ if test x"${MISSING+set}" != xset; then
esac
fi
# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
+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;}
+ { $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
@@ -2526,10 +2545,10 @@ if test x"${install_sh}" != xset; then
esac
fi
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
+# 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.
+# 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.
@@ -2668,12 +2687,6 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
$as_echo "$MKDIR_P" >&6; }
-mkdir_p="$MKDIR_P"
-case $mkdir_p in
- [\\/$]* | ?:[\\/]*) ;;
- */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
-esac
-
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.
@@ -2756,6 +2769,45 @@ else
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."
@@ -2778,7 +2830,7 @@ fi
# Define the identity of the package.
PACKAGE='xproto'
- VERSION='7.0.24'
+ VERSION='7.0.25'
cat >>confdefs.h <<_ACEOF
@@ -2806,18 +2858,70 @@ 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:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+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.
+# 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 -'
+
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes. So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+ cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present. This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake@gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message. This
+can help us improve future automake versions.
+
+END
+ if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+ echo 'Configuration will proceed anyway, since you have set the' >&2
+ echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+ echo >&2
+ else
+ cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+ as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+ fi
+fi
# Require xorg-macros minimum of 1.12 for DocBook external references
@@ -2850,7 +2954,7 @@ am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
+# 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
@@ -3684,6 +3788,65 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $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; }
+if ${am_cv_prog_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.
+ # Following AC_PROG_CC_C_O, we do the test twice because some
+ # compilers refuse to overwrite an existing .o file with -o,
+ # though they will create one.
+ am_cv_prog_cc_c_o=yes
+ for am_i in 1 2; do
+ if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+ ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } \
+ && test -f conftest2.$ac_objext; then
+ : OK
+ else
+ am_cv_prog_cc_c_o=no
+ break
+ fi
+ done
+ rm -f core conftest*
+ unset am_i
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+$as_echo "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
depcc="$CC" am_compiler_list=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
@@ -3695,8 +3858,8 @@ else
# 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'.
+ # 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
@@ -3731,16 +3894,16 @@ else
: > 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 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
+ # 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"
+ # 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
+ # 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
@@ -3749,8 +3912,8 @@ else
test "$am__universal" = false || continue
;;
nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
+ # 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
@@ -3758,7 +3921,7 @@ else
fi
;;
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
- # This compiler won't grok `-c -o', but also, the minuso test has
+ # 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}
@@ -4762,11 +4925,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -4880,11 +5043,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -4998,11 +5161,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -5116,11 +5279,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -5165,11 +5328,11 @@ $as_echo "$supported" >&6; }
fi
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -5285,11 +5448,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -5403,11 +5566,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -5521,11 +5684,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -5639,11 +5802,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -5757,11 +5920,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -5875,11 +6038,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -5997,11 +6160,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -6115,11 +6278,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -6233,11 +6396,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -6351,11 +6514,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -6469,11 +6632,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -6587,11 +6750,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -6705,11 +6868,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -6835,11 +6998,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -6884,11 +7047,11 @@ $as_echo "$supported" >&6; }
fi
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -7002,11 +7165,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -7120,11 +7283,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -7238,11 +7401,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -7356,11 +7519,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -7474,11 +7637,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -7592,11 +7755,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -7641,11 +7804,11 @@ $as_echo "$supported" >&6; }
fi
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -7759,11 +7922,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -7877,11 +8040,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -7995,11 +8158,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -8113,11 +8276,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -8231,11 +8394,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -8280,11 +8443,11 @@ $as_echo "$supported" >&6; }
fi
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -8398,11 +8561,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -8519,11 +8682,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -8637,11 +8800,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -8755,11 +8918,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -8873,11 +9036,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -8991,11 +9154,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -9109,11 +9272,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -9227,11 +9390,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -9345,11 +9508,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -9463,11 +9626,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -9581,11 +9744,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -9699,11 +9862,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -9817,11 +9980,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -9935,11 +10098,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -10086,11 +10249,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -10204,11 +10367,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -10253,11 +10416,11 @@ $as_echo "$supported" >&6; }
fi
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -10374,11 +10537,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -10568,11 +10731,38 @@ 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;;
+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='\'
@@ -11436,6 +11626,14 @@ 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='#'
@@ -11885,7 +12083,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by Xproto $as_me 7.0.24, which was
+This file was extended by Xproto $as_me 7.0.25, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -11951,7 +12149,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-Xproto config.status 7.0.24
+Xproto config.status 7.0.25
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
@@ -12684,7 +12882,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
case $ac_file$ac_mode in
"depfiles":C) test x"$AMDEP_TRUE" != x"" || {
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # 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
@@ -12697,7 +12895,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
# 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
+ # 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.
@@ -12731,21 +12929,19 @@ $as_echo X"$mf" |
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
+ # 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
+ test -z "$am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //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' -e 's/\$U/'"$U"'/g'`; do
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`$as_dirname -- "$file" ||
diff --git a/X11/configure.ac b/X11/configure.ac
index 0e21f8e9c..04f123827 100644
--- a/X11/configure.ac
+++ b/X11/configure.ac
@@ -1,5 +1,5 @@
AC_PREREQ([2.60])
-AC_INIT([Xproto], [7.0.24],
+AC_INIT([Xproto], [7.0.25],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
@@ -209,8 +209,9 @@ if test "x$WIDEPROTO" = xno; then
fi
-AC_OUTPUT([Makefile
+AC_CONFIG_FILES([Makefile
specs/Makefile
specs/SIAddresses/Makefile
Xpoll.h
xproto.pc])
+AC_OUTPUT
diff --git a/X11/install-sh b/X11/install-sh
index a9244eb07..377bb8687 100644
--- a/X11/install-sh
+++ b/X11/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2011-01-19.21; # UTC
+scriptversion=2011-11-20.07; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -35,7 +35,7 @@ scriptversion=2011-01-19.21; # UTC
# 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
+# '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
@@ -156,7 +156,7 @@ while test $# -ne 0; do
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
- # Protect names problematic for `test' and other utilities.
+ # Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
@@ -190,7 +190,7 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
fi
shift # arg
dst_arg=$arg
- # Protect names problematic for `test' and other utilities.
+ # Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
@@ -202,7 +202,7 @@ if test $# -eq 0; then
echo "$0: no input file specified." >&2
exit 1
fi
- # It's OK to call `install-sh -d' without argument.
+ # It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
@@ -240,7 +240,7 @@ fi
for src
do
- # Protect names problematic for `test' and other utilities.
+ # Protect names problematic for 'test' and other utilities.
case $src in
-* | [=\(\)!]) src=./$src;;
esac
@@ -354,7 +354,7 @@ do
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.
+ # other-writable 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
diff --git a/X11/keysymdef.h b/X11/keysymdef.h
index ae73977cb..147ecf552 100644
--- a/X11/keysymdef.h
+++ b/X11/keysymdef.h
@@ -414,6 +414,12 @@ SOFTWARE.
#define XK_dead_belowcomma 0xfe6e
#define XK_dead_currency 0xfe6f
+/* extra dead elements for German T3 layout */
+#define XK_dead_lowline 0xfe90
+#define XK_dead_aboveverticalline 0xfe91
+#define XK_dead_belowverticalline 0xfe92
+#define XK_dead_longsolidusoverlay 0xfe93
+
/* dead vowels for universal syllable entry */
#define XK_dead_a 0xfe80
#define XK_dead_A 0xfe81
diff --git a/X11/missing b/X11/missing
index 28055d2ae..cdea51493 100644
--- a/X11/missing
+++ b/X11/missing
@@ -1,11 +1,10 @@
#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
+# Common wrapper for a few potentially missing GNU programs.
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2012-06-26.16; # UTC
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 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
@@ -26,69 +25,40 @@ scriptversion=2009-04-28.21; # UTC
# 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"
+ 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
+case $1 in
-msg="missing on your system"
+ --is-lightweight)
+ # Used by our autoconf macros to check whether the available missing
+ # script is modern enough.
+ exit 0
+ ;;
-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
- ;;
+ --run)
+ # Back-compat with the calling convention used by older automake.
+ shift
+ ;;
-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.
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
- --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]
+ aclocal autoconf autoheader autom4te automake makeinfo
+ bison yacc flex lex help2man
-Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
-\`g' are ignored when checking the name.
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
Send bug reports to <bug-automake@gnu.org>."
exit $?
@@ -100,272 +70,141 @@ Send bug reports to <bug-automake@gnu.org>."
;;
-*)
- echo 1>&2 "$0: Unknown \`$1' option"
- echo 1>&2 "Try \`$0 --help' for more information"
+ echo 1>&2 "$0: unknown '$1' option"
+ echo 1>&2 "Try '$0 --help' for more information"
exit 1
;;
esac
-# normalize program name to check for.
-program=`echo "$1" | sed '
- s/^gnu-//; t
- s/^gnu//; t
- s/^g//; t'`
-
-# 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). This is about non-GNU programs, so use $1 not
-# $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 $program 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 $?
- 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
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch. This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+ msg="probably too old"
+elif test $st -eq 127; then
+ # Program was missing.
+ msg="missing on your system"
+else
+ # Program was found and executed, but failed. Give up.
+ exit $st
+fi
-exit 0
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+ case $1 in
+ aclocal|automake)
+ echo "The '$1' program is part of the GNU Automake package:"
+ echo "<$gnu_software_URL/automake>"
+ echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/autoconf>"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ autoconf|autom4te|autoheader)
+ echo "The '$1' program is part of the GNU Autoconf package:"
+ echo "<$gnu_software_URL/autoconf/>"
+ echo "It also requires GNU m4 and Perl in order to run:"
+ echo "<$gnu_software_URL/m4/>"
+ echo "<$perl_URL>"
+ ;;
+ esac
+}
+
+give_advice ()
+{
+ # Normalize program name to check for.
+ normalized_program=`echo "$1" | sed '
+ s/^gnu-//; t
+ s/^gnu//; t
+ s/^g//; t'`
+
+ printf '%s\n' "'$1' is $msg."
+
+ configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+ case $normalized_program in
+ autoconf*)
+ echo "You should only need it if you modified 'configure.ac',"
+ echo "or m4 files included by it."
+ program_details 'autoconf'
+ ;;
+ autoheader*)
+ echo "You should only need it if you modified 'acconfig.h' or"
+ echo "$configure_deps."
+ program_details 'autoheader'
+ ;;
+ automake*)
+ echo "You should only need it if you modified 'Makefile.am' or"
+ echo "$configure_deps."
+ program_details 'automake'
+ ;;
+ aclocal*)
+ echo "You should only need it if you modified 'acinclude.m4' or"
+ echo "$configure_deps."
+ program_details 'aclocal'
+ ;;
+ autom4te*)
+ echo "You might have modified some maintainer files that require"
+ echo "the 'automa4te' program to be rebuilt."
+ program_details 'autom4te'
+ ;;
+ bison*|yacc*)
+ echo "You should only need it if you modified a '.y' file."
+ echo "You may want to install the GNU Bison package:"
+ echo "<$gnu_software_URL/bison/>"
+ ;;
+ lex*|flex*)
+ echo "You should only need it if you modified a '.l' file."
+ echo "You may want to install the Fast Lexical Analyzer package:"
+ echo "<$flex_URL>"
+ ;;
+ help2man*)
+ echo "You should only need it if you modified a dependency" \
+ "of a man page."
+ echo "You may want to install the GNU Help2man package:"
+ echo "<$gnu_software_URL/help2man/>"
+ ;;
+ makeinfo*)
+ echo "You should only need it if you modified a '.texi' file, or"
+ echo "any other file indirectly affecting the aspect of the manual."
+ echo "You might want to install the Texinfo package:"
+ echo "<$gnu_software_URL/texinfo/>"
+ echo "The spurious makeinfo call might also be the consequence of"
+ echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+ echo "want to install GNU make:"
+ echo "<$gnu_software_URL/make/>"
+ ;;
+ *)
+ echo "You might have modified some files without having the proper"
+ echo "tools for further handling them. Check the 'README' file, it"
+ echo "often tells you about the needed prerequisites for installing"
+ echo "this package. You may also peek at any GNU archive site, in"
+ echo "case some other package contains this missing '$1' program."
+ ;;
+ esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+ -e '2,$s/^/ /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
diff --git a/X11/xtrans/Xtrans.c b/X11/xtrans/Xtrans.c
index 0d6ebaa78..30f099255 100644..100755
--- a/X11/xtrans/Xtrans.c
+++ b/X11/xtrans/Xtrans.c
@@ -49,8 +49,9 @@ from The Open Group.
#include <ctype.h>
#include <unistd.h>
-#ifdef HAVE_SYSTEMD_DAEMON
+#include <stdlib.h>
#include <string.h>
+#ifdef HAVE_SYSTEMD_DAEMON
#include <systemd/sd-daemon.h>
#endif
@@ -171,8 +172,8 @@ TRANS(SelectTransport) (const char *protocol)
protobuf[PROTOBUFSIZE-1] = '\0';
for (i = 0; i < PROTOBUFSIZE && protobuf[i] != '\0'; i++)
- if (isupper (protobuf[i]))
- protobuf[i] = tolower (protobuf[i]);
+ if (isupper ((unsigned char)protobuf[i]))
+ protobuf[i] = tolower ((unsigned char)protobuf[i]);
/* Look at all of the configured protocols */
diff --git a/X11/xtrans/xtrans.pc.in b/X11/xtrans/xtrans.pc.in
index 90d19b16f..b8d135b3f 100644
--- a/X11/xtrans/xtrans.pc.in
+++ b/X11/xtrans/xtrans.pc.in
@@ -6,4 +6,4 @@ includedir=@includedir@
Name: XTrans
Description: Abstract network code for X
Version: @PACKAGE_VERSION@
-Cflags: -I${includedir} -D_BSD_SOURCE @fchown_define@ @sticky_bit_define@
+Cflags: -I${includedir} -D_DEFAULT_SOURCE -D_BSD_SOURCE @fchown_define@ @sticky_bit_define@
diff --git a/fontconfig/configure.ac b/fontconfig/configure.ac
index 1086a9a55..80875dfa2 100644
--- a/fontconfig/configure.ac
+++ b/fontconfig/configure.ac
@@ -321,6 +321,10 @@ AC_CHECK_MEMBER(FT_Bitmap_Size.y_ppem,
#include FT_FREETYPE_H])
AC_DEFINE_UNQUOTED(HAVE_FT_BITMAP_SIZE_Y_PPEM,$HAVE_FT_BITMAP_SIZE_Y_PPEM,
[FT_Bitmap_Size structure includes y_ppem field])
+AC_CHECK_MEMBERS([TT_OS2.usLowerOpticalPointSize, TT_OS2.usUpperOpticalPointSize], [], [], [[
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_TRUETYPE_TABLES_H]])
CFLAGS="$fontconfig_save_cflags"
LIBS="$fontconfig_save_libs"
diff --git a/fontconfig/doc/Makefile.am b/fontconfig/doc/Makefile.am
index 78a7cdbf1..7503219b8 100644
--- a/fontconfig/doc/Makefile.am
+++ b/fontconfig/doc/Makefile.am
@@ -81,6 +81,7 @@ DOC_FUNCS_FNCS = \
fcobjectset.fncs \
fcobjecttype.fncs \
fcpattern.fncs \
+ fcrange.fncs \
fcstring.fncs \
fcstrset.fncs \
fcvalue.fncs \
diff --git a/fontconfig/doc/fcpattern.fncs b/fontconfig/doc/fcpattern.fncs
index 1df1c4f61..1049d77af 100644
--- a/fontconfig/doc/fcpattern.fncs
+++ b/fontconfig/doc/fcpattern.fncs
@@ -181,12 +181,21 @@ values added to the list have binding <parameter>weak</parameter> instead of <pa
@TYPE2+++++++@ const char * @ARG2+++++++@ object
@TYPE3+++++++@ const FcLangSet * @ARG3+++++++@ l
+@PROTOTYPE++++++++@
+@RET++++++++@ FcBool
+@FUNC++++++++@ FcPatternAddRange
+@TYPE1++++++++@ FcPattern * @ARG1++++++++@ p
+@TYPE2++++++++@ const char * @ARG2++++++++@ object
+@TYPE3++++++++@ const FcRange * @ARG3++++++++@ r
+
@PURPOSE@ Add a typed value to a pattern
@DESC@
These are all convenience functions that insert objects of the specified
type into the pattern. Use these in preference to FcPatternAdd as they
will provide compile-time typechecking. These all append values to
any existing list of values.
+
+<function>FcPatternAddRange</function> are available since 2.11.91.
@@
@RET@ FcResult
@@ -257,16 +266,24 @@ within the pattern directly. Applications must not free this value.
@FUNC++++++@ FcPatternGetFTFace
@TYPE1++++++@ FcPattern * @ARG1++++++@ p
@TYPE2++++++@ const char * @ARG2++++++@ object
-@TYPE3+++++@ int% @ARG3+++++@ n
-@TYPE3++++++@ FT_Face * @ARG3++++++@ f
+@TYPE3++++++@ int% @ARG3++++++@ n
+@TYPE4++++++@ FT_Face * @ARG4++++++@ f
@PROTOTYPE+++++++@
@RET+++++++@ FcResult
@FUNC+++++++@ FcPatternGetLangSet
@TYPE1+++++++@ FcPattern * @ARG1+++++++@ p
@TYPE2+++++++@ const char * @ARG2+++++++@ object
-@TYPE3+++++@ int% @ARG3+++++@ n
-@TYPE3+++++++@ FcLangSet ** @ARG3+++++++@ l
+@TYPE3+++++++@ int% @ARG3+++++++@ n
+@TYPE4+++++++@ FcLangSet ** @ARG4+++++++@ l
+
+@PROTOTYPE++++++++@
+@RET++++++++@ FcResult
+@FUNC++++++++@ FcPatternGetRange
+@TYPE1++++++++@ FcPattern * @ARG1++++++++@ p
+@TYPE2++++++++@ const char * @ARG2++++++++@ object
+@TYPE3++++++++@ int% @ARG3++++++++@ n
+@TYPE4++++++++@ FcRange ** @ARG4++++++++@ r
@PURPOSE@ Return a typed value from a pattern
@DESC@
@@ -275,6 +292,8 @@ returned data is of the expected type. They return FcResultTypeMismatch if
this is not the case. Note that these (like FcPatternGet) do not make a
copy of any data structure referenced by the return value. Use these
in preference to FcPatternGet to provide compile-time typechecking.
+
+<function>FcPatternGetRange</function> are available since 2.11.91.
@@
@RET@ FcPattern *
diff --git a/fontconfig/doc/fcrange.fncs b/fontconfig/doc/fcrange.fncs
new file mode 100644
index 000000000..605459525
--- /dev/null
+++ b/fontconfig/doc/fcrange.fncs
@@ -0,0 +1,64 @@
+/*
+ * fontconfig/doc/fcrange.fncs
+ *
+ * Copyright © 2003 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 author(s) not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. The authors make no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE AUTHOR(S) 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.
+ */
+@RET@ FcRange *
+@FUNC@ FcRangeCopy
+@TYPE1@ const FcRange * @ARG1@ range
+@PURPOSE@ Copy a range object
+@DESC@
+<function>FcRangeCopy</function> creates a new FcRange object and
+populates it with the contents of <parameter>range</parameter>.
+@SINCE@ 2.11.91
+@@
+
+@RET@ FcRange *
+@FUNC@ FcRangeCreateDouble
+@TYPE1@ double @ARG1@ begin
+@TYPE2@ double @ARG2@ end
+@PURPOSE@ create a range object for double
+@DESC@
+<function>FcRangeCreateDouble</function> creates a new FcRange object with
+double sized value.
+@SINCE@ 2.11.91
+@@
+
+@RET@ FcRange *
+@FUNC@ FcRangeCreateInteger
+@TYPE1@ int @ARG1@ begin
+@TYPE2@ int @ARG2@ end
+@PURPOSE@ create a range object for integer
+@DESC@
+<function>FcRangeCreateInteger</function> creates a new FcRange object with
+integer sized value.
+@SINCE@ 2.11.91
+@@
+
+@RET@ void
+@FUNC@ FcRangeDestroy
+@TYPE1@ FcRange * @ARG1@ range
+@PURPOSE@ destroy a range object
+@DESC@
+<function>FcRangeDestroy</function> destroys a FcRange object, freeing
+all memory associated with it.
+@SINCE@ 2.11.91
+@@
diff --git a/fontconfig/doc/fontconfig-devel.sgml b/fontconfig/doc/fontconfig-devel.sgml
index 7306d7924..e2cb1c281 100644
--- a/fontconfig/doc/fontconfig-devel.sgml
+++ b/fontconfig/doc/fontconfig-devel.sgml
@@ -16,6 +16,7 @@
<!ENTITY fcobjectset SYSTEM "fcobjectset.sgml">
<!ENTITY fcobjecttype SYSTEM "fcobjecttype.sgml">
<!ENTITY fcpattern SYSTEM "fcpattern.sgml">
+<!ENTITY fcrange SYSTEM "fcrange.sgml">
<!ENTITY fcstring SYSTEM "fcstring.sgml">
<!ENTITY fcstrset SYSTEM "fcstrset.sgml">
<!ENTITY fcvalue SYSTEM "fcvalue.sgml">
@@ -508,6 +509,12 @@ FcMatrix structures hold an affine transformation in matrix form.
</para>
&fcmatrix;
</sect2>
+ <sect2><title>FcRange</title>
+ <para>
+An FcRange holds two variables to indicate a range in between.
+ </para>
+ &fcrange;
+ </sect2>
<sect2><title>FcConfig</title>
<para>
An FcConfig object holds the internal representation of a configuration.
diff --git a/fontconfig/fontconfig/fcprivate.h b/fontconfig/fontconfig/fcprivate.h
index 210c1d8a3..a6ee5c234 100644
--- a/fontconfig/fontconfig/fcprivate.h
+++ b/fontconfig/fontconfig/fcprivate.h
@@ -77,6 +77,9 @@
case FcTypeLangSet: \
__v__.u.l = va_arg (va, const FcLangSet *); \
break; \
+ case FcTypeRange: \
+ __v__.u.r = va_arg (va, const FcRange *); \
+ break; \
} \
if (!FcPatternAdd (__p__, __o__, __v__, FcTrue)) \
goto _FcPatternVapBuild_bail1; \
diff --git a/fontconfig/fontconfig/fontconfig.h b/fontconfig/fontconfig/fontconfig.h
index 225825127..069cb60dd 100644
--- a/fontconfig/fontconfig/fontconfig.h
+++ b/fontconfig/fontconfig/fontconfig.h
@@ -75,7 +75,7 @@ typedef int FcBool;
#define FC_STYLE "style" /* String */
#define FC_SLANT "slant" /* Int */
#define FC_WEIGHT "weight" /* Int */
-#define FC_SIZE "size" /* Double */
+#define FC_SIZE "size" /* Range (double) */
#define FC_ASPECT "aspect" /* Double */
#define FC_PIXEL_SIZE "pixelsize" /* Double */
#define FC_SPACING "spacing" /* Int */
@@ -194,7 +194,8 @@ typedef enum _FcType {
FcTypeMatrix,
FcTypeCharSet,
FcTypeFTFace,
- FcTypeLangSet
+ FcTypeLangSet,
+ FcTypeRange
} FcType;
typedef struct _FcMatrix {
@@ -231,6 +232,8 @@ typedef struct _FcPattern FcPattern;
typedef struct _FcLangSet FcLangSet;
+typedef struct _FcRange FcRange;
+
typedef struct _FcValue {
FcType type;
union {
@@ -242,6 +245,7 @@ typedef struct _FcValue {
const FcCharSet *c;
void *f;
const FcLangSet *l;
+ const FcRange *r;
} u;
} FcValue;
@@ -853,6 +857,9 @@ FcPatternAddBool (FcPattern *p, const char *object, FcBool b);
FcPublic FcBool
FcPatternAddLangSet (FcPattern *p, const char *object, const FcLangSet *ls);
+FcPublic FcBool
+FcPatternAddRange (FcPattern *p, const char *object, const FcRange *r);
+
FcPublic FcResult
FcPatternGetInteger (const FcPattern *p, const char *object, int n, int *i);
@@ -874,6 +881,9 @@ FcPatternGetBool (const FcPattern *p, const char *object, int n, FcBool *b);
FcPublic FcResult
FcPatternGetLangSet (const FcPattern *p, const char *object, int n, FcLangSet **ls);
+FcPublic FcResult
+FcPatternGetRange (const FcPattern *p, const char *object, int id, FcRange **r);
+
FcPublic FcPattern *
FcPatternVaBuild (FcPattern *p, va_list va);
@@ -883,6 +893,20 @@ FcPatternBuild (FcPattern *p, ...) FC_ATTRIBUTE_SENTINEL(0);
FcPublic FcChar8 *
FcPatternFormat (FcPattern *pat, const FcChar8 *format);
+/* fcrange.c */
+FcPublic FcRange *
+FcRangeCreateDouble (double begin, double end);
+
+FcPublic FcRange *
+FcRangeCreateInteger (FcChar32 begin, FcChar32 end);
+
+FcPublic void
+FcRangeDestroy (FcRange *range);
+
+FcPublic FcRange *
+FcRangeCopy (const FcRange *r);
+
+
/* fcstr.c */
FcPublic FcChar8 *
diff --git a/fontconfig/src/Makefile.am b/fontconfig/src/Makefile.am
index 066cc03e7..be20eba05 100644
--- a/fontconfig/src/Makefile.am
+++ b/fontconfig/src/Makefile.am
@@ -151,6 +151,7 @@ libfontconfig_la_SOURCES = \
fcobjs.h \
fcobjshash.h \
fcpat.c \
+ fcrange.c \
fcserialize.c \
fcstat.c \
fcstr.c \
diff --git a/fontconfig/src/fccfg.c b/fontconfig/src/fccfg.c
index 6377fd7c6..cdb8c0f25 100644
--- a/fontconfig/src/fccfg.c
+++ b/fontconfig/src/fccfg.c
@@ -722,6 +722,11 @@ FcConfigPromote (FcValue v, FcValue u, FcValuePromotionBuffer *buf)
v.u.l = FcLangSetPromote (v.u.s, buf);
v.type = FcTypeLangSet;
}
+ if (buf && v.type == FcTypeDouble && u.type == FcTypeRange)
+ {
+ v.u.r = FcRangePromote (v.u.d, buf);
+ v.type = FcTypeRange;
+ }
return v;
}
@@ -894,6 +899,9 @@ FcConfigCompareValue (const FcValue *left_o,
break;
}
break;
+ case FcTypeRange:
+ ret = FcRangeCompare (op, left.u.r, right.u.r);
+ break;
}
}
else
@@ -915,10 +923,11 @@ FcConfigCompareValue (const FcValue *left_o,
static FcValue
FcConfigEvaluate (FcPattern *p, FcPattern *p_pat, FcMatchKind kind, FcExpr *e)
{
- FcValue v, vl, vr;
+ FcValue v, vl, vr, vle, vre;
FcMatrix *m;
FcChar8 *str;
FcOp op = FC_OP_GET_OP (e->op);
+ FcValuePromotionBuffer buf1, buf2;
switch ((int) op) {
case FcOpInteger:
@@ -967,6 +976,11 @@ FcConfigEvaluate (FcPattern *p, FcPattern *p_pat, FcMatchKind kind, FcExpr *e)
v.u.l = e->u.lval;
v = FcValueSave (v);
break;
+ case FcOpRange:
+ v.type = FcTypeRange;
+ v.u.r = e->u.rval;
+ v = FcValueSave (v);
+ break;
case FcOpBool:
v.type = FcTypeBool;
v.u.b = e->u.bval;
@@ -1033,28 +1047,28 @@ FcConfigEvaluate (FcPattern *p, FcPattern *p_pat, FcMatchKind kind, FcExpr *e)
case FcOpDivide:
vl = FcConfigEvaluate (p, p_pat, kind, e->u.tree.left);
vr = FcConfigEvaluate (p, p_pat, kind, e->u.tree.right);
- vl = FcConfigPromote (vl, vr, NULL);
- vr = FcConfigPromote (vr, vl, NULL);
- if (vl.type == vr.type)
+ vle = FcConfigPromote (vl, vr, &buf1);
+ vre = FcConfigPromote (vr, vle, &buf2);
+ if (vle.type == vre.type)
{
- switch ((int) vl.type) {
+ switch ((int) vle.type) {
case FcTypeDouble:
switch ((int) op) {
case FcOpPlus:
v.type = FcTypeDouble;
- v.u.d = vl.u.d + vr.u.d;
+ v.u.d = vle.u.d + vre.u.d;
break;
case FcOpMinus:
v.type = FcTypeDouble;
- v.u.d = vl.u.d - vr.u.d;
+ v.u.d = vle.u.d - vre.u.d;
break;
case FcOpTimes:
v.type = FcTypeDouble;
- v.u.d = vl.u.d * vr.u.d;
+ v.u.d = vle.u.d * vre.u.d;
break;
case FcOpDivide:
v.type = FcTypeDouble;
- v.u.d = vl.u.d / vr.u.d;
+ v.u.d = vle.u.d / vre.u.d;
break;
default:
v.type = FcTypeVoid;
@@ -1071,11 +1085,11 @@ FcConfigEvaluate (FcPattern *p, FcPattern *p_pat, FcMatchKind kind, FcExpr *e)
switch ((int) op) {
case FcOpOr:
v.type = FcTypeBool;
- v.u.b = vl.u.b || vr.u.b;
+ v.u.b = vle.u.b || vre.u.b;
break;
case FcOpAnd:
v.type = FcTypeBool;
- v.u.b = vl.u.b && vr.u.b;
+ v.u.b = vle.u.b && vre.u.b;
break;
default:
v.type = FcTypeVoid;
@@ -1086,7 +1100,7 @@ FcConfigEvaluate (FcPattern *p, FcPattern *p_pat, FcMatchKind kind, FcExpr *e)
switch ((int) op) {
case FcOpPlus:
v.type = FcTypeString;
- str = FcStrPlus (vl.u.s, vr.u.s);
+ str = FcStrPlus (vle.u.s, vre.u.s);
v.u.s = FcStrdup (str);
FcStrFree (str);
@@ -1105,7 +1119,7 @@ FcConfigEvaluate (FcPattern *p, FcPattern *p_pat, FcMatchKind kind, FcExpr *e)
m = malloc (sizeof (FcMatrix));
if (m)
{
- FcMatrixMultiply (m, vl.u.m, vr.u.m);
+ FcMatrixMultiply (m, vle.u.m, vre.u.m);
v.u.m = m;
}
else
@@ -1122,13 +1136,13 @@ FcConfigEvaluate (FcPattern *p, FcPattern *p_pat, FcMatchKind kind, FcExpr *e)
switch ((int) op) {
case FcOpPlus:
v.type = FcTypeCharSet;
- v.u.c = FcCharSetUnion (vl.u.c, vr.u.c);
+ v.u.c = FcCharSetUnion (vle.u.c, vre.u.c);
if (!v.u.c)
v.type = FcTypeVoid;
break;
case FcOpMinus:
v.type = FcTypeCharSet;
- v.u.c = FcCharSetSubtract (vl.u.c, vr.u.c);
+ v.u.c = FcCharSetSubtract (vle.u.c, vre.u.c);
if (!v.u.c)
v.type = FcTypeVoid;
break;
@@ -1141,13 +1155,13 @@ FcConfigEvaluate (FcPattern *p, FcPattern *p_pat, FcMatchKind kind, FcExpr *e)
switch ((int) op) {
case FcOpPlus:
v.type = FcTypeLangSet;
- v.u.l = FcLangSetUnion (vl.u.l, vr.u.l);
+ v.u.l = FcLangSetUnion (vle.u.l, vre.u.l);
if (!v.u.l)
v.type = FcTypeVoid;
break;
case FcOpMinus:
v.type = FcTypeLangSet;
- v.u.l = FcLangSetSubtract (vl.u.l, vr.u.l);
+ v.u.l = FcLangSetSubtract (vle.u.l, vre.u.l);
if (!v.u.l)
v.type = FcTypeVoid;
break;
diff --git a/fontconfig/src/fcdbg.c b/fontconfig/src/fcdbg.c
index d74bc2769..ef038f017 100644
--- a/fontconfig/src/fcdbg.c
+++ b/fontconfig/src/fcdbg.c
@@ -29,6 +29,8 @@
static void
_FcValuePrintFile (FILE *f, const FcValue v)
{
+ FcRange r;
+
switch (v.type) {
case FcTypeUnknown:
fprintf (f, "<unknown>");
@@ -61,6 +63,10 @@ _FcValuePrintFile (FILE *f, const FcValue v)
case FcTypeFTFace:
fprintf (f, "face");
break;
+ case FcTypeRange:
+ r = FcRangeCanonicalize (v.u.r);
+ fprintf (f, "(%g, %g)", r.u.d.begin, r.u.d.end);
+ break;
}
}
@@ -261,6 +267,8 @@ FcOpPrint (FcOp op_)
void
FcExprPrint (const FcExpr *expr)
{
+ FcRange r;
+
if (!expr) printf ("none");
else switch (FC_OP_GET_OP (expr->op)) {
case FcOpInteger: printf ("%d", expr->u.ival); break;
@@ -277,7 +285,10 @@ FcExprPrint (const FcExpr *expr)
FcExprPrint (expr->u.mexpr->yy);
printf ("]");
break;
- case FcOpRange: break;
+ case FcOpRange:
+ r = FcRangeCanonicalize (expr->u.rval);
+ printf ("(%g, %g)", r.u.d.begin, r.u.d.end);
+ break;
case FcOpBool: printf ("%s", expr->u.bval ? "true" : "false"); break;
case FcOpCharSet: printf ("charset\n"); break;
case FcOpLangSet:
diff --git a/fontconfig/src/fcdefault.c b/fontconfig/src/fcdefault.c
index 4beda7c00..7c16f4841 100644
--- a/fontconfig/src/fcdefault.c
+++ b/fontconfig/src/fcdefault.c
@@ -219,6 +219,7 @@ FcDefaultSubstitute (FcPattern *pattern)
{
FcValue v, namelang, v2;
int i;
+ double dpi, size, scale, pixelsize;
if (FcPatternObjectGet (pattern, FC_WEIGHT_OBJECT, 0, &v) == FcResultNoMatch )
FcPatternObjectAddInteger (pattern, FC_WEIGHT_OBJECT, FC_WEIGHT_NORMAL);
@@ -233,32 +234,30 @@ FcDefaultSubstitute (FcPattern *pattern)
if (FcPatternObjectGet (pattern, FcBoolDefaults[i].field, 0, &v) == FcResultNoMatch)
FcPatternObjectAddBool (pattern, FcBoolDefaults[i].field, FcBoolDefaults[i].value);
- if (FcPatternObjectGet (pattern, FC_PIXEL_SIZE_OBJECT, 0, &v) == FcResultNoMatch)
- {
- double dpi, size, scale;
+ if (FcPatternObjectGetDouble (pattern, FC_SIZE_OBJECT, 0, &size) != FcResultMatch)
+ size = 12.0L;
+ if (FcPatternObjectGetDouble (pattern, FC_SCALE_OBJECT, 0, &scale) != FcResultMatch)
+ scale = 1.0;
+ if (FcPatternObjectGetDouble (pattern, FC_DPI_OBJECT, 0, &dpi) != FcResultMatch)
+ dpi = 75.0;
- if (FcPatternObjectGetDouble (pattern, FC_SIZE_OBJECT, 0, &size) != FcResultMatch)
- {
- size = 12.0;
- (void) FcPatternObjectDel (pattern, FC_SIZE_OBJECT);
- FcPatternObjectAddDouble (pattern, FC_SIZE_OBJECT, size);
- }
- if (FcPatternObjectGetDouble (pattern, FC_SCALE_OBJECT, 0, &scale) != FcResultMatch)
- {
- scale = 1.0;
- (void) FcPatternObjectDel (pattern, FC_SCALE_OBJECT);
- FcPatternObjectAddDouble (pattern, FC_SCALE_OBJECT, scale);
- }
- size *= scale;
- if (FcPatternObjectGetDouble (pattern, FC_DPI_OBJECT, 0, &dpi) != FcResultMatch)
- {
- dpi = 75.0;
- (void) FcPatternObjectDel (pattern, FC_DPI_OBJECT);
- FcPatternObjectAddDouble (pattern, FC_DPI_OBJECT, dpi);
- }
- size *= dpi / 72.0;
- FcPatternObjectAddDouble (pattern, FC_PIXEL_SIZE_OBJECT, size);
+ if (FcPatternObjectGet (pattern, FC_PIXEL_SIZE_OBJECT, 0, &v) != FcResultMatch)
+ {
+ (void) FcPatternObjectDel (pattern, FC_SCALE_OBJECT);
+ FcPatternObjectAddDouble (pattern, FC_SCALE_OBJECT, scale);
+ pixelsize = size * scale;
+ (void) FcPatternObjectDel (pattern, FC_DPI_OBJECT);
+ FcPatternObjectAddDouble (pattern, FC_DPI_OBJECT, dpi);
+ pixelsize *= dpi / 72.0;
+ FcPatternObjectAddDouble (pattern, FC_PIXEL_SIZE_OBJECT, pixelsize);
+ }
+ else
+ {
+ size = v.u.d;
+ size = size / dpi * 72.0 / scale;
}
+ (void) FcPatternObjectDel (pattern, FC_SIZE_OBJECT);
+ FcPatternObjectAddDouble (pattern, FC_SIZE_OBJECT, size);
if (FcPatternObjectGet (pattern, FC_FONTVERSION_OBJECT, 0, &v) == FcResultNoMatch)
{
diff --git a/fontconfig/src/fcfreetype.c b/fontconfig/src/fcfreetype.c
index 97d049206..988913ba2 100644
--- a/fontconfig/src/fcfreetype.c
+++ b/fontconfig/src/fcfreetype.c
@@ -1107,6 +1107,8 @@ FcFreeTypeQueryFace (const FT_Face face,
FcChar8 *hashstr = NULL;
FT_Error err;
FT_ULong len = 0, alen;
+ FcRange *r = NULL;
+ double lower_size = 0.0L, upper_size = DBL_MAX;
pat = FcPatternCreate ();
if (!pat)
@@ -1514,6 +1516,39 @@ FcFreeTypeQueryFace (const FT_Face face,
free (complex_);
}
+#if defined (HAVE_TT_OS2_USUPPEROPTICALPOINTSIZE) && defined (HAVE_TT_OS2_USLOWEROPTICALPOINTSIZE)
+ if (os2 && os2->version >= 0x0005 && os2->version != 0xffff)
+ {
+ /* usLowerPointSize and usUpperPointSize is actually twips */
+ lower_size = os2->usLowerOpticalPointSize / 20.0L;
+ upper_size = os2->usUpperOpticalPointSize / 20.0L;
+ }
+#endif
+ if (os2)
+ {
+ r = FcRangeCreateDouble (lower_size, upper_size);
+ if (!FcPatternAddRange (pat, FC_SIZE, r))
+ {
+ FcRangeDestroy (r);
+ goto bail1;
+ }
+ FcRangeDestroy (r);
+ }
+ else
+ {
+ for (i = 0; i < face->num_fixed_sizes; i++)
+ {
+ double d = FcGetPixelSize (face, i);
+ r = FcRangeCreateDouble (d, d);
+ if (!FcPatternAddRange (pat, FC_SIZE, r))
+ {
+ FcRangeDestroy (r);
+ goto bail1;
+ }
+ FcRangeDestroy (r);
+ }
+ }
+
/*
* Type 1: Check for FontInfo dictionary information
* Code from g2@magestudios.net (Gerard Escalante)
diff --git a/fontconfig/src/fcint.h b/fontconfig/src/fcint.h
index cdf2daba0..dd26fd89a 100644
--- a/fontconfig/src/fcint.h
+++ b/fontconfig/src/fcint.h
@@ -38,6 +38,8 @@
#include <assert.h>
#include <errno.h>
#include <limits.h>
+#include <float.h>
+#include <math.h>
#include <unistd.h>
#include <stddef.h>
#include <sys/types.h>
@@ -94,6 +96,11 @@ extern pfnSHGetFolderPathA pSHGetFolderPathA;
#define FC_MAX(a,b) ((a) > (b) ? (a) : (b))
#define FC_ABS(a) ((a) < 0 ? -(a) : (a))
+#define FcDoubleIsZero(a) (fabs ((a)) <= DBL_EPSILON)
+#define FcDoubleCmpEQ(a,b) (fabs ((a) - (b)) <= DBL_EPSILON)
+#define FcDoubleCmpGE(a,b) (FcDoubleCmpEQ (a, b) || (a) > (b))
+#define FcDoubleCmpLE(a,b) (FcDoubleCmpEQ (a, b) || (a) < (b))
+
/* slim_internal.h */
#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) && !defined(__sun)
#define FcPrivate __attribute__((__visibility__("hidden")))
@@ -161,6 +168,7 @@ typedef enum _FcValueBinding {
#define FcValueString(v) FcPointerMember(v,u.s,FcChar8)
#define FcValueCharSet(v) FcPointerMember(v,u.c,const FcCharSet)
#define FcValueLangSet(v) FcPointerMember(v,u.l,const FcLangSet)
+#define FcValueRange(v) FcPointerMember(v,u.r,const FcRange)
typedef struct _FcValueList *FcValueListPtr;
@@ -244,20 +252,38 @@ typedef struct _FcExprName {
FcMatchKind kind;
} FcExprName;
+typedef struct _FcRangeInt {
+ FcChar32 begin;
+ FcChar32 end;
+} FcRangeInt;
+typedef struct _FcRangeDouble {
+ double begin;
+ double end;
+} FcRangeDouble;
+struct _FcRange {
+ FcBool is_double;
+ FcBool is_inclusive;
+ union {
+ FcRangeInt i;
+ FcRangeDouble d;
+ } u;
+};
+
typedef struct _FcExpr {
FcOp op;
union {
- int ival;
- double dval;
- const FcChar8 *sval;
- FcExprMatrix *mexpr;
- FcBool bval;
- FcCharSet *cval;
- FcLangSet *lval;
-
- FcExprName name;
- const FcChar8 *constant;
+ int ival;
+ double dval;
+ const FcChar8 *sval;
+ FcExprMatrix *mexpr;
+ FcBool bval;
+ FcCharSet *cval;
+ FcLangSet *lval;
+ FcRange *rval;
+
+ FcExprName name;
+ const FcChar8 *constant;
struct {
struct _FcExpr *left, *right;
} tree;
@@ -532,13 +558,6 @@ typedef struct _FcFileTime {
typedef struct _FcCharMap FcCharMap;
-typedef struct _FcRange FcRange;
-
-struct _FcRange {
- FcChar32 begin;
- FcChar32 end;
-};
-
typedef struct _FcStatFS FcStatFS;
struct _FcStatFS {
@@ -1008,6 +1027,9 @@ FcPatternObjectAddBool (FcPattern *p, FcObject object, FcBool b);
FcPrivate FcBool
FcPatternObjectAddLangSet (FcPattern *p, FcObject object, const FcLangSet *ls);
+FcPrivate FcBool
+FcPatternObjectAddRange (FcPattern *p, FcObject object, const FcRange *r);
+
FcPrivate FcResult
FcPatternObjectGetInteger (const FcPattern *p, FcObject object, int n, int *i);
@@ -1029,6 +1051,9 @@ FcPatternObjectGetBool (const FcPattern *p, FcObject object, int n, FcBool *b);
FcPrivate FcResult
FcPatternObjectGetLangSet (const FcPattern *p, FcObject object, int n, FcLangSet **ls);
+FcPrivate FcResult
+FcPatternObjectGetRange (const FcPattern *p, FcObject object, int id, FcRange **r);
+
FcPrivate FcBool
FcPatternAppend (FcPattern *p, FcPattern *s);
@@ -1056,6 +1081,32 @@ extern FcPrivate const FcMatrix FcIdentityMatrix;
FcPrivate void
FcMatrixFree (FcMatrix *mat);
+/* fcrange.c */
+
+FcPrivate FcRange
+FcRangeCanonicalize (const FcRange *range);
+
+FcPrivate FcRange *
+FcRangePromote (double v, FcValuePromotionBuffer *vbuf);
+
+FcPrivate FcBool
+FcRangeIsZero (const FcRange *r);
+
+FcPrivate FcBool
+FcRangeIsInRange (const FcRange *a, const FcRange *b);
+
+FcPrivate FcBool
+FcRangeCompare (FcOp op, const FcRange *a, const FcRange *b);
+
+FcPrivate FcChar32
+FcRangeHash (const FcRange *r);
+
+FcPrivate FcBool
+FcRangeSerializeAlloc (FcSerialize *serialize, const FcRange *r);
+
+FcPrivate FcRange *
+FcRangeSerialize (FcSerialize *serialize, const FcRange *r);
+
/* fcstat.c */
FcPrivate int
diff --git a/fontconfig/src/fclist.c b/fontconfig/src/fclist.c
index e58a62b9f..8bb42971c 100644
--- a/fontconfig/src/fclist.c
+++ b/fontconfig/src/fclist.c
@@ -273,6 +273,8 @@ FcListValueHash (FcValue *value)
return (long) v.u.f;
case FcTypeLangSet:
return FcLangSetHash (v.u.l);
+ case FcTypeRange:
+ return FcRangeHash (v.u.r);
}
return 0;
}
diff --git a/fontconfig/src/fcmatch.c b/fontconfig/src/fcmatch.c
index 93e013f9b..0c0a0670e 100644
--- a/fontconfig/src/fcmatch.c
+++ b/fontconfig/src/fcmatch.c
@@ -189,6 +189,49 @@ FcCompareSize (FcValue *value1, FcValue *value2)
}
static double
+FcCompareSizeRange (FcValue *v1, FcValue *v2)
+{
+ FcValue value1 = FcValueCanonicalize (v1);
+ FcValue value2 = FcValueCanonicalize (v2);
+ FcRange *r1 = NULL, *r2 = NULL;
+ double ret = -1.0;
+
+ switch ((int) value1.type) {
+ case FcTypeDouble:
+ r1 = FcRangeCreateDouble (value1.u.d, value1.u.d);
+ break;
+ case FcTypeRange:
+ r1 = FcRangeCopy (value1.u.r);
+ break;
+ default:
+ goto bail;
+ }
+ switch ((int) value2.type) {
+ case FcTypeDouble:
+ r2 = FcRangeCreateDouble (value2.u.d, value2.u.d);
+ break;
+ case FcTypeRange:
+ r2 = FcRangeCopy (value2.u.r);
+ break;
+ default:
+ goto bail;
+ }
+
+ if (FcRangeIsInRange (r1, r2))
+ ret = 0.0;
+ else
+ ret = FC_MIN (fabs (r1->u.d.end - r2->u.d.begin), fabs (r1->u.d.begin - r2->u.d.end));
+
+bail:
+ if (r1)
+ FcRangeDestroy (r1);
+ if (r2)
+ FcRangeDestroy (r2);
+
+ return ret;
+}
+
+static double
FcCompareFilename (FcValue *v1, FcValue *v2)
{
const FcChar8 *s1 = FcValueString (v1), *s2 = FcValueString (v2);
@@ -227,6 +270,7 @@ FcCompareHash (FcValue *v1, FcValue *v2)
#define PRI_FcCompareLang(n) PRI1(n)
#define PRI_FcComparePostScript(n) PRI1(n)
#define PRI_FcCompareHash(n) PRI1(n)
+#define PRI_FcCompareSizeRange(n) PRI1(n)
#define FC_OBJECT(NAME, Type, Cmp) PRI_##Cmp(NAME)
@@ -255,6 +299,7 @@ typedef enum _FcMatcherPriority {
PRI_FAMILY_WEAK,
PRI_POSTSCRIPT_NAME_WEAK,
PRI1(SPACING),
+ PRI1(SIZE),
PRI1(PIXEL_SIZE),
PRI1(STYLE),
PRI1(SLANT),
diff --git a/fontconfig/src/fcname.c b/fontconfig/src/fcname.c
index f302948dd..466617872 100644
--- a/fontconfig/src/fcname.c
+++ b/fontconfig/src/fcname.c
@@ -87,6 +87,10 @@ FcObjectValidType (FcObject object, FcType type)
if (type == FcTypeLangSet || type == FcTypeString)
return FcTrue;
break;
+ case FcTypeRange:
+ if (type == FcTypeRange || type == FcTypeDouble)
+ return FcTrue;
+ break;
default:
if (type == t->type)
return FcTrue;
@@ -273,6 +277,8 @@ FcNameConvert (FcType type, FcChar8 *string)
{
FcValue v;
FcMatrix m;
+ double b, e;
+ char *p;
v.type = type;
switch ((int) v.type) {
@@ -307,6 +313,20 @@ FcNameConvert (FcType type, FcChar8 *string)
if (!v.u.l)
v.type = FcTypeVoid;
break;
+ case FcTypeRange:
+ if (sscanf ((char *) string, "(%lg %lg)", &b, &e) != 2)
+ {
+ v.u.d = strtod ((char *) string, &p);
+ if (p != NULL && p[0] != 0)
+ {
+ v.type = FcTypeVoid;
+ break;
+ }
+ v.type = FcTypeDouble;
+ }
+ else
+ v.u.r = FcRangeCreateDouble (b, e);
+ break;
default:
break;
}
@@ -476,6 +496,7 @@ FcNameUnparseValue (FcStrBuf *buf,
{
FcChar8 temp[1024];
FcValue v = FcValueCanonicalize(v0);
+ FcRange r;
switch (v.type) {
case FcTypeUnknown:
@@ -501,6 +522,18 @@ FcNameUnparseValue (FcStrBuf *buf,
return FcNameUnparseLangSet (buf, v.u.l);
case FcTypeFTFace:
return FcTrue;
+ case FcTypeRange:
+ r = FcRangeCanonicalize (v.u.r);
+ if (!FcDoubleIsZero (r.u.d.begin) || !FcDoubleIsZero (r.u.d.end))
+ {
+ if (FcDoubleCmpEQ (r.u.d.begin, r.u.d.end))
+ sprintf ((char *) temp, "%g", r.u.d.begin);
+ else
+ sprintf ((char *) temp, "(%g %g)", r.u.d.begin, r.u.d.end);
+ return FcNameUnparseString (buf, temp, 0);
+ }
+ else
+ return FcTrue;
}
return FcFalse;
}
@@ -533,12 +566,13 @@ FcNameUnparse (FcPattern *pat)
FcChar8 *
FcNameUnparseEscaped (FcPattern *pat, FcBool escape)
{
- FcStrBuf buf;
- FcChar8 buf_static[8192];
+ FcStrBuf buf, buf2;
+ FcChar8 buf_static[8192], buf2_static[256];
int i;
FcPatternElt *e;
FcStrBufInit (&buf, buf_static, sizeof (buf_static));
+ FcStrBufInit (&buf2, buf2_static, sizeof (buf2_static));
e = FcPatternObjectFindElt (pat, FC_FAMILY_OBJECT);
if (e)
{
@@ -548,10 +582,17 @@ FcNameUnparseEscaped (FcPattern *pat, FcBool escape)
e = FcPatternObjectFindElt (pat, FC_SIZE_OBJECT);
if (e)
{
- if (!FcNameUnparseString (&buf, (FcChar8 *) "-", 0))
+ FcChar8 *p;
+
+ if (!FcNameUnparseString (&buf2, (FcChar8 *) "-", 0))
goto bail0;
- if (!FcNameUnparseValueList (&buf, FcPatternEltValues(e), escape ? (FcChar8 *) FC_ESCAPE_FIXED : 0))
+ if (!FcNameUnparseValueList (&buf2, FcPatternEltValues(e), escape ? (FcChar8 *) FC_ESCAPE_FIXED : 0))
goto bail0;
+ p = FcStrBufDoneStatic (&buf2);
+ FcStrBufDestroy (&buf2);
+ if (strlen ((const char *)p) > 1)
+ if (!FcStrBufString (&buf, p))
+ goto bail0;
}
for (i = 0; i < NUM_OBJECT_TYPES; i++)
{
diff --git a/fontconfig/src/fcobjs.h b/fontconfig/src/fcobjs.h
index a0ee0795b..72e71f99c 100644
--- a/fontconfig/src/fcobjs.h
+++ b/fontconfig/src/fcobjs.h
@@ -31,7 +31,7 @@ FC_OBJECT (FULLNAMELANG, FcTypeString, NULL)
FC_OBJECT (SLANT, FcTypeInteger, FcCompareNumber)
FC_OBJECT (WEIGHT, FcTypeInteger, FcCompareNumber)
FC_OBJECT (WIDTH, FcTypeInteger, FcCompareNumber)
-FC_OBJECT (SIZE, FcTypeDouble, NULL)
+FC_OBJECT (SIZE, FcTypeRange, FcCompareSizeRange)
FC_OBJECT (ASPECT, FcTypeDouble, NULL)
FC_OBJECT (PIXEL_SIZE, FcTypeDouble, FcCompareSize)
FC_OBJECT (SPACING, FcTypeInteger, FcCompareNumber)
diff --git a/fontconfig/src/fcpat.c b/fontconfig/src/fcpat.c
index 986cca391..7e7d54a4e 100644
--- a/fontconfig/src/fcpat.c
+++ b/fontconfig/src/fcpat.c
@@ -57,6 +57,9 @@ FcValueDestroy (FcValue v)
case FcTypeLangSet:
FcLangSetDestroy ((FcLangSet *) v.u.l);
break;
+ case FcTypeRange:
+ FcRangeDestroy ((FcRange *) v.u.r);
+ break;
default:
break;
}
@@ -81,6 +84,10 @@ FcValueCanonicalize (const FcValue *v)
new.u.l = FcValueLangSet(v);
new.type = FcTypeLangSet;
break;
+ case FcTypeRange:
+ new.u.r = FcValueRange(v);
+ new.type = FcTypeRange;
+ break;
default:
new = *v;
break;
@@ -112,6 +119,11 @@ FcValueSave (FcValue v)
if (!v.u.l)
v.type = FcTypeVoid;
break;
+ case FcTypeRange:
+ v.u.r = FcRangeCopy (v.u.r);
+ if (!v.u.r)
+ v.type = FcTypeVoid;
+ break;
default:
break;
}
@@ -145,6 +157,9 @@ FcValueListDestroy (FcValueListPtr l)
FcLangSetDestroy
((FcLangSet *) (l->value.u.l));
break;
+ case FcTypeRange:
+ FcRangeDestroy ((FcRange *) (l->value.u.r));
+ break;
default:
break;
}
@@ -267,6 +282,8 @@ FcValueEqual (FcValue va, FcValue vb)
return va.u.f == vb.u.f;
case FcTypeLangSet:
return FcLangSetEqual (va.u.l, vb.u.l);
+ case FcTypeRange:
+ return FcRangeIsInRange (va.u.r, vb.u.r);
}
return FcFalse;
}
@@ -320,6 +337,8 @@ FcValueHash (const FcValue *v)
FcStringHash ((const FcChar8 *) ((FT_Face) v->u.f)->style_name);
case FcTypeLangSet:
return FcLangSetHash (FcValueLangSet(v));
+ case FcTypeRange:
+ return FcRangeHash (v->u.r);
}
return 0;
}
@@ -841,6 +860,22 @@ FcPatternAddLangSet (FcPattern *p, const char *object, const FcLangSet *ls)
return FcPatternAdd (p, object, v, FcTrue);
}
+FcBool
+FcPatternObjectAddRange (FcPattern *p, FcObject object, const FcRange *r)
+{
+ FcValue v;
+
+ v.type = FcTypeRange;
+ v.u.r = (FcRange *)r;
+ return FcPatternObjectAdd (p, object, v, FcTrue);
+}
+
+FcBool
+FcPatternAddRange (FcPattern *p, const char *object, const FcRange *r)
+{
+ return FcPatternObjectAddRange (p, FcObjectFromName (object), r);
+}
+
FcResult
FcPatternObjectGet (const FcPattern *p, FcObject object, int id, FcValue *v)
{
@@ -1025,6 +1060,31 @@ FcPatternGetLangSet(const FcPattern *p, const char *object, int id, FcLangSet **
return FcResultMatch;
}
+FcResult
+FcPatternObjectGetRange (const FcPattern *p, FcObject object, int id, FcRange **r)
+{
+ FcValue v;
+ FcResult res;
+
+ res = FcPatternObjectGet (p, object, id, &v);
+ if (res != FcResultMatch)
+ return res;
+ switch ((int)v.type) {
+ case FcTypeRange:
+ *r = (FcRange *)v.u.r;
+ break;
+ default:
+ return FcResultTypeMismatch;
+ }
+ return FcResultMatch;
+}
+
+FcResult
+FcPatternGetRange (const FcPattern *p, const char *object, int id, FcRange **r)
+{
+ return FcPatternObjectGetRange (p, FcObjectFromName (object), id, r);
+}
+
FcPattern *
FcPatternDuplicate (const FcPattern *orig)
{
@@ -1230,6 +1290,10 @@ FcValueListSerializeAlloc (FcSerialize *serialize, const FcValueList *vl)
if (!FcLangSetSerializeAlloc (serialize, vl->value.u.l))
return FcFalse;
break;
+ case FcTypeRange:
+ if (!FcRangeSerializeAlloc (serialize, vl->value.u.r))
+ return FcFalse;
+ break;
default:
break;
}
@@ -1245,6 +1309,7 @@ FcValueListSerialize (FcSerialize *serialize, const FcValueList *vl)
FcChar8 *s_serialized;
FcCharSet *c_serialized;
FcLangSet *l_serialized;
+ FcRange *r_serialized;
FcValueList *head_serialized = NULL;
FcValueList *prev_serialized = NULL;
@@ -1303,6 +1368,14 @@ FcValueListSerialize (FcSerialize *serialize, const FcValueList *vl)
l_serialized,
FcLangSet);
break;
+ case FcTypeRange:
+ r_serialized = FcRangeSerialize (serialize, vl->value.u.r);
+ if (!r_serialized)
+ return NULL;
+ vl_serialized->value.u.r = FcPtrToEncodedOffset (&vl_serialized->value,
+ r_serialized,
+ FcRange);
+ break;
default:
break;
}
diff --git a/fontconfig/src/fcrange.c b/fontconfig/src/fcrange.c
new file mode 100644
index 000000000..7d0c1c0b1
--- /dev/null
+++ b/fontconfig/src/fcrange.c
@@ -0,0 +1,207 @@
+/*
+ * fontconfig/src/fcrange.c
+ *
+ * Copyright © 2002 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 author(s) not be used in
+ * advertising or publicity pertaining to distribution of the software without
+ * specific, written prior permission. The authors make no
+ * representations about the suitability of this software for any purpose. It
+ * is provided "as is" without express or implied warranty.
+ *
+ * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+ * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+ * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
+ * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
+ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include "fcint.h"
+
+
+FcRange *
+FcRangeCreateDouble (double begin, double end)
+{
+ FcRange *ret = malloc (sizeof (FcRange));
+
+ if (ret)
+ {
+ ret->is_double = FcTrue;
+ ret->is_inclusive = FcDoubleCmpEQ (begin, end);
+ ret->u.d.begin = begin;
+ ret->u.d.end = end;
+ }
+
+ return ret;
+}
+
+FcRange *
+FcRangeCreateInteger (FcChar32 begin, FcChar32 end)
+{
+ FcRange *ret = malloc (sizeof (FcRange));
+
+ if (ret)
+ {
+ ret->is_double = FcFalse;
+ ret->is_inclusive = (begin == end);
+ ret->u.i.begin = begin;
+ ret->u.i.end = end;
+ }
+
+ return ret;
+}
+
+void
+FcRangeDestroy (FcRange *range)
+{
+ free (range);
+}
+
+FcRange *
+FcRangeCopy (const FcRange *range)
+{
+ FcRange *ret;
+
+ if (range->is_double)
+ ret = FcRangeCreateDouble (range->u.d.begin, range->u.d.end);
+ else
+ ret = FcRangeCreateInteger (range->u.i.begin, range->u.i.end);
+
+ return ret;
+}
+
+FcRange
+FcRangeCanonicalize (const FcRange *range)
+{
+ FcRange new;
+
+ if (range->is_double)
+ new = *range;
+ else
+ {
+ new.is_double = FcTrue;
+ new.is_inclusive = range->is_inclusive;
+ new.u.d.begin = (double)range->u.i.begin;
+ new.u.d.end = (double)range->u.i.end;
+ }
+ return new;
+}
+
+FcRange *
+FcRangePromote (double v, FcValuePromotionBuffer *vbuf)
+{
+ typedef struct {
+ FcRange r;
+ } FcRangePromotionBuffer;
+ FcRangePromotionBuffer *buf = (FcRangePromotionBuffer *) vbuf;
+
+ FC_ASSERT_STATIC (sizeof (FcRangePromotionBuffer) <= sizeof (FcValuePromotionBuffer));
+ buf->r.is_double = FcTrue;
+ buf->r.is_inclusive = FcTrue;
+ buf->r.u.d.begin = v;
+ buf->r.u.d.end = v;
+
+ return &buf->r;
+}
+
+FcBool
+FcRangeIsZero (const FcRange *r)
+{
+ FcRange c;
+
+ if (!r)
+ return FcFalse;
+ c = FcRangeCanonicalize (r);
+
+ return FcDoubleIsZero (c.u.d.begin) && FcDoubleIsZero (c.u.d.end);
+}
+
+FcBool
+FcRangeIsInRange (const FcRange *a, const FcRange *b)
+{
+ FcRange ca, cb;
+ FcBool f;
+
+ if (!a || !b)
+ return FcFalse;
+
+ ca = FcRangeCanonicalize (a);
+ cb = FcRangeCanonicalize (b);
+ if (ca.is_inclusive & cb.is_inclusive)
+ f = ca.u.d.end <= cb.u.d.end;
+ else
+ f = ca.u.d.end < cb.u.d.end;
+
+ return FcDoubleCmpGE (ca.u.d.begin, cb.u.d.begin) && f;
+}
+
+FcBool
+FcRangeCompare (FcOp op, const FcRange *a, const FcRange *b)
+{
+ FcRange ca, cb;
+
+ switch ((int) op) {
+ case FcOpEqual:
+ case FcOpContains:
+ case FcOpListing:
+ return FcRangeIsInRange (a, b);
+ case FcOpNotEqual:
+ case FcOpNotContains:
+ return !FcRangeIsInRange (a, b);
+ case FcOpLess:
+ ca = FcRangeCanonicalize (a);
+ cb = FcRangeCanonicalize (b);
+ return ca.u.d.begin < cb.u.d.begin;
+ case FcOpLessEqual:
+ ca = FcRangeCanonicalize (a);
+ cb = FcRangeCanonicalize (b);
+ return FcDoubleCmpLE (ca.u.d.begin, cb.u.d.begin);
+ case FcOpMore:
+ ca = FcRangeCanonicalize (a);
+ cb = FcRangeCanonicalize (b);
+ return ca.u.d.end > cb.u.d.end;
+ case FcOpMoreEqual:
+ ca = FcRangeCanonicalize (a);
+ cb = FcRangeCanonicalize (b);
+ return FcDoubleCmpGE (ca.u.d.end, cb.u.d.end);
+ default:
+ break;
+ }
+ return FcFalse;
+}
+
+FcChar32
+FcRangeHash (const FcRange *r)
+{
+ FcRange c = FcRangeCanonicalize (r);
+ int b = (int) (c.u.d.begin * 100);
+ int e = (int) (c.u.d.end * 100);
+
+ return b ^ (b << 1) ^ (e << 9);
+}
+
+FcBool
+FcRangeSerializeAlloc (FcSerialize *serialize, const FcRange *r)
+{
+ if (!FcSerializeAlloc (serialize, r, sizeof (FcRange)))
+ return FcFalse;
+ return FcTrue;
+}
+
+FcRange *
+FcRangeSerialize (FcSerialize *serialize, const FcRange *r)
+{
+ FcRange *r_serialize = FcSerializePtr (serialize, r);
+
+ if (!r_serialize)
+ return NULL;
+ memcpy (r_serialize, r, sizeof (FcRange));
+
+ return r_serialize;
+}
diff --git a/fontconfig/src/fcxml.c b/fontconfig/src/fcxml.c
index ec79b8723..9f4c2b062 100644
--- a/fontconfig/src/fcxml.c
+++ b/fontconfig/src/fcxml.c
@@ -169,6 +169,18 @@ FcExprCreateMatrix (FcConfig *config, const FcExprMatrix *matrix)
}
static FcExpr *
+FcExprCreateRange (FcConfig *config, FcRange *range)
+{
+ FcExpr *e = FcConfigAllocExpr (config);
+ if (e)
+ {
+ e->op = FcOpRange;
+ e->u.rval = FcRangeCopy (range);
+ }
+ return e;
+}
+
+static FcExpr *
FcExprCreateBool (FcConfig *config, FcBool b)
{
FcExpr *e = FcConfigAllocExpr (config);
@@ -258,6 +270,7 @@ FcExprDestroy (FcExpr *e)
FcExprMatrixFree (e->u.mexpr);
break;
case FcOpRange:
+ FcRangeDestroy (e->u.rval);
break;
case FcOpCharSet:
FcCharSetDestroy (e->u.cval);
@@ -503,7 +516,7 @@ typedef struct _FcVStack {
int integer;
double _double;
FcExprMatrix *matrix;
- FcRange range;
+ FcRange *range;
FcBool bool_;
FcCharSet *charset;
FcLangSet *langset;
@@ -593,6 +606,8 @@ FcTypeName (FcType type)
return "FT_Face";
case FcTypeLangSet:
return "langset";
+ case FcTypeRange:
+ return "range";
default:
return "unknown";
}
@@ -608,7 +623,9 @@ FcTypecheckValue (FcConfigParse *parse, FcType value, FcType type)
if (value != type)
{
if ((value == FcTypeLangSet && type == FcTypeString) ||
- (value == FcTypeString && type == FcTypeLangSet))
+ (value == FcTypeString && type == FcTypeLangSet) ||
+ (value == FcTypeInteger && type == FcTypeRange) ||
+ (value == FcTypeDouble && type == FcTypeRange))
return;
if (type == FcTypeUnknown)
return;
@@ -651,6 +668,9 @@ FcTypecheckExpr (FcConfigParse *parse, FcExpr *expr, FcType type)
case FcOpLangSet:
FcTypecheckValue (parse, FcTypeLangSet, type);
break;
+ case FcOpRange:
+ FcTypecheckValue (parse, FcTypeRange, type);
+ break;
case FcOpNil:
break;
case FcOpField:
@@ -865,11 +885,10 @@ FcVStackPushMatrix (FcConfigParse *parse, FcExprMatrix *matrix)
static FcBool
FcVStackPushRange (FcConfigParse *parse, FcRange *range)
{
- FcVStack *vstack = FcVStackCreateAndPush (parse);
+ FcVStack *vstack = FcVStackCreateAndPush (parse);
if (!vstack)
return FcFalse;
- vstack->u.range.begin = range->begin;
- vstack->u.range.end = range->end;
+ vstack->u.range = range;
vstack->tag = FcVStackRange;
return FcTrue;
}
@@ -1017,9 +1036,11 @@ FcVStackPopAndDestroy (FcConfigParse *parse)
case FcVStackMatrix:
FcExprMatrixFreeShallow (vstack->u.matrix);
break;
- case FcVStackRange:
case FcVStackBool:
break;
+ case FcVStackRange:
+ FcRangeDestroy (vstack->u.range);
+ break;
case FcVStackCharSet:
FcCharSetDestroy (vstack->u.charset);
break;
@@ -1232,7 +1253,9 @@ static void
FcParseBlank (FcConfigParse *parse)
{
int n = FcVStackElements (parse);
- FcChar32 i;
+ FcChar32 i, begin, end;
+ FcRange r;
+
while (n-- > 0)
{
FcVStack *v = FcVStackFetch (parse, n);
@@ -1248,9 +1271,12 @@ FcParseBlank (FcConfigParse *parse)
goto bail;
break;
case FcVStackRange:
- if (v->u.range.begin <= v->u.range.end)
+ r = FcRangeCanonicalize (v->u.range);
+ begin = (FcChar32)r.u.d.begin;
+ end = (FcChar32)r.u.d.end;
+ if (begin <= end)
{
- for (i = v->u.range.begin; i <= v->u.range.end; i++)
+ for (i = begin; i <= end; i++)
{
if (!FcBlanksAdd (parse->config->blanks, i))
goto bail;
@@ -1463,9 +1489,11 @@ static void
FcParseRange (FcConfigParse *parse)
{
FcVStack *vstack;
- FcRange r = {0, 0};
- FcChar32 n;
+ FcRange *r;
+ FcChar32 n[2] = {0, 0};
int count = 1;
+ double d[2] = {0.0L, 0.0L};
+ FcBool dflag = FcFalse;
while ((vstack = FcVStackPeek (parse)))
{
@@ -1476,31 +1504,52 @@ FcParseRange (FcConfigParse *parse)
}
switch ((int) vstack->tag) {
case FcVStackInteger:
- n = vstack->u.integer;
+ if (dflag)
+ d[count] = (double)vstack->u.integer;
+ else
+ n[count] = vstack->u.integer;
+ break;
+ case FcVStackDouble:
+ if (count == 0 && !dflag)
+ d[1] = (double)n[1];
+ d[count] = vstack->u._double;
+ dflag = FcTrue;
break;
default:
FcConfigMessage (parse, FcSevereError, "invalid element in range");
- n = 0;
+ if (dflag)
+ d[count] = 0.0L;
+ else
+ n[count] = 0;
break;
}
- if (count == 1)
- r.end = n;
- else
- r.begin = n;
count--;
FcVStackPopAndDestroy (parse);
}
- if (count < 0)
+ if (count >= 0)
+ {
+ FcConfigMessage (parse, FcSevereError, "invalid range");
+ return;
+ }
+ if (dflag)
{
- if (r.begin > r.end)
+ if (d[0] > d[1])
{
FcConfigMessage (parse, FcSevereError, "invalid range");
return;
}
- FcVStackPushRange (parse, &r);
+ r = FcRangeCreateDouble (d[0], d[1]);
}
else
- FcConfigMessage (parse, FcSevereError, "invalid range");
+ {
+ if (n[0] > n[1])
+ {
+ FcConfigMessage (parse, FcSevereError, "invalid range");
+ return;
+ }
+ r = FcRangeCreateInteger (n[0], n[1]);
+ }
+ FcVStackPushRange (parse, r);
}
static FcBool
@@ -1536,7 +1585,8 @@ FcParseCharSet (FcConfigParse *parse)
{
FcVStack *vstack;
FcCharSet *charset = FcCharSetCreate ();
- FcChar32 i;
+ FcChar32 i, begin, end;
+ FcRange r;
int n = 0;
while ((vstack = FcVStackPeek (parse)))
@@ -1551,9 +1601,13 @@ FcParseCharSet (FcConfigParse *parse)
n++;
break;
case FcVStackRange:
- if (vstack->u.range.begin <= vstack->u.range.end)
+ r = FcRangeCanonicalize (vstack->u.range);
+ begin = (FcChar32)r.u.d.begin;
+ end = (FcChar32)r.u.d.end;
+
+ if (begin <= end)
{
- for (i = vstack->u.range.begin; i <= vstack->u.range.end; i++)
+ for (i = begin; i <= end; i++)
{
if (!FcCharSetAddChar (charset, i))
{
@@ -1888,6 +1942,7 @@ FcPopExpr (FcConfigParse *parse)
expr = FcExprCreateMatrix (parse->config, vstack->u.matrix);
break;
case FcVStackRange:
+ expr = FcExprCreateRange (parse->config, vstack->u.range);
break;
case FcVStackBool:
expr = FcExprCreateBool (parse->config, vstack->u.bool_);
@@ -2654,6 +2709,11 @@ FcPopValue (FcConfigParse *parse)
if (value.u.l)
value.type = FcTypeLangSet;
break;
+ case FcVStackRange:
+ value.u.r = FcRangeCopy (vstack->u.range);
+ if (value.u.r)
+ value.type = FcTypeRange;
+ break;
default:
FcConfigMessage (parse, FcSevereWarning, "unknown pattern element %d",
vstack->tag);
diff --git a/libXfont/ChangeLog b/libXfont/ChangeLog
index 05daa3cd5..5901d9918 100644
--- a/libXfont/ChangeLog
+++ b/libXfont/ChangeLog
@@ -1,3 +1,129 @@
+commit 30110063857ff9a5f93f6d8d13f535c9b6e59e2a
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Tue Jan 7 08:22:31 2014 -0800
+
+ libXfont 1.4.7
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 2a84680376bafd74609c6ef3e38befcb8467d814
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Mon Dec 23 19:01:11 2013 -0800
+
+ Limit additional sscanf strings to fit buffer sizes
+
+ None of these could currently result in buffer overflow, as the input
+ and output buffers were the same size, but adding limits helps ensure
+ we keep it that way, if we ever resize any of these in the future.
+
+ Fixes cppcheck warnings:
+ [lib/libXfont/src/bitmap/bdfread.c:547]: (warning)
+ scanf without field width limits can crash with huge input data.
+ [lib/libXfont/src/bitmap/bdfread.c:553]: (warning)
+ scanf without field width limits can crash with huge input data.
+ [lib/libXfont/src/bitmap/bdfread.c:636]: (warning)
+ scanf without field width limits can crash with huge input data.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
+ Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit 4d024ac10f964f6bd372ae0dd14f02772a6e5f63
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Mon Dec 23 18:34:02 2013 -0800
+
+ CVE-2013-6462: unlimited sscanf overflows stack buffer in bdfReadCharacters()
+
+ Fixes cppcheck warning:
+ [lib/libXfont/src/bitmap/bdfread.c:341]: (warning)
+ scanf without field width limits can crash with huge input data.
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
+ Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
+
+commit fdcf9a9be6a5d453659beadec5d1a1fdbab9afaf
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Dec 27 11:01:35 2013 -0800
+
+ Add AC_USE_SYSTEM_EXTENSIONS to expose non-standard extensions
+
+ Required on Solaris to expose definitions in system headers that
+ are not defined in the XPG standards now that xtrans 1.3 defines
+ _XOPEN_SOURCE to 600 on Solaris.
+
+ Fixes build failures:
+ fserve.c: In function 'fs_block_handler':
+ fserve.c:1210:5: error: 'fd_mask' undeclared (first use in this function)
+ fserve.c:1210:5: note: each undeclared identifier is reported only once for each function it appears in
+ In file included from transport.c:67:0,
+ from fstrans.c:28:
+ Xtranssock.c: In function '_FontTransSocketINETConnect':
+ Xtranssock.c:1421:19: error: 'INET6_ADDRSTRLEN' undeclared (first use in this function)
+ Xtranssock.c:1421:19: note: each undeclared identifier is reported only once for each function it appears in
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Daniel Stone <daniel@fooishbar.org>
+
+commit 0d24378a6f08f5ab594ff552d60cf5f8f74bcb33
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Dec 7 20:11:29 2013 -0800
+
+ Don't leak old allocation if realloc fails to enlarge it
+
+ In ftfuncs.c, since the buffer being reallocated is a function local
+ buffer, used to accumulate data for a single run of the function and
+ then freed at the end of the function, we just free the old buffer if
+ realloc fails.
+
+ In atom.c however, the ReverseMap is a static buffer, so we operate in
+ temporary variables until we know we're successful, then update the
+ static variables. If we fail, we leave the old static variables in place,
+ since they contain data about previous atoms we should maintain, not lose.
+
+ Reported by cppcheck:
+ [lib/libXfont/src/FreeType/ftfuncs.c:2122]: (error) Common realloc mistake:
+ 'ranges' nulled but not freed upon failure
+ [lib/libXfont/src/util/atom.c:126]: (error) Common realloc mistake:
+ 'reverseMap' nulled but not freed upon failure
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+
+commit 5e27c364b174497d427dcecd122d711ef6b9f630
+Author: Julien Cristau <jcristau@debian.org>
+Date: Mon Aug 12 18:40:27 2013 +0200
+
+ Make serverGeneration unsigned
+
+ Makes the definition match other declarations, and xserver's definition.
+
+ Debian bug#689439
+
+ Reported-by: Michael Tautschnig <mt@debian.org>
+ Signed-off-by: Julien Cristau <jcristau@debian.org>
+ Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 7d34534c050cb4366c7b14bff585c17d6d578f89
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Oct 26 00:06:22 2013 -0700
+
+ Replace malloc(strlen)+strcpy/strcat calls with strdup
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 8a9fc31628a98e3cdaae6078bb5d92bce06c37ac
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Fri Oct 25 23:56:55 2013 -0700
+
+ xstrdup -> strdup
+
+ Missed in xalloc -> malloc etal conversion in 0cdc9b8f850342
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+ Reviewed-by: Jasper St. Pierre <jstpierre@mecheye.net>
+
commit 8b289e10c5013cdcbf817c06bd929e3ea8339987
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Sun Jul 21 16:53:47 2013 -0700
diff --git a/libXfont/Makefile.am b/libXfont/Makefile.am
index 9153e98bf..7ec31880d 100644
--- a/libXfont/Makefile.am
+++ b/libXfont/Makefile.am
@@ -1,6 +1,6 @@
-#
+#
# Copyright © 2003 Keith Packard, Noah Levitt
-#
+#
# 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
@@ -10,7 +10,7 @@
# specific, written prior permission. Keith Packard makes no
# representations about the suitability of this software for any purpose. It
# is provided "as is" without express or implied warranty.
-#
+#
# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
diff --git a/libXfont/aclocal.m4 b/libXfont/aclocal.m4
index c78d7244c..17ad91eb5 100644
--- a/libXfont/aclocal.m4
+++ b/libXfont/aclocal.m4
@@ -9893,7 +9893,7 @@ fi[]dnl
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
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
@@ -9926,10 +9926,10 @@ dnl DEALINGS IN THE SOFTWARE.
# [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
+# 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.17])
+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,,
@@ -9949,7 +9949,7 @@ m4_undefine([maj_needed])
# such as man pages and config files
AC_DEFUN([XORG_PROG_RAWCPP],[
AC_REQUIRE([AC_PROG_CPP])
-AC_PATH_PROGS(RAWCPP, [cpp], [${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,
@@ -10511,9 +10511,10 @@ 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
@@ -10533,6 +10534,7 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
#
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],
@@ -10576,6 +10578,20 @@ m4_ifval([$1],
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
@@ -11212,7 +11228,8 @@ AC_ARG_ENABLE(malloc0returnsnull,
AC_MSG_CHECKING([whether malloc(0) returns NULL])
if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
- AC_RUN_IFELSE([AC_LANG_PROGRAM([
+AC_CACHE_VAL([xorg_cv_malloc0_returns_null],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([
#include <stdlib.h>
],[
char *m0, *r0, *c0, *p;
@@ -11222,9 +11239,9 @@ if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
c0 = calloc(0,10);
exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
])],
- [MALLOC_ZERO_RETURNS_NULL=yes],
- [MALLOC_ZERO_RETURNS_NULL=no],
- [MALLOC_ZERO_RETURNS_NULL=yes])
+ [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])
@@ -11435,11 +11452,11 @@ fi
found="no"
m4_foreach([flag], m4_cdr($@), [
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; 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_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then
PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
fi
@@ -11513,7 +11530,7 @@ AC_LANG_CASE(
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])
+ XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd])
XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
]
)
@@ -11522,17 +11539,17 @@ AC_LANG_CASE(
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]], [-Wcast-qual])
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]], [-Wlogical-op])
# 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.
@@ -11706,7 +11723,7 @@ 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`],
@@ -11774,12 +11791,12 @@ AC_DEFUN([XTRANS_TCP_FLAGS],[
AC_SEARCH_LIBS(socket, [socket])
AC_SEARCH_LIBS(gethostbyname, [nsl])
if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then
- AC_HAVE_LIBRARY([ws2_32])
+ AC_CHECK_LIB([ws2_32],[main])
fi
# Needs to come after above checks for libsocket & libnsl for SVR4 systems
AC_ARG_ENABLE(ipv6,
- AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]),
+ AS_HELP_STRING([--enable-ipv6],[Enable IPv6 support]),
[IPV6CONN=$enableval],
[AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])])
AC_MSG_CHECKING([if IPv6 support should be built])
@@ -11802,6 +11819,41 @@ AC_DEFUN([XTRANS_TCP_FLAGS],[
AC_INCLUDES_DEFAULT
#include <sys/socket.h>])
+ # XPG4v2/UNIX95 added msg_control - check to see if we need to define
+ # _XOPEN_SOURCE to get it (such as on Solaris)
+ AC_CHECK_MEMBER([struct msghdr.msg_control], [], [],
+ [
+AC_INCLUDES_DEFAULT
+#include <sys/socket.h>
+ ])
+ # First try for Solaris in C99 compliant mode, which requires XPG6/UNIX03
+ if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then
+ unset ac_cv_member_struct_msghdr_msg_control
+ AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=600])
+ AC_CHECK_MEMBER([struct msghdr.msg_control],
+ [AC_DEFINE([_XOPEN_SOURCE], [600],
+ [Defined if needed to expose struct msghdr.msg_control])
+ ], [], [
+#define _XOPEN_SOURCE 600
+AC_INCLUDES_DEFAULT
+#include <sys/socket.h>
+ ])
+ fi
+ # If that didn't work, fall back to XPG5/UNIX98 with C89
+ if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then
+ unset ac_cv_member_struct_msghdr_msg_control
+ AC_MSG_NOTICE([trying again with _XOPEN_SOURCE=500])
+ AC_CHECK_MEMBER([struct msghdr.msg_control],
+ [AC_DEFINE([_XOPEN_SOURCE], [500],
+ [Defined if needed to expose struct msghdr.msg_control])
+ ], [], [
+#define _XOPEN_SOURCE 500
+AC_INCLUDES_DEFAULT
+#include <sys/socket.h>
+ ])
+ fi
+
+
]) # XTRANS_TCP_FLAGS
# XTRANS_CONNECTION_FLAGS()
@@ -11810,13 +11862,12 @@ AC_INCLUDES_DEFAULT
# that use Xtrans functions
AC_DEFUN([XTRANS_CONNECTION_FLAGS],[
AC_REQUIRE([AC_CANONICAL_HOST])
- AC_REQUIRE([AC_TYPE_SIGNAL])
[case $host_os in
mingw*) unixdef="no" ;;
*) unixdef="yes" ;;
esac]
AC_ARG_ENABLE(unix-transport,
- AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
+ AS_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
[UNIXCONN=$enableval], [UNIXCONN=$unixdef])
AC_MSG_CHECKING([if Xtrans should support UNIX socket connections])
if test "$UNIXCONN" = "yes"; then
@@ -11824,7 +11875,7 @@ AC_DEFUN([XTRANS_CONNECTION_FLAGS],[
fi
AC_MSG_RESULT($UNIXCONN)
AC_ARG_ENABLE(tcp-transport,
- AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
+ AS_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
[TCPCONN=$enableval], [TCPCONN=yes])
AC_MSG_CHECKING([if Xtrans should support TCP socket connections])
AC_MSG_RESULT($TCPCONN)
@@ -11837,7 +11888,7 @@ AC_DEFUN([XTRANS_CONNECTION_FLAGS],[
*) localdef="no" ;;
esac]
AC_ARG_ENABLE(local-transport,
- AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]),
+ AS_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]),
[LOCALCONN=$enableval], [LOCALCONN=$localdef])
AC_MSG_CHECKING([if Xtrans should support os-specific local connections])
AC_MSG_RESULT($LOCALCONN)
@@ -11855,7 +11906,7 @@ AC_DEFUN([XTRANS_CONNECTION_FLAGS],[
AC_DEFUN([XTRANS_SECURE_RPC_FLAGS],
[AC_REQUIRE([XTRANS_TCP_FLAGS])
AC_ARG_ENABLE(secure-rpc,
- AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
+ AS_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
[SECURE_RPC=$enableval], [SECURE_RPC="try"])
if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
diff --git a/libXfont/config.h.in b/libXfont/config.h.in
index ff0fdce7b..abbc2c62c 100644
--- a/libXfont/config.h.in
+++ b/libXfont/config.h.in
@@ -94,9 +94,6 @@
/* Patch version of this package */
#undef PACKAGE_VERSION_PATCHLEVEL
-/* Define as the return type of signal handlers (`int' or `void'). */
-#undef RETSIGTYPE
-
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
@@ -106,6 +103,28 @@
/* Support UNIX socket connections */
#undef UNIXCONN
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
/* Version number of package */
#undef VERSION
@@ -138,3 +157,16 @@
/* Support gzip for bitmap fonts */
#undef X_GZIP_FONT_COMPRESSION
+
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
+
+/* Defined if needed to expose struct msghdr.msg_control */
+#undef _XOPEN_SOURCE
diff --git a/libXfont/configure b/libXfont/configure
index 31bd27bce..618a6daeb 100644
--- a/libXfont/configure
+++ b/libXfont/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for libXfont 1.4.6.
+# Generated by GNU Autoconf 2.68 for libXfont 1.4.7.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@@ -174,6 +174,7 @@ test x\$exitcode = x0 || exit 1"
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='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
@@ -181,8 +182,7 @@ test x\$exitcode = x0 || exit 1"
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
-test \$(( 1 + 1 )) = 2 || exit 1"
+ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1"
if (eval "$as_required") 2>/dev/null; then :
as_have_required=yes
else
@@ -631,8 +631,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='libXfont'
PACKAGE_TARNAME='libXfont'
-PACKAGE_VERSION='1.4.6'
-PACKAGE_STRING='libXfont 1.4.6'
+PACKAGE_VERSION='1.4.7'
+PACKAGE_STRING='libXfont 1.4.7'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
PACKAGE_URL=''
@@ -740,7 +740,6 @@ CHANGELOG_CMD
STRICT_CFLAGS
CWARNFLAGS
BASE_CFLAGS
-CPP
OTOOL64
OTOOL
LIPO
@@ -758,9 +757,19 @@ ac_ct_DUMPBIN
DUMPBIN
LD
FGREP
+SED
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+LIBTOOL
EGREP
GREP
-SED
+CPP
am__fastdepCC_FALSE
am__fastdepCC_TRUE
CCDEPMODE
@@ -778,15 +787,6 @@ CPPFLAGS
LDFLAGS
CFLAGS
CC
-host_os
-host_vendor
-host_cpu
-host
-build_os
-build_vendor
-build_cpu
-build
-LIBTOOL
AM_BACKSLASH
AM_DEFAULT_VERBOSITY
AM_DEFAULT_V
@@ -856,11 +856,11 @@ ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_silent_rules
+enable_dependency_tracking
enable_shared
enable_static
with_pic
enable_fast_install
-enable_dependency_tracking
with_gnu_ld
with_sysroot
enable_libtool_lock
@@ -1440,7 +1440,7 @@ 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 libXfont 1.4.6 to adapt to many kinds of systems.
+\`configure' configures libXfont 1.4.7 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1510,7 +1510,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libXfont 1.4.6:";;
+ short | recursive ) echo "Configuration of libXfont 1.4.7:";;
esac
cat <<\_ACEOF
@@ -1520,14 +1520,14 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-silent-rules less verbose build output (undo: "make V=1")
--disable-silent-rules verbose build output (undo: "make V=0")
- --enable-shared[=PKGS] build shared libraries [default=yes]
- --enable-static[=PKGS] build static libraries [default=yes]
- --enable-fast-install[=PKGS]
- optimize for fast installation [default=yes]
--enable-dependency-tracking
do not reject slow dependency extractors
--disable-dependency-tracking
speeds up one-time build
+ --enable-shared[=PKGS] build shared libraries [default=yes]
+ --enable-static[=PKGS] build static libraries [default=yes]
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--disable-selective-werror
Turn off selective compiler errors. (default:
@@ -1649,7 +1649,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libXfont configure 1.4.6
+libXfont configure 1.4.7
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1701,21 +1701,20 @@ fi
} # ac_fn_c_try_compile
-# ac_fn_c_try_link LINENO
-# -----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_link ()
+# 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
- rm -f conftest.$ac_objext conftest$ac_exeext
- if { { ac_try="$ac_link"
+ 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_link") 2>conftest.err
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
ac_status=$?
if test -s conftest.err; then
grep -v '^ *+' conftest.err >conftest.er1
@@ -1723,97 +1722,112 @@ $as_echo "$ac_try_echo"; } >&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 $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_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
+ 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_try_cpp
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# ac_fn_c_check_header_mongrel 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 ()
+# 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
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ # 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 :
- eval "$3=yes"
+ ac_header_compiler=yes
else
- eval "$3=no"
+ ac_header_compiler=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
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
-} # ac_fn_c_check_header_compile
+# 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; }
-# 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;;
+# 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
-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
+ { $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
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
+ 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
- as_fn_set_status $ac_retval
-} # ac_fn_c_try_cpp
+} # ac_fn_c_check_header_mongrel
# ac_fn_c_try_run LINENO
# ----------------------
@@ -1857,6 +1871,83 @@ fi
} # 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 ||
+ $as_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
@@ -1970,97 +2061,6 @@ $as_echo "$ac_res" >&6; }
} # ac_fn_c_check_decl
-# 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
-
# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
# ----------------------------------------------------
# Tries to find if the field MEMBER exists in type AGGR, after including
@@ -2175,7 +2175,7 @@ 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 libXfont $as_me 1.4.6, which was
+It was created by libXfont $as_me 1.4.7, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -3043,7 +3043,7 @@ fi
# Define the identity of the package.
PACKAGE='libXfont'
- VERSION='1.4.6'
+ VERSION='1.4.7'
cat >>confdefs.h <<_ACEOF
@@ -3136,172 +3136,9 @@ END
fi
fi
-# Initialize libtool
-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"
-
-# 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
-
-
-# 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
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+# Set common system defines for POSIX extensions, such as _GNU_SOURCE
+# Must be called before any macros that run the compiler (like
+# AC_PROG_LIBTOOL) to avoid autoconf errors.
DEPDIR="${am__leading_dot}deps"
ac_config_commands="$ac_config_commands depfiles"
@@ -4342,86 +4179,143 @@ else
fi
-{ $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 :
+
+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
- 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
+ # 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
- 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"
- { test -f "$ac_path_SED" && $as_test_x "$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
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> 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 <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
- $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
+ # 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 <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
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//"
-
+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 <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> 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 <limits.h>
+#else
+# include <assert.h>
+#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 <ac_nonexistent.h>
+_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
@@ -4554,6 +4448,445 @@ $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 <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+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 <string.h>
+
+_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 <stdlib.h>
+
+_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 <ctype.h>
+#include <stdlib.h>
+#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_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
+if test "x$ac_cv_header_minix_config_h" = xyes; then :
+ MINIX=yes
+else
+ MINIX=
+fi
+
+
+ if test "$MINIX" = yes; then
+
+$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
+
+
+$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+
+$as_echo "#define _MINIX 1" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if ${ac_cv_safe_to_define___extensions__+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# define __EXTENSIONS__ 1
+ $ac_includes_default
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_safe_to_define___extensions__=yes
+else
+ ac_cv_safe_to_define___extensions__=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+ test $ac_cv_safe_to_define___extensions__ = yes &&
+ $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
+
+ $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
+
+ $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+
+ $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+ $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
+
+
+
+# Initialize libtool
+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"
+
+# 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
+
+
+# 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"
+ { test -f "$ac_path_SED" && $as_test_x "$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 :
@@ -5767,7 +6100,6 @@ test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
-
if test -n "$ac_tool_prefix"; then
for ac_prog in ar
do
@@ -7471,273 +7803,6 @@ $as_echo "$lt_cv_ld_force_load" >&6; }
;;
esac
-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 <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> 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 <limits.h>
-#else
-# include <assert.h>
-#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 <ac_nonexistent.h>
-_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 <limits.h> to <assert.h> if __STDC__ is defined, since
- # <limits.h> 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 <limits.h>
-#else
-# include <assert.h>
-#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 <ac_nonexistent.h>
-_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 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 <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-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 <string.h>
-
-_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 <stdlib.h>
-
-_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 <ctype.h>
-#include <stdlib.h>
-#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
-
-
for ac_header in dlfcn.h
do :
ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
@@ -12180,11 +12245,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -12298,11 +12363,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -12416,11 +12481,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -12534,11 +12599,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -12583,11 +12648,11 @@ $as_echo "$supported" >&6; }
fi
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -12703,11 +12768,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -12821,11 +12886,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -12939,11 +13004,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -13057,11 +13122,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -13175,11 +13240,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -13223,6 +13288,55 @@ $as_echo "$supported" >&6; }
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
+
@@ -13293,11 +13407,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -13415,11 +13529,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -13533,11 +13647,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -13651,11 +13765,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -13769,19 +13883,19 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
- CFLAGS="$CFLAGS -Wcast-qual"
+ CFLAGS="$CFLAGS -Wmissing-noreturn"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wcast-qual" >&5
-$as_echo_n "checking if $CC supports -Wcast-qual... " >&6; }
- cacheid=xorg_cv_cc_flag__Wcast_qual
+ { $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
@@ -13812,7 +13926,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $supported" >&5
$as_echo "$supported" >&6; }
if test "$supported" = "yes" ; then
- BASE_CFLAGS="$BASE_CFLAGS -Wcast-qual"
+ BASE_CFLAGS="$BASE_CFLAGS -Wmissing-noreturn"
found="yes"
fi
fi
@@ -13887,19 +14001,19 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
- CFLAGS="$CFLAGS -Wmissing-noreturn"
+ CFLAGS="$CFLAGS -Wmissing-format-attribute"
- { $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
+ { $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
@@ -13930,7 +14044,7 @@ fi
{ $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"
+ BASE_CFLAGS="$BASE_CFLAGS -Wmissing-format-attribute"
found="yes"
fi
fi
@@ -14005,19 +14119,19 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ 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"
+ CFLAGS="$CFLAGS -Wredundant-decls"
- { $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
+ { $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
@@ -14048,7 +14162,7 @@ fi
{ $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"
+ BASE_CFLAGS="$BASE_CFLAGS -Wredundant-decls"
found="yes"
fi
fi
@@ -14123,19 +14237,19 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
- CFLAGS="$CFLAGS -Wredundant-decls"
+ CFLAGS="$CFLAGS -Wlogical-op"
- { $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
+ { $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
@@ -14166,7 +14280,7 @@ fi
{ $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"
+ BASE_CFLAGS="$BASE_CFLAGS -Wlogical-op"
found="yes"
fi
fi
@@ -14176,9 +14290,9 @@ $as_echo "$supported" >&6; }
# 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]], [-Wlogical-op])
# 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.
@@ -14253,11 +14367,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -14302,11 +14416,11 @@ $as_echo "$supported" >&6; }
fi
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -14420,11 +14534,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -14538,11 +14652,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -14656,11 +14770,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -14774,11 +14888,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -14892,11 +15006,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -15010,11 +15124,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -15059,11 +15173,11 @@ $as_echo "$supported" >&6; }
fi
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -15177,11 +15291,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -15295,11 +15409,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -15413,11 +15527,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -15531,11 +15645,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -15649,11 +15763,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -15698,11 +15812,11 @@ $as_echo "$supported" >&6; }
fi
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -15816,11 +15930,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -15937,11 +16051,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -16055,11 +16169,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -16173,11 +16287,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -16291,11 +16405,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -16409,11 +16523,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -16527,11 +16641,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -16645,11 +16759,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -16763,11 +16877,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -16881,11 +16995,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -16999,11 +17113,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -17117,11 +17231,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -17235,11 +17349,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -17353,11 +17467,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -17504,11 +17618,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -17622,11 +17736,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -17671,11 +17785,11 @@ $as_echo "$supported" >&6; }
fi
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -17792,11 +17906,11 @@ fi
found="no"
if test $found = "no" ; then
- if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
+ if test "x$xorg_testset_cc_unknown_warning_option" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unknown-warning-option"
fi
- if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
+ if test "x$xorg_testset_cc_unused_command_line_argument" = "xyes" ; then
CFLAGS="$CFLAGS -Werror=unused-command-line-argument"
fi
@@ -19104,40 +19218,6 @@ $as_echo "yes" >&6; }
fi
# Transport selection macro from xtrans.m4
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
-$as_echo_n "checking return type of signal handlers... " >&6; }
-if ${ac_cv_type_signal+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <sys/types.h>
-#include <signal.h>
-
-int
-main ()
-{
-return *(signal (0, 0)) (0) == 1;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_type_signal=int
-else
- ac_cv_type_signal=void
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
-$as_echo "$ac_cv_type_signal" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define RETSIGTYPE $ac_cv_type_signal
-_ACEOF
-
-
-
case $host_os in
@@ -19328,7 +19408,6 @@ _ACEOF
LIBS="-lws2_32 $LIBS"
fi
-ac_cv_lib_ws2_32=ac_cv_lib_ws2_32_main
fi
@@ -19385,6 +19464,57 @@ _ACEOF
fi
+ # XPG4v2/UNIX95 added msg_control - check to see if we need to define
+ # _XOPEN_SOURCE to get it (such as on Solaris)
+ ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "
+$ac_includes_default
+#include <sys/socket.h>
+
+"
+if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then :
+
+fi
+
+ # First try for Solaris in C99 compliant mode, which requires XPG6/UNIX03
+ if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then
+ unset ac_cv_member_struct_msghdr_msg_control
+ { $as_echo "$as_me:${as_lineno-$LINENO}: trying again with _XOPEN_SOURCE=600" >&5
+$as_echo "$as_me: trying again with _XOPEN_SOURCE=600" >&6;}
+ ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "
+#define _XOPEN_SOURCE 600
+$ac_includes_default
+#include <sys/socket.h>
+
+"
+if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then :
+
+$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
+
+
+fi
+
+ fi
+ # If that didn't work, fall back to XPG5/UNIX98 with C89
+ if test "x$ac_cv_member_struct_msghdr_msg_control" = xno; then
+ unset ac_cv_member_struct_msghdr_msg_control
+ { $as_echo "$as_me:${as_lineno-$LINENO}: trying again with _XOPEN_SOURCE=500" >&5
+$as_echo "$as_me: trying again with _XOPEN_SOURCE=500" >&6;}
+ ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "
+#define _XOPEN_SOURCE 500
+$ac_includes_default
+#include <sys/socket.h>
+
+"
+if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then :
+
+$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
+
+
+fi
+
+ fi
+
+
fi
case $host_os in
@@ -20023,7 +20153,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libXfont $as_me 1.4.6, which was
+This file was extended by libXfont $as_me 1.4.7, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -20089,7 +20219,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-libXfont config.status 1.4.6
+libXfont config.status 1.4.7
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
diff --git a/libXfont/configure.ac b/libXfont/configure.ac
index e0e81bb21..01e7b6e58 100644
--- a/libXfont/configure.ac
+++ b/libXfont/configure.ac
@@ -21,7 +21,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
-AC_INIT([libXfont], [1.4.6],
+AC_INIT([libXfont], [1.4.7],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [libXfont])
AC_CONFIG_SRCDIR([Makefile.am])
AC_CONFIG_HEADERS([config.h include/X11/fonts/fontconf.h])
@@ -29,6 +29,11 @@ AC_CONFIG_HEADERS([config.h include/X11/fonts/fontconf.h])
# Initialize Automake
AM_INIT_AUTOMAKE([foreign dist-bzip2])
+# Set common system defines for POSIX extensions, such as _GNU_SOURCE
+# Must be called before any macros that run the compiler (like
+# AC_PROG_LIBTOOL) to avoid autoconf errors.
+AC_USE_SYSTEM_EXTENSIONS
+
# Initialize libtool
AC_PROG_LIBTOOL
diff --git a/libXfont/src/FreeType/ftfuncs.c b/libXfont/src/FreeType/ftfuncs.c
index 95873fa07..d3af0dbd2 100644
--- a/libXfont/src/FreeType/ftfuncs.c
+++ b/libXfont/src/FreeType/ftfuncs.c
@@ -2054,7 +2054,7 @@ restrict_code_range_by_str(int count,unsigned short *refFirstCol,
{
int nRanges = 0;
int result = 0;
- fsRange *ranges = NULL;
+ fsRange *ranges = NULL, *oldRanges;
char const *p, *q;
p = q = str;
@@ -2123,10 +2123,13 @@ restrict_code_range_by_str(int count,unsigned short *refFirstCol,
fflush(stderr);
#endif
nRanges++;
+ oldRanges = ranges;
ranges = realloc(ranges, nRanges*sizeof(*ranges));
- if (NULL == ranges)
+ if (NULL == ranges) {
+ free(oldRanges);
break;
- {
+ }
+ else {
fsRange *r = ranges+nRanges-1;
r->min_char_low = minpoint & 0xff;
@@ -2208,7 +2211,7 @@ FreeTypeSetUpTTCap( char *fileName, FontScalablePtr vals,
strcpy(*dynStrRealFileName+dirLen, p2+1);
capHead = p1;
} else {
- *dynStrRealFileName = xstrdup(fileName);
+ *dynStrRealFileName = strdup(fileName);
if( *dynStrRealFileName == NULL ) {
result = AllocError;
goto quit;
@@ -2293,13 +2296,11 @@ FreeTypeSetUpTTCap( char *fileName, FontScalablePtr vals,
}
}
else{
- *dynStrFTFileName = malloc(strlen(*dynStrRealFileName)+1);
+ *dynStrFTFileName = strdup(*dynStrRealFileName);
if( *dynStrFTFileName == NULL ){
result = AllocError;
goto quit;
}
- **dynStrFTFileName = '\0';
- strcat(*dynStrFTFileName,*dynStrRealFileName);
}
}
/*
@@ -2553,7 +2554,7 @@ FreeTypeSetUpTTCap( char *fileName, FontScalablePtr vals,
if (SPropRecValList_search_record(&listPropRecVal,
&contRecValue,
"CodeRange")) {
- *dynStrTTCapCodeRange = xstrdup(SPropContainer_value_str(contRecValue));
+ *dynStrTTCapCodeRange = strdup(SPropContainer_value_str(contRecValue));
if( *dynStrTTCapCodeRange == NULL ) {
result = AllocError;
goto quit;
diff --git a/libXfont/src/FreeType/xttcap.c b/libXfont/src/FreeType/xttcap.c
index c2a412091..104dc89e4 100644
--- a/libXfont/src/FreeType/xttcap.c
+++ b/libXfont/src/FreeType/xttcap.c
@@ -1,7 +1,7 @@
/* ===EmacsMode: -*- Mode: C; tab-width:4; c-basic-offset: 4; -*- === */
/* ===FileName: ===
Copyright (c) 1998 Takuya SHIOZAKI, All Rights reserved.
- Copyright (c) 1998 X-TrueType Server Project, All rights reserved.
+ Copyright (c) 1998 X-TrueType Server Project, All rights reserved.
Copyright (c) 2003 After X-TT Project, All rights reserved.
===Notice
@@ -133,7 +133,7 @@ get_record_type_by_name(SPropertyRecord const ** const refRefRecord, /*result*/
{
Bool result = False;
int i;
-
+
*refRefRecord = NULL;
for (i=0; i<numOfValidRecords; i++) {
if (!strcasecmp(validRecords[i].strRecordName, strName)) {
@@ -142,7 +142,7 @@ get_record_type_by_name(SPropertyRecord const ** const refRefRecord, /*result*/
break;
}
}
-
+
return result;
}
@@ -161,7 +161,7 @@ SPropRecValList_add_record(SDynPropRecValList *pThisList,
{
int val;
char *endPtr;
-
+
val = strtol(strValue, &endPtr, 0);
if ('\0' != *endPtr) {
fprintf(stderr,
@@ -178,7 +178,7 @@ SPropRecValList_add_record(SDynPropRecValList *pThisList,
{
double val;
char *endPtr;
-
+
val = strtod(strValue, &endPtr);
if ('\0' != *endPtr) {
fprintf(stderr,
@@ -194,7 +194,7 @@ SPropRecValList_add_record(SDynPropRecValList *pThisList,
case eRecTypeBool:
{
Bool val;
-
+
if (!strcasecmp(strValue, "yes"))
val = True;
else if (!strcasecmp(strValue, "y"))
@@ -233,15 +233,14 @@ SPropRecValList_add_record(SDynPropRecValList *pThisList,
case eRecTypeString:
{
char *p;
-
- if (NULL == (p = malloc(strlen(strValue)+1))) {
+
+ if (NULL == (p = strdup(strValue))) {
fprintf(stderr,
"truetype font property : "
"cannot allocate memory.\n");
result = True;
goto quit;
}
- strcpy(p, strValue);
SPropContainer_value_str(&tmpContainerE) = p;
}
break;
@@ -257,7 +256,7 @@ SPropRecValList_add_record(SDynPropRecValList *pThisList,
{
/* add to list */
SPropRecValListNodeP *newNode;
-
+
if (NULL == (newNode = malloc(sizeof(*newNode)))) {
fprintf(stderr,
"truetype font property : "
@@ -301,11 +300,11 @@ get_one_line(FILE *is, char *buf)
Bool flInDoubleQuote = False;
Bool flBackSlash = False;
Bool flFirstElement = True;
-
+
*buf = '\0';
for (;;) {
int c = fgetc(is);
-
+
if (ferror(is)) {
fprintf(stderr, "truetype font property file : read error.\n");
result = True;
@@ -446,7 +445,7 @@ parse_one_line(SDynPropRecValList *pThisList, FILE *is)
Bool result = False;
char *buf = NULL;
char *recordHead, *valueHead = NULL;
-
+
if (NULL == (buf = malloc(LEN_LINEBUF))) {
fprintf(stderr,
"truetype font property file : cannot allocate memory.\n");
@@ -483,7 +482,7 @@ parse_one_line(SDynPropRecValList *pThisList, FILE *is)
}
quit:
free(buf);
- abort:
+ abort:
return result;
}
@@ -494,7 +493,7 @@ SPropRecValList_read_prop_file(SDynPropRecValList *pThisList,
{
Bool result = False;
FILE *is;
-
+
#if 1
if (!strcmp(strFileName, "-"))
is = stdin;
@@ -530,7 +529,7 @@ Bool /* True == Error, False == Success */
SPropRecValList_new(SDynPropRecValList *pThisList)
{
Bool result = False;
-
+
pThisList->headNode = NULL;
return result;
@@ -582,7 +581,7 @@ SPropRecValList_search_record(SRefPropRecValList *pThisList,
{
Bool result = False;
SPropRecValListNodeP *p;
-
+
*refRecValue = NULL;
for (p=pThisList->headNode; NULL!=p; p=p->nextNode) {
if (!strcasecmp(p->containerE.refRecordType->strRecordName,
@@ -605,7 +604,7 @@ SPropRecValList_add_by_font_cap(SDynPropRecValList *pThisList,
Bool result = False;
/* SPropertyRecord const *refRecordType; */
char const *term;
-
+
if (NULL == (term = strrchr(strCapHead, ':')))
goto abort;
@@ -646,7 +645,7 @@ SPropRecValList_add_by_font_cap(SDynPropRecValList *pThisList,
char *duplicated = malloc((nextColon-strCapHead)+1);
{
char *value;
-
+
memcpy(duplicated, strCapHead, nextColon-strCapHead);
duplicated[nextColon-strCapHead] = '\0';
if (NULL != (value=strchr(duplicated, '='))) {
@@ -654,7 +653,7 @@ SPropRecValList_add_by_font_cap(SDynPropRecValList *pThisList,
value++;
} else
value = &duplicated[nextColon-strCapHead];
-
+
for (i=0; i<numOfCorrespondRelations; i++) {
if (!strcasecmp(correspondRelations[i].capVariable,
duplicated)) {
@@ -676,30 +675,10 @@ SPropRecValList_add_by_font_cap(SDynPropRecValList *pThisList,
}
strCapHead = nextColon+1;
}
-
+
/* quit: */
abort:
return result;
}
-
-/**************************************************************************
- Functions (xttmisc)
- */
-
-/* strdup clone with using the allocator of X server */
-char *
-XttXstrdup(char const *str)
-{
- char *result;
-
- result = malloc(strlen(str)+1);
-
- if (result)
- strcpy(result, str);
-
- return result;
-}
-
-
/* end of file */
diff --git a/libXfont/src/FreeType/xttcap.h b/libXfont/src/FreeType/xttcap.h
index 6a09cf610..2822540bb 100644
--- a/libXfont/src/FreeType/xttcap.h
+++ b/libXfont/src/FreeType/xttcap.h
@@ -1,8 +1,8 @@
/* ===EmacsMode: -*- Mode: C; tab-width:4; c-basic-offset: 4; -*- === */
/* ===FileName: ===
Copyright (c) 1998 Takuya SHIOZAKI, All Rights reserved.
- Copyright (c) 1998 X-TrueType Server Project, All rights reserved.
- Copyright (c) 2003 After X-TT Project, All rights reserved.
+ Copyright (c) 1998 X-TrueType Server Project, All rights reserved.
+ Copyright (c) 2003 After X-TT Project, All rights reserved.
===Notice
Redistribution and use in source and binary forms, with or without
@@ -116,15 +116,6 @@ SPropRecValList_dump(SRefPropRecValList *refList);
#define SPropContainer_value_str(contRecVal)\
((contRecVal)->uValue.dynStringValue)
-/******************************************************
- Prototypes (xttmisc)
- */
-
-/* strdup clone */
-char * XttXstrdup(char const *str);
-#undef xstrdup
-#define xstrdup(s) XttXstrdup((char const*)s)
-
#endif /* !def _XTTCAP_H_ */
/* end of file */
diff --git a/libXfont/src/Makefile.am b/libXfont/src/Makefile.am
index 26551bc04..cd09ab99f 100644
--- a/libXfont/src/Makefile.am
+++ b/libXfont/src/Makefile.am
@@ -1,6 +1,6 @@
-#
+#
# Copyright © 2003 Keith Packard, Noah Levitt
-#
+#
# 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
@@ -10,7 +10,7 @@
# specific, written prior permission. Keith Packard makes no
# representations about the suitability of this software for any purpose. It
# is provided "as is" without express or implied warranty.
-#
+#
# KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
# EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
diff --git a/libXfont/src/bitmap/bdfread.c b/libXfont/src/bitmap/bdfread.c
index e2770dc1c..914a0244e 100644
--- a/libXfont/src/bitmap/bdfread.c
+++ b/libXfont/src/bitmap/bdfread.c
@@ -69,6 +69,7 @@ from The Open Group.
#define INDICES 256
#define MAXENCODING 0xFFFF
#define BDFLINELEN 1024
+#define BDFLINESTR "%1023s" /* scanf specifier to read a BDFLINELEN string */
static Bool bdfPadToTerminal(FontPtr pFont);
extern int bdfFileLineNum;
@@ -338,7 +339,7 @@ bdfReadCharacters(FontFilePtr file, FontPtr pFont, bdfFileState *pState,
char charName[100];
int ignore;
- if (sscanf((char *) line, "STARTCHAR %s", charName) != 1) {
+ if (sscanf((char *) line, "STARTCHAR %99s", charName) != 1) {
bdfError("bad character name in BDF file\n");
goto BAILOUT; /* bottom of function, free and return error */
}
@@ -544,13 +545,18 @@ bdfReadHeader(FontFilePtr file, bdfFileState *pState)
unsigned char lineBuf[BDFLINELEN];
line = bdfGetLine(file, lineBuf, BDFLINELEN);
- if (!line || sscanf((char *) line, "STARTFONT %s", namebuf) != 1 ||
+ if (!line ||
+ sscanf((char *) line, "STARTFONT " BDFLINESTR, namebuf) != 1 ||
!bdfStrEqual(namebuf, "2.1")) {
bdfError("bad 'STARTFONT'\n");
return (FALSE);
}
line = bdfGetLine(file, lineBuf, BDFLINELEN);
- if (!line || sscanf((char *) line, "FONT %[^\n]", pState->fontName) != 1) {
+#if MAXFONTNAMELEN != 1024
+# error "need to adjust sscanf length limit to be MAXFONTNAMELEN - 1"
+#endif
+ if (!line ||
+ sscanf((char *) line, "FONT %1023[^\n]", pState->fontName) != 1) {
bdfError("bad 'FONT'\n");
return (FALSE);
}
@@ -633,7 +639,9 @@ bdfReadProperties(FontFilePtr file, FontPtr pFont, bdfFileState *pState)
while (*line && isspace(*line))
line++;
- switch (sscanf((char *) line, "%s%s%s", namebuf, secondbuf, thirdbuf)) {
+ switch (sscanf((char *) line,
+ BDFLINESTR BDFLINESTR BDFLINESTR,
+ namebuf, secondbuf, thirdbuf)) {
default:
bdfError("missing '%s' parameter value\n", namebuf);
goto BAILOUT;
diff --git a/libXfont/src/builtins/buildfont b/libXfont/src/builtins/buildfont
index aa4602ff8..84c68c4f4 100644
--- a/libXfont/src/builtins/buildfont
+++ b/libXfont/src/builtins/buildfont
@@ -8,7 +8,7 @@ NAME=$2
echo 'static const char file_'$NAME'[] = {'
bdftopcf -p1 -u1 $1 |
compress -b 12 |
- od -b -v -w8 |
+ od -b -v -w8 |
sed 's/^[0-9]*\( *\)/\1\1\1\1/' |
sed 's/\([0-9][0-9]*\)/'"'"'\\\1'"'"',/g'
echo '};'
diff --git a/libXfont/src/fontfile/fontdir.c b/libXfont/src/fontfile/fontdir.c
index 97b2ba3b1..ef7ffa561 100644
--- a/libXfont/src/fontfile/fontdir.c
+++ b/libXfont/src/fontfile/fontdir.c
@@ -425,17 +425,13 @@ FontFileCountDashes (char *name, int namelen)
return ndashes;
}
+/* exported in public API in <X11/fonts/fntfil.h> */
char *
FontFileSaveString (char *s)
{
- char *n;
-
- n = malloc (strlen (s) + 1);
- if (!n)
- return 0;
- strcpy (n, s);
- return n;
+ return strdup(s);
}
+#define FontFileSaveString(s) strdup(s)
FontEntryPtr
FontFileFindNameInScalableDir(FontTablePtr table, FontNamePtr pat,
diff --git a/libXfont/src/util/atom.c b/libXfont/src/util/atom.c
index c47cb5c80..37811f91e 100644
--- a/libXfont/src/util/atom.c
+++ b/libXfont/src/util/atom.c
@@ -118,19 +118,23 @@ ResizeHashTable (void)
static int
ResizeReverseMap (void)
{
- int ret = TRUE;
+ AtomListPtr *newMap;
+ int newMapSize;
+
if (reverseMapSize == 0)
- reverseMapSize = 1000;
+ newMapSize = 1000;
else
- reverseMapSize *= 2;
- reverseMap = realloc (reverseMap, reverseMapSize * sizeof (AtomListPtr));
- if (!reverseMap) {
+ newMapSize = reverseMapSize * 2;
+ newMap = realloc (reverseMap, newMapSize * sizeof (AtomListPtr));
+ if (newMap == NULL) {
fprintf(stderr, "ResizeReverseMap(): Error: Couldn't reallocate"
" reverseMap (%ld)\n",
- reverseMapSize * (unsigned long)sizeof(AtomListPtr));
- ret = FALSE;
+ newMapSize * (unsigned long)sizeof(AtomListPtr));
+ return FALSE;
}
- return ret;
+ reverseMap = newMap;
+ reverseMapSize = newMapSize;
+ return TRUE;
}
static int
diff --git a/libXfont/src/util/miscutil.c b/libXfont/src/util/miscutil.c
index 7173d3640..3d802d2f5 100644
--- a/libXfont/src/util/miscutil.c
+++ b/libXfont/src/util/miscutil.c
@@ -47,7 +47,7 @@ extern void BuiltinRegisterFpeFunctions(void);
#ifndef NO_WEAK_SYMBOLS
/* make sure everything initializes themselves at least once */
-weak long serverGeneration = 1;
+weak unsigned long serverGeneration = 1;
#endif
weak void
diff --git a/mesalib/SConstruct b/mesalib/SConstruct
index de735e94c..0e10818ba 100644
--- a/mesalib/SConstruct
+++ b/mesalib/SConstruct
@@ -59,13 +59,6 @@ else:
Help(opts.GenerateHelpText(env))
-# fail early for a common error on windows
-if env['gles']:
- try:
- import libxml2
- except ImportError:
- raise SCons.Errors.UserError, "GLES requires libxml2-python to build"
-
#######################################################################
# Environment setup
diff --git a/mesalib/configure.ac b/mesalib/configure.ac
index c5042f93e..1e5e49667 100644
--- a/mesalib/configure.ac
+++ b/mesalib/configure.ac
@@ -54,7 +54,6 @@ AM_PROG_CC_C_O
AM_PROG_AS
AC_CHECK_PROGS([MAKE], [gmake make])
AC_CHECK_PROGS([PYTHON2], [python2 python])
-AX_PYTHON_MODULE([libxml2], [needed])
AC_PROG_SED
AC_PROG_MKDIR_P
@@ -1549,7 +1548,6 @@ if test "x$enable_gallium_llvm" = xyes; then
LLVM_CXXFLAGS=`strip_unwanted_llvm_flags "$LLVM_CONFIG --cxxflags"`
LLVM_INCLUDEDIR=`$LLVM_CONFIG --includedir`
LLVM_LIBDIR=`$LLVM_CONFIG --libdir`
- LLVM_LDFLAGS="-Wl,-rpath,$LLVM_LIBDIR $LLVM_LDFLAGS"
AC_COMPUTE_INT([LLVM_VERSION_MAJOR], [LLVM_VERSION_MAJOR],
[#include "${LLVM_INCLUDEDIR}/llvm/Config/llvm-config.h"])
diff --git a/mesalib/docs/README.WIN32 b/mesalib/docs/README.WIN32
index 0cd007c8a..c8759f65b 100644
--- a/mesalib/docs/README.WIN32
+++ b/mesalib/docs/README.WIN32
@@ -36,17 +36,15 @@ Recipe
Building on windows requires several open-source packages. These are
steps that work as of this writing.
-1) install python 2.7
-2) install scons (latest)
-3) install mingw, flex, and bison
-4) install libxml2 from here: http://www.lfd.uci.edu/~gohlke/pythonlibs
- get libxml2-python-2.9.1.win-amd64-py2.7.exe
-5) install pywin32 from here: http://www.lfd.uci.edu/~gohlke/pythonlibs
+- install python 2.7
+- install scons (latest)
+- install mingw, flex, and bison
+- install pywin32 from here: http://www.lfd.uci.edu/~gohlke/pythonlibs
get pywin32-218.4.win-amd64-py2.7.exe
-6) install git
-7) download mesa from git
+- install git
+- download mesa from git
see http://www.mesa3d.org/repository.html
-8) run scons
+- run scons
General
-------
diff --git a/mesalib/docs/install.html b/mesalib/docs/install.html
index 24492a786..5061eded0 100644
--- a/mesalib/docs/install.html
+++ b/mesalib/docs/install.html
@@ -44,10 +44,6 @@ On Windows with MinGW, install flex and bison with:
</li>
<li>python - Python is needed for building the Gallium components.
Version 2.6.4 or later should work.
-<br>
-<br>
-To build OpenGL ES 1.1 and 2.0 you'll also need
-<a href="http://xmlsoft.org/sources/win32/python/libxml2-python-2.7.7.win32-py2.7.exe">libxml2-python</a>.
</li>
</ul>
diff --git a/mesalib/m4/ax_python_module.m4 b/mesalib/m4/ax_python_module.m4
deleted file mode 100644
index 2e6670a0f..000000000
--- a/mesalib/m4/ax_python_module.m4
+++ /dev/null
@@ -1,49 +0,0 @@
-# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_python_module.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-# AX_PYTHON_MODULE(modname[, fatal])
-#
-# DESCRIPTION
-#
-# Checks for Python module.
-#
-# If fatal is non-empty then absence of a module will trigger an error.
-#
-# LICENSE
-#
-# Copyright (c) 2008 Andrew Collier
-#
-# Copying and distribution of this file, with or without modification, are
-# permitted in any medium without royalty provided the copyright notice
-# and this notice are preserved. This file is offered as-is, without any
-# warranty.
-
-#serial 6
-
-AU_ALIAS([AC_PYTHON_MODULE], [AX_PYTHON_MODULE])
-AC_DEFUN([AX_PYTHON_MODULE],[
- if test -z $PYTHON2;
- then
- PYTHON2="python"
- fi
- PYTHON_NAME=`basename $PYTHON2`
- AC_MSG_CHECKING($PYTHON_NAME module: $1)
- $PYTHON2 -c "import $1" 2>/dev/null
- if test $? -eq 0;
- then
- AC_MSG_RESULT(yes)
- eval AS_TR_CPP(HAVE_PYMOD_$1)=yes
- else
- AC_MSG_RESULT(no)
- eval AS_TR_CPP(HAVE_PYMOD_$1)=no
- #
- if test -n "$2"
- then
- AC_MSG_ERROR(failed to find required module $1)
- exit 1
- fi
- fi
-])
diff --git a/mesalib/src/glsl/glsl_parser.yy b/mesalib/src/glsl/glsl_parser.yy
index 3798af455..531ae394b 100644
--- a/mesalib/src/glsl/glsl_parser.yy
+++ b/mesalib/src/glsl/glsl_parser.yy
@@ -1902,7 +1902,6 @@ struct_specifier:
$$ = new(ctx) ast_struct_specifier($2, $4);
$$->set_location_range(@2, @5);
state->symbols->add_type($2, glsl_type::void_type);
- state->symbols->add_type_ast($2, new(ctx) ast_type_specifier($$));
}
| STRUCT '{' struct_declaration_list '}'
{
diff --git a/mesalib/src/glsl/glsl_symbol_table.cpp b/mesalib/src/glsl/glsl_symbol_table.cpp
index 6ec4f534b..d17a5e66f 100755
--- a/mesalib/src/glsl/glsl_symbol_table.cpp
+++ b/mesalib/src/glsl/glsl_symbol_table.cpp
@@ -166,23 +166,6 @@ bool glsl_symbol_table::add_type(const char *name, const glsl_type *t)
return _mesa_symbol_table_add_symbol(table, -1, name, entry) == 0;
}
-static char *make_ast_name(const char *name)
-{
- char *ast_name = new char[strlen("#ast.") + strlen(name) + 1];
- strcpy(ast_name, "#ast.");
- strcat(ast_name + strlen("#ast."), name);
- return ast_name;
-}
-
-bool glsl_symbol_table::add_type_ast(const char *name, const class ast_type_specifier *a)
-{
- symbol_table_entry *entry = new(mem_ctx) symbol_table_entry(a);
- char *ast_name = make_ast_name(name);
- bool ret = _mesa_symbol_table_add_symbol(table, -1, ast_name, entry) == 0;
- delete [] ast_name;
- return ret;
-}
-
bool glsl_symbol_table::add_interface(const char *name, const glsl_type *i,
enum ir_variable_mode mode)
{
@@ -234,14 +217,6 @@ const glsl_type *glsl_symbol_table::get_type(const char *name)
return entry != NULL ? entry->t : NULL;
}
-const class ast_type_specifier *glsl_symbol_table::get_type_ast(const char *name)
-{
- char *ast_name = make_ast_name(name);
- symbol_table_entry *entry = get_entry(ast_name);
- delete [] ast_name;
- return entry != NULL ? entry->a : NULL;
-}
-
const glsl_type *glsl_symbol_table::get_interface(const char *name,
enum ir_variable_mode mode)
{
diff --git a/mesalib/src/glsl/glsl_symbol_table.h b/mesalib/src/glsl/glsl_symbol_table.h
index 89d832125..83d7935d8 100644
--- a/mesalib/src/glsl/glsl_symbol_table.h
+++ b/mesalib/src/glsl/glsl_symbol_table.h
@@ -103,7 +103,6 @@ public:
/*@{*/
bool add_variable(ir_variable *v);
bool add_type(const char *name, const glsl_type *t);
- bool add_type_ast(const char *name, const class ast_type_specifier *t);
bool add_function(ir_function *f);
bool add_interface(const char *name, const glsl_type *i,
enum ir_variable_mode mode);
@@ -120,7 +119,6 @@ public:
/*@{*/
ir_variable *get_variable(const char *name);
const glsl_type *get_type(const char *name);
- const class ast_type_specifier *get_type_ast(const char *name);
ir_function *get_function(const char *name);
const glsl_type *get_interface(const char *name,
enum ir_variable_mode mode);
diff --git a/mesalib/src/glsl/ir.h b/mesalib/src/glsl/ir.h
index ed3f086ce..8fa3b9ef6 100644
--- a/mesalib/src/glsl/ir.h
+++ b/mesalib/src/glsl/ir.h
@@ -1914,15 +1914,6 @@ public:
* Get the variable that is ultimately referenced by an r-value
*/
virtual ir_variable *variable_referenced() const = 0;
-
- /**
- * Get the constant that is ultimately referenced by an r-value,
- * in a constant expression evaluation context.
- *
- * The offset is used when the reference is to a specific column of
- * a matrix.
- */
- virtual void constant_referenced(struct hash_table *variable_context, ir_constant *&store, int &offset) const = 0;
};
@@ -1950,15 +1941,6 @@ public:
return this->var;
}
- /**
- * Get the constant that is ultimately referenced by an r-value,
- * in a constant expression evaluation context.
- *
- * The offset is used when the reference is to a specific column of
- * a matrix.
- */
- virtual void constant_referenced(struct hash_table *variable_context, ir_constant *&store, int &offset) const;
-
virtual ir_variable *whole_variable_referenced()
{
/* ir_dereference_variable objects always dereference the entire
@@ -2010,15 +1992,6 @@ public:
return this->array->variable_referenced();
}
- /**
- * Get the constant that is ultimately referenced by an r-value,
- * in a constant expression evaluation context.
- *
- * The offset is used when the reference is to a specific column of
- * a matrix.
- */
- virtual void constant_referenced(struct hash_table *variable_context, ir_constant *&store, int &offset) const;
-
virtual void accept(ir_visitor *v)
{
v->visit(this);
@@ -2058,15 +2031,6 @@ public:
return this->record->variable_referenced();
}
- /**
- * Get the constant that is ultimately referenced by an r-value,
- * in a constant expression evaluation context.
- *
- * The offset is used when the reference is to a specific column of
- * a matrix.
- */
- virtual void constant_referenced(struct hash_table *variable_context, ir_constant *&store, int &offset) const;
-
virtual void accept(ir_visitor *v)
{
v->visit(this);
diff --git a/mesalib/src/glsl/ir_clone.cpp b/mesalib/src/glsl/ir_clone.cpp
index 311c992be..167b80c9f 100644
--- a/mesalib/src/glsl/ir_clone.cpp
+++ b/mesalib/src/glsl/ir_clone.cpp
@@ -265,10 +265,12 @@ ir_assignment::clone(void *mem_ctx, struct hash_table *ht) const
if (this->condition)
new_condition = this->condition->clone(mem_ctx, ht);
- return new(mem_ctx) ir_assignment(this->lhs->clone(mem_ctx, ht),
- this->rhs->clone(mem_ctx, ht),
- new_condition,
- this->write_mask);
+ ir_assignment *cloned =
+ new(mem_ctx) ir_assignment(this->lhs->clone(mem_ctx, ht),
+ this->rhs->clone(mem_ctx, ht),
+ new_condition);
+ cloned->write_mask = this->write_mask;
+ return cloned;
}
ir_function *
diff --git a/mesalib/src/glsl/ir_constant_expression.cpp b/mesalib/src/glsl/ir_constant_expression.cpp
index 48cf47f53..f5cb12343 100755
--- a/mesalib/src/glsl/ir_constant_expression.cpp
+++ b/mesalib/src/glsl/ir_constant_expression.cpp
@@ -379,8 +379,104 @@ unpack_half_1x16(uint16_t u)
return _mesa_half_to_float(u);
}
+/**
+ * Get the constant that is ultimately referenced by an r-value, in a constant
+ * expression evaluation context.
+ *
+ * The offset is used when the reference is to a specific column of a matrix.
+ */
+static bool
+constant_referenced(const ir_dereference *deref,
+ struct hash_table *variable_context,
+ ir_constant *&store, int &offset)
+{
+ store = NULL;
+ offset = 0;
+
+ if (variable_context == NULL)
+ return false;
+
+ switch (deref->ir_type) {
+ case ir_type_dereference_array: {
+ const ir_dereference_array *const da =
+ (const ir_dereference_array *) deref;
+
+ ir_constant *const index_c =
+ da->array_index->constant_expression_value(variable_context);
+
+ if (!index_c || !index_c->type->is_scalar() || !index_c->type->is_integer())
+ break;
+
+ const int index = index_c->type->base_type == GLSL_TYPE_INT ?
+ index_c->get_int_component(0) :
+ index_c->get_uint_component(0);
+
+ ir_constant *substore;
+ int suboffset;
+
+ const ir_dereference *const deref = da->array->as_dereference();
+ if (!deref)
+ break;
+
+ if (!constant_referenced(deref, variable_context, substore, suboffset))
+ break;
+
+ const glsl_type *const vt = da->array->type;
+ if (vt->is_array()) {
+ store = substore->get_array_element(index);
+ offset = 0;
+ } else if (vt->is_matrix()) {
+ store = substore;
+ offset = index * vt->vector_elements;
+ } else if (vt->is_vector()) {
+ store = substore;
+ offset = suboffset + index;
+ }
+
+ break;
+ }
+
+ case ir_type_dereference_record: {
+ const ir_dereference_record *const dr =
+ (const ir_dereference_record *) deref;
+
+ const ir_dereference *const deref = dr->record->as_dereference();
+ if (!deref)
+ break;
+
+ ir_constant *substore;
+ int suboffset;
+
+ if (!constant_referenced(deref, variable_context, substore, suboffset))
+ break;
+
+ /* Since we're dropping it on the floor...
+ */
+ assert(suboffset == 0);
+
+ store = substore->get_record_field(dr->field);
+ break;
+ }
+
+ case ir_type_dereference_variable: {
+ const ir_dereference_variable *const dv =
+ (const ir_dereference_variable *) deref;
+
+ store = (ir_constant *) hash_table_find(variable_context, dv->var);
+ break;
+ }
+
+ default:
+ assert(!"Should not get here.");
+ break;
+ }
+
+ return store != NULL;
+}
+
+
ir_constant *
-ir_rvalue::constant_expression_value(struct hash_table *variable_context)
+ir_rvalue::constant_expression_value(struct hash_table *)
{
assert(this->type->is_error());
return NULL;
@@ -1527,7 +1623,7 @@ ir_expression::constant_expression_value(struct hash_table *variable_context)
ir_constant *
-ir_texture::constant_expression_value(struct hash_table *variable_context)
+ir_texture::constant_expression_value(struct hash_table *)
{
/* texture lookups aren't constant expressions */
return NULL;
@@ -1563,19 +1659,6 @@ ir_swizzle::constant_expression_value(struct hash_table *variable_context)
}
-void
-ir_dereference_variable::constant_referenced(struct hash_table *variable_context,
- ir_constant *&store, int &offset) const
-{
- if (variable_context) {
- store = (ir_constant *)hash_table_find(variable_context, var);
- offset = 0;
- } else {
- store = NULL;
- offset = 0;
- }
-}
-
ir_constant *
ir_dereference_variable::constant_expression_value(struct hash_table *variable_context)
{
@@ -1603,60 +1686,6 @@ ir_dereference_variable::constant_expression_value(struct hash_table *variable_c
}
-void
-ir_dereference_array::constant_referenced(struct hash_table *variable_context,
- ir_constant *&store, int &offset) const
-{
- ir_constant *index_c = array_index->constant_expression_value(variable_context);
-
- if (!index_c || !index_c->type->is_scalar() || !index_c->type->is_integer()) {
- store = 0;
- offset = 0;
- return;
- }
-
- int index = index_c->type->base_type == GLSL_TYPE_INT ?
- index_c->get_int_component(0) :
- index_c->get_uint_component(0);
-
- ir_constant *substore;
- int suboffset;
- const ir_dereference *deref = array->as_dereference();
- if (!deref) {
- store = 0;
- offset = 0;
- return;
- }
-
- deref->constant_referenced(variable_context, substore, suboffset);
-
- if (!substore) {
- store = 0;
- offset = 0;
- return;
- }
-
- const glsl_type *vt = array->type;
- if (vt->is_array()) {
- store = substore->get_array_element(index);
- offset = 0;
- return;
- }
- if (vt->is_matrix()) {
- store = substore;
- offset = index * vt->vector_elements;
- return;
- }
- if (vt->is_vector()) {
- store = substore;
- offset = suboffset + index;
- return;
- }
-
- store = 0;
- offset = 0;
-}
-
ir_constant *
ir_dereference_array::constant_expression_value(struct hash_table *variable_context)
{
@@ -1712,33 +1741,8 @@ ir_dereference_array::constant_expression_value(struct hash_table *variable_cont
}
-void
-ir_dereference_record::constant_referenced(struct hash_table *variable_context,
- ir_constant *&store, int &offset) const
-{
- ir_constant *substore;
- int suboffset;
- const ir_dereference *deref = record->as_dereference();
- if (!deref) {
- store = 0;
- offset = 0;
- return;
- }
-
- deref->constant_referenced(variable_context, substore, suboffset);
-
- if (!substore) {
- store = 0;
- offset = 0;
- return;
- }
-
- store = substore->get_record_field(field);
- offset = 0;
-}
-
ir_constant *
-ir_dereference_record::constant_expression_value(struct hash_table *variable_context)
+ir_dereference_record::constant_expression_value(struct hash_table *)
{
ir_constant *v = this->record->constant_expression_value();
@@ -1747,7 +1751,7 @@ ir_dereference_record::constant_expression_value(struct hash_table *variable_con
ir_constant *
-ir_assignment::constant_expression_value(struct hash_table *variable_context)
+ir_assignment::constant_expression_value(struct hash_table *)
{
/* FINISHME: Handle CEs involving assignment (return RHS) */
return NULL;
@@ -1755,7 +1759,7 @@ ir_assignment::constant_expression_value(struct hash_table *variable_context)
ir_constant *
-ir_constant::constant_expression_value(struct hash_table *variable_context)
+ir_constant::constant_expression_value(struct hash_table *)
{
return this;
}
@@ -1796,9 +1800,8 @@ bool ir_function_signature::constant_expression_evaluate_expression_list(const s
ir_constant *store = NULL;
int offset = 0;
- asg->lhs->constant_referenced(variable_context, store, offset);
- if (!store)
+ if (!constant_referenced(asg->lhs, variable_context, store, offset))
return false;
ir_constant *value = asg->rhs->constant_expression_value(variable_context);
@@ -1829,9 +1832,9 @@ bool ir_function_signature::constant_expression_evaluate_expression_list(const s
ir_constant *store = NULL;
int offset = 0;
- call->return_deref->constant_referenced(variable_context, store, offset);
- if (!store)
+ if (!constant_referenced(call->return_deref, variable_context,
+ store, offset))
return false;
ir_constant *value = call->constant_expression_value(variable_context);
diff --git a/mesalib/src/mapi/glapi/gen/glX_XML.py b/mesalib/src/mapi/glapi/gen/glX_XML.py
index 03a35b740..12ff291fc 100644
--- a/mesalib/src/mapi/glapi/gen/glX_XML.py
+++ b/mesalib/src/mapi/glapi/gen/glX_XML.py
@@ -33,29 +33,27 @@ import sys, getopt, string
class glx_item_factory(gl_XML.gl_item_factory):
"""Factory to create GLX protocol oriented objects derived from gl_item."""
- def create_item(self, name, element, context):
- if name == "function":
- return glx_function(element, context)
- elif name == "enum":
- return glx_enum(element, context)
- elif name == "api":
- return glx_api(self)
- else:
- return gl_XML.gl_item_factory.create_item(self, name, element, context)
+ def create_function(self, element, context):
+ return glx_function(element, context)
+
+ def create_enum(self, element, context, category):
+ return glx_enum(element, context, category)
+
+ def create_api(self):
+ return glx_api(self)
class glx_enum(gl_XML.gl_enum):
- def __init__(self, element, context):
- gl_XML.gl_enum.__init__(self, element, context)
+ def __init__(self, element, context, category):
+ gl_XML.gl_enum.__init__(self, element, context, category)
self.functions = {}
- child = element.children
- while child:
- if child.type == "element" and child.name == "size":
- n = child.nsProp( "name", None )
- c = child.nsProp( "count", None )
- m = child.nsProp( "mode", None )
+ for child in element.getchildren():
+ if child.tag == "size":
+ n = child.get( "name" )
+ c = child.get( "count" )
+ m = child.get( "mode", "set" )
if not c:
c = self.default_count
@@ -70,8 +68,6 @@ class glx_enum(gl_XML.gl_enum):
if not self.functions.has_key(n):
self.functions[ n ] = [c, mode]
- child = child.next
-
return
@@ -120,10 +116,10 @@ class glx_function(gl_XML.gl_function):
# appears after the function that it aliases.
if not self.vectorequiv:
- self.vectorequiv = element.nsProp("vectorequiv", None)
+ self.vectorequiv = element.get("vectorequiv")
- name = element.nsProp("name", None)
+ name = element.get("name")
if name == self.name:
for param in self.parameters:
self.parameters_by_name[ param.name ] = param
@@ -135,12 +131,11 @@ class glx_function(gl_XML.gl_function):
self.counter_list.append(param.counter)
- child = element.children
- while child:
- if child.type == "element" and child.name == "glx":
- rop = child.nsProp( 'rop', None )
- sop = child.nsProp( 'sop', None )
- vop = child.nsProp( 'vendorpriv', None )
+ for child in element.getchildren():
+ if child.tag == "glx":
+ rop = child.get( 'rop' )
+ sop = child.get( 'sop' )
+ vop = child.get( 'vendorpriv' )
if rop:
self.glx_rop = int(rop)
@@ -152,12 +147,12 @@ class glx_function(gl_XML.gl_function):
self.glx_vendorpriv = int(vop)
self.glx_vendorpriv_names.append(name)
- self.img_reset = child.nsProp( 'img_reset', None )
+ self.img_reset = child.get( 'img_reset' )
# The 'handcode' attribute can be one of 'true',
# 'false', 'client', or 'server'.
- handcode = child.nsProp( 'handcode', None )
+ handcode = child.get( 'handcode', 'false' )
if handcode == "false":
self.server_handcode = 0
self.client_handcode = 0
@@ -179,8 +174,6 @@ class glx_function(gl_XML.gl_function):
self.reply_always_array = gl_XML.is_attr_true( child, 'always_array' )
self.dimensions_in_reply = gl_XML.is_attr_true( child, 'dimensions_in_reply' )
- child = child.next
-
# Do some validation of the GLX protocol information. As
# new tests are discovered, they should be added here.
diff --git a/mesalib/src/mapi/glapi/gen/glX_doc.py b/mesalib/src/mapi/glapi/gen/glX_doc.py
deleted file mode 100644
index 35d068894..000000000
--- a/mesalib/src/mapi/glapi/gen/glX_doc.py
+++ /dev/null
@@ -1,280 +0,0 @@
-#!/usr/bin/env python
-
-# (C) Copyright IBM Corporation 2004, 2005
-# All Rights Reserved.
-#
-# Permission is hereby granted, free of charge, to any person obtaining a
-# copy of this software and associated documentation files (the "Software"),
-# to deal in the Software without restriction, including without limitation
-# on the rights to use, copy, modify, merge, publish, distribute, sub
-# license, and/or sell copies of the Software, and to permit persons to whom
-# the Software is furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice (including the next
-# paragraph) shall be included in all copies or substantial portions of the
-# Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
-# IBM 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:
-# Ian Romanick <idr@us.ibm.com>
-
-import gl_XML, glX_XML, glX_proto_common, license
-import sys, getopt
-
-
-class glx_doc_item_factory(glX_proto_common.glx_proto_item_factory):
- """Factory to create GLX protocol documentation oriented objects derived from glItem."""
-
- def create_item(self, name, element, context):
- if name == "parameter":
- return glx_doc_parameter(element, context)
- else:
- return glX_proto_common.glx_proto_item_factory.create_item(self, name, element, context)
-
-
-class glx_doc_parameter(gl_XML.gl_parameter):
- def packet_type(self, type_dict):
- """Get the type string for the packet header
-
- GLX protocol documentation uses type names like CARD32,
- FLOAT64, LISTofCARD8, and ENUM. This function converts the
- type of the parameter to one of these names."""
-
- list_of = ""
- if self.is_array():
- list_of = "LISTof"
-
- t_name = self.get_base_type_string()
- if not type_dict.has_key( t_name ):
- type_name = "CARD8"
- else:
- type_name = type_dict[ t_name ]
-
- return "%s%s" % (list_of, type_name)
-
-
- def packet_size(self):
- p = None
- s = self.size()
- if s == 0:
- a_prod = "n"
- b_prod = self.p_type.size
-
- if not self.count_parameter_list and self.counter:
- a_prod = self.counter
- elif self.count_parameter_list and not self.counter or self.is_output:
- pass
- elif self.count_parameter_list and self.counter:
- b_prod = self.counter
- else:
- raise RuntimeError("Parameter '%s' to function '%s' has size 0." % (self.name, self.context.name))
-
- ss = "%s*%s" % (a_prod, b_prod)
-
- return [ss, p]
- else:
- if s % 4 != 0:
- p = "p"
-
- return [str(s), p]
-
-class PrintGlxProtoText(gl_XML.gl_print_base):
- def __init__(self):
- gl_XML.gl_print_base.__init__(self)
- self.license = ""
-
-
- def printHeader(self):
- return
-
-
- def body_size(self, f):
- # At some point, refactor this function and
- # glXFunction::command_payload_length.
-
- size = 0;
- size_str = ""
- pad_str = ""
- plus = ""
- for p in f.parameterIterateGlxSend():
- [s, pad] = p.packet_size()
- try:
- size += int(s)
- except Exception,e:
- size_str += "%s%s" % (plus, s)
- plus = "+"
-
- if pad != None:
- pad_str = pad
-
- return [size, size_str, pad_str]
-
-
- def print_render_header(self, f):
- [size, size_str, pad_str] = self.body_size(f)
- size += 4;
-
- if size_str == "":
- s = "%u" % ((size + 3) & ~3)
- elif pad_str != "":
- s = "%u+%s+%s" % (size, size_str, pad_str)
- else:
- s = "%u+%s" % (size, size_str)
-
- print ' 2 %-15s rendering command length' % (s)
- print ' 2 %-4u rendering command opcode' % (f.glx_rop)
- return
-
-
- def print_single_header(self, f):
- [size, size_str, pad_str] = self.body_size(f)
- size = ((size + 3) / 4) + 2;
-
- if f.glx_vendorpriv != 0:
- size += 1
-
- print ' 1 CARD8 opcode (X assigned)'
- print ' 1 %-4u GLX opcode (%s)' % (f.opcode_real_value(), f.opcode_real_name())
-
- if size_str == "":
- s = "%u" % (size)
- elif pad_str != "":
- s = "%u+((%s+%s)/4)" % (size, size_str, pad_str)
- else:
- s = "%u+((%s)/4)" % (size, size_str)
-
- print ' 2 %-15s request length' % (s)
-
- if f.glx_vendorpriv != 0:
- print ' 4 %-4u vendor specific opcode' % (f.opcode_value())
-
- print ' 4 GLX_CONTEXT_TAG context tag'
-
- return
-
-
- def print_reply(self, f):
- print ' =>'
- print ' 1 1 reply'
- print ' 1 unused'
- print ' 2 CARD16 sequence number'
-
- if f.output == None:
- print ' 4 0 reply length'
- elif f.reply_always_array:
- print ' 4 m reply length'
- else:
- print ' 4 m reply length, m = (n == 1 ? 0 : n)'
-
-
- output = None
- for x in f.parameterIterateOutputs():
- output = x
- break
-
-
- unused = 24
- if f.return_type != 'void':
- print ' 4 %-15s return value' % (f.return_type)
- unused -= 4
- elif output != None:
- print ' 4 unused'
- unused -= 4
-
- if output != None:
- print ' 4 CARD32 n'
- unused -= 4
-
- if output != None:
- if not f.reply_always_array:
- print ''
- print ' if (n = 1) this follows:'
- print ''
- print ' 4 CARD32 %s' % (output.name)
- print ' %-2u unused' % (unused - 4)
- print ''
- print ' otherwise this follows:'
- print ''
-
- print ' %-2u unused' % (unused)
-
- [s, pad] = output.packet_size()
- print ' %-8s %-15s %s' % (s, output.packet_type( self.type_map ), output.name)
- if pad != None:
- try:
- bytes = int(s)
- bytes = 4 - (bytes & 3)
- print ' %-8u %-15s unused' % (bytes, "")
- except Exception,e:
- print ' %-8s %-15s unused, %s=pad(%s)' % (pad, "", pad, s)
- else:
- print ' %-2u unused' % (unused)
-
-
- def print_body(self, f):
- for p in f.parameterIterateGlxSend():
- [s, pad] = p.packet_size()
- print ' %-8s %-15s %s' % (s, p.packet_type( self.type_map ), p.name)
- if pad != None:
- try:
- bytes = int(s)
- bytes = 4 - (bytes & 3)
- print ' %-8u %-15s unused' % (bytes, "")
- except Exception,e:
- print ' %-8s %-15s unused, %s=pad(%s)' % (pad, "", pad, s)
-
- def printBody(self, api):
- self.type_map = {}
- for t in api.typeIterate():
- self.type_map[ "GL" + t.name ] = t.glx_name
-
-
- # At some point this should be expanded to support pixel
- # functions, but I'm not going to lose any sleep over it now.
-
- for f in api.functionIterateByOffset():
- if f.client_handcode or f.server_handcode or f.vectorequiv or len(f.get_images()):
- continue
-
-
- if f.glx_rop:
- print ' %s' % (f.name)
- self.print_render_header(f)
- elif f.glx_sop or f.glx_vendorpriv:
- print ' %s' % (f.name)
- self.print_single_header(f)
- else:
- continue
-
- self.print_body(f)
-
- if f.needs_reply():
- self.print_reply(f)
-
- print ''
- return
-
-
-if __name__ == '__main__':
- file_name = "gl_API.xml"
-
- try:
- (args, trail) = getopt.getopt(sys.argv[1:], "f:")
- except Exception,e:
- show_usage()
-
- for (arg,val) in args:
- if arg == "-f":
- file_name = val
-
- api = gl_XML.parse_GL_API( file_name, glx_doc_item_factory() )
-
- printer = PrintGlxProtoText()
- printer.Print( api )
diff --git a/mesalib/src/mapi/glapi/gen/glX_proto_common.py b/mesalib/src/mapi/glapi/gen/glX_proto_common.py
index 86d9189a9..ae2c2d581 100644
--- a/mesalib/src/mapi/glapi/gen/glX_proto_common.py
+++ b/mesalib/src/mapi/glapi/gen/glX_proto_common.py
@@ -32,18 +32,15 @@ import string
class glx_proto_item_factory(glX_XML.glx_item_factory):
"""Factory to create GLX protocol oriented objects derived from gl_item."""
- def create_item(self, name, element, context):
- if name == "type":
- return glx_proto_type(element, context)
- else:
- return glX_XML.glx_item_factory.create_item(self, name, element, context)
+ def create_type(self, element, context, category):
+ return glx_proto_type(element, context, category)
class glx_proto_type(gl_XML.gl_type):
- def __init__(self, element, context):
- gl_XML.gl_type.__init__(self, element, context)
+ def __init__(self, element, context, category):
+ gl_XML.gl_type.__init__(self, element, context, category)
- self.glx_name = element.nsProp( "glx_name", None )
+ self.glx_name = element.get( "glx_name" )
return
diff --git a/mesalib/src/mapi/glapi/gen/gl_XML.py b/mesalib/src/mapi/glapi/gen/gl_XML.py
index 3bbc79439..1a2bc2b91 100644
--- a/mesalib/src/mapi/glapi/gen/gl_XML.py
+++ b/mesalib/src/mapi/glapi/gen/gl_XML.py
@@ -26,20 +26,19 @@
# Ian Romanick <idr@us.ibm.com>
from decimal import Decimal
-import libxml2
+import xml.etree.ElementTree as ET
import re, sys, string
+import os.path
import typeexpr
def parse_GL_API( file_name, factory = None ):
- doc = libxml2.readFile( file_name, None, libxml2.XML_PARSE_XINCLUDE + libxml2.XML_PARSE_NOBLANKS + libxml2.XML_PARSE_DTDVALID + libxml2.XML_PARSE_DTDATTR + libxml2.XML_PARSE_DTDLOAD + libxml2.XML_PARSE_NOENT )
- ret = doc.xincludeProcess()
if not factory:
factory = gl_item_factory()
- api = factory.create_item( "api", None, None )
- api.process_element( doc )
+ api = factory.create_api()
+ api.parse_file( file_name )
# After the XML has been processed, we need to go back and assign
# dispatch offsets to the functions that request that their offsets
@@ -51,12 +50,10 @@ def parse_GL_API( file_name, factory = None ):
func.offset = api.next_offset;
api.next_offset += 1
- doc.freeDoc()
-
return api
-def is_attr_true( element, name ):
+def is_attr_true( element, name, default = "false" ):
"""Read a name value from an element's attributes.
The value read from the attribute list must be either 'true' or
@@ -64,7 +61,7 @@ def is_attr_true( element, name ):
value is 'true', non-zero will be returned. An exception will be
raised for any other value."""
- value = element.nsProp( name, None )
+ value = element.get( name, default )
if value == "true":
return 1
elif value == "false":
@@ -254,8 +251,8 @@ class gl_print_base(object):
def real_function_name(element):
- name = element.nsProp( "name", None )
- alias = element.nsProp( "alias", None )
+ name = element.get( "name" )
+ alias = element.get( "alias" )
if alias:
return alias
@@ -324,21 +321,22 @@ def create_parameter_string(parameters, include_names):
class gl_item(object):
- def __init__(self, element, context):
+ def __init__(self, element, context, category):
self.context = context
- self.name = element.nsProp( "name", None )
- self.category = real_category_name( element.parent.nsProp( "name", None ) )
+ self.name = element.get( "name" )
+ self.category = real_category_name( category )
+
return
class gl_type( gl_item ):
- def __init__(self, element, context):
- gl_item.__init__(self, element, context)
- self.size = int( element.nsProp( "size", None ), 0 )
+ def __init__(self, element, context, category):
+ gl_item.__init__(self, element, context, category)
+ self.size = int( element.get( "size" ), 0 )
te = typeexpr.type_expression( None )
tn = typeexpr.type_node()
- tn.size = int( element.nsProp( "size", None ), 0 )
+ tn.size = int( element.get( "size" ), 0 )
tn.integer = not is_attr_true( element, "float" )
tn.unsigned = is_attr_true( element, "unsigned" )
tn.pointer = is_attr_true( element, "pointer" )
@@ -354,11 +352,11 @@ class gl_type( gl_item ):
class gl_enum( gl_item ):
- def __init__(self, element, context):
- gl_item.__init__(self, element, context)
- self.value = int( element.nsProp( "value", None ), 0 )
+ def __init__(self, element, context, category):
+ gl_item.__init__(self, element, context, category)
+ self.value = int( element.get( "value" ), 0 )
- temp = element.nsProp( "count", None )
+ temp = element.get( "count" )
if not temp or temp == "?":
self.default_count = -1
else:
@@ -404,12 +402,12 @@ class gl_enum( gl_item ):
class gl_parameter(object):
def __init__(self, element, context):
- self.name = element.nsProp( "name", None )
+ self.name = element.get( "name" )
- ts = element.nsProp( "type", None )
+ ts = element.get( "type" )
self.type_expr = typeexpr.type_expression( ts, context )
- temp = element.nsProp( "variable_param", None )
+ temp = element.get( "variable_param" )
if temp:
self.count_parameter_list = temp.split( ' ' )
else:
@@ -420,7 +418,7 @@ class gl_parameter(object):
# statement will throw an exception, and the except block will
# take over.
- c = element.nsProp( "count", None )
+ c = element.get( "count" )
try:
count = int(c)
self.count = count
@@ -430,7 +428,7 @@ class gl_parameter(object):
self.count = 0
self.counter = c
- self.count_scale = int(element.nsProp( "count_scale", None ))
+ self.count_scale = int(element.get( "count_scale", "1" ))
elements = (count * self.count_scale)
if elements == 1:
@@ -450,19 +448,19 @@ class gl_parameter(object):
# Pixel data has special parameters.
- self.width = element.nsProp('img_width', None)
- self.height = element.nsProp('img_height', None)
- self.depth = element.nsProp('img_depth', None)
- self.extent = element.nsProp('img_extent', None)
+ self.width = element.get('img_width')
+ self.height = element.get('img_height')
+ self.depth = element.get('img_depth')
+ self.extent = element.get('img_extent')
- self.img_xoff = element.nsProp('img_xoff', None)
- self.img_yoff = element.nsProp('img_yoff', None)
- self.img_zoff = element.nsProp('img_zoff', None)
- self.img_woff = element.nsProp('img_woff', None)
+ self.img_xoff = element.get('img_xoff')
+ self.img_yoff = element.get('img_yoff')
+ self.img_zoff = element.get('img_zoff')
+ self.img_woff = element.get('img_woff')
- self.img_format = element.nsProp('img_format', None)
- self.img_type = element.nsProp('img_type', None)
- self.img_target = element.nsProp('img_target', None)
+ self.img_format = element.get('img_format')
+ self.img_type = element.get('img_type')
+ self.img_target = element.get('img_target')
self.img_pad_dimensions = is_attr_true( element, 'img_pad_dimensions' )
self.img_null_flag = is_attr_true( element, 'img_null_flag' )
@@ -648,17 +646,17 @@ class gl_function( gl_item ):
def process_element(self, element):
- name = element.nsProp( "name", None )
- alias = element.nsProp( "alias", None )
+ name = element.get( "name" )
+ alias = element.get( "alias" )
- if is_attr_true(element, "static_dispatch"):
+ if is_attr_true(element, "static_dispatch", "true"):
self.static_entry_points.append(name)
self.entry_points.append( name )
self.entry_point_api_map[name] = {}
for api in ('es1', 'es2'):
- version_str = element.nsProp(api, None)
+ version_str = element.get(api, 'none')
assert version_str is not None
if version_str != 'none':
version_decimal = Decimal(version_str)
@@ -667,15 +665,15 @@ class gl_function( gl_item ):
version_decimal < self.api_map[api]:
self.api_map[api] = version_decimal
- exec_flavor = element.nsProp('exec', None)
+ exec_flavor = element.get('exec')
if exec_flavor:
self.exec_flavor = exec_flavor
- deprecated = element.nsProp('deprecated', None)
+ deprecated = element.get('deprecated', 'none')
if deprecated != 'none':
self.deprecated = Decimal(deprecated)
- if not is_attr_true(element, 'desktop'):
+ if not is_attr_true(element, 'desktop', 'true'):
self.desktop = False
if alias:
@@ -686,7 +684,7 @@ class gl_function( gl_item ):
# Only try to set the offset when a non-alias entry-point
# is being processed.
- offset = element.nsProp( "offset", None )
+ offset = element.get( "offset" )
if offset:
try:
o = int( offset )
@@ -712,16 +710,12 @@ class gl_function( gl_item ):
parameters = []
return_type = "void"
- child = element.children
- while child:
- if child.type == "element":
- if child.name == "return":
- return_type = child.nsProp( "type", None )
- elif child.name == "param":
- param = self.context.factory.create_item( "parameter", child, self.context)
- parameters.append( param )
-
- child = child.next
+ for child in element.getchildren():
+ if child.tag == "return":
+ return_type = child.get( "type", "void" )
+ elif child.tag == "param":
+ param = self.context.factory.create_parameter(child, self.context)
+ parameters.append( param )
if self.initialized:
@@ -746,7 +740,7 @@ class gl_function( gl_item ):
if param.is_image():
self.images.append( param )
- if element.children:
+ if element.getchildren():
self.initialized = 1
self.entry_point_parameters[name] = parameters
else:
@@ -848,19 +842,20 @@ class gl_function( gl_item ):
class gl_item_factory(object):
"""Factory to create objects derived from gl_item."""
- def create_item(self, item_name, element, context):
- if item_name == "function":
- return gl_function(element, context)
- if item_name == "type":
- return gl_type(element, context)
- elif item_name == "enum":
- return gl_enum(element, context)
- elif item_name == "parameter":
- return gl_parameter(element, context)
- elif item_name == "api":
- return gl_api(self)
- else:
- return None
+ def create_function(self, element, context):
+ return gl_function(element, context)
+
+ def create_type(self, element, context, category):
+ return gl_type(element, context, category)
+
+ def create_enum(self, element, context, category):
+ return gl_enum(element, context, category)
+
+ def create_parameter(self, element, context):
+ return gl_parameter(element, context)
+
+ def create_api(self):
+ return gl_api(self)
class gl_api(object):
@@ -903,66 +898,64 @@ class gl_api(object):
self.functions_by_name = functions_by_name
- def process_element(self, doc):
- element = doc.children
- while element.type != "element" or element.name != "OpenGLAPI":
- element = element.next
- if element:
- self.process_OpenGLAPI(element)
- return
+ def parse_file(self, file_name):
+ doc = ET.parse( file_name )
+ self.process_element(file_name, doc)
- def process_OpenGLAPI(self, element):
- child = element.children
- while child:
- if child.type == "element":
- if child.name == "category":
- self.process_category( child )
- elif child.name == "OpenGLAPI":
- self.process_OpenGLAPI( child )
+ def process_element(self, file_name, doc):
+ element = doc.getroot()
+ if element.tag == "OpenGLAPI":
+ self.process_OpenGLAPI(file_name, element)
+ return
+
- child = child.next
+ def process_OpenGLAPI(self, file_name, element):
+ for child in element.getchildren():
+ if child.tag == "category":
+ self.process_category( child )
+ elif child.tag == "OpenGLAPI":
+ self.process_OpenGLAPI( file_name, child )
+ elif child.tag == '{http://www.w3.org/2001/XInclude}include':
+ href = child.get('href')
+ href = os.path.join(os.path.dirname(file_name), href)
+ self.parse_file(href)
return
def process_category(self, cat):
- cat_name = cat.nsProp( "name", None )
- cat_number = cat.nsProp( "number", None )
+ cat_name = cat.get( "name" )
+ cat_number = cat.get( "number" )
[cat_type, key] = classify_category(cat_name, cat_number)
self.categories[cat_type][key] = [cat_name, cat_number]
- child = cat.children
- while child:
- if child.type == "element":
- if child.name == "function":
- func_name = real_function_name( child )
-
- temp_name = child.nsProp( "name", None )
- self.category_dict[ temp_name ] = [cat_name, cat_number]
-
- if self.functions_by_name.has_key( func_name ):
- func = self.functions_by_name[ func_name ]
- func.process_element( child )
- else:
- func = self.factory.create_item( "function", child, self )
- self.functions_by_name[ func_name ] = func
+ for child in cat.getchildren():
+ if child.tag == "function":
+ func_name = real_function_name( child )
- if func.offset >= self.next_offset:
- self.next_offset = func.offset + 1
+ temp_name = child.get( "name" )
+ self.category_dict[ temp_name ] = [cat_name, cat_number]
+ if self.functions_by_name.has_key( func_name ):
+ func = self.functions_by_name[ func_name ]
+ func.process_element( child )
+ else:
+ func = self.factory.create_function( child, self )
+ self.functions_by_name[ func_name ] = func
- elif child.name == "enum":
- enum = self.factory.create_item( "enum", child, self )
- self.enums_by_name[ enum.name ] = enum
- elif child.name == "type":
- t = self.factory.create_item( "type", child, self )
- self.types_by_name[ "GL" + t.name ] = t
+ if func.offset >= self.next_offset:
+ self.next_offset = func.offset + 1
- child = child.next
+ elif child.tag == "enum":
+ enum = self.factory.create_enum( child, self, cat_name )
+ self.enums_by_name[ enum.name ] = enum
+ elif child.tag == "type":
+ t = self.factory.create_type( child, self, cat_name )
+ self.types_by_name[ "GL" + t.name ] = t
return
diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c
index 76cbb41a9..acf927b09 100644
--- a/mesalib/src/mesa/drivers/common/meta.c
+++ b/mesalib/src/mesa/drivers/common/meta.c
@@ -53,6 +53,7 @@
#include "main/mipmap.h"
#include "main/multisample.h"
#include "main/objectlabel.h"
+#include "main/pipelineobj.h"
#include "main/pixel.h"
#include "main/pbo.h"
#include "main/polygon.h"
@@ -535,12 +536,20 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
_mesa_set_enable(ctx, GL_FRAGMENT_SHADER_ATI, GL_FALSE);
}
+ if (ctx->Extensions.ARB_separate_shader_objects) {
+ /* Warning it must be done before _mesa_UseProgram call */
+ _mesa_reference_pipeline_object(ctx, &save->_Shader, ctx->_Shader);
+ _mesa_reference_pipeline_object(ctx, &save->Pipeline,
+ ctx->Pipeline.Current);
+ _mesa_BindProgramPipeline(0);
+ }
+
for (i = 0; i < MESA_SHADER_STAGES; i++) {
_mesa_reference_shader_program(ctx, &save->Shader[i],
- ctx->Shader.CurrentProgram[i]);
+ ctx->_Shader->CurrentProgram[i]);
}
_mesa_reference_shader_program(ctx, &save->ActiveShader,
- ctx->Shader.ActiveProgram);
+ ctx->_Shader->ActiveProgram);
_mesa_UseProgram(0);
}
@@ -880,25 +889,37 @@ _mesa_meta_end(struct gl_context *ctx)
save->ATIFragmentShaderEnabled);
}
+ /* Warning it must be done before _mesa_use_shader_program call */
+ if (ctx->Extensions.ARB_separate_shader_objects) {
+ _mesa_reference_pipeline_object(ctx, &ctx->_Shader, save->_Shader);
+ _mesa_reference_pipeline_object(ctx, &ctx->Pipeline.Current,
+ save->Pipeline);
+ _mesa_reference_pipeline_object(ctx, &save->Pipeline, NULL);
+ }
+
if (ctx->Extensions.ARB_vertex_shader) {
_mesa_use_shader_program(ctx, GL_VERTEX_SHADER,
- save->Shader[MESA_SHADER_VERTEX]);
+ save->Shader[MESA_SHADER_VERTEX],
+ ctx->_Shader);
}
if (_mesa_has_geometry_shaders(ctx))
_mesa_use_shader_program(ctx, GL_GEOMETRY_SHADER_ARB,
- save->Shader[MESA_SHADER_GEOMETRY]);
+ save->Shader[MESA_SHADER_GEOMETRY],
+ ctx->_Shader);
if (ctx->Extensions.ARB_fragment_shader)
_mesa_use_shader_program(ctx, GL_FRAGMENT_SHADER,
- save->Shader[MESA_SHADER_FRAGMENT]);
+ save->Shader[MESA_SHADER_FRAGMENT],
+ ctx->_Shader);
- _mesa_reference_shader_program(ctx, &ctx->Shader.ActiveProgram,
+ _mesa_reference_shader_program(ctx, &ctx->_Shader->ActiveProgram,
save->ActiveShader);
for (i = 0; i < MESA_SHADER_STAGES; i++)
_mesa_reference_shader_program(ctx, &save->Shader[i], NULL);
_mesa_reference_shader_program(ctx, &save->ActiveShader, NULL);
+ _mesa_reference_pipeline_object(ctx, &save->_Shader, NULL);
}
if (state & MESA_META_STENCIL_TEST) {
diff --git a/mesalib/src/mesa/drivers/common/meta.h b/mesalib/src/mesa/drivers/common/meta.h
index e2ccb939e..4faae0b40 100644
--- a/mesalib/src/mesa/drivers/common/meta.h
+++ b/mesalib/src/mesa/drivers/common/meta.h
@@ -121,6 +121,8 @@ struct save_state
GLboolean ATIFragmentShaderEnabled;
struct gl_shader_program *Shader[MESA_SHADER_STAGES];
struct gl_shader_program *ActiveShader;
+ struct gl_pipeline_object *_Shader;
+ struct gl_pipeline_object *Pipeline;
/** MESA_META_STENCIL_TEST */
struct gl_stencil_attrib Stencil;
diff --git a/mesalib/src/mesa/main/api_validate.c b/mesalib/src/mesa/main/api_validate.c
index f3fd1a475..8f0b1998d 100644
--- a/mesalib/src/mesa/main/api_validate.c
+++ b/mesalib/src/mesa/main/api_validate.c
@@ -125,11 +125,14 @@ check_valid_to_render(struct gl_context *ctx, const char *function)
return GL_FALSE;
break;
- case API_OPENGL_COMPAT:
case API_OPENGL_CORE:
+ if (ctx->Array.VAO == ctx->Array.DefaultVAO)
+ return GL_FALSE;
+ /* fallthrough */
+ case API_OPENGL_COMPAT:
{
const struct gl_shader_program *vsProg =
- ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX];
+ ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX];
GLboolean haveVertexShader = (vsProg && vsProg->LinkStatus);
GLboolean haveVertexProgram = ctx->VertexProgram._Enabled;
if (haveVertexShader || haveVertexProgram) {
@@ -270,9 +273,9 @@ _mesa_valid_prim_mode(struct gl_context *ctx, GLenum mode, const char *name)
* TRIANGLES_ADJACENCY_ARB or TRIANGLE_STRIP_ADJACENCY_ARB.
*
*/
- if (ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY]) {
+ if (ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY]) {
const GLenum geom_mode =
- ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY]->Geom.InputType;
+ ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY]->Geom.InputType;
switch (mode) {
case GL_POINTS:
valid_enum = (geom_mode == GL_POINTS);
@@ -331,8 +334,8 @@ _mesa_valid_prim_mode(struct gl_context *ctx, GLenum mode, const char *name)
if (_mesa_is_xfb_active_and_unpaused(ctx)) {
GLboolean pass = GL_TRUE;
- if(ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY]) {
- switch (ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY]->Geom.OutputType) {
+ if(ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY]) {
+ switch (ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY]->Geom.OutputType) {
case GL_POINTS:
pass = ctx->TransformFeedback.Mode == GL_POINTS;
break;
diff --git a/mesalib/src/mesa/main/context.c b/mesalib/src/mesa/main/context.c
index 21dee98b6..8eb426d59 100644
--- a/mesalib/src/mesa/main/context.c
+++ b/mesalib/src/mesa/main/context.c
@@ -1841,6 +1841,7 @@ shader_linked_or_absent(struct gl_context *ctx,
* Prior to drawing anything with glBegin, glDrawArrays, etc. this function
* is called to see if it's valid to render. This involves checking that
* the current shader is valid and the framebuffer is complete.
+ * It also check the current pipeline object is valid if any.
* If an error is detected it'll be recorded here.
* \return GL_TRUE if OK to render, GL_FALSE if not
*/
@@ -1855,7 +1856,7 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
_mesa_update_state(ctx);
for (i = 0; i < MESA_SHADER_COMPUTE; i++) {
- if (!shader_linked_or_absent(ctx, ctx->Shader.CurrentProgram[i],
+ if (!shader_linked_or_absent(ctx, ctx->_Shader->CurrentProgram[i],
&from_glsl_shader[i], where))
return GL_FALSE;
}
@@ -1892,6 +1893,15 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
}
}
+ /* A pipeline object is bound */
+ if (ctx->_Shader->Name && !ctx->_Shader->Validated) {
+ /* Error message will be printed inside _mesa_validate_program_pipeline.
+ */
+ if (!_mesa_validate_program_pipeline(ctx, ctx->_Shader, GL_TRUE)) {
+ return GL_FALSE;
+ }
+ }
+
if (ctx->DrawBuffer->_Status != GL_FRAMEBUFFER_COMPLETE_EXT) {
_mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION_EXT,
"%s(incomplete framebuffer)", where);
@@ -1903,8 +1913,8 @@ _mesa_valid_to_render(struct gl_context *ctx, const char *where)
}
#ifdef DEBUG
- if (ctx->Shader.Flags & GLSL_LOG) {
- struct gl_shader_program **shProg = ctx->Shader.CurrentProgram;
+ if (ctx->_Shader->Flags & GLSL_LOG) {
+ struct gl_shader_program **shProg = ctx->_Shader->CurrentProgram;
gl_shader_stage i;
for (i = 0; i < MESA_SHADER_STAGES; i++) {
diff --git a/mesalib/src/mesa/main/fbobject.c b/mesalib/src/mesa/main/fbobject.c
index 107919f0b..6c4f1b548 100644
--- a/mesalib/src/mesa/main/fbobject.c
+++ b/mesalib/src/mesa/main/fbobject.c
@@ -632,7 +632,8 @@ _mesa_is_legal_color_format(const struct gl_context *ctx, GLenum baseFormat)
* Is the given base format a legal format for a color renderbuffer?
*/
static GLboolean
-is_format_color_renderable(const struct gl_context *ctx, mesa_format format, GLenum internalFormat)
+is_format_color_renderable(const struct gl_context *ctx, mesa_format format,
+ GLenum internalFormat)
{
const GLenum baseFormat =
_mesa_get_format_base_format(format);
@@ -664,7 +665,8 @@ is_format_color_renderable(const struct gl_context *ctx, mesa_format format, GLe
break;
}
- if (format == MESA_FORMAT_B10G10R10A2_UNORM && internalFormat != GL_RGB10_A2) {
+ if (format == MESA_FORMAT_B10G10R10A2_UNORM &&
+ internalFormat != GL_RGB10_A2) {
return GL_FALSE;
}
@@ -948,7 +950,8 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
attFormat = texImg->TexFormat;
numImages++;
- if (!is_format_color_renderable(ctx, attFormat, texImg->InternalFormat) &&
+ if (!is_format_color_renderable(ctx, attFormat,
+ texImg->InternalFormat) &&
!is_legal_depth_format(ctx, f)) {
fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT;
fbo_incomplete(ctx, "texture attachment incomplete", -1);
@@ -1071,7 +1074,9 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
return;
} else if (is_layered != att->Layered) {
fb->_Status = GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS;
- fbo_incomplete(ctx, "framebuffer attachment layer mode is inconsistent", i);
+ fbo_incomplete(ctx,
+ "framebuffer attachment layer mode is inconsistent",
+ i);
return;
} else if (att_layer_count > max_layer_count) {
max_layer_count = att_layer_count;
@@ -1149,7 +1154,8 @@ _mesa_IsRenderbuffer(GLuint renderbuffer)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
if (renderbuffer) {
- struct gl_renderbuffer *rb = _mesa_lookup_renderbuffer(ctx, renderbuffer);
+ struct gl_renderbuffer *rb =
+ _mesa_lookup_renderbuffer(ctx, renderbuffer);
if (rb != NULL && rb != &DummyRenderbuffer)
return GL_TRUE;
}
@@ -1291,8 +1297,8 @@ _mesa_DeleteRenderbuffers(GLsizei n, const GLuint *renderbuffers)
}
/* Section 4.4.2 (Attaching Images to Framebuffer Objects),
- * subsection "Attaching Renderbuffer Images to a Framebuffer," of
- * the OpenGL 3.1 spec says:
+ * subsection "Attaching Renderbuffer Images to a Framebuffer,"
+ * of the OpenGL 3.1 spec says:
*
* "If a renderbuffer object is deleted while its image is
* attached to one or more attachment points in the currently
@@ -1387,15 +1393,15 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
case GL_ALPHA8:
case GL_ALPHA12:
case GL_ALPHA16:
- return ctx->API == API_OPENGL_COMPAT && ctx->Extensions.ARB_framebuffer_object
- ? GL_ALPHA : 0;
+ return (ctx->API == API_OPENGL_COMPAT &&
+ ctx->Extensions.ARB_framebuffer_object) ? GL_ALPHA : 0;
case GL_LUMINANCE:
case GL_LUMINANCE4:
case GL_LUMINANCE8:
case GL_LUMINANCE12:
case GL_LUMINANCE16:
- return ctx->API == API_OPENGL_COMPAT && ctx->Extensions.ARB_framebuffer_object
- ? GL_LUMINANCE : 0;
+ return (ctx->API == API_OPENGL_COMPAT &&
+ ctx->Extensions.ARB_framebuffer_object) ? GL_LUMINANCE : 0;
case GL_LUMINANCE_ALPHA:
case GL_LUMINANCE4_ALPHA4:
case GL_LUMINANCE6_ALPHA2:
@@ -1403,15 +1409,15 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
case GL_LUMINANCE12_ALPHA4:
case GL_LUMINANCE12_ALPHA12:
case GL_LUMINANCE16_ALPHA16:
- return ctx->API == API_OPENGL_COMPAT && ctx->Extensions.ARB_framebuffer_object
- ? GL_LUMINANCE_ALPHA : 0;
+ return (ctx->API == API_OPENGL_COMPAT &&
+ ctx->Extensions.ARB_framebuffer_object) ? GL_LUMINANCE_ALPHA : 0;
case GL_INTENSITY:
case GL_INTENSITY4:
case GL_INTENSITY8:
case GL_INTENSITY12:
case GL_INTENSITY16:
- return ctx->API == API_OPENGL_COMPAT && ctx->Extensions.ARB_framebuffer_object
- ? GL_INTENSITY : 0;
+ return (ctx->API == API_OPENGL_COMPAT &&
+ ctx->Extensions.ARB_framebuffer_object) ? GL_INTENSITY : 0;
case GL_RGB8:
return GL_RGB;
case GL_RGB:
@@ -1458,11 +1464,13 @@ _mesa_base_fbo_format(struct gl_context *ctx, GLenum internalFormat)
return GL_DEPTH_STENCIL;
case GL_DEPTH_COMPONENT32F:
return ctx->Version >= 30
- || (ctx->API == API_OPENGL_COMPAT && ctx->Extensions.ARB_depth_buffer_float)
+ || (ctx->API == API_OPENGL_COMPAT &&
+ ctx->Extensions.ARB_depth_buffer_float)
? GL_DEPTH_COMPONENT : 0;
case GL_DEPTH32F_STENCIL8:
return ctx->Version >= 30
- || (ctx->API == API_OPENGL_COMPAT && ctx->Extensions.ARB_depth_buffer_float)
+ || (ctx->API == API_OPENGL_COMPAT &&
+ ctx->Extensions.ARB_depth_buffer_float)
? GL_DEPTH_STENCIL : 0;
case GL_RED:
case GL_R16:
@@ -1694,7 +1702,7 @@ invalidate_rb(GLuint key, void *data, void *userData)
/**
- * Helper function used by _mesa_RenderbufferStorage() and
+ * Helper function used by _mesa_RenderbufferStorage() and
* _mesa_RenderbufferStorageMultisample().
* samples will be NO_SAMPLES if called by _mesa_RenderbufferStorage().
*/
@@ -2142,6 +2150,7 @@ _mesa_BindFramebuffer(GLenum target, GLuint framebuffer)
bind_framebuffer(target, framebuffer, _mesa_is_gles(ctx));
}
+
void GLAPIENTRY
_mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer)
{
@@ -2152,6 +2161,7 @@ _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer)
bind_framebuffer(target, framebuffer, true);
}
+
void GLAPIENTRY
_mesa_DeleteFramebuffers(GLsizei n, const GLuint *framebuffers)
{
@@ -2222,7 +2232,6 @@ _mesa_GenFramebuffers(GLsizei n, GLuint *framebuffers)
}
-
GLenum GLAPIENTRY
_mesa_CheckFramebufferStatus(GLenum target)
{
@@ -2297,7 +2306,7 @@ reuse_framebuffer_texture_attachment(struct gl_framebuffer *fb,
* glFramebufferTexture(), false otherwise.
*/
static void
-framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target,
+framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target,
GLenum attachment, GLenum textarget, GLuint texture,
GLint level, GLint zoffset, GLboolean layered)
{
@@ -2492,10 +2501,9 @@ framebuffer_texture(struct gl_context *ctx, const char *caller, GLenum target,
}
-
void GLAPIENTRY
_mesa_FramebufferTexture1D(GLenum target, GLenum attachment,
- GLenum textarget, GLuint texture, GLint level)
+ GLenum textarget, GLuint texture, GLint level)
{
GET_CURRENT_CONTEXT(ctx);
@@ -2528,7 +2536,7 @@ _mesa_FramebufferTexture1D(GLenum target, GLenum attachment,
void GLAPIENTRY
_mesa_FramebufferTexture2D(GLenum target, GLenum attachment,
- GLenum textarget, GLuint texture, GLint level)
+ GLenum textarget, GLuint texture, GLint level)
{
GET_CURRENT_CONTEXT(ctx);
@@ -2579,8 +2587,8 @@ _mesa_FramebufferTexture2D(GLenum target, GLenum attachment,
void GLAPIENTRY
_mesa_FramebufferTexture3D(GLenum target, GLenum attachment,
- GLenum textarget, GLuint texture,
- GLint level, GLint zoffset)
+ GLenum textarget, GLuint texture,
+ GLint level, GLint zoffset)
{
GET_CURRENT_CONTEXT(ctx);
@@ -2597,7 +2605,7 @@ _mesa_FramebufferTexture3D(GLenum target, GLenum attachment,
void GLAPIENTRY
_mesa_FramebufferTextureLayer(GLenum target, GLenum attachment,
- GLuint texture, GLint level, GLint layer)
+ GLuint texture, GLint level, GLint layer)
{
GET_CURRENT_CONTEXT(ctx);
@@ -2624,8 +2632,8 @@ _mesa_FramebufferTexture(GLenum target, GLenum attachment,
void GLAPIENTRY
_mesa_FramebufferRenderbuffer(GLenum target, GLenum attachment,
- GLenum renderbufferTarget,
- GLuint renderbuffer)
+ GLenum renderbufferTarget,
+ GLuint renderbuffer)
{
struct gl_renderbuffer_attachment *att;
struct gl_framebuffer *fb;
@@ -2634,7 +2642,8 @@ _mesa_FramebufferRenderbuffer(GLenum target, GLenum attachment,
fb = get_framebuffer_target(ctx, target);
if (!fb) {
- _mesa_error(ctx, GL_INVALID_ENUM, "glFramebufferRenderbufferEXT(target)");
+ _mesa_error(ctx, GL_INVALID_ENUM,
+ "glFramebufferRenderbufferEXT(target)");
return;
}
@@ -2691,7 +2700,6 @@ _mesa_FramebufferRenderbuffer(GLenum target, GLenum attachment,
}
}
-
FLUSH_VERTICES(ctx, _NEW_BUFFERS);
assert(ctx->Driver.FramebufferRenderbuffer);
@@ -2706,7 +2714,7 @@ _mesa_FramebufferRenderbuffer(GLenum target, GLenum attachment,
void GLAPIENTRY
_mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment,
- GLenum pname, GLint *params)
+ GLenum pname, GLint *params)
{
const struct gl_renderbuffer_attachment *att;
struct gl_framebuffer *buffer;
@@ -2734,7 +2742,8 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment,
* OES_framebuffer_object spec refers to the EXT_framebuffer_object
* spec.
*/
- if ((!_mesa_is_desktop_gl(ctx) || !ctx->Extensions.ARB_framebuffer_object)
+ if ((!_mesa_is_desktop_gl(ctx) ||
+ !ctx->Extensions.ARB_framebuffer_object)
&& !_mesa_is_gles3(ctx)) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glGetFramebufferAttachmentParameteriv(bound FBO = 0)");
@@ -2845,7 +2854,8 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment,
}
return;
case GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:
- if ((!_mesa_is_desktop_gl(ctx) || !ctx->Extensions.ARB_framebuffer_object)
+ if ((!_mesa_is_desktop_gl(ctx) ||
+ !ctx->Extensions.ARB_framebuffer_object)
&& !_mesa_is_gles3(ctx)) {
goto invalid_pname_enum;
}
@@ -2855,7 +2865,8 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment,
}
else {
if (ctx->Extensions.EXT_framebuffer_sRGB) {
- *params = _mesa_get_format_color_encoding(att->Renderbuffer->Format);
+ *params =
+ _mesa_get_format_color_encoding(att->Renderbuffer->Format);
}
else {
/* According to ARB_framebuffer_sRGB, we should return LINEAR
@@ -2865,7 +2876,8 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment,
}
return;
case GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:
- if ((ctx->API != API_OPENGL_COMPAT || !ctx->Extensions.ARB_framebuffer_object)
+ if ((ctx->API != API_OPENGL_COMPAT ||
+ !ctx->Extensions.ARB_framebuffer_object)
&& ctx->API != API_OPENGL_CORE
&& !_mesa_is_gles3(ctx)) {
goto invalid_pname_enum;
@@ -2884,7 +2896,8 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment,
* attachment is DEPTH_STENCIL_ATTACHMENT the query will fail and
* generate an INVALID_OPERATION error.
*/
- if (_mesa_is_gles3(ctx) && attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
+ if (_mesa_is_gles3(ctx) &&
+ attachment == GL_DEPTH_STENCIL_ATTACHMENT) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glGetFramebufferAttachmentParameteriv(cannot query "
"GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE of "
@@ -2916,7 +2929,8 @@ _mesa_GetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment,
case GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:
case GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:
case GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:
- if ((!_mesa_is_desktop_gl(ctx) || !ctx->Extensions.ARB_framebuffer_object)
+ if ((!_mesa_is_desktop_gl(ctx) ||
+ !ctx->Extensions.ARB_framebuffer_object)
&& !_mesa_is_gles3(ctx)) {
goto invalid_pname_enum;
}
@@ -3079,6 +3093,7 @@ invalid_enum:
return;
}
+
void GLAPIENTRY
_mesa_InvalidateSubFramebuffer(GLenum target, GLsizei numAttachments,
const GLenum *attachments, GLint x, GLint y,
@@ -3089,6 +3104,7 @@ _mesa_InvalidateSubFramebuffer(GLenum target, GLsizei numAttachments,
"glInvalidateSubFramebuffer");
}
+
void GLAPIENTRY
_mesa_InvalidateFramebuffer(GLenum target, GLsizei numAttachments,
const GLenum *attachments)
@@ -3106,10 +3122,12 @@ _mesa_InvalidateFramebuffer(GLenum target, GLsizei numAttachments,
* <MAX_VIEWPORT_DIMS[1]> respectively."
*/
invalidate_framebuffer_storage(target, numAttachments, attachments,
- 0, 0, MAX_VIEWPORT_WIDTH, MAX_VIEWPORT_HEIGHT,
+ 0, 0,
+ MAX_VIEWPORT_WIDTH, MAX_VIEWPORT_HEIGHT,
"glInvalidateFramebuffer");
}
+
void GLAPIENTRY
_mesa_DiscardFramebufferEXT(GLenum target, GLsizei numAttachments,
const GLenum *attachments)
diff --git a/mesalib/src/mesa/main/ff_fragment_shader.cpp b/mesalib/src/mesa/main/ff_fragment_shader.cpp
index cad67aa85..1d2ad604b 100644
--- a/mesalib/src/mesa/main/ff_fragment_shader.cpp
+++ b/mesalib/src/mesa/main/ff_fragment_shader.cpp
@@ -317,9 +317,9 @@ static GLbitfield get_fp_input_mask( struct gl_context *ctx )
{
/* _NEW_PROGRAM */
const GLboolean vertexShader =
- (ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX] &&
- ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]->LinkStatus &&
- ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]->_LinkedShaders[MESA_SHADER_VERTEX]);
+ (ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX] &&
+ ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX]->LinkStatus &&
+ ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX]->_LinkedShaders[MESA_SHADER_VERTEX]);
const GLboolean vertexProgram = ctx->VertexProgram._Enabled;
GLbitfield fp_inputs = 0x0;
@@ -383,7 +383,7 @@ static GLbitfield get_fp_input_mask( struct gl_context *ctx )
* validation (see additional comments in state.c).
*/
if (vertexShader)
- vprog = ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX]->_LinkedShaders[MESA_SHADER_VERTEX]->Program;
+ vprog = ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX]->_LinkedShaders[MESA_SHADER_VERTEX]->Program;
else
vprog = &ctx->VertexProgram.Current->Base;
diff --git a/mesalib/src/mesa/main/format_pack.c b/mesalib/src/mesa/main/format_pack.c
index 9fbd41746..e3cbfff7e 100644
--- a/mesalib/src/mesa/main/format_pack.c
+++ b/mesalib/src/mesa/main/format_pack.c
@@ -96,22 +96,22 @@ linear_ubyte_to_srgb_ubyte(GLubyte cl)
*/
static void
-pack_ubyte_RGBA8888(const GLubyte src[4], void *dst)
+pack_ubyte_A8B8G8R8_UNORM(const GLubyte src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
*d = PACK_COLOR_8888(src[RCOMP], src[GCOMP], src[BCOMP], src[ACOMP]);
}
static void
-pack_float_RGBA8888(const GLfloat src[4], void *dst)
+pack_float_A8B8G8R8_UNORM(const GLfloat src[4], void *dst)
{
GLubyte v[4];
_mesa_unclamped_float_rgba_to_ubyte(v, src);
- pack_ubyte_RGBA8888(v, dst);
+ pack_ubyte_A8B8G8R8_UNORM(v, dst);
}
static void
-pack_row_ubyte_RGBA8888(GLuint n, const GLubyte src[][4], void *dst)
+pack_row_ubyte_A8B8G8R8_UNORM(GLuint n, const GLubyte src[][4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLuint i;
@@ -122,14 +122,14 @@ pack_row_ubyte_RGBA8888(GLuint n, const GLubyte src[][4], void *dst)
}
static void
-pack_row_float_RGBA8888(GLuint n, const GLfloat src[][4], void *dst)
+pack_row_float_A8B8G8R8_UNORM(GLuint n, const GLfloat src[][4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLuint i;
for (i = 0; i < n; i++) {
GLubyte v[4];
_mesa_unclamped_float_rgba_to_ubyte(v, src[i]);
- pack_ubyte_RGBA8888(v, d + i);
+ pack_ubyte_A8B8G8R8_UNORM(v, d + i);
}
}
@@ -140,22 +140,22 @@ pack_row_float_RGBA8888(GLuint n, const GLfloat src[][4], void *dst)
*/
static void
-pack_ubyte_RGBA8888_REV(const GLubyte src[4], void *dst)
+pack_ubyte_R8G8B8A8_UNORM(const GLubyte src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
*d = PACK_COLOR_8888(src[ACOMP], src[BCOMP], src[GCOMP], src[RCOMP]);
}
static void
-pack_float_RGBA8888_REV(const GLfloat src[4], void *dst)
+pack_float_R8G8B8A8_UNORM(const GLfloat src[4], void *dst)
{
GLubyte v[4];
_mesa_unclamped_float_rgba_to_ubyte(v, src);
- pack_ubyte_RGBA8888_REV(v, dst);
+ pack_ubyte_R8G8B8A8_UNORM(v, dst);
}
static void
-pack_row_ubyte_RGBA8888_REV(GLuint n, const GLubyte src[][4], void *dst)
+pack_row_ubyte_R8G8B8A8_UNORM(GLuint n, const GLubyte src[][4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLuint i;
@@ -166,14 +166,14 @@ pack_row_ubyte_RGBA8888_REV(GLuint n, const GLubyte src[][4], void *dst)
}
static void
-pack_row_float_RGBA8888_REV(GLuint n, const GLfloat src[][4], void *dst)
+pack_row_float_R8G8B8A8_UNORM(GLuint n, const GLfloat src[][4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLuint i;
for (i = 0; i < n; i++) {
GLubyte v[4];
_mesa_unclamped_float_rgba_to_ubyte(v, src[i]);
- pack_ubyte_RGBA8888_REV(v, d + i);
+ pack_ubyte_R8G8B8A8_UNORM(v, d + i);
}
}
@@ -183,22 +183,22 @@ pack_row_float_RGBA8888_REV(GLuint n, const GLfloat src[][4], void *dst)
*/
static void
-pack_ubyte_ARGB8888(const GLubyte src[4], void *dst)
+pack_ubyte_B8G8R8A8_UNORM(const GLubyte src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
*d = PACK_COLOR_8888(src[ACOMP], src[RCOMP], src[GCOMP], src[BCOMP]);
}
static void
-pack_float_ARGB8888(const GLfloat src[4], void *dst)
+pack_float_B8G8R8A8_UNORM(const GLfloat src[4], void *dst)
{
GLubyte v[4];
_mesa_unclamped_float_rgba_to_ubyte(v, src);
- pack_ubyte_ARGB8888(v, dst);
+ pack_ubyte_B8G8R8A8_UNORM(v, dst);
}
static void
-pack_row_ubyte_ARGB8888(GLuint n, const GLubyte src[][4], void *dst)
+pack_row_ubyte_B8G8R8A8_UNORM(GLuint n, const GLubyte src[][4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLuint i;
@@ -209,14 +209,14 @@ pack_row_ubyte_ARGB8888(GLuint n, const GLubyte src[][4], void *dst)
}
static void
-pack_row_float_ARGB8888(GLuint n, const GLfloat src[][4], void *dst)
+pack_row_float_B8G8R8A8_UNORM(GLuint n, const GLfloat src[][4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLuint i;
for (i = 0; i < n; i++) {
GLubyte v[4];
_mesa_unclamped_float_rgba_to_ubyte(v, src[i]);
- pack_ubyte_ARGB8888(v, d + i);
+ pack_ubyte_B8G8R8A8_UNORM(v, d + i);
}
}
@@ -226,22 +226,22 @@ pack_row_float_ARGB8888(GLuint n, const GLfloat src[][4], void *dst)
*/
static void
-pack_ubyte_ARGB8888_REV(const GLubyte src[4], void *dst)
+pack_ubyte_A8R8G8B8_UNORM(const GLubyte src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
*d = PACK_COLOR_8888(src[BCOMP], src[GCOMP], src[RCOMP], src[ACOMP]);
}
static void
-pack_float_ARGB8888_REV(const GLfloat src[4], void *dst)
+pack_float_A8R8G8B8_UNORM(const GLfloat src[4], void *dst)
{
GLubyte v[4];
_mesa_unclamped_float_rgba_to_ubyte(v, src);
- pack_ubyte_ARGB8888_REV(v, dst);
+ pack_ubyte_A8R8G8B8_UNORM(v, dst);
}
static void
-pack_row_ubyte_ARGB8888_REV(GLuint n, const GLubyte src[][4], void *dst)
+pack_row_ubyte_A8R8G8B8_UNORM(GLuint n, const GLubyte src[][4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLuint i;
@@ -252,14 +252,14 @@ pack_row_ubyte_ARGB8888_REV(GLuint n, const GLubyte src[][4], void *dst)
}
static void
-pack_row_float_ARGB8888_REV(GLuint n, const GLfloat src[][4], void *dst)
+pack_row_float_A8R8G8B8_UNORM(GLuint n, const GLfloat src[][4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLuint i;
for (i = 0; i < n; i++) {
GLubyte v[4];
_mesa_unclamped_float_rgba_to_ubyte(v, src[i]);
- pack_ubyte_ARGB8888_REV(v, d + i);
+ pack_ubyte_A8R8G8B8_UNORM(v, d + i);
}
}
@@ -269,22 +269,22 @@ pack_row_float_ARGB8888_REV(GLuint n, const GLfloat src[][4], void *dst)
*/
static void
-pack_ubyte_XRGB8888(const GLubyte src[4], void *dst)
+pack_ubyte_B8G8R8X8_UNORM(const GLubyte src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
*d = PACK_COLOR_8888(0x0, src[RCOMP], src[GCOMP], src[BCOMP]);
}
static void
-pack_float_XRGB8888(const GLfloat src[4], void *dst)
+pack_float_B8G8R8X8_UNORM(const GLfloat src[4], void *dst)
{
GLubyte v[4];
_mesa_unclamped_float_rgba_to_ubyte(v, src);
- pack_ubyte_XRGB8888(v, dst);
+ pack_ubyte_B8G8R8X8_UNORM(v, dst);
}
static void
-pack_row_ubyte_XRGB8888(GLuint n, const GLubyte src[][4], void *dst)
+pack_row_ubyte_B8G8R8X8_UNORM(GLuint n, const GLubyte src[][4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLuint i;
@@ -294,14 +294,14 @@ pack_row_ubyte_XRGB8888(GLuint n, const GLubyte src[][4], void *dst)
}
static void
-pack_row_float_XRGB8888(GLuint n, const GLfloat src[][4], void *dst)
+pack_row_float_B8G8R8X8_UNORM(GLuint n, const GLfloat src[][4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLuint i;
for (i = 0; i < n; i++) {
GLubyte v[4];
_mesa_unclamped_float_rgba_to_ubyte(v, src[i]);
- pack_ubyte_XRGB8888(v, d + i);
+ pack_ubyte_B8G8R8X8_UNORM(v, d + i);
}
}
@@ -311,22 +311,22 @@ pack_row_float_XRGB8888(GLuint n, const GLfloat src[][4], void *dst)
*/
static void
-pack_ubyte_XRGB8888_REV(const GLubyte src[4], void *dst)
+pack_ubyte_X8R8G8B8_UNORM(const GLubyte src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
*d = PACK_COLOR_8888(src[BCOMP], src[GCOMP], src[RCOMP], 0);
}
static void
-pack_float_XRGB8888_REV(const GLfloat src[4], void *dst)
+pack_float_X8R8G8B8_UNORM(const GLfloat src[4], void *dst)
{
GLubyte v[4];
_mesa_unclamped_float_rgba_to_ubyte(v, src);
- pack_ubyte_XRGB8888_REV(v, dst);
+ pack_ubyte_X8R8G8B8_UNORM(v, dst);
}
static void
-pack_row_ubyte_XRGB8888_REV(GLuint n, const GLubyte src[][4], void *dst)
+pack_row_ubyte_X8R8G8B8_UNORM(GLuint n, const GLubyte src[][4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLuint i;
@@ -336,14 +336,14 @@ pack_row_ubyte_XRGB8888_REV(GLuint n, const GLubyte src[][4], void *dst)
}
static void
-pack_row_float_XRGB8888_REV(GLuint n, const GLfloat src[][4], void *dst)
+pack_row_float_X8R8G8B8_UNORM(GLuint n, const GLfloat src[][4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLuint i;
for (i = 0; i < n; i++) {
GLubyte v[4];
_mesa_unclamped_float_rgba_to_ubyte(v, src[i]);
- pack_ubyte_XRGB8888_REV(v, d + i);
+ pack_ubyte_X8R8G8B8_UNORM(v, d + i);
}
}
@@ -353,7 +353,7 @@ pack_row_float_XRGB8888_REV(GLuint n, const GLfloat src[][4], void *dst)
*/
static void
-pack_ubyte_RGB888(const GLubyte src[4], void *dst)
+pack_ubyte_BGR_UNORM8(const GLubyte src[4], void *dst)
{
GLubyte *d = ((GLubyte *) dst);
d[2] = src[RCOMP];
@@ -362,7 +362,7 @@ pack_ubyte_RGB888(const GLubyte src[4], void *dst)
}
static void
-pack_float_RGB888(const GLfloat src[4], void *dst)
+pack_float_BGR_UNORM8(const GLfloat src[4], void *dst)
{
GLubyte *d = ((GLubyte *) dst);
UNCLAMPED_FLOAT_TO_UBYTE(d[2], src[RCOMP]);
@@ -371,7 +371,7 @@ pack_float_RGB888(const GLfloat src[4], void *dst)
}
static void
-pack_row_ubyte_RGB888(GLuint n, const GLubyte src[][4], void *dst)
+pack_row_ubyte_BGR_UNORM8(GLuint n, const GLubyte src[][4], void *dst)
{
GLubyte *d = ((GLubyte *) dst);
GLuint i;
@@ -383,7 +383,7 @@ pack_row_ubyte_RGB888(GLuint n, const GLubyte src[][4], void *dst)
}
static void
-pack_row_float_RGB888(GLuint n, const GLfloat src[][4], void *dst)
+pack_row_float_BGR_UNORM8(GLuint n, const GLfloat src[][4], void *dst)
{
GLubyte *d = ((GLubyte *) dst);
GLuint i;
@@ -402,7 +402,7 @@ pack_row_float_RGB888(GLuint n, const GLfloat src[][4], void *dst)
*/
static void
-pack_ubyte_BGR888(const GLubyte src[4], void *dst)
+pack_ubyte_RGB_UNORM8(const GLubyte src[4], void *dst)
{
GLubyte *d = ((GLubyte *) dst);
d[2] = src[BCOMP];
@@ -411,7 +411,7 @@ pack_ubyte_BGR888(const GLubyte src[4], void *dst)
}
static void
-pack_float_BGR888(const GLfloat src[4], void *dst)
+pack_float_RGB_UNORM8(const GLfloat src[4], void *dst)
{
GLubyte *d = ((GLubyte *) dst);
UNCLAMPED_FLOAT_TO_UBYTE(d[2], src[BCOMP]);
@@ -420,7 +420,7 @@ pack_float_BGR888(const GLfloat src[4], void *dst)
}
static void
-pack_row_ubyte_BGR888(GLuint n, const GLubyte src[][4], void *dst)
+pack_row_ubyte_RGB_UNORM8(GLuint n, const GLubyte src[][4], void *dst)
{
GLubyte *d = ((GLubyte *) dst);
GLuint i;
@@ -432,7 +432,7 @@ pack_row_ubyte_BGR888(GLuint n, const GLubyte src[][4], void *dst)
}
static void
-pack_row_float_BGR888(GLuint n, const GLfloat src[][4], void *dst)
+pack_row_float_RGB_UNORM8(GLuint n, const GLfloat src[][4], void *dst)
{
GLubyte *d = ((GLubyte *) dst);
GLuint i;
@@ -451,41 +451,41 @@ pack_row_float_BGR888(GLuint n, const GLfloat src[][4], void *dst)
*/
static void
-pack_ubyte_RGB565(const GLubyte src[4], void *dst)
+pack_ubyte_B5G6R5_UNORM(const GLubyte src[4], void *dst)
{
GLushort *d = ((GLushort *) dst);
*d = PACK_COLOR_565(src[RCOMP], src[GCOMP], src[BCOMP]);
}
static void
-pack_float_RGB565(const GLfloat src[4], void *dst)
+pack_float_B5G6R5_UNORM(const GLfloat src[4], void *dst)
{
GLubyte v[3];
UNCLAMPED_FLOAT_TO_UBYTE(v[0], src[RCOMP]);
UNCLAMPED_FLOAT_TO_UBYTE(v[1], src[GCOMP]);
UNCLAMPED_FLOAT_TO_UBYTE(v[2], src[BCOMP]);
- pack_ubyte_RGB565(v, dst);
+ pack_ubyte_B5G6R5_UNORM(v, dst);
}
static void
-pack_row_ubyte_RGB565(GLuint n, const GLubyte src[][4], void *dst)
+pack_row_ubyte_B5G6R5_UNORM(GLuint n, const GLubyte src[][4], void *dst)
{
GLushort *d = ((GLushort *) dst);
GLuint i;
for (i = 0; i < n; i++) {
- pack_ubyte_RGB565(src[i], d + i);
+ pack_ubyte_B5G6R5_UNORM(src[i], d + i);
}
}
static void
-pack_row_float_RGB565(GLuint n, const GLfloat src[][4], void *dst)
+pack_row_float_B5G6R5_UNORM(GLuint n, const GLfloat src[][4], void *dst)
{
GLushort *d = ((GLushort *) dst);
GLuint i;
for (i = 0; i < n; i++) {
GLubyte v[4];
_mesa_unclamped_float_rgba_to_ubyte(v, src[i]);
- pack_ubyte_RGB565(v, d + i);
+ pack_ubyte_B5G6R5_UNORM(v, d + i);
}
}
@@ -497,14 +497,14 @@ pack_row_float_RGB565(GLuint n, const GLfloat src[][4], void *dst)
*/
static void
-pack_ubyte_RGB565_REV(const GLubyte src[4], void *dst)
+pack_ubyte_R5G6B5_UNORM(const GLubyte src[4], void *dst)
{
GLushort *d = ((GLushort *) dst);
*d = PACK_COLOR_565_REV(src[RCOMP], src[GCOMP], src[BCOMP]);
}
static void
-pack_float_RGB565_REV(const GLfloat src[4], void *dst)
+pack_float_R5G6B5_UNORM(const GLfloat src[4], void *dst)
{
GLushort *d = ((GLushort *) dst);
GLubyte r, g, b;
@@ -515,24 +515,24 @@ pack_float_RGB565_REV(const GLfloat src[4], void *dst)
}
static void
-pack_row_ubyte_RGB565_REV(GLuint n, const GLubyte src[][4], void *dst)
+pack_row_ubyte_R5G6B5_UNORM(GLuint n, const GLubyte src[][4], void *dst)
{
GLushort *d = ((GLushort *) dst);
GLuint i;
for (i = 0; i < n; i++) {
- pack_ubyte_RGB565_REV(src[i], d + i);
+ pack_ubyte_R5G6B5_UNORM(src[i], d + i);
}
}
static void
-pack_row_float_RGB565_REV(GLuint n, const GLfloat src[][4], void *dst)
+pack_row_float_R5G6B5_UNORM(GLuint n, const GLfloat src[][4], void *dst)
{
GLushort *d = ((GLushort *) dst);
GLuint i;
for (i = 0; i < n; i++) {
GLubyte v[4];
_mesa_unclamped_float_rgba_to_ubyte(v, src[i]);
- pack_ubyte_RGB565_REV(v, d + i);
+ pack_ubyte_R5G6B5_UNORM(v, d + i);
}
}
@@ -542,18 +542,18 @@ pack_row_float_RGB565_REV(GLuint n, const GLfloat src[][4], void *dst)
*/
static void
-pack_ubyte_ARGB4444(const GLubyte src[4], void *dst)
+pack_ubyte_B4G4R4A4_UNORM(const GLubyte src[4], void *dst)
{
GLushort *d = ((GLushort *) dst);
*d = PACK_COLOR_4444(src[ACOMP], src[RCOMP], src[GCOMP], src[BCOMP]);
}
static void
-pack_float_ARGB4444(const GLfloat src[4], void *dst)
+pack_float_B4G4R4A4_UNORM(const GLfloat src[4], void *dst)
{
GLubyte v[4];
_mesa_unclamped_float_rgba_to_ubyte(v, src);
- pack_ubyte_ARGB4444(v, dst);
+ pack_ubyte_B4G4R4A4_UNORM(v, dst);
}
/* use fallback row packing functions */
@@ -564,18 +564,18 @@ pack_float_ARGB4444(const GLfloat src[4], void *dst)
*/
static void
-pack_ubyte_ARGB4444_REV(const GLubyte src[4], void *dst)
+pack_ubyte_A4R4G4B4_UNORM(const GLubyte src[4], void *dst)
{
GLushort *d = ((GLushort *) dst);
*d = PACK_COLOR_4444(src[BCOMP], src[GCOMP], src[RCOMP], src[ACOMP]);
}
static void
-pack_float_ARGB4444_REV(const GLfloat src[4], void *dst)
+pack_float_A4R4G4B4_UNORM(const GLfloat src[4], void *dst)
{
GLubyte v[4];
_mesa_unclamped_float_rgba_to_ubyte(v, src);
- pack_ubyte_ARGB4444_REV(v, dst);
+ pack_ubyte_A4R4G4B4_UNORM(v, dst);
}
/* use fallback row packing functions */
@@ -586,18 +586,18 @@ pack_float_ARGB4444_REV(const GLfloat src[4], void *dst)
*/
static void
-pack_ubyte_RGBA5551(const GLubyte src[4], void *dst)
+pack_ubyte_A1B5G5R5_UNORM(const GLubyte src[4], void *dst)
{
GLushort *d = ((GLushort *) dst);
*d = PACK_COLOR_5551(src[RCOMP], src[GCOMP], src[BCOMP], src[ACOMP]);
}
static void
-pack_float_RGBA5551(const GLfloat src[4], void *dst)
+pack_float_A1B5G5R5_UNORM(const GLfloat src[4], void *dst)
{
GLubyte v[4];
_mesa_unclamped_float_rgba_to_ubyte(v, src);
- pack_ubyte_RGBA5551(v, dst);
+ pack_ubyte_A1B5G5R5_UNORM(v, dst);
}
/* use fallback row packing functions */
@@ -608,18 +608,18 @@ pack_float_RGBA5551(const GLfloat src[4], void *dst)
*/
static void
-pack_ubyte_ARGB1555(const GLubyte src[4], void *dst)
+pack_ubyte_B5G5R5A1_UNORM(const GLubyte src[4], void *dst)
{
GLushort *d = ((GLushort *) dst);
*d = PACK_COLOR_1555(src[ACOMP], src[RCOMP], src[GCOMP], src[BCOMP]);
}
static void
-pack_float_ARGB1555(const GLfloat src[4], void *dst)
+pack_float_B5G5R5A1_UNORM(const GLfloat src[4], void *dst)
{
GLubyte v[4];
_mesa_unclamped_float_rgba_to_ubyte(v, src);
- pack_ubyte_ARGB1555(v, dst);
+ pack_ubyte_B5G5R5A1_UNORM(v, dst);
}
@@ -629,7 +629,7 @@ pack_float_ARGB1555(const GLfloat src[4], void *dst)
*/
static void
-pack_ubyte_ARGB1555_REV(const GLubyte src[4], void *dst)
+pack_ubyte_A1R5G5B5_UNORM(const GLubyte src[4], void *dst)
{
GLushort *d = ((GLushort *) dst), tmp;
tmp = PACK_COLOR_1555(src[ACOMP], src[RCOMP], src[GCOMP], src[BCOMP]);
@@ -637,75 +637,75 @@ pack_ubyte_ARGB1555_REV(const GLubyte src[4], void *dst)
}
static void
-pack_float_ARGB1555_REV(const GLfloat src[4], void *dst)
+pack_float_A1R5G5B5_UNORM(const GLfloat src[4], void *dst)
{
GLubyte v[4];
_mesa_unclamped_float_rgba_to_ubyte(v, src);
- pack_ubyte_ARGB1555_REV(v, dst);
+ pack_ubyte_A1R5G5B5_UNORM(v, dst);
}
/* MESA_FORMAT_L4A4_UNORM */
static void
-pack_ubyte_AL44(const GLubyte src[4], void *dst)
+pack_ubyte_L4A4_UNORM(const GLubyte src[4], void *dst)
{
GLubyte *d = ((GLubyte *) dst);
*d = PACK_COLOR_44(src[ACOMP], src[RCOMP]);
}
static void
-pack_float_AL44(const GLfloat src[4], void *dst)
+pack_float_L4A4_UNORM(const GLfloat src[4], void *dst)
{
GLubyte v[4];
UNCLAMPED_FLOAT_TO_UBYTE(v[0], src[RCOMP]);
UNCLAMPED_FLOAT_TO_UBYTE(v[3], src[ACOMP]);
- pack_ubyte_AL44(v, dst);
+ pack_ubyte_L4A4_UNORM(v, dst);
}
/* MESA_FORMAT_L8A8_UNORM */
static void
-pack_ubyte_AL88(const GLubyte src[4], void *dst)
+pack_ubyte_L8A8_UNORM(const GLubyte src[4], void *dst)
{
GLushort *d = ((GLushort *) dst);
*d = PACK_COLOR_88(src[ACOMP], src[RCOMP]);
}
static void
-pack_float_AL88(const GLfloat src[4], void *dst)
+pack_float_L8A8_UNORM(const GLfloat src[4], void *dst)
{
GLubyte v[4];
UNCLAMPED_FLOAT_TO_UBYTE(v[0], src[RCOMP]);
UNCLAMPED_FLOAT_TO_UBYTE(v[3], src[ACOMP]);
- pack_ubyte_AL88(v, dst);
+ pack_ubyte_L8A8_UNORM(v, dst);
}
/* MESA_FORMAT_A8L8_UNORM */
static void
-pack_ubyte_AL88_REV(const GLubyte src[4], void *dst)
+pack_ubyte_A8L8_UNORM(const GLubyte src[4], void *dst)
{
GLushort *d = ((GLushort *) dst);
*d = PACK_COLOR_88(src[RCOMP], src[ACOMP]);
}
static void
-pack_float_AL88_REV(const GLfloat src[4], void *dst)
+pack_float_A8L8_UNORM(const GLfloat src[4], void *dst)
{
GLubyte v[4];
UNCLAMPED_FLOAT_TO_UBYTE(v[0], src[RCOMP]);
UNCLAMPED_FLOAT_TO_UBYTE(v[3], src[ACOMP]);
- pack_ubyte_AL88_REV(v, dst);
+ pack_ubyte_A8L8_UNORM(v, dst);
}
/* MESA_FORMAT_L16A16_UNORM */
static void
-pack_ubyte_AL1616(const GLubyte src[4], void *dst)
+pack_ubyte_L16A16_UNORM(const GLubyte src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLushort l = UBYTE_TO_USHORT(src[RCOMP]);
@@ -714,7 +714,7 @@ pack_ubyte_AL1616(const GLubyte src[4], void *dst)
}
static void
-pack_float_AL1616(const GLfloat src[4], void *dst)
+pack_float_L16A16_UNORM(const GLfloat src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLushort l, a;
@@ -727,7 +727,7 @@ pack_float_AL1616(const GLfloat src[4], void *dst)
/* MESA_FORMAT_A16L16_UNORM */
static void
-pack_ubyte_AL1616_REV(const GLubyte src[4], void *dst)
+pack_ubyte_A16L16_UNORM(const GLubyte src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLushort l = UBYTE_TO_USHORT(src[RCOMP]);
@@ -736,7 +736,7 @@ pack_ubyte_AL1616_REV(const GLubyte src[4], void *dst)
}
static void
-pack_float_AL1616_REV(const GLfloat src[4], void *dst)
+pack_float_A16L16_UNORM(const GLfloat src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLushort l, a;
@@ -749,34 +749,34 @@ pack_float_AL1616_REV(const GLfloat src[4], void *dst)
/* MESA_FORMAT_B2G3R3_UNORM */
static void
-pack_ubyte_RGB332(const GLubyte src[4], void *dst)
+pack_ubyte_B2G3R3_UNORM(const GLubyte src[4], void *dst)
{
GLubyte *d = ((GLubyte *) dst);
*d = PACK_COLOR_332(src[RCOMP], src[GCOMP], src[BCOMP]);
}
static void
-pack_float_RGB332(const GLfloat src[4], void *dst)
+pack_float_B2G3R3_UNORM(const GLfloat src[4], void *dst)
{
GLubyte v[4];
UNCLAMPED_FLOAT_TO_UBYTE(v[0], src[RCOMP]);
UNCLAMPED_FLOAT_TO_UBYTE(v[1], src[GCOMP]);
UNCLAMPED_FLOAT_TO_UBYTE(v[2], src[BCOMP]);
- pack_ubyte_RGB332(v, dst);
+ pack_ubyte_B2G3R3_UNORM(v, dst);
}
/* MESA_FORMAT_A_UNORM8 */
static void
-pack_ubyte_A8(const GLubyte src[4], void *dst)
+pack_ubyte_A_UNORM8(const GLubyte src[4], void *dst)
{
GLubyte *d = ((GLubyte *) dst);
*d = src[ACOMP];
}
static void
-pack_float_A8(const GLfloat src[4], void *dst)
+pack_float_A_UNORM8(const GLfloat src[4], void *dst)
{
GLubyte *d = ((GLubyte *) dst);
UNCLAMPED_FLOAT_TO_UBYTE(d[0], src[ACOMP]);
@@ -786,14 +786,14 @@ pack_float_A8(const GLfloat src[4], void *dst)
/* MESA_FORMAT_A_UNORM16 */
static void
-pack_ubyte_A16(const GLubyte src[4], void *dst)
+pack_ubyte_A_UNORM16(const GLubyte src[4], void *dst)
{
GLushort *d = ((GLushort *) dst);
*d = UBYTE_TO_USHORT(src[ACOMP]);
}
static void
-pack_float_A16(const GLfloat src[4], void *dst)
+pack_float_A_UNORM16(const GLfloat src[4], void *dst)
{
GLushort *d = ((GLushort *) dst);
UNCLAMPED_FLOAT_TO_USHORT(d[0], src[ACOMP]);
@@ -803,14 +803,14 @@ pack_float_A16(const GLfloat src[4], void *dst)
/* MESA_FORMAT_L_UNORM8 */
static void
-pack_ubyte_L8(const GLubyte src[4], void *dst)
+pack_ubyte_L_UNORM8(const GLubyte src[4], void *dst)
{
GLubyte *d = ((GLubyte *) dst);
*d = src[RCOMP];
}
static void
-pack_float_L8(const GLfloat src[4], void *dst)
+pack_float_L_UNORM8(const GLfloat src[4], void *dst)
{
GLubyte *d = ((GLubyte *) dst);
UNCLAMPED_FLOAT_TO_UBYTE(d[0], src[RCOMP]);
@@ -820,14 +820,14 @@ pack_float_L8(const GLfloat src[4], void *dst)
/* MESA_FORMAT_L_UNORM16 */
static void
-pack_ubyte_L16(const GLubyte src[4], void *dst)
+pack_ubyte_L_UNORM16(const GLubyte src[4], void *dst)
{
GLushort *d = ((GLushort *) dst);
*d = UBYTE_TO_USHORT(src[RCOMP]);
}
static void
-pack_float_L16(const GLfloat src[4], void *dst)
+pack_float_L_UNORM16(const GLfloat src[4], void *dst)
{
GLushort *d = ((GLushort *) dst);
UNCLAMPED_FLOAT_TO_USHORT(d[0], src[RCOMP]);
@@ -867,14 +867,14 @@ pack_float_YCBCR_REV(const GLfloat src[4], void *dst)
/* MESA_FORMAT_R_UNORM8 */
static void
-pack_ubyte_R8(const GLubyte src[4], void *dst)
+pack_ubyte_R_UNORM8(const GLubyte src[4], void *dst)
{
GLubyte *d = ((GLubyte *) dst);
*d = src[RCOMP];
}
static void
-pack_float_R8(const GLfloat src[4], void *dst)
+pack_float_R_UNORM8(const GLfloat src[4], void *dst)
{
GLubyte *d = ((GLubyte *) dst);
GLubyte r;
@@ -886,14 +886,14 @@ pack_float_R8(const GLfloat src[4], void *dst)
/* MESA_FORMAT_R8G8_UNORM */
static void
-pack_ubyte_GR88(const GLubyte src[4], void *dst)
+pack_ubyte_R8G8_UNORM(const GLubyte src[4], void *dst)
{
GLubyte *d = ((GLubyte *) dst);
*d = PACK_COLOR_88(src[GCOMP], src[RCOMP]);
}
static void
-pack_float_GR88(const GLfloat src[4], void *dst)
+pack_float_R8G8_UNORM(const GLfloat src[4], void *dst)
{
GLushort *d = ((GLushort *) dst);
GLubyte r, g;
@@ -906,14 +906,14 @@ pack_float_GR88(const GLfloat src[4], void *dst)
/* MESA_FORMAT_G8R8_UNORM */
static void
-pack_ubyte_RG88(const GLubyte src[4], void *dst)
+pack_ubyte_G8R8_UNORM(const GLubyte src[4], void *dst)
{
GLubyte *d = ((GLubyte *) dst);
*d = PACK_COLOR_88(src[RCOMP], src[GCOMP]);
}
static void
-pack_float_RG88(const GLfloat src[4], void *dst)
+pack_float_G8R8_UNORM(const GLfloat src[4], void *dst)
{
GLushort *d = ((GLushort *) dst);
GLubyte r, g;
@@ -926,14 +926,14 @@ pack_float_RG88(const GLfloat src[4], void *dst)
/* MESA_FORMAT_R_UNORM16 */
static void
-pack_ubyte_R16(const GLubyte src[4], void *dst)
+pack_ubyte_R_UNORM16(const GLubyte src[4], void *dst)
{
GLushort *d = ((GLushort *) dst);
*d = UBYTE_TO_USHORT(src[RCOMP]);
}
static void
-pack_float_R16(const GLfloat src[4], void *dst)
+pack_float_R_UNORM16(const GLfloat src[4], void *dst)
{
GLushort *d = ((GLushort *) dst);
UNCLAMPED_FLOAT_TO_USHORT(d[0], src[RCOMP]);
@@ -943,7 +943,7 @@ pack_float_R16(const GLfloat src[4], void *dst)
/* MESA_FORMAT_R16G16_UNORM */
static void
-pack_ubyte_GR1616(const GLubyte src[4], void *dst)
+pack_ubyte_R16G16_UNORM(const GLubyte src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLushort r = UBYTE_TO_USHORT(src[RCOMP]);
@@ -952,7 +952,7 @@ pack_ubyte_GR1616(const GLubyte src[4], void *dst)
}
static void
-pack_float_GR1616(const GLfloat src[4], void *dst)
+pack_float_R16G16_UNORM(const GLfloat src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLushort r, g;
@@ -965,7 +965,7 @@ pack_float_GR1616(const GLfloat src[4], void *dst)
/* MESA_FORMAT_G16R16_UNORM */
static void
-pack_ubyte_RG1616(const GLubyte src[4], void *dst)
+pack_ubyte_G16R16_UNORM(const GLubyte src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLushort r = UBYTE_TO_USHORT(src[RCOMP]);
@@ -975,7 +975,7 @@ pack_ubyte_RG1616(const GLubyte src[4], void *dst)
static void
-pack_float_RG1616(const GLfloat src[4], void *dst)
+pack_float_G16R16_UNORM(const GLfloat src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLushort r, g;
@@ -988,7 +988,7 @@ pack_float_RG1616(const GLfloat src[4], void *dst)
/* MESA_FORMAT_B10G10R10A2_UNORM */
static void
-pack_ubyte_ARGB2101010(const GLubyte src[4], void *dst)
+pack_ubyte_B10G10R10A2_UNORM(const GLubyte src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLushort r = UBYTE_TO_USHORT(src[RCOMP]);
@@ -999,7 +999,7 @@ pack_ubyte_ARGB2101010(const GLubyte src[4], void *dst)
}
static void
-pack_float_ARGB2101010(const GLfloat src[4], void *dst)
+pack_float_B10G10R10A2_UNORM(const GLfloat src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLushort r, g, b, a;
@@ -1014,7 +1014,7 @@ pack_float_ARGB2101010(const GLfloat src[4], void *dst)
/* MESA_FORMAT_R10G10B10A2_UINT */
static void
-pack_ubyte_ABGR2101010_UINT(const GLubyte src[4], void *dst)
+pack_ubyte_R10G10B10A2_UINT(const GLubyte src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLushort r = UBYTE_TO_USHORT(src[RCOMP]);
@@ -1025,7 +1025,7 @@ pack_ubyte_ABGR2101010_UINT(const GLubyte src[4], void *dst)
}
static void
-pack_float_ABGR2101010_UINT(const GLfloat src[4], void *dst)
+pack_float_R10G10B10A2_UINT(const GLfloat src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLushort r, g, b, a;
@@ -1040,7 +1040,7 @@ pack_float_ABGR2101010_UINT(const GLfloat src[4], void *dst)
/* MESA_FORMAT_BGR_SRGB8 */
static void
-pack_ubyte_SRGB8(const GLubyte src[4], void *dst)
+pack_ubyte_BGR_SRGB8(const GLubyte src[4], void *dst)
{
GLubyte *d = ((GLubyte *) dst);
d[2] = linear_ubyte_to_srgb_ubyte(src[RCOMP]);
@@ -1049,7 +1049,7 @@ pack_ubyte_SRGB8(const GLubyte src[4], void *dst)
}
static void
-pack_float_SRGB8(const GLfloat src[4], void *dst)
+pack_float_BGR_SRGB8(const GLfloat src[4], void *dst)
{
GLubyte *d = ((GLubyte *) dst);
d[2] = linear_float_to_srgb_ubyte(src[RCOMP]);
@@ -1061,7 +1061,7 @@ pack_float_SRGB8(const GLfloat src[4], void *dst)
/* MESA_FORMAT_A8B8G8R8_SRGB */
static void
-pack_ubyte_SRGBA8(const GLubyte src[4], void *dst)
+pack_ubyte_A8B8G8R8_SRGB(const GLubyte src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLubyte r = linear_ubyte_to_srgb_ubyte(src[RCOMP]);
@@ -1071,7 +1071,7 @@ pack_ubyte_SRGBA8(const GLubyte src[4], void *dst)
}
static void
-pack_float_SRGBA8(const GLfloat src[4], void *dst)
+pack_float_A8B8G8R8_SRGB(const GLfloat src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLubyte r, g, b, a;
@@ -1086,7 +1086,7 @@ pack_float_SRGBA8(const GLfloat src[4], void *dst)
/* MESA_FORMAT_B8G8R8A8_SRGB */
static void
-pack_ubyte_SARGB8(const GLubyte src[4], void *dst)
+pack_ubyte_B8G8R8A8_SRGB(const GLubyte src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLubyte r = linear_ubyte_to_srgb_ubyte(src[RCOMP]);
@@ -1096,7 +1096,7 @@ pack_ubyte_SARGB8(const GLubyte src[4], void *dst)
}
static void
-pack_float_SARGB8(const GLfloat src[4], void *dst)
+pack_float_B8G8R8A8_SRGB(const GLfloat src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLubyte r, g, b, a;
@@ -1111,7 +1111,7 @@ pack_float_SARGB8(const GLfloat src[4], void *dst)
/* MESA_FORMAT_R8G8B8A8_SRGB */
static void
-pack_ubyte_SABGR8(const GLubyte src[4], void *dst)
+pack_ubyte_R8G8B8A8_SRGB(const GLubyte src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLubyte r = linear_ubyte_to_srgb_ubyte(src[RCOMP]);
@@ -1121,7 +1121,7 @@ pack_ubyte_SABGR8(const GLubyte src[4], void *dst)
}
static void
-pack_float_SABGR8(const GLfloat src[4], void *dst)
+pack_float_R8G8B8A8_SRGB(const GLfloat src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLubyte r, g, b, a;
@@ -1136,14 +1136,14 @@ pack_float_SABGR8(const GLfloat src[4], void *dst)
/* MESA_FORMAT_L_SRGB8 */
static void
-pack_ubyte_SL8(const GLubyte src[4], void *dst)
+pack_ubyte_L_SRGB8(const GLubyte src[4], void *dst)
{
GLubyte *d = ((GLubyte *) dst);
*d = linear_ubyte_to_srgb_ubyte(src[RCOMP]);
}
static void
-pack_float_SL8(const GLfloat src[4], void *dst)
+pack_float_L_SRGB8(const GLfloat src[4], void *dst)
{
GLubyte *d = ((GLubyte *) dst);
GLubyte l = linear_float_to_srgb_ubyte(src[RCOMP]);
@@ -1154,7 +1154,7 @@ pack_float_SL8(const GLfloat src[4], void *dst)
/* MESA_FORMAT_L8A8_SRGB */
static void
-pack_ubyte_SLA8(const GLubyte src[4], void *dst)
+pack_ubyte_L8A8_SRGB(const GLubyte src[4], void *dst)
{
GLushort *d = ((GLushort *) dst);
GLubyte l = linear_ubyte_to_srgb_ubyte(src[RCOMP]);
@@ -1162,7 +1162,7 @@ pack_ubyte_SLA8(const GLubyte src[4], void *dst)
}
static void
-pack_float_SLA8(const GLfloat src[4], void *dst)
+pack_float_L8A8_SRGB(const GLfloat src[4], void *dst)
{
GLushort *d = ((GLushort *) dst);
GLubyte a, l = linear_float_to_srgb_ubyte(src[RCOMP]);
@@ -1262,14 +1262,14 @@ pack_float_RGB_FLOAT16(const GLfloat src[4], void *dst)
/* MESA_FORMAT_A_FLOAT32 */
static void
-pack_ubyte_ALPHA_FLOAT32(const GLubyte src[4], void *dst)
+pack_ubyte_A_FLOAT32(const GLubyte src[4], void *dst)
{
GLfloat *d = ((GLfloat *) dst);
d[0] = UBYTE_TO_FLOAT(src[ACOMP]);
}
static void
-pack_float_ALPHA_FLOAT32(const GLfloat src[4], void *dst)
+pack_float_A_FLOAT32(const GLfloat src[4], void *dst)
{
GLfloat *d = ((GLfloat *) dst);
d[0] = src[ACOMP];
@@ -1279,48 +1279,48 @@ pack_float_ALPHA_FLOAT32(const GLfloat src[4], void *dst)
/* MESA_FORMAT_A_FLOAT16 */
static void
-pack_ubyte_ALPHA_FLOAT16(const GLubyte src[4], void *dst)
+pack_ubyte_A_FLOAT16(const GLubyte src[4], void *dst)
{
GLhalfARB *d = ((GLhalfARB *) dst);
d[0] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[ACOMP]));
}
static void
-pack_float_ALPHA_FLOAT16(const GLfloat src[4], void *dst)
+pack_float_A_FLOAT16(const GLfloat src[4], void *dst)
{
GLhalfARB *d = ((GLhalfARB *) dst);
d[0] = _mesa_float_to_half(src[ACOMP]);
}
-/* MESA_FORMAT_L_FLOAT32 (and INTENSITY_FLOAT32, R_FLOAT32) */
+/* MESA_FORMAT_L_FLOAT32 (and I_FLOAT32, R_FLOAT32) */
static void
-pack_ubyte_LUMINANCE_FLOAT32(const GLubyte src[4], void *dst)
+pack_ubyte_L_FLOAT32(const GLubyte src[4], void *dst)
{
GLfloat *d = ((GLfloat *) dst);
d[0] = UBYTE_TO_FLOAT(src[RCOMP]);
}
static void
-pack_float_LUMINANCE_FLOAT32(const GLfloat src[4], void *dst)
+pack_float_L_FLOAT32(const GLfloat src[4], void *dst)
{
GLfloat *d = ((GLfloat *) dst);
d[0] = src[RCOMP];
}
-/* MESA_FORMAT_L_FLOAT16 (and INTENSITY_FLOAT16, R_FLOAT32) */
+/* MESA_FORMAT_L_FLOAT16 (and I_FLOAT16, R_FLOAT32) */
static void
-pack_ubyte_LUMINANCE_FLOAT16(const GLubyte src[4], void *dst)
+pack_ubyte_L_FLOAT16(const GLubyte src[4], void *dst)
{
GLhalfARB *d = ((GLhalfARB *) dst);
d[0] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[RCOMP]));
}
static void
-pack_float_LUMINANCE_FLOAT16(const GLfloat src[4], void *dst)
+pack_float_L_FLOAT16(const GLfloat src[4], void *dst)
{
GLhalfARB *d = ((GLhalfARB *) dst);
d[0] = _mesa_float_to_half(src[RCOMP]);
@@ -1330,7 +1330,7 @@ pack_float_LUMINANCE_FLOAT16(const GLfloat src[4], void *dst)
/* MESA_FORMAT_LA_FLOAT32 */
static void
-pack_ubyte_LUMINANCE_ALPHA_FLOAT32(const GLubyte src[4], void *dst)
+pack_ubyte_LA_FLOAT32(const GLubyte src[4], void *dst)
{
GLfloat *d = ((GLfloat *) dst);
d[0] = UBYTE_TO_FLOAT(src[RCOMP]);
@@ -1338,7 +1338,7 @@ pack_ubyte_LUMINANCE_ALPHA_FLOAT32(const GLubyte src[4], void *dst)
}
static void
-pack_float_LUMINANCE_ALPHA_FLOAT32(const GLfloat src[4], void *dst)
+pack_float_LA_FLOAT32(const GLfloat src[4], void *dst)
{
GLfloat *d = ((GLfloat *) dst);
d[0] = src[RCOMP];
@@ -1349,7 +1349,7 @@ pack_float_LUMINANCE_ALPHA_FLOAT32(const GLfloat src[4], void *dst)
/* MESA_FORMAT_LA_FLOAT16 */
static void
-pack_ubyte_LUMINANCE_ALPHA_FLOAT16(const GLubyte src[4], void *dst)
+pack_ubyte_LA_FLOAT16(const GLubyte src[4], void *dst)
{
GLhalfARB *d = ((GLhalfARB *) dst);
d[0] = _mesa_float_to_half(UBYTE_TO_FLOAT(src[RCOMP]));
@@ -1357,7 +1357,7 @@ pack_ubyte_LUMINANCE_ALPHA_FLOAT16(const GLubyte src[4], void *dst)
}
static void
-pack_float_LUMINANCE_ALPHA_FLOAT16(const GLfloat src[4], void *dst)
+pack_float_LA_FLOAT16(const GLfloat src[4], void *dst)
{
GLhalfARB *d = ((GLhalfARB *) dst);
d[0] = _mesa_float_to_half(src[RCOMP]);
@@ -1453,7 +1453,7 @@ pack_float_RGBA_16(const GLfloat src[4], void *dst)
*/
static void
-pack_float_SIGNED_R8(const GLfloat src[4], void *dst)
+pack_float_R_SNORM8(const GLfloat src[4], void *dst)
{
GLbyte *d = (GLbyte *) dst;
*d = FLOAT_TO_BYTE(CLAMP(src[RCOMP], -1.0f, 1.0f));
@@ -1465,7 +1465,7 @@ pack_float_SIGNED_R8(const GLfloat src[4], void *dst)
*/
static void
-pack_float_SIGNED_RG88_REV(const GLfloat src[4], void *dst)
+pack_float_R8G8_SNORM(const GLfloat src[4], void *dst)
{
GLushort *d = (GLushort *) dst;
GLbyte r = FLOAT_TO_BYTE(CLAMP(src[RCOMP], -1.0f, 1.0f));
@@ -1479,7 +1479,7 @@ pack_float_SIGNED_RG88_REV(const GLfloat src[4], void *dst)
*/
static void
-pack_float_SIGNED_RGBX8888(const GLfloat src[4], void *dst)
+pack_float_X8B8G8R8_SNORM(const GLfloat src[4], void *dst)
{
GLuint *d = (GLuint *) dst;
GLbyte r = FLOAT_TO_BYTE(CLAMP(src[RCOMP], -1.0f, 1.0f));
@@ -1495,7 +1495,7 @@ pack_float_SIGNED_RGBX8888(const GLfloat src[4], void *dst)
*/
static void
-pack_float_SIGNED_RGBA8888(const GLfloat src[4], void *dst)
+pack_float_A8B8G8R8_SNORM(const GLfloat src[4], void *dst)
{
GLuint *d = (GLuint *) dst;
GLbyte r = FLOAT_TO_BYTE(CLAMP(src[RCOMP], -1.0f, 1.0f));
@@ -1511,7 +1511,7 @@ pack_float_SIGNED_RGBA8888(const GLfloat src[4], void *dst)
*/
static void
-pack_float_SIGNED_RGBA8888_REV(const GLfloat src[4], void *dst)
+pack_float_R8G8B8A8_SNORM(const GLfloat src[4], void *dst)
{
GLuint *d = (GLuint *) dst;
GLbyte r = FLOAT_TO_BYTE(CLAMP(src[RCOMP], -1.0f, 1.0f));
@@ -1527,7 +1527,7 @@ pack_float_SIGNED_RGBA8888_REV(const GLfloat src[4], void *dst)
*/
static void
-pack_float_SIGNED_R16(const GLfloat src[4], void *dst)
+pack_float_R_SNORM16(const GLfloat src[4], void *dst)
{
GLshort *d = (GLshort *) dst;
*d = FLOAT_TO_SHORT(CLAMP(src[RCOMP], -1.0f, 1.0f));
@@ -1539,7 +1539,7 @@ pack_float_SIGNED_R16(const GLfloat src[4], void *dst)
*/
static void
-pack_float_SIGNED_GR1616(const GLfloat src[4], void *dst)
+pack_float_R16G16_SNORM(const GLfloat src[4], void *dst)
{
GLuint *d = (GLuint *) dst;
GLshort r = FLOAT_TO_SHORT(CLAMP(src[RCOMP], -1.0f, 1.0f));
@@ -1553,7 +1553,7 @@ pack_float_SIGNED_GR1616(const GLfloat src[4], void *dst)
*/
static void
-pack_float_SIGNED_RGB_16(const GLfloat src[4], void *dst)
+pack_float_RGB_SNORM16(const GLfloat src[4], void *dst)
{
GLshort *d = (GLshort *) dst;
d[0] = FLOAT_TO_SHORT(CLAMP(src[RCOMP], -1.0f, 1.0f));
@@ -1567,7 +1567,7 @@ pack_float_SIGNED_RGB_16(const GLfloat src[4], void *dst)
*/
static void
-pack_float_SIGNED_RGBA_16(const GLfloat src[4], void *dst)
+pack_float_RGBA_SNORM16(const GLfloat src[4], void *dst)
{
GLshort *d = (GLshort *) dst;
d[0] = FLOAT_TO_SHORT(CLAMP(src[RCOMP], -1.0f, 1.0f));
@@ -1582,7 +1582,7 @@ pack_float_SIGNED_RGBA_16(const GLfloat src[4], void *dst)
*/
static void
-pack_float_SIGNED_A8(const GLfloat src[4], void *dst)
+pack_float_A_SNORM8(const GLfloat src[4], void *dst)
{
GLbyte *d = (GLbyte *) dst;
*d = FLOAT_TO_BYTE(CLAMP(src[ACOMP], -1.0f, 1.0f));
@@ -1594,7 +1594,7 @@ pack_float_SIGNED_A8(const GLfloat src[4], void *dst)
*/
static void
-pack_float_SIGNED_L8(const GLfloat src[4], void *dst)
+pack_float_L_SNORM8(const GLfloat src[4], void *dst)
{
GLbyte *d = (GLbyte *) dst;
*d = FLOAT_TO_BYTE(CLAMP(src[RCOMP], -1.0f, 1.0f));
@@ -1606,7 +1606,7 @@ pack_float_SIGNED_L8(const GLfloat src[4], void *dst)
*/
static void
-pack_float_SIGNED_AL88(const GLfloat src[4], void *dst)
+pack_float_L8A8_SNORM(const GLfloat src[4], void *dst)
{
GLushort *d = (GLushort *) dst;
GLbyte l = FLOAT_TO_BYTE(CLAMP(src[RCOMP], -1.0f, 1.0f));
@@ -1620,7 +1620,7 @@ pack_float_SIGNED_AL88(const GLfloat src[4], void *dst)
*/
static void
-pack_float_SIGNED_A16(const GLfloat src[4], void *dst)
+pack_float_A_SNORM16(const GLfloat src[4], void *dst)
{
GLshort *d = (GLshort *) dst;
*d = FLOAT_TO_SHORT(CLAMP(src[ACOMP], -1.0f, 1.0f));
@@ -1632,7 +1632,7 @@ pack_float_SIGNED_A16(const GLfloat src[4], void *dst)
*/
static void
-pack_float_SIGNED_L16(const GLfloat src[4], void *dst)
+pack_float_L_SNORM16(const GLfloat src[4], void *dst)
{
GLshort *d = (GLshort *) dst;
*d = FLOAT_TO_SHORT(CLAMP(src[RCOMP], -1.0f, 1.0f));
@@ -1644,7 +1644,7 @@ pack_float_SIGNED_L16(const GLfloat src[4], void *dst)
*/
static void
-pack_float_SIGNED_AL1616(const GLfloat src[4], void *dst)
+pack_float_LA_SNORM16(const GLfloat src[4], void *dst)
{
GLuint *d = (GLuint *) dst;
GLshort l = FLOAT_TO_SHORT(CLAMP(src[RCOMP], -1.0f, 1.0f));
@@ -1658,14 +1658,14 @@ pack_float_SIGNED_AL1616(const GLfloat src[4], void *dst)
*/
static void
-pack_float_RGB9_E5_FLOAT(const GLfloat src[4], void *dst)
+pack_float_R9G9B9E5_FLOAT(const GLfloat src[4], void *dst)
{
GLuint *d = (GLuint *) dst;
*d = float3_to_rgb9e5(src);
}
static void
-pack_ubyte_RGB9_E5_FLOAT(const GLubyte src[4], void *dst)
+pack_ubyte_R9G9B9E5_FLOAT(const GLubyte src[4], void *dst)
{
GLuint *d = (GLuint *) dst;
GLfloat rgb[3];
@@ -1682,7 +1682,7 @@ pack_ubyte_RGB9_E5_FLOAT(const GLubyte src[4], void *dst)
*/
static void
-pack_ubyte_R11_G11_B10_FLOAT(const GLubyte src[4], void *dst)
+pack_ubyte_R11G11B10_FLOAT(const GLubyte src[4], void *dst)
{
GLuint *d = (GLuint *) dst;
GLfloat rgb[3];
@@ -1693,7 +1693,7 @@ pack_ubyte_R11_G11_B10_FLOAT(const GLubyte src[4], void *dst)
}
static void
-pack_float_R11_G11_B10_FLOAT(const GLfloat src[4], void *dst)
+pack_float_R11G11B10_FLOAT(const GLfloat src[4], void *dst)
{
GLuint *d = (GLuint *) dst;
*d = float3_to_r11g11b10f(src);
@@ -1760,7 +1760,7 @@ pack_float_XBGR8888_SNORM(const GLfloat src[4], void *dst)
*/
static void
-pack_float_XBGR8888_SRGB(const GLfloat src[4], void *dst)
+pack_float_R8G8B8X8_SRGB(const GLfloat src[4], void *dst)
{
GLuint *d = (GLuint *) dst;
GLubyte r = linear_float_to_srgb_ubyte(src[RCOMP]);
@@ -1773,7 +1773,7 @@ pack_float_XBGR8888_SRGB(const GLfloat src[4], void *dst)
/* MESA_FORMAT_B10G10R10X2_UNORM */
static void
-pack_ubyte_XRGB2101010_UNORM(const GLubyte src[4], void *dst)
+pack_ubyte_B10G10R10X2_UNORM(const GLubyte src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLushort r = UBYTE_TO_USHORT(src[RCOMP]);
@@ -1783,7 +1783,7 @@ pack_ubyte_XRGB2101010_UNORM(const GLubyte src[4], void *dst)
}
static void
-pack_float_XRGB2101010_UNORM(const GLfloat src[4], void *dst)
+pack_float_B10G10R10X2_UNORM(const GLfloat src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLushort r, g, b;
@@ -1797,7 +1797,7 @@ pack_float_XRGB2101010_UNORM(const GLfloat src[4], void *dst)
/* MESA_FORMAT_RGBX_UNORM16 */
static void
-pack_ubyte_XBGR16161616_UNORM(const GLubyte src[4], void *dst)
+pack_ubyte_RGBX_UNORM16(const GLubyte src[4], void *dst)
{
GLushort *d = ((GLushort *) dst);
d[0] = UBYTE_TO_USHORT(src[RCOMP]);
@@ -1807,7 +1807,7 @@ pack_ubyte_XBGR16161616_UNORM(const GLubyte src[4], void *dst)
}
static void
-pack_float_XBGR16161616_UNORM(const GLfloat src[4], void *dst)
+pack_float_RGBX_UNORM16(const GLfloat src[4], void *dst)
{
GLushort *d = ((GLushort *) dst);
UNCLAMPED_FLOAT_TO_USHORT(d[0], src[RCOMP]);
@@ -1820,7 +1820,7 @@ pack_float_XBGR16161616_UNORM(const GLfloat src[4], void *dst)
/* MESA_FORMAT_RGBX_SNORM16 */
static void
-pack_float_XBGR16161616_SNORM(const GLfloat src[4], void *dst)
+pack_float_RGBX_SNORM16(const GLfloat src[4], void *dst)
{
GLushort *d = ((GLushort *) dst);
UNCLAMPED_FLOAT_TO_SHORT(d[0], src[RCOMP]);
@@ -1845,7 +1845,7 @@ pack_float_XBGR16161616_FLOAT(const GLfloat src[4], void *dst)
/* MESA_FORMAT_RGBX_FLOAT32 */
static void
-pack_float_XBGR32323232_FLOAT(const GLfloat src[4], void *dst)
+pack_float_RGBX_FLOAT32(const GLfloat src[4], void *dst)
{
GLfloat *d = ((GLfloat *) dst);
d[0] = src[RCOMP];
@@ -1857,7 +1857,7 @@ pack_float_XBGR32323232_FLOAT(const GLfloat src[4], void *dst)
/* MESA_FORMAT_R10G10B10A2_UNORM */
static void
-pack_ubyte_ABGR2101010(const GLubyte src[4], void *dst)
+pack_ubyte_R10G10B10A2_UNORM(const GLubyte src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLushort r = UBYTE_TO_USHORT(src[RCOMP]);
@@ -1868,7 +1868,7 @@ pack_ubyte_ABGR2101010(const GLubyte src[4], void *dst)
}
static void
-pack_float_ABGR2101010(const GLfloat src[4], void *dst)
+pack_float_R10G10B10A2_UNORM(const GLfloat src[4], void *dst)
{
GLuint *d = ((GLuint *) dst);
GLushort r, g, b, a;
@@ -1884,7 +1884,7 @@ pack_float_ABGR2101010(const GLfloat src[4], void *dst)
*/
static void
-pack_float_SIGNED_RG88(const GLfloat src[4], void *dst)
+pack_float_G8R8_SNORM(const GLfloat src[4], void *dst)
{
GLushort *d = (GLushort *) dst;
GLbyte r = FLOAT_TO_BYTE(CLAMP(src[RCOMP], -1.0f, 1.0f));
@@ -1897,7 +1897,7 @@ pack_float_SIGNED_RG88(const GLfloat src[4], void *dst)
*/
static void
-pack_float_SIGNED_RG1616(const GLfloat src[4], void *dst)
+pack_float_G16R16_SNORM(const GLfloat src[4], void *dst)
{
GLuint *d = (GLuint *) dst;
GLshort r = FLOAT_TO_SHORT(CLAMP(src[RCOMP], -1.0f, 1.0f));
@@ -1910,7 +1910,7 @@ pack_float_SIGNED_RG1616(const GLfloat src[4], void *dst)
*/
static void
-pack_float_XRGB8888_SRGB(const GLfloat src[4], void *dst)
+pack_float_B8G8R8X8_SRGB(const GLfloat src[4], void *dst)
{
GLuint *d = (GLuint *) dst;
GLubyte r = linear_float_to_srgb_ubyte(src[RCOMP]);
@@ -1933,45 +1933,45 @@ _mesa_get_pack_ubyte_rgba_function(mesa_format format)
table[MESA_FORMAT_NONE] = NULL;
- table[MESA_FORMAT_A8B8G8R8_UNORM] = pack_ubyte_RGBA8888;
- table[MESA_FORMAT_R8G8B8A8_UNORM] = pack_ubyte_RGBA8888_REV;
- table[MESA_FORMAT_B8G8R8A8_UNORM] = pack_ubyte_ARGB8888;
- table[MESA_FORMAT_A8R8G8B8_UNORM] = pack_ubyte_ARGB8888_REV;
- table[MESA_FORMAT_X8B8G8R8_UNORM] = pack_ubyte_RGBA8888; /* reused */
- table[MESA_FORMAT_R8G8B8X8_UNORM] = pack_ubyte_RGBA8888_REV; /* reused */
- table[MESA_FORMAT_B8G8R8X8_UNORM] = pack_ubyte_XRGB8888;
- table[MESA_FORMAT_X8R8G8B8_UNORM] = pack_ubyte_XRGB8888_REV;
- table[MESA_FORMAT_BGR_UNORM8] = pack_ubyte_RGB888;
- table[MESA_FORMAT_RGB_UNORM8] = pack_ubyte_BGR888;
- table[MESA_FORMAT_B5G6R5_UNORM] = pack_ubyte_RGB565;
- table[MESA_FORMAT_R5G6B5_UNORM] = pack_ubyte_RGB565_REV;
- table[MESA_FORMAT_B4G4R4A4_UNORM] = pack_ubyte_ARGB4444;
- table[MESA_FORMAT_A4R4G4B4_UNORM] = pack_ubyte_ARGB4444_REV;
- table[MESA_FORMAT_A1B5G5R5_UNORM] = pack_ubyte_RGBA5551;
- table[MESA_FORMAT_B5G5R5A1_UNORM] = pack_ubyte_ARGB1555;
- table[MESA_FORMAT_A1R5G5B5_UNORM] = pack_ubyte_ARGB1555_REV;
- table[MESA_FORMAT_L4A4_UNORM] = pack_ubyte_AL44;
- table[MESA_FORMAT_L8A8_UNORM] = pack_ubyte_AL88;
- table[MESA_FORMAT_A8L8_UNORM] = pack_ubyte_AL88_REV;
- table[MESA_FORMAT_L16A16_UNORM] = pack_ubyte_AL1616;
- table[MESA_FORMAT_A16L16_UNORM] = pack_ubyte_AL1616_REV;
- table[MESA_FORMAT_B2G3R3_UNORM] = pack_ubyte_RGB332;
- table[MESA_FORMAT_A_UNORM8] = pack_ubyte_A8;
- table[MESA_FORMAT_A_UNORM16] = pack_ubyte_A16;
- table[MESA_FORMAT_L_UNORM8] = pack_ubyte_L8;
- table[MESA_FORMAT_L_UNORM16] = pack_ubyte_L16;
- table[MESA_FORMAT_I_UNORM8] = pack_ubyte_L8; /* reuse pack_ubyte_L8 */
- table[MESA_FORMAT_I_UNORM16] = pack_ubyte_L16; /* reuse pack_ubyte_L16 */
+ table[MESA_FORMAT_A8B8G8R8_UNORM] = pack_ubyte_A8B8G8R8_UNORM;
+ table[MESA_FORMAT_R8G8B8A8_UNORM] = pack_ubyte_R8G8B8A8_UNORM;
+ table[MESA_FORMAT_B8G8R8A8_UNORM] = pack_ubyte_B8G8R8A8_UNORM;
+ table[MESA_FORMAT_A8R8G8B8_UNORM] = pack_ubyte_A8R8G8B8_UNORM;
+ table[MESA_FORMAT_X8B8G8R8_UNORM] = pack_ubyte_A8B8G8R8_UNORM; /* reused */
+ table[MESA_FORMAT_R8G8B8X8_UNORM] = pack_ubyte_R8G8B8A8_UNORM; /* reused */
+ table[MESA_FORMAT_B8G8R8X8_UNORM] = pack_ubyte_B8G8R8X8_UNORM;
+ table[MESA_FORMAT_X8R8G8B8_UNORM] = pack_ubyte_X8R8G8B8_UNORM;
+ table[MESA_FORMAT_BGR_UNORM8] = pack_ubyte_BGR_UNORM8;
+ table[MESA_FORMAT_RGB_UNORM8] = pack_ubyte_RGB_UNORM8;
+ table[MESA_FORMAT_B5G6R5_UNORM] = pack_ubyte_B5G6R5_UNORM;
+ table[MESA_FORMAT_R5G6B5_UNORM] = pack_ubyte_R5G6B5_UNORM;
+ table[MESA_FORMAT_B4G4R4A4_UNORM] = pack_ubyte_B4G4R4A4_UNORM;
+ table[MESA_FORMAT_A4R4G4B4_UNORM] = pack_ubyte_A4R4G4B4_UNORM;
+ table[MESA_FORMAT_A1B5G5R5_UNORM] = pack_ubyte_A1B5G5R5_UNORM;
+ table[MESA_FORMAT_B5G5R5A1_UNORM] = pack_ubyte_B5G5R5A1_UNORM;
+ table[MESA_FORMAT_A1R5G5B5_UNORM] = pack_ubyte_A1R5G5B5_UNORM;
+ table[MESA_FORMAT_L4A4_UNORM] = pack_ubyte_L4A4_UNORM;
+ table[MESA_FORMAT_L8A8_UNORM] = pack_ubyte_L8A8_UNORM;
+ table[MESA_FORMAT_A8L8_UNORM] = pack_ubyte_A8L8_UNORM;
+ table[MESA_FORMAT_L16A16_UNORM] = pack_ubyte_L16A16_UNORM;
+ table[MESA_FORMAT_A16L16_UNORM] = pack_ubyte_A16L16_UNORM;
+ table[MESA_FORMAT_B2G3R3_UNORM] = pack_ubyte_B2G3R3_UNORM;
+ table[MESA_FORMAT_A_UNORM8] = pack_ubyte_A_UNORM8;
+ table[MESA_FORMAT_A_UNORM16] = pack_ubyte_A_UNORM16;
+ table[MESA_FORMAT_L_UNORM8] = pack_ubyte_L_UNORM8;
+ table[MESA_FORMAT_L_UNORM16] = pack_ubyte_L_UNORM16;
+ table[MESA_FORMAT_I_UNORM8] = pack_ubyte_L_UNORM8; /* reuse pack_ubyte_L_UNORM8 */
+ table[MESA_FORMAT_I_UNORM16] = pack_ubyte_L_UNORM16; /* reuse pack_ubyte_L_UNORM16 */
table[MESA_FORMAT_YCBCR] = pack_ubyte_YCBCR;
table[MESA_FORMAT_YCBCR_REV] = pack_ubyte_YCBCR_REV;
- table[MESA_FORMAT_R_UNORM8] = pack_ubyte_R8;
- table[MESA_FORMAT_R8G8_UNORM] = pack_ubyte_GR88;
- table[MESA_FORMAT_G8R8_UNORM] = pack_ubyte_RG88;
- table[MESA_FORMAT_R_UNORM16] = pack_ubyte_R16;
- table[MESA_FORMAT_R16G16_UNORM] = pack_ubyte_GR1616;
- table[MESA_FORMAT_G16R16_UNORM] = pack_ubyte_RG1616;
- table[MESA_FORMAT_B10G10R10A2_UNORM] = pack_ubyte_ARGB2101010;
- table[MESA_FORMAT_R10G10B10A2_UINT] = pack_ubyte_ABGR2101010_UINT;
+ table[MESA_FORMAT_R_UNORM8] = pack_ubyte_R_UNORM8;
+ table[MESA_FORMAT_R8G8_UNORM] = pack_ubyte_R8G8_UNORM;
+ table[MESA_FORMAT_G8R8_UNORM] = pack_ubyte_G8R8_UNORM;
+ table[MESA_FORMAT_R_UNORM16] = pack_ubyte_R_UNORM16;
+ table[MESA_FORMAT_R16G16_UNORM] = pack_ubyte_R16G16_UNORM;
+ table[MESA_FORMAT_G16R16_UNORM] = pack_ubyte_G16R16_UNORM;
+ table[MESA_FORMAT_B10G10R10A2_UNORM] = pack_ubyte_B10G10R10A2_UNORM;
+ table[MESA_FORMAT_R10G10B10A2_UINT] = pack_ubyte_R10G10B10A2_UINT;
/* should never convert RGBA to these formats */
table[MESA_FORMAT_S8_UINT_Z24_UNORM] = NULL;
@@ -1983,12 +1983,12 @@ _mesa_get_pack_ubyte_rgba_function(mesa_format format)
table[MESA_FORMAT_S_UINT8] = NULL;
/* sRGB */
- table[MESA_FORMAT_BGR_SRGB8] = pack_ubyte_SRGB8;
- table[MESA_FORMAT_A8B8G8R8_SRGB] = pack_ubyte_SRGBA8;
- table[MESA_FORMAT_B8G8R8A8_SRGB] = pack_ubyte_SARGB8;
- table[MESA_FORMAT_R8G8B8A8_SRGB] = pack_ubyte_SABGR8;
- table[MESA_FORMAT_L_SRGB8] = pack_ubyte_SL8;
- table[MESA_FORMAT_L8A8_SRGB] = pack_ubyte_SLA8;
+ table[MESA_FORMAT_BGR_SRGB8] = pack_ubyte_BGR_SRGB8;
+ table[MESA_FORMAT_A8B8G8R8_SRGB] = pack_ubyte_A8B8G8R8_SRGB;
+ table[MESA_FORMAT_B8G8R8A8_SRGB] = pack_ubyte_B8G8R8A8_SRGB;
+ table[MESA_FORMAT_R8G8B8A8_SRGB] = pack_ubyte_R8G8B8A8_SRGB;
+ table[MESA_FORMAT_L_SRGB8] = pack_ubyte_L_SRGB8;
+ table[MESA_FORMAT_L8A8_SRGB] = pack_ubyte_L8A8_SRGB;
/* n/a */
table[MESA_FORMAT_SRGB_DXT1] = NULL; /* pack_ubyte_SRGB_DXT1; */
table[MESA_FORMAT_SRGBA_DXT1] = NULL; /* pack_ubyte_SRGBA_DXT1; */
@@ -2006,16 +2006,16 @@ _mesa_get_pack_ubyte_rgba_function(mesa_format format)
table[MESA_FORMAT_RGBA_FLOAT16] = pack_ubyte_RGBA_FLOAT16;
table[MESA_FORMAT_RGB_FLOAT32] = pack_ubyte_RGB_FLOAT32;
table[MESA_FORMAT_RGB_FLOAT16] = pack_ubyte_RGB_FLOAT16;
- table[MESA_FORMAT_A_FLOAT32] = pack_ubyte_ALPHA_FLOAT32;
- table[MESA_FORMAT_A_FLOAT16] = pack_ubyte_ALPHA_FLOAT16;
- table[MESA_FORMAT_L_FLOAT32] = pack_ubyte_LUMINANCE_FLOAT32;
- table[MESA_FORMAT_L_FLOAT16] = pack_ubyte_LUMINANCE_FLOAT16;
- table[MESA_FORMAT_LA_FLOAT32] = pack_ubyte_LUMINANCE_ALPHA_FLOAT32;
- table[MESA_FORMAT_LA_FLOAT16] = pack_ubyte_LUMINANCE_ALPHA_FLOAT16;
- table[MESA_FORMAT_I_FLOAT32] = pack_ubyte_LUMINANCE_FLOAT32;
- table[MESA_FORMAT_I_FLOAT16] = pack_ubyte_LUMINANCE_FLOAT16;
- table[MESA_FORMAT_R_FLOAT32] = pack_ubyte_LUMINANCE_FLOAT32;
- table[MESA_FORMAT_R_FLOAT16] = pack_ubyte_LUMINANCE_FLOAT16;
+ table[MESA_FORMAT_A_FLOAT32] = pack_ubyte_A_FLOAT32;
+ table[MESA_FORMAT_A_FLOAT16] = pack_ubyte_A_FLOAT16;
+ table[MESA_FORMAT_L_FLOAT32] = pack_ubyte_L_FLOAT32;
+ table[MESA_FORMAT_L_FLOAT16] = pack_ubyte_L_FLOAT16;
+ table[MESA_FORMAT_LA_FLOAT32] = pack_ubyte_LA_FLOAT32;
+ table[MESA_FORMAT_LA_FLOAT16] = pack_ubyte_LA_FLOAT16;
+ table[MESA_FORMAT_I_FLOAT32] = pack_ubyte_L_FLOAT32;
+ table[MESA_FORMAT_I_FLOAT16] = pack_ubyte_L_FLOAT16;
+ table[MESA_FORMAT_R_FLOAT32] = pack_ubyte_L_FLOAT32;
+ table[MESA_FORMAT_R_FLOAT16] = pack_ubyte_L_FLOAT16;
table[MESA_FORMAT_RG_FLOAT32] = pack_ubyte_RG_FLOAT32;
table[MESA_FORMAT_RG_FLOAT16] = pack_ubyte_RG_FLOAT16;
@@ -2053,8 +2053,8 @@ _mesa_get_pack_ubyte_rgba_function(mesa_format format)
table[MESA_FORMAT_RGBA_UNORM16] = pack_ubyte_RGBA_16;
- table[MESA_FORMAT_R9G9B9E5_FLOAT] = pack_ubyte_RGB9_E5_FLOAT;
- table[MESA_FORMAT_R11G11B10_FLOAT] = pack_ubyte_R11_G11_B10_FLOAT;
+ table[MESA_FORMAT_R9G9B9E5_FLOAT] = pack_ubyte_R9G9B9E5_FLOAT;
+ table[MESA_FORMAT_R11G11B10_FLOAT] = pack_ubyte_R11G11B10_FLOAT;
table[MESA_FORMAT_B4G4R4X4_UNORM] = pack_ubyte_XRGB4444_UNORM;
table[MESA_FORMAT_B5G5R5X1_UNORM] = pack_ubyte_XRGB1555_UNORM;
@@ -2062,8 +2062,8 @@ _mesa_get_pack_ubyte_rgba_function(mesa_format format)
table[MESA_FORMAT_R8G8B8X8_SRGB] = NULL;
table[MESA_FORMAT_RGBX_UINT8] = NULL;
table[MESA_FORMAT_RGBX_SINT8] = NULL;
- table[MESA_FORMAT_B10G10R10X2_UNORM] = pack_ubyte_XRGB2101010_UNORM;
- table[MESA_FORMAT_RGBX_UNORM16] = pack_ubyte_XBGR16161616_UNORM;
+ table[MESA_FORMAT_B10G10R10X2_UNORM] = pack_ubyte_B10G10R10X2_UNORM;
+ table[MESA_FORMAT_RGBX_UNORM16] = pack_ubyte_RGBX_UNORM16;
table[MESA_FORMAT_RGBX_SNORM16] = NULL;
table[MESA_FORMAT_RGBX_FLOAT16] = NULL;
table[MESA_FORMAT_RGBX_UINT16] = NULL;
@@ -2072,7 +2072,7 @@ _mesa_get_pack_ubyte_rgba_function(mesa_format format)
table[MESA_FORMAT_RGBX_UINT32] = NULL;
table[MESA_FORMAT_RGBX_SINT32] = NULL;
- table[MESA_FORMAT_R10G10B10A2_UNORM] = pack_ubyte_ABGR2101010;
+ table[MESA_FORMAT_R10G10B10A2_UNORM] = pack_ubyte_R10G10B10A2_UNORM;
table[MESA_FORMAT_B8G8R8X8_SRGB] = NULL;
@@ -2098,46 +2098,46 @@ _mesa_get_pack_float_rgba_function(mesa_format format)
table[MESA_FORMAT_NONE] = NULL;
- table[MESA_FORMAT_A8B8G8R8_UNORM] = pack_float_RGBA8888;
- table[MESA_FORMAT_R8G8B8A8_UNORM] = pack_float_RGBA8888_REV;
- table[MESA_FORMAT_B8G8R8A8_UNORM] = pack_float_ARGB8888;
- table[MESA_FORMAT_A8R8G8B8_UNORM] = pack_float_ARGB8888_REV;
- table[MESA_FORMAT_X8B8G8R8_UNORM] = pack_float_RGBA8888; /* reused */
- table[MESA_FORMAT_R8G8B8X8_UNORM] = pack_float_RGBA8888_REV; /* reused */
- table[MESA_FORMAT_B8G8R8X8_UNORM] = pack_float_XRGB8888;
- table[MESA_FORMAT_X8R8G8B8_UNORM] = pack_float_XRGB8888_REV;
- table[MESA_FORMAT_BGR_UNORM8] = pack_float_RGB888;
- table[MESA_FORMAT_RGB_UNORM8] = pack_float_BGR888;
- table[MESA_FORMAT_B5G6R5_UNORM] = pack_float_RGB565;
- table[MESA_FORMAT_R5G6B5_UNORM] = pack_float_RGB565_REV;
- table[MESA_FORMAT_B4G4R4A4_UNORM] = pack_float_ARGB4444;
- table[MESA_FORMAT_A4R4G4B4_UNORM] = pack_float_ARGB4444_REV;
- table[MESA_FORMAT_A1B5G5R5_UNORM] = pack_float_RGBA5551;
- table[MESA_FORMAT_B5G5R5A1_UNORM] = pack_float_ARGB1555;
- table[MESA_FORMAT_A1R5G5B5_UNORM] = pack_float_ARGB1555_REV;
-
- table[MESA_FORMAT_L4A4_UNORM] = pack_float_AL44;
- table[MESA_FORMAT_L8A8_UNORM] = pack_float_AL88;
- table[MESA_FORMAT_A8L8_UNORM] = pack_float_AL88_REV;
- table[MESA_FORMAT_L16A16_UNORM] = pack_float_AL1616;
- table[MESA_FORMAT_A16L16_UNORM] = pack_float_AL1616_REV;
- table[MESA_FORMAT_B2G3R3_UNORM] = pack_float_RGB332;
- table[MESA_FORMAT_A_UNORM8] = pack_float_A8;
- table[MESA_FORMAT_A_UNORM16] = pack_float_A16;
- table[MESA_FORMAT_L_UNORM8] = pack_float_L8;
- table[MESA_FORMAT_L_UNORM16] = pack_float_L16;
- table[MESA_FORMAT_I_UNORM8] = pack_float_L8; /* reuse pack_float_L8 */
- table[MESA_FORMAT_I_UNORM16] = pack_float_L16; /* reuse pack_float_L16 */
+ table[MESA_FORMAT_A8B8G8R8_UNORM] = pack_float_A8B8G8R8_UNORM;
+ table[MESA_FORMAT_R8G8B8A8_UNORM] = pack_float_R8G8B8A8_UNORM;
+ table[MESA_FORMAT_B8G8R8A8_UNORM] = pack_float_B8G8R8A8_UNORM;
+ table[MESA_FORMAT_A8R8G8B8_UNORM] = pack_float_A8R8G8B8_UNORM;
+ table[MESA_FORMAT_X8B8G8R8_UNORM] = pack_float_A8B8G8R8_UNORM; /* reused */
+ table[MESA_FORMAT_R8G8B8X8_UNORM] = pack_float_R8G8B8A8_UNORM; /* reused */
+ table[MESA_FORMAT_B8G8R8X8_UNORM] = pack_float_B8G8R8X8_UNORM;
+ table[MESA_FORMAT_X8R8G8B8_UNORM] = pack_float_X8R8G8B8_UNORM;
+ table[MESA_FORMAT_BGR_UNORM8] = pack_float_BGR_UNORM8;
+ table[MESA_FORMAT_RGB_UNORM8] = pack_float_RGB_UNORM8;
+ table[MESA_FORMAT_B5G6R5_UNORM] = pack_float_B5G6R5_UNORM;
+ table[MESA_FORMAT_R5G6B5_UNORM] = pack_float_R5G6B5_UNORM;
+ table[MESA_FORMAT_B4G4R4A4_UNORM] = pack_float_B4G4R4A4_UNORM;
+ table[MESA_FORMAT_A4R4G4B4_UNORM] = pack_float_A4R4G4B4_UNORM;
+ table[MESA_FORMAT_A1B5G5R5_UNORM] = pack_float_A1B5G5R5_UNORM;
+ table[MESA_FORMAT_B5G5R5A1_UNORM] = pack_float_B5G5R5A1_UNORM;
+ table[MESA_FORMAT_A1R5G5B5_UNORM] = pack_float_A1R5G5B5_UNORM;
+
+ table[MESA_FORMAT_L4A4_UNORM] = pack_float_L4A4_UNORM;
+ table[MESA_FORMAT_L8A8_UNORM] = pack_float_L8A8_UNORM;
+ table[MESA_FORMAT_A8L8_UNORM] = pack_float_A8L8_UNORM;
+ table[MESA_FORMAT_L16A16_UNORM] = pack_float_L16A16_UNORM;
+ table[MESA_FORMAT_A16L16_UNORM] = pack_float_A16L16_UNORM;
+ table[MESA_FORMAT_B2G3R3_UNORM] = pack_float_B2G3R3_UNORM;
+ table[MESA_FORMAT_A_UNORM8] = pack_float_A_UNORM8;
+ table[MESA_FORMAT_A_UNORM16] = pack_float_A_UNORM16;
+ table[MESA_FORMAT_L_UNORM8] = pack_float_L_UNORM8;
+ table[MESA_FORMAT_L_UNORM16] = pack_float_L_UNORM16;
+ table[MESA_FORMAT_I_UNORM8] = pack_float_L_UNORM8; /* reuse pack_float_L_UNORM8 */
+ table[MESA_FORMAT_I_UNORM16] = pack_float_L_UNORM16; /* reuse pack_float_L_UNORM16 */
table[MESA_FORMAT_YCBCR] = pack_float_YCBCR;
table[MESA_FORMAT_YCBCR_REV] = pack_float_YCBCR_REV;
- table[MESA_FORMAT_R_UNORM8] = pack_float_R8;
- table[MESA_FORMAT_R8G8_UNORM] = pack_float_GR88;
- table[MESA_FORMAT_G8R8_UNORM] = pack_float_RG88;
- table[MESA_FORMAT_R_UNORM16] = pack_float_R16;
- table[MESA_FORMAT_R16G16_UNORM] = pack_float_GR1616;
- table[MESA_FORMAT_G16R16_UNORM] = pack_float_RG1616;
- table[MESA_FORMAT_B10G10R10A2_UNORM] = pack_float_ARGB2101010;
- table[MESA_FORMAT_R10G10B10A2_UINT] = pack_float_ABGR2101010_UINT;
+ table[MESA_FORMAT_R_UNORM8] = pack_float_R_UNORM8;
+ table[MESA_FORMAT_R8G8_UNORM] = pack_float_R8G8_UNORM;
+ table[MESA_FORMAT_G8R8_UNORM] = pack_float_G8R8_UNORM;
+ table[MESA_FORMAT_R_UNORM16] = pack_float_R_UNORM16;
+ table[MESA_FORMAT_R16G16_UNORM] = pack_float_R16G16_UNORM;
+ table[MESA_FORMAT_G16R16_UNORM] = pack_float_G16R16_UNORM;
+ table[MESA_FORMAT_B10G10R10A2_UNORM] = pack_float_B10G10R10A2_UNORM;
+ table[MESA_FORMAT_R10G10B10A2_UINT] = pack_float_R10G10B10A2_UINT;
/* should never convert RGBA to these formats */
table[MESA_FORMAT_S8_UINT_Z24_UNORM] = NULL;
@@ -2148,12 +2148,12 @@ _mesa_get_pack_float_rgba_function(mesa_format format)
table[MESA_FORMAT_Z_UNORM32] = NULL;
table[MESA_FORMAT_S_UINT8] = NULL;
- table[MESA_FORMAT_BGR_SRGB8] = pack_float_SRGB8;
- table[MESA_FORMAT_A8B8G8R8_SRGB] = pack_float_SRGBA8;
- table[MESA_FORMAT_B8G8R8A8_SRGB] = pack_float_SARGB8;
- table[MESA_FORMAT_R8G8B8A8_SRGB] = pack_float_SABGR8;
- table[MESA_FORMAT_L_SRGB8] = pack_float_SL8;
- table[MESA_FORMAT_L8A8_SRGB] = pack_float_SLA8;
+ table[MESA_FORMAT_BGR_SRGB8] = pack_float_BGR_SRGB8;
+ table[MESA_FORMAT_A8B8G8R8_SRGB] = pack_float_A8B8G8R8_SRGB;
+ table[MESA_FORMAT_B8G8R8A8_SRGB] = pack_float_B8G8R8A8_SRGB;
+ table[MESA_FORMAT_R8G8B8A8_SRGB] = pack_float_R8G8B8A8_SRGB;
+ table[MESA_FORMAT_L_SRGB8] = pack_float_L_SRGB8;
+ table[MESA_FORMAT_L8A8_SRGB] = pack_float_L8A8_SRGB;
/* n/a */
table[MESA_FORMAT_SRGB_DXT1] = NULL;
@@ -2172,17 +2172,17 @@ _mesa_get_pack_float_rgba_function(mesa_format format)
table[MESA_FORMAT_RGBA_FLOAT16] = pack_float_RGBA_FLOAT16;
table[MESA_FORMAT_RGB_FLOAT32] = pack_float_RGB_FLOAT32;
table[MESA_FORMAT_RGB_FLOAT16] = pack_float_RGB_FLOAT16;
- table[MESA_FORMAT_A_FLOAT32] = pack_float_ALPHA_FLOAT32;
- table[MESA_FORMAT_A_FLOAT16] = pack_float_ALPHA_FLOAT16;
- table[MESA_FORMAT_L_FLOAT32] = pack_float_LUMINANCE_FLOAT32;
- table[MESA_FORMAT_L_FLOAT16] = pack_float_LUMINANCE_FLOAT16;
- table[MESA_FORMAT_LA_FLOAT32] = pack_float_LUMINANCE_ALPHA_FLOAT32;
- table[MESA_FORMAT_LA_FLOAT16] = pack_float_LUMINANCE_ALPHA_FLOAT16;
-
- table[MESA_FORMAT_I_FLOAT32] = pack_float_LUMINANCE_FLOAT32;
- table[MESA_FORMAT_I_FLOAT16] = pack_float_LUMINANCE_FLOAT16;
- table[MESA_FORMAT_R_FLOAT32] = pack_float_LUMINANCE_FLOAT32;
- table[MESA_FORMAT_R_FLOAT16] = pack_float_LUMINANCE_FLOAT16;
+ table[MESA_FORMAT_A_FLOAT32] = pack_float_A_FLOAT32;
+ table[MESA_FORMAT_A_FLOAT16] = pack_float_A_FLOAT16;
+ table[MESA_FORMAT_L_FLOAT32] = pack_float_L_FLOAT32;
+ table[MESA_FORMAT_L_FLOAT16] = pack_float_L_FLOAT16;
+ table[MESA_FORMAT_LA_FLOAT32] = pack_float_LA_FLOAT32;
+ table[MESA_FORMAT_LA_FLOAT16] = pack_float_LA_FLOAT16;
+
+ table[MESA_FORMAT_I_FLOAT32] = pack_float_L_FLOAT32;
+ table[MESA_FORMAT_I_FLOAT16] = pack_float_L_FLOAT16;
+ table[MESA_FORMAT_R_FLOAT32] = pack_float_L_FLOAT32;
+ table[MESA_FORMAT_R_FLOAT16] = pack_float_L_FLOAT16;
table[MESA_FORMAT_RG_FLOAT32] = pack_float_RG_FLOAT32;
table[MESA_FORMAT_RG_FLOAT16] = pack_float_RG_FLOAT16;
@@ -2198,49 +2198,49 @@ _mesa_get_pack_float_rgba_function(mesa_format format)
table[MESA_FORMAT_RGBA_UNORM16] = pack_float_RGBA_16;
- table[MESA_FORMAT_R_SNORM8] = pack_float_SIGNED_R8;
- table[MESA_FORMAT_R8G8_SNORM] = pack_float_SIGNED_RG88_REV;
- table[MESA_FORMAT_X8B8G8R8_SNORM] = pack_float_SIGNED_RGBX8888;
- table[MESA_FORMAT_A8B8G8R8_SNORM] = pack_float_SIGNED_RGBA8888;
- table[MESA_FORMAT_R8G8B8A8_SNORM] = pack_float_SIGNED_RGBA8888_REV;
- table[MESA_FORMAT_R_SNORM16] = pack_float_SIGNED_R16;
- table[MESA_FORMAT_R16G16_SNORM] = pack_float_SIGNED_GR1616;
- table[MESA_FORMAT_RGB_SNORM16] = pack_float_SIGNED_RGB_16;
- table[MESA_FORMAT_RGBA_SNORM16] = pack_float_SIGNED_RGBA_16;
- table[MESA_FORMAT_A_SNORM8] = pack_float_SIGNED_A8;
- table[MESA_FORMAT_L_SNORM8] = pack_float_SIGNED_L8;
- table[MESA_FORMAT_L8A8_SNORM] = pack_float_SIGNED_AL88;
- table[MESA_FORMAT_I_SNORM8] = pack_float_SIGNED_L8; /* reused */
- table[MESA_FORMAT_A_SNORM16] = pack_float_SIGNED_A16;
- table[MESA_FORMAT_L_SNORM16] = pack_float_SIGNED_L16;
- table[MESA_FORMAT_LA_SNORM16] = pack_float_SIGNED_AL1616;
- table[MESA_FORMAT_I_SNORM16] = pack_float_SIGNED_L16; /* reused */
-
- table[MESA_FORMAT_R9G9B9E5_FLOAT] = pack_float_RGB9_E5_FLOAT;
- table[MESA_FORMAT_R11G11B10_FLOAT] = pack_float_R11_G11_B10_FLOAT;
+ table[MESA_FORMAT_R_SNORM8] = pack_float_R_SNORM8;
+ table[MESA_FORMAT_R8G8_SNORM] = pack_float_R8G8_SNORM;
+ table[MESA_FORMAT_X8B8G8R8_SNORM] = pack_float_X8B8G8R8_SNORM;
+ table[MESA_FORMAT_A8B8G8R8_SNORM] = pack_float_A8B8G8R8_SNORM;
+ table[MESA_FORMAT_R8G8B8A8_SNORM] = pack_float_R8G8B8A8_SNORM;
+ table[MESA_FORMAT_R_SNORM16] = pack_float_R_SNORM16;
+ table[MESA_FORMAT_R16G16_SNORM] = pack_float_R16G16_SNORM;
+ table[MESA_FORMAT_RGB_SNORM16] = pack_float_RGB_SNORM16;
+ table[MESA_FORMAT_RGBA_SNORM16] = pack_float_RGBA_SNORM16;
+ table[MESA_FORMAT_A_SNORM8] = pack_float_A_SNORM8;
+ table[MESA_FORMAT_L_SNORM8] = pack_float_L_SNORM8;
+ table[MESA_FORMAT_L8A8_SNORM] = pack_float_L8A8_SNORM;
+ table[MESA_FORMAT_I_SNORM8] = pack_float_L_SNORM8; /* reused */
+ table[MESA_FORMAT_A_SNORM16] = pack_float_A_SNORM16;
+ table[MESA_FORMAT_L_SNORM16] = pack_float_L_SNORM16;
+ table[MESA_FORMAT_LA_SNORM16] = pack_float_LA_SNORM16;
+ table[MESA_FORMAT_I_SNORM16] = pack_float_L_SNORM16; /* reused */
+
+ table[MESA_FORMAT_R9G9B9E5_FLOAT] = pack_float_R9G9B9E5_FLOAT;
+ table[MESA_FORMAT_R11G11B10_FLOAT] = pack_float_R11G11B10_FLOAT;
table[MESA_FORMAT_B4G4R4X4_UNORM] = pack_float_XRGB4444_UNORM;
table[MESA_FORMAT_B5G5R5X1_UNORM] = pack_float_XRGB1555_UNORM;
table[MESA_FORMAT_R8G8B8X8_SNORM] = pack_float_XBGR8888_SNORM;
- table[MESA_FORMAT_R8G8B8X8_SRGB] = pack_float_XBGR8888_SRGB;
+ table[MESA_FORMAT_R8G8B8X8_SRGB] = pack_float_R8G8B8X8_SRGB;
table[MESA_FORMAT_RGBX_UINT8] = NULL;
table[MESA_FORMAT_RGBX_SINT8] = NULL;
- table[MESA_FORMAT_B10G10R10X2_UNORM] = pack_float_XRGB2101010_UNORM;
- table[MESA_FORMAT_RGBX_UNORM16] = pack_float_XBGR16161616_UNORM;
- table[MESA_FORMAT_RGBX_SNORM16] = pack_float_XBGR16161616_SNORM;
+ table[MESA_FORMAT_B10G10R10X2_UNORM] = pack_float_B10G10R10X2_UNORM;
+ table[MESA_FORMAT_RGBX_UNORM16] = pack_float_RGBX_UNORM16;
+ table[MESA_FORMAT_RGBX_SNORM16] = pack_float_RGBX_SNORM16;
table[MESA_FORMAT_RGBX_FLOAT16] = pack_float_XBGR16161616_FLOAT;
table[MESA_FORMAT_RGBX_UINT16] = NULL;
table[MESA_FORMAT_RGBX_SINT16] = NULL;
- table[MESA_FORMAT_RGBX_FLOAT32] = pack_float_XBGR32323232_FLOAT;
+ table[MESA_FORMAT_RGBX_FLOAT32] = pack_float_RGBX_FLOAT32;
table[MESA_FORMAT_RGBX_UINT32] = NULL;
table[MESA_FORMAT_RGBX_SINT32] = NULL;
- table[MESA_FORMAT_R10G10B10A2_UNORM] = pack_float_ABGR2101010;
+ table[MESA_FORMAT_R10G10B10A2_UNORM] = pack_float_R10G10B10A2_UNORM;
- table[MESA_FORMAT_G8R8_SNORM] = pack_float_SIGNED_RG88;
- table[MESA_FORMAT_G16R16_SNORM] = pack_float_SIGNED_RG1616;
+ table[MESA_FORMAT_G8R8_SNORM] = pack_float_G8R8_SNORM;
+ table[MESA_FORMAT_G16R16_SNORM] = pack_float_G16R16_SNORM;
- table[MESA_FORMAT_B8G8R8X8_SRGB] = pack_float_XRGB8888_SRGB;
+ table[MESA_FORMAT_B8G8R8X8_SRGB] = pack_float_B8G8R8X8_SRGB;
initialized = GL_TRUE;
}
@@ -2262,18 +2262,18 @@ get_pack_float_rgba_row_function(mesa_format format)
*/
memset(table, 0, sizeof(table));
- table[MESA_FORMAT_A8B8G8R8_UNORM] = pack_row_float_RGBA8888;
- table[MESA_FORMAT_R8G8B8A8_UNORM] = pack_row_float_RGBA8888_REV;
- table[MESA_FORMAT_B8G8R8A8_UNORM] = pack_row_float_ARGB8888;
- table[MESA_FORMAT_A8R8G8B8_UNORM] = pack_row_float_ARGB8888_REV;
- table[MESA_FORMAT_X8B8G8R8_UNORM] = pack_row_float_RGBA8888; /* reused */
- table[MESA_FORMAT_R8G8B8X8_UNORM] = pack_row_float_RGBA8888_REV; /* reused */
- table[MESA_FORMAT_B8G8R8X8_UNORM] = pack_row_float_XRGB8888;
- table[MESA_FORMAT_X8R8G8B8_UNORM] = pack_row_float_XRGB8888_REV;
- table[MESA_FORMAT_BGR_UNORM8] = pack_row_float_RGB888;
- table[MESA_FORMAT_RGB_UNORM8] = pack_row_float_BGR888;
- table[MESA_FORMAT_B5G6R5_UNORM] = pack_row_float_RGB565;
- table[MESA_FORMAT_R5G6B5_UNORM] = pack_row_float_RGB565_REV;
+ table[MESA_FORMAT_A8B8G8R8_UNORM] = pack_row_float_A8B8G8R8_UNORM;
+ table[MESA_FORMAT_R8G8B8A8_UNORM] = pack_row_float_R8G8B8A8_UNORM;
+ table[MESA_FORMAT_B8G8R8A8_UNORM] = pack_row_float_B8G8R8A8_UNORM;
+ table[MESA_FORMAT_A8R8G8B8_UNORM] = pack_row_float_A8R8G8B8_UNORM;
+ table[MESA_FORMAT_X8B8G8R8_UNORM] = pack_row_float_A8B8G8R8_UNORM; /* reused */
+ table[MESA_FORMAT_R8G8B8X8_UNORM] = pack_row_float_R8G8B8A8_UNORM; /* reused */
+ table[MESA_FORMAT_B8G8R8X8_UNORM] = pack_row_float_B8G8R8X8_UNORM;
+ table[MESA_FORMAT_X8R8G8B8_UNORM] = pack_row_float_X8R8G8B8_UNORM;
+ table[MESA_FORMAT_BGR_UNORM8] = pack_row_float_BGR_UNORM8;
+ table[MESA_FORMAT_RGB_UNORM8] = pack_row_float_RGB_UNORM8;
+ table[MESA_FORMAT_B5G6R5_UNORM] = pack_row_float_B5G6R5_UNORM;
+ table[MESA_FORMAT_R5G6B5_UNORM] = pack_row_float_R5G6B5_UNORM;
initialized = GL_TRUE;
}
@@ -2295,18 +2295,18 @@ get_pack_ubyte_rgba_row_function(mesa_format format)
*/
memset(table, 0, sizeof(table));
- table[MESA_FORMAT_A8B8G8R8_UNORM] = pack_row_ubyte_RGBA8888;
- table[MESA_FORMAT_R8G8B8A8_UNORM] = pack_row_ubyte_RGBA8888_REV;
- table[MESA_FORMAT_B8G8R8A8_UNORM] = pack_row_ubyte_ARGB8888;
- table[MESA_FORMAT_A8R8G8B8_UNORM] = pack_row_ubyte_ARGB8888_REV;
- table[MESA_FORMAT_X8B8G8R8_UNORM] = pack_row_ubyte_RGBA8888; /* reused */
- table[MESA_FORMAT_R8G8B8X8_UNORM] = pack_row_ubyte_RGBA8888_REV; /* reused */
- table[MESA_FORMAT_B8G8R8X8_UNORM] = pack_row_ubyte_XRGB8888;
- table[MESA_FORMAT_X8R8G8B8_UNORM] = pack_row_ubyte_XRGB8888_REV;
- table[MESA_FORMAT_BGR_UNORM8] = pack_row_ubyte_RGB888;
- table[MESA_FORMAT_RGB_UNORM8] = pack_row_ubyte_BGR888;
- table[MESA_FORMAT_B5G6R5_UNORM] = pack_row_ubyte_RGB565;
- table[MESA_FORMAT_R5G6B5_UNORM] = pack_row_ubyte_RGB565_REV;
+ table[MESA_FORMAT_A8B8G8R8_UNORM] = pack_row_ubyte_A8B8G8R8_UNORM;
+ table[MESA_FORMAT_R8G8B8A8_UNORM] = pack_row_ubyte_R8G8B8A8_UNORM;
+ table[MESA_FORMAT_B8G8R8A8_UNORM] = pack_row_ubyte_B8G8R8A8_UNORM;
+ table[MESA_FORMAT_A8R8G8B8_UNORM] = pack_row_ubyte_A8R8G8B8_UNORM;
+ table[MESA_FORMAT_X8B8G8R8_UNORM] = pack_row_ubyte_A8B8G8R8_UNORM; /* reused */
+ table[MESA_FORMAT_R8G8B8X8_UNORM] = pack_row_ubyte_R8G8B8A8_UNORM; /* reused */
+ table[MESA_FORMAT_B8G8R8X8_UNORM] = pack_row_ubyte_B8G8R8X8_UNORM;
+ table[MESA_FORMAT_X8R8G8B8_UNORM] = pack_row_ubyte_X8R8G8B8_UNORM;
+ table[MESA_FORMAT_BGR_UNORM8] = pack_row_ubyte_BGR_UNORM8;
+ table[MESA_FORMAT_RGB_UNORM8] = pack_row_ubyte_RGB_UNORM8;
+ table[MESA_FORMAT_B5G6R5_UNORM] = pack_row_ubyte_B5G6R5_UNORM;
+ table[MESA_FORMAT_R5G6B5_UNORM] = pack_row_ubyte_R5G6B5_UNORM;
initialized = GL_TRUE;
}
@@ -2425,7 +2425,7 @@ _mesa_pack_ubyte_rgba_rect(mesa_format format, GLuint width, GLuint height,
**/
static void
-pack_float_z_Z24_S8(const GLfloat *src, void *dst)
+pack_float_S8_UINT_Z24_UNORM(const GLfloat *src, void *dst)
{
/* don't disturb the stencil values */
GLuint *d = ((GLuint *) dst);
@@ -2437,7 +2437,7 @@ pack_float_z_Z24_S8(const GLfloat *src, void *dst)
}
static void
-pack_float_z_S8_Z24(const GLfloat *src, void *dst)
+pack_float_Z24_UNORM_S8_UINT(const GLfloat *src, void *dst)
{
/* don't disturb the stencil values */
GLuint *d = ((GLuint *) dst);
@@ -2449,7 +2449,7 @@ pack_float_z_S8_Z24(const GLfloat *src, void *dst)
}
static void
-pack_float_z_Z16(const GLfloat *src, void *dst)
+pack_float_Z_UNORM16(const GLfloat *src, void *dst)
{
GLushort *d = ((GLushort *) dst);
const GLfloat scale = (GLfloat) 0xffff;
@@ -2457,7 +2457,7 @@ pack_float_z_Z16(const GLfloat *src, void *dst)
}
static void
-pack_float_z_Z32(const GLfloat *src, void *dst)
+pack_float_Z_UNORM32(const GLfloat *src, void *dst)
{
GLuint *d = ((GLuint *) dst);
const GLdouble scale = (GLdouble) 0xffffffff;
@@ -2465,7 +2465,7 @@ pack_float_z_Z32(const GLfloat *src, void *dst)
}
static void
-pack_float_z_Z32_FLOAT(const GLfloat *src, void *dst)
+pack_float_Z_FLOAT32(const GLfloat *src, void *dst)
{
GLfloat *d = (GLfloat *) dst;
*d = *src;
@@ -2477,17 +2477,17 @@ _mesa_get_pack_float_z_func(mesa_format format)
switch (format) {
case MESA_FORMAT_S8_UINT_Z24_UNORM:
case MESA_FORMAT_X8_UINT_Z24_UNORM:
- return pack_float_z_Z24_S8;
+ return pack_float_S8_UINT_Z24_UNORM;
case MESA_FORMAT_Z24_UNORM_S8_UINT:
case MESA_FORMAT_Z24_UNORM_X8_UINT:
- return pack_float_z_S8_Z24;
+ return pack_float_Z24_UNORM_S8_UINT;
case MESA_FORMAT_Z_UNORM16:
- return pack_float_z_Z16;
+ return pack_float_Z_UNORM16;
case MESA_FORMAT_Z_UNORM32:
- return pack_float_z_Z32;
+ return pack_float_Z_UNORM32;
case MESA_FORMAT_Z_FLOAT32:
case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
- return pack_float_z_Z32_FLOAT;
+ return pack_float_Z_FLOAT32;
default:
_mesa_problem(NULL,
"unexpected format in _mesa_get_pack_float_z_func()");
@@ -2503,7 +2503,7 @@ _mesa_get_pack_float_z_func(mesa_format format)
**/
static void
-pack_uint_z_Z24_S8(const GLuint *src, void *dst)
+pack_uint_S8_UINT_Z24_UNORM(const GLuint *src, void *dst)
{
/* don't disturb the stencil values */
GLuint *d = ((GLuint *) dst);
@@ -2513,7 +2513,7 @@ pack_uint_z_Z24_S8(const GLuint *src, void *dst)
}
static void
-pack_uint_z_S8_Z24(const GLuint *src, void *dst)
+pack_uint_Z24_UNORM_S8_UINT(const GLuint *src, void *dst)
{
/* don't disturb the stencil values */
GLuint *d = ((GLuint *) dst);
@@ -2523,21 +2523,21 @@ pack_uint_z_S8_Z24(const GLuint *src, void *dst)
}
static void
-pack_uint_z_Z16(const GLuint *src, void *dst)
+pack_uint_Z_UNORM16(const GLuint *src, void *dst)
{
GLushort *d = ((GLushort *) dst);
*d = *src >> 16;
}
static void
-pack_uint_z_Z32(const GLuint *src, void *dst)
+pack_uint_Z_UNORM32(const GLuint *src, void *dst)
{
GLuint *d = ((GLuint *) dst);
*d = *src;
}
static void
-pack_uint_z_Z32_FLOAT(const GLuint *src, void *dst)
+pack_uint_Z_FLOAT32(const GLuint *src, void *dst)
{
GLuint *d = ((GLuint *) dst);
const GLdouble scale = 1.0 / (GLdouble) 0xffffffff;
@@ -2547,7 +2547,7 @@ pack_uint_z_Z32_FLOAT(const GLuint *src, void *dst)
}
static void
-pack_uint_z_Z32_FLOAT_X24S8(const GLuint *src, void *dst)
+pack_uint_Z_FLOAT32_X24S8(const GLuint *src, void *dst)
{
GLfloat *d = ((GLfloat *) dst);
const GLdouble scale = 1.0 / (GLdouble) 0xffffffff;
@@ -2562,18 +2562,18 @@ _mesa_get_pack_uint_z_func(mesa_format format)
switch (format) {
case MESA_FORMAT_S8_UINT_Z24_UNORM:
case MESA_FORMAT_X8_UINT_Z24_UNORM:
- return pack_uint_z_Z24_S8;
+ return pack_uint_S8_UINT_Z24_UNORM;
case MESA_FORMAT_Z24_UNORM_S8_UINT:
case MESA_FORMAT_Z24_UNORM_X8_UINT:
- return pack_uint_z_S8_Z24;
+ return pack_uint_Z24_UNORM_S8_UINT;
case MESA_FORMAT_Z_UNORM16:
- return pack_uint_z_Z16;
+ return pack_uint_Z_UNORM16;
case MESA_FORMAT_Z_UNORM32:
- return pack_uint_z_Z32;
+ return pack_uint_Z_UNORM32;
case MESA_FORMAT_Z_FLOAT32:
- return pack_uint_z_Z32_FLOAT;
+ return pack_uint_Z_FLOAT32;
case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
- return pack_uint_z_Z32_FLOAT_X24S8;
+ return pack_uint_Z_FLOAT32_X24S8;
default:
_mesa_problem(NULL, "unexpected format in _mesa_get_pack_uint_z_func()");
return NULL;
diff --git a/mesalib/src/mesa/main/format_unpack.c b/mesalib/src/mesa/main/format_unpack.c
index f85c875e4..2ef2e31d6 100644
--- a/mesalib/src/mesa/main/format_unpack.c
+++ b/mesalib/src/mesa/main/format_unpack.c
@@ -89,7 +89,7 @@ typedef void (*unpack_rgba_func)(const void *src, GLfloat dst[][4], GLuint n);
static void
-unpack_RGBA8888(const void *src, GLfloat dst[][4], GLuint n)
+unpack_A8B8G8R8_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -102,7 +102,7 @@ unpack_RGBA8888(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_RGBA8888_REV(const void *src, GLfloat dst[][4], GLuint n)
+unpack_R8G8B8A8_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -115,7 +115,7 @@ unpack_RGBA8888_REV(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_ARGB8888(const void *src, GLfloat dst[][4], GLuint n)
+unpack_B8G8R8A8_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -128,7 +128,7 @@ unpack_ARGB8888(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_ARGB8888_REV(const void *src, GLfloat dst[][4], GLuint n)
+unpack_A8R8G8B8_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -167,7 +167,7 @@ unpack_RGBX8888_REV(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_XRGB8888(const void *src, GLfloat dst[][4], GLuint n)
+unpack_B8G8R8X8_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -180,7 +180,7 @@ unpack_XRGB8888(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_XRGB8888_REV(const void *src, GLfloat dst[][4], GLuint n)
+unpack_X8R8G8B8_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -193,7 +193,7 @@ unpack_XRGB8888_REV(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_RGB888(const void *src, GLfloat dst[][4], GLuint n)
+unpack_BGR_UNORM8(const void *src, GLfloat dst[][4], GLuint n)
{
const GLubyte *s = (const GLubyte *) src;
GLuint i;
@@ -206,7 +206,7 @@ unpack_RGB888(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_BGR888(const void *src, GLfloat dst[][4], GLuint n)
+unpack_RGB_UNORM8(const void *src, GLfloat dst[][4], GLuint n)
{
const GLubyte *s = (const GLubyte *) src;
GLuint i;
@@ -219,7 +219,7 @@ unpack_BGR888(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_RGB565(const void *src, GLfloat dst[][4], GLuint n)
+unpack_B5G6R5_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -232,7 +232,7 @@ unpack_RGB565(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_RGB565_REV(const void *src, GLfloat dst[][4], GLuint n)
+unpack_R5G6B5_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
/* Warning: this function does not match the current Mesa definition
* of MESA_FORMAT_R5G6B5_UNORM.
@@ -249,7 +249,7 @@ unpack_RGB565_REV(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_ARGB4444(const void *src, GLfloat dst[][4], GLuint n)
+unpack_B4G4R4A4_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -262,7 +262,7 @@ unpack_ARGB4444(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_ARGB4444_REV(const void *src, GLfloat dst[][4], GLuint n)
+unpack_A4R4G4B4_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -275,7 +275,7 @@ unpack_ARGB4444_REV(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_RGBA5551(const void *src, GLfloat dst[][4], GLuint n)
+unpack_A1B5G5R5_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -288,7 +288,7 @@ unpack_RGBA5551(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_ARGB1555(const void *src, GLfloat dst[][4], GLuint n)
+unpack_B5G5R5A1_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -301,7 +301,7 @@ unpack_ARGB1555(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_ARGB1555_REV(const void *src, GLfloat dst[][4], GLuint n)
+unpack_A1R5G5B5_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
/* Warning: this function does not match the current Mesa definition
* of MESA_FORMAT_A1R5G5B5_UNORM.
@@ -318,7 +318,7 @@ unpack_ARGB1555_REV(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_AL44(const void *src, GLfloat dst[][4], GLuint n)
+unpack_L4A4_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLubyte *s = ((const GLubyte *) src);
GLuint i;
@@ -331,7 +331,7 @@ unpack_AL44(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_AL88(const void *src, GLfloat dst[][4], GLuint n)
+unpack_L8A8_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -344,7 +344,7 @@ unpack_AL88(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_AL88_REV(const void *src, GLfloat dst[][4], GLuint n)
+unpack_A8L8_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -357,7 +357,7 @@ unpack_AL88_REV(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_AL1616(const void *src, GLfloat dst[][4], GLuint n)
+unpack_L16A16_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -370,7 +370,7 @@ unpack_AL1616(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_AL1616_REV(const void *src, GLfloat dst[][4], GLuint n)
+unpack_A16L16_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -383,7 +383,7 @@ unpack_AL1616_REV(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_RGB332(const void *src, GLfloat dst[][4], GLuint n)
+unpack_B2G3R3_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLubyte *s = ((const GLubyte *) src);
GLuint i;
@@ -397,7 +397,7 @@ unpack_RGB332(const void *src, GLfloat dst[][4], GLuint n)
static void
-unpack_A8(const void *src, GLfloat dst[][4], GLuint n)
+unpack_A_UNORM8(const void *src, GLfloat dst[][4], GLuint n)
{
const GLubyte *s = ((const GLubyte *) src);
GLuint i;
@@ -410,7 +410,7 @@ unpack_A8(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_A16(const void *src, GLfloat dst[][4], GLuint n)
+unpack_A_UNORM16(const void *src, GLfloat dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -423,7 +423,7 @@ unpack_A16(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_L8(const void *src, GLfloat dst[][4], GLuint n)
+unpack_L_UNORM8(const void *src, GLfloat dst[][4], GLuint n)
{
const GLubyte *s = ((const GLubyte *) src);
GLuint i;
@@ -436,7 +436,7 @@ unpack_L8(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_L16(const void *src, GLfloat dst[][4], GLuint n)
+unpack_L_UNORM16(const void *src, GLfloat dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -449,7 +449,7 @@ unpack_L16(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_I8(const void *src, GLfloat dst[][4], GLuint n)
+unpack_I_UNORM8(const void *src, GLfloat dst[][4], GLuint n)
{
const GLubyte *s = ((const GLubyte *) src);
GLuint i;
@@ -462,7 +462,7 @@ unpack_I8(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_I16(const void *src, GLfloat dst[][4], GLuint n)
+unpack_I_UNORM16(const void *src, GLfloat dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -525,7 +525,7 @@ unpack_YCBCR_REV(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_R8(const void *src, GLfloat dst[][4], GLuint n)
+unpack_R_UNORM8(const void *src, GLfloat dst[][4], GLuint n)
{
const GLubyte *s = ((const GLubyte *) src);
GLuint i;
@@ -538,7 +538,7 @@ unpack_R8(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_GR88(const void *src, GLfloat dst[][4], GLuint n)
+unpack_R8G8_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -551,7 +551,7 @@ unpack_GR88(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_RG88(const void *src, GLfloat dst[][4], GLuint n)
+unpack_G8R8_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -564,7 +564,7 @@ unpack_RG88(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_R16(const void *src, GLfloat dst[][4], GLuint n)
+unpack_R_UNORM16(const void *src, GLfloat dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -577,7 +577,7 @@ unpack_R16(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_GR1616(const void *src, GLfloat dst[][4], GLuint n)
+unpack_R16G16_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -590,7 +590,7 @@ unpack_GR1616(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_RG1616(const void *src, GLfloat dst[][4], GLuint n)
+unpack_G16R16_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -603,7 +603,7 @@ unpack_RG1616(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_ARGB2101010(const void *src, GLfloat dst[][4], GLuint n)
+unpack_B10G10R10A2_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -617,7 +617,7 @@ unpack_ARGB2101010(const void *src, GLfloat dst[][4], GLuint n)
static void
-unpack_ARGB2101010_UINT(const void *src, GLfloat dst[][4], GLuint n)
+unpack_B10G10R10A2_UINT(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = (const GLuint *) src;
GLuint i;
@@ -631,7 +631,7 @@ unpack_ARGB2101010_UINT(const void *src, GLfloat dst[][4], GLuint n)
static void
-unpack_ABGR2101010_UINT(const void *src, GLfloat dst[][4], GLuint n)
+unpack_R10G10B10A2_UINT(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -717,20 +717,20 @@ unpack_Z32(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_Z32_FLOAT(const void *src, GLfloat dst[][4], GLuint n)
+unpack_Z32_FLOAT_X24S8(const void *src, GLfloat dst[][4], GLuint n)
{
- const GLfloat *s = ((const GLfloat *) src);
+ const struct z32f_x24s8 *s = (const struct z32f_x24s8 *) src;
GLuint i;
for (i = 0; i < n; i++) {
dst[i][0] =
dst[i][1] =
- dst[i][2] = s[i * 2];
+ dst[i][2] = s[i].z;
dst[i][3] = 1.0F;
}
}
static void
-unpack_Z32_FLOAT_X24S8(const void *src, GLfloat dst[][4], GLuint n)
+unpack_Z32_FLOAT(const void *src, GLfloat dst[][4], GLuint n)
{
const GLfloat *s = ((const GLfloat *) src);
GLuint i;
@@ -758,7 +758,7 @@ unpack_S8(const void *src, GLfloat dst[][4], GLuint n)
static void
-unpack_SRGB8(const void *src, GLfloat dst[][4], GLuint n)
+unpack_BGR_SRGB8(const void *src, GLfloat dst[][4], GLuint n)
{
const GLubyte *s = (const GLubyte *) src;
GLuint i;
@@ -771,7 +771,7 @@ unpack_SRGB8(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_SRGBA8(const void *src, GLfloat dst[][4], GLuint n)
+unpack_A8B8G8R8_SRGB(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -784,7 +784,7 @@ unpack_SRGBA8(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_SARGB8(const void *src, GLfloat dst[][4], GLuint n)
+unpack_B8G8R8A8_SRGB(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -797,7 +797,7 @@ unpack_SARGB8(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_SABGR8(const void *src, GLfloat dst[][4], GLuint n)
+unpack_R8G8B8A8_SRGB(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -810,7 +810,7 @@ unpack_SABGR8(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_SL8(const void *src, GLfloat dst[][4], GLuint n)
+unpack_L_SRGB8(const void *src, GLfloat dst[][4], GLuint n)
{
const GLubyte *s = ((const GLubyte *) src);
GLuint i;
@@ -823,7 +823,7 @@ unpack_SL8(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_SLA8(const void *src, GLfloat dst[][4], GLuint n)
+unpack_L8A8_SRGB(const void *src, GLfloat dst[][4], GLuint n)
{
const GLushort *s = (const GLushort *) src;
GLuint i;
@@ -939,7 +939,7 @@ unpack_RGB_FLOAT16(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_ALPHA_FLOAT32(const void *src, GLfloat dst[][4], GLuint n)
+unpack_A_FLOAT32(const void *src, GLfloat dst[][4], GLuint n)
{
const GLfloat *s = (const GLfloat *) src;
GLuint i;
@@ -952,7 +952,7 @@ unpack_ALPHA_FLOAT32(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_ALPHA_FLOAT16(const void *src, GLfloat dst[][4], GLuint n)
+unpack_A_FLOAT16(const void *src, GLfloat dst[][4], GLuint n)
{
const GLhalfARB *s = (const GLhalfARB *) src;
GLuint i;
@@ -965,7 +965,7 @@ unpack_ALPHA_FLOAT16(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_LUMINANCE_FLOAT32(const void *src, GLfloat dst[][4], GLuint n)
+unpack_L_FLOAT32(const void *src, GLfloat dst[][4], GLuint n)
{
const GLfloat *s = (const GLfloat *) src;
GLuint i;
@@ -978,7 +978,7 @@ unpack_LUMINANCE_FLOAT32(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_LUMINANCE_FLOAT16(const void *src, GLfloat dst[][4], GLuint n)
+unpack_L_FLOAT16(const void *src, GLfloat dst[][4], GLuint n)
{
const GLhalfARB *s = (const GLhalfARB *) src;
GLuint i;
@@ -991,7 +991,7 @@ unpack_LUMINANCE_FLOAT16(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_LUMINANCE_ALPHA_FLOAT32(const void *src, GLfloat dst[][4], GLuint n)
+unpack_LA_FLOAT32(const void *src, GLfloat dst[][4], GLuint n)
{
const GLfloat *s = (const GLfloat *) src;
GLuint i;
@@ -1004,7 +1004,7 @@ unpack_LUMINANCE_ALPHA_FLOAT32(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_LUMINANCE_ALPHA_FLOAT16(const void *src, GLfloat dst[][4], GLuint n)
+unpack_LA_FLOAT16(const void *src, GLfloat dst[][4], GLuint n)
{
const GLhalfARB *s = (const GLhalfARB *) src;
GLuint i;
@@ -1017,7 +1017,7 @@ unpack_LUMINANCE_ALPHA_FLOAT16(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_INTENSITY_FLOAT32(const void *src, GLfloat dst[][4], GLuint n)
+unpack_I_FLOAT32(const void *src, GLfloat dst[][4], GLuint n)
{
const GLfloat *s = (const GLfloat *) src;
GLuint i;
@@ -1030,7 +1030,7 @@ unpack_INTENSITY_FLOAT32(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_INTENSITY_FLOAT16(const void *src, GLfloat dst[][4], GLuint n)
+unpack_I_FLOAT16(const void *src, GLfloat dst[][4], GLuint n)
{
const GLhalfARB *s = (const GLhalfARB *) src;
GLuint i;
@@ -1721,7 +1721,7 @@ unpack_DUDV8(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_SIGNED_R8(const void *src, GLfloat dst[][4], GLuint n)
+unpack_R_SNORM8(const void *src, GLfloat dst[][4], GLuint n)
{
const GLbyte *s = ((const GLbyte *) src);
GLuint i;
@@ -1734,7 +1734,7 @@ unpack_SIGNED_R8(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_SIGNED_RG88_REV(const void *src, GLfloat dst[][4], GLuint n)
+unpack_R8G8_SNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -1747,7 +1747,7 @@ unpack_SIGNED_RG88_REV(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_SIGNED_RGBX8888(const void *src, GLfloat dst[][4], GLuint n)
+unpack_X8B8G8R8_SNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -1760,7 +1760,7 @@ unpack_SIGNED_RGBX8888(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_SIGNED_RGBA8888(const void *src, GLfloat dst[][4], GLuint n)
+unpack_A8B8G8R8_SNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -1773,7 +1773,7 @@ unpack_SIGNED_RGBA8888(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_SIGNED_RGBA8888_REV(const void *src, GLfloat dst[][4], GLuint n)
+unpack_R8G8B8A8_SNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -1786,7 +1786,7 @@ unpack_SIGNED_RGBA8888_REV(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_SIGNED_R16(const void *src, GLfloat dst[][4], GLuint n)
+unpack_R_SNORM16(const void *src, GLfloat dst[][4], GLuint n)
{
const GLshort *s = ((const GLshort *) src);
GLuint i;
@@ -1799,7 +1799,7 @@ unpack_SIGNED_R16(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_SIGNED_GR1616(const void *src, GLfloat dst[][4], GLuint n)
+unpack_R16G16_SNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -1812,7 +1812,7 @@ unpack_SIGNED_GR1616(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_SIGNED_RGB_16(const void *src, GLfloat dst[][4], GLuint n)
+unpack_RGB_SNORM16(const void *src, GLfloat dst[][4], GLuint n)
{
const GLshort *s = (const GLshort *) src;
GLuint i;
@@ -1825,7 +1825,7 @@ unpack_SIGNED_RGB_16(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_SIGNED_RGBA_16(const void *src, GLfloat dst[][4], GLuint n)
+unpack_RGBA_SNORM16(const void *src, GLfloat dst[][4], GLuint n)
{
const GLshort *s = (const GLshort *) src;
GLuint i;
@@ -1967,7 +1967,7 @@ unpack_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1(const void *src, GLfloat dst[][4],
}
static void
-unpack_SIGNED_A8(const void *src, GLfloat dst[][4], GLuint n)
+unpack_A_SNORM8(const void *src, GLfloat dst[][4], GLuint n)
{
const GLbyte *s = ((const GLbyte *) src);
GLuint i;
@@ -1980,7 +1980,7 @@ unpack_SIGNED_A8(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_SIGNED_L8(const void *src, GLfloat dst[][4], GLuint n)
+unpack_L_SNORM8(const void *src, GLfloat dst[][4], GLuint n)
{
const GLbyte *s = ((const GLbyte *) src);
GLuint i;
@@ -1993,7 +1993,7 @@ unpack_SIGNED_L8(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_SIGNED_AL88(const void *src, GLfloat dst[][4], GLuint n)
+unpack_L8A8_SNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLshort *s = ((const GLshort *) src);
GLuint i;
@@ -2006,7 +2006,7 @@ unpack_SIGNED_AL88(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_SIGNED_I8(const void *src, GLfloat dst[][4], GLuint n)
+unpack_I_SNORM8(const void *src, GLfloat dst[][4], GLuint n)
{
const GLbyte *s = ((const GLbyte *) src);
GLuint i;
@@ -2019,7 +2019,7 @@ unpack_SIGNED_I8(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_SIGNED_A16(const void *src, GLfloat dst[][4], GLuint n)
+unpack_A_SNORM16(const void *src, GLfloat dst[][4], GLuint n)
{
const GLshort *s = ((const GLshort *) src);
GLuint i;
@@ -2032,7 +2032,7 @@ unpack_SIGNED_A16(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_SIGNED_L16(const void *src, GLfloat dst[][4], GLuint n)
+unpack_L_SNORM16(const void *src, GLfloat dst[][4], GLuint n)
{
const GLshort *s = ((const GLshort *) src);
GLuint i;
@@ -2045,7 +2045,7 @@ unpack_SIGNED_L16(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_SIGNED_AL1616(const void *src, GLfloat dst[][4], GLuint n)
+unpack_LA_SNORM16(const void *src, GLfloat dst[][4], GLuint n)
{
const GLshort *s = (const GLshort *) src;
GLuint i;
@@ -2058,7 +2058,7 @@ unpack_SIGNED_AL1616(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_SIGNED_I16(const void *src, GLfloat dst[][4], GLuint n)
+unpack_I_SNORM16(const void *src, GLfloat dst[][4], GLuint n)
{
const GLshort *s = ((const GLshort *) src);
GLuint i;
@@ -2071,7 +2071,7 @@ unpack_SIGNED_I16(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_RGB9_E5_FLOAT(const void *src, GLfloat dst[][4], GLuint n)
+unpack_R9G9B9E5_FLOAT(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = (const GLuint *) src;
GLuint i;
@@ -2082,7 +2082,7 @@ unpack_RGB9_E5_FLOAT(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_R11_G11_B10_FLOAT(const void *src, GLfloat dst[][4], GLuint n)
+unpack_R11G11B10_FLOAT(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = (const GLuint *) src;
GLuint i;
@@ -2132,7 +2132,7 @@ unpack_XBGR8888_SNORM(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_XBGR8888_SRGB(const void *src, GLfloat dst[][4], GLuint n)
+unpack_R8G8B8X8_SRGB(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -2171,7 +2171,7 @@ unpack_XBGR8888_SINT(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_XRGB2101010_UNORM(const void *src, GLfloat dst[][4], GLuint n)
+unpack_B10G10R10X2_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -2184,7 +2184,7 @@ unpack_XRGB2101010_UNORM(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_XBGR16161616_UNORM(const void *src, GLfloat dst[][4], GLuint n)
+unpack_RGBX_UNORM16(const void *src, GLfloat dst[][4], GLuint n)
{
const GLushort *s = (const GLushort *) src;
GLuint i;
@@ -2197,7 +2197,7 @@ unpack_XBGR16161616_UNORM(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_XBGR16161616_SNORM(const void *src, GLfloat dst[][4], GLuint n)
+unpack_RGBX_SNORM16(const void *src, GLfloat dst[][4], GLuint n)
{
const GLshort *s = (const GLshort *) src;
GLuint i;
@@ -2249,7 +2249,7 @@ unpack_XBGR16161616_SINT(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_XBGR32323232_FLOAT(const void *src, GLfloat dst[][4], GLuint n)
+unpack_RGBX_FLOAT32(const void *src, GLfloat dst[][4], GLuint n)
{
const GLfloat *s = (const GLfloat *) src;
GLuint i;
@@ -2288,7 +2288,7 @@ unpack_XBGR32323232_SINT(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_ABGR2101010(const void *src, GLfloat dst[][4], GLuint n)
+unpack_R10G10B10A2_UNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -2301,7 +2301,7 @@ unpack_ABGR2101010(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_SIGNED_RG88(const void *src, GLfloat dst[][4], GLuint n)
+unpack_G8R8_SNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -2314,7 +2314,7 @@ unpack_SIGNED_RG88(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_SIGNED_RG1616(const void *src, GLfloat dst[][4], GLuint n)
+unpack_G16R16_SNORM(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -2327,7 +2327,7 @@ unpack_SIGNED_RG1616(const void *src, GLfloat dst[][4], GLuint n)
}
static void
-unpack_XRGB8888_SRGB(const void *src, GLfloat dst[][4], GLuint n)
+unpack_B8G8R8X8_SRGB(const void *src, GLfloat dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -2351,46 +2351,46 @@ get_unpack_rgba_function(mesa_format format)
if (!initialized) {
table[MESA_FORMAT_NONE] = NULL;
- table[MESA_FORMAT_A8B8G8R8_UNORM] = unpack_RGBA8888;
- table[MESA_FORMAT_R8G8B8A8_UNORM] = unpack_RGBA8888_REV;
- table[MESA_FORMAT_B8G8R8A8_UNORM] = unpack_ARGB8888;
- table[MESA_FORMAT_A8R8G8B8_UNORM] = unpack_ARGB8888_REV;
+ table[MESA_FORMAT_A8B8G8R8_UNORM] = unpack_A8B8G8R8_UNORM;
+ table[MESA_FORMAT_R8G8B8A8_UNORM] = unpack_R8G8B8A8_UNORM;
+ table[MESA_FORMAT_B8G8R8A8_UNORM] = unpack_B8G8R8A8_UNORM;
+ table[MESA_FORMAT_A8R8G8B8_UNORM] = unpack_A8R8G8B8_UNORM;
table[MESA_FORMAT_X8B8G8R8_UNORM] = unpack_RGBX8888;
table[MESA_FORMAT_R8G8B8X8_UNORM] = unpack_RGBX8888_REV;
- table[MESA_FORMAT_B8G8R8X8_UNORM] = unpack_XRGB8888;
- table[MESA_FORMAT_X8R8G8B8_UNORM] = unpack_XRGB8888_REV;
- table[MESA_FORMAT_BGR_UNORM8] = unpack_RGB888;
- table[MESA_FORMAT_RGB_UNORM8] = unpack_BGR888;
- table[MESA_FORMAT_B5G6R5_UNORM] = unpack_RGB565;
- table[MESA_FORMAT_R5G6B5_UNORM] = unpack_RGB565_REV;
- table[MESA_FORMAT_B4G4R4A4_UNORM] = unpack_ARGB4444;
- table[MESA_FORMAT_A4R4G4B4_UNORM] = unpack_ARGB4444_REV;
- table[MESA_FORMAT_A1B5G5R5_UNORM] = unpack_RGBA5551;
- table[MESA_FORMAT_B5G5R5A1_UNORM] = unpack_ARGB1555;
- table[MESA_FORMAT_A1R5G5B5_UNORM] = unpack_ARGB1555_REV;
- table[MESA_FORMAT_L4A4_UNORM] = unpack_AL44;
- table[MESA_FORMAT_L8A8_UNORM] = unpack_AL88;
- table[MESA_FORMAT_A8L8_UNORM] = unpack_AL88_REV;
- table[MESA_FORMAT_L16A16_UNORM] = unpack_AL1616;
- table[MESA_FORMAT_A16L16_UNORM] = unpack_AL1616_REV;
- table[MESA_FORMAT_B2G3R3_UNORM] = unpack_RGB332;
- table[MESA_FORMAT_A_UNORM8] = unpack_A8;
- table[MESA_FORMAT_A_UNORM16] = unpack_A16;
- table[MESA_FORMAT_L_UNORM8] = unpack_L8;
- table[MESA_FORMAT_L_UNORM16] = unpack_L16;
- table[MESA_FORMAT_I_UNORM8] = unpack_I8;
- table[MESA_FORMAT_I_UNORM16] = unpack_I16;
+ table[MESA_FORMAT_B8G8R8X8_UNORM] = unpack_B8G8R8X8_UNORM;
+ table[MESA_FORMAT_X8R8G8B8_UNORM] = unpack_X8R8G8B8_UNORM;
+ table[MESA_FORMAT_BGR_UNORM8] = unpack_BGR_UNORM8;
+ table[MESA_FORMAT_RGB_UNORM8] = unpack_RGB_UNORM8;
+ table[MESA_FORMAT_B5G6R5_UNORM] = unpack_B5G6R5_UNORM;
+ table[MESA_FORMAT_R5G6B5_UNORM] = unpack_R5G6B5_UNORM;
+ table[MESA_FORMAT_B4G4R4A4_UNORM] = unpack_B4G4R4A4_UNORM;
+ table[MESA_FORMAT_A4R4G4B4_UNORM] = unpack_A4R4G4B4_UNORM;
+ table[MESA_FORMAT_A1B5G5R5_UNORM] = unpack_A1B5G5R5_UNORM;
+ table[MESA_FORMAT_B5G5R5A1_UNORM] = unpack_B5G5R5A1_UNORM;
+ table[MESA_FORMAT_A1R5G5B5_UNORM] = unpack_A1R5G5B5_UNORM;
+ table[MESA_FORMAT_L4A4_UNORM] = unpack_L4A4_UNORM;
+ table[MESA_FORMAT_L8A8_UNORM] = unpack_L8A8_UNORM;
+ table[MESA_FORMAT_A8L8_UNORM] = unpack_A8L8_UNORM;
+ table[MESA_FORMAT_L16A16_UNORM] = unpack_L16A16_UNORM;
+ table[MESA_FORMAT_A16L16_UNORM] = unpack_A16L16_UNORM;
+ table[MESA_FORMAT_B2G3R3_UNORM] = unpack_B2G3R3_UNORM;
+ table[MESA_FORMAT_A_UNORM8] = unpack_A_UNORM8;
+ table[MESA_FORMAT_A_UNORM16] = unpack_A_UNORM16;
+ table[MESA_FORMAT_L_UNORM8] = unpack_L_UNORM8;
+ table[MESA_FORMAT_L_UNORM16] = unpack_L_UNORM16;
+ table[MESA_FORMAT_I_UNORM8] = unpack_I_UNORM8;
+ table[MESA_FORMAT_I_UNORM16] = unpack_I_UNORM16;
table[MESA_FORMAT_YCBCR] = unpack_YCBCR;
table[MESA_FORMAT_YCBCR_REV] = unpack_YCBCR_REV;
- table[MESA_FORMAT_R_UNORM8] = unpack_R8;
- table[MESA_FORMAT_R8G8_UNORM] = unpack_GR88;
- table[MESA_FORMAT_G8R8_UNORM] = unpack_RG88;
- table[MESA_FORMAT_R_UNORM16] = unpack_R16;
- table[MESA_FORMAT_R16G16_UNORM] = unpack_GR1616;
- table[MESA_FORMAT_G16R16_UNORM] = unpack_RG1616;
- table[MESA_FORMAT_B10G10R10A2_UNORM] = unpack_ARGB2101010;
- table[MESA_FORMAT_B10G10R10A2_UINT] = unpack_ARGB2101010_UINT;
- table[MESA_FORMAT_R10G10B10A2_UINT] = unpack_ABGR2101010_UINT;
+ table[MESA_FORMAT_R_UNORM8] = unpack_R_UNORM8;
+ table[MESA_FORMAT_R8G8_UNORM] = unpack_R8G8_UNORM;
+ table[MESA_FORMAT_G8R8_UNORM] = unpack_G8R8_UNORM;
+ table[MESA_FORMAT_R_UNORM16] = unpack_R_UNORM16;
+ table[MESA_FORMAT_R16G16_UNORM] = unpack_R16G16_UNORM;
+ table[MESA_FORMAT_G16R16_UNORM] = unpack_G16R16_UNORM;
+ table[MESA_FORMAT_B10G10R10A2_UNORM] = unpack_B10G10R10A2_UNORM;
+ table[MESA_FORMAT_B10G10R10A2_UINT] = unpack_B10G10R10A2_UINT;
+ table[MESA_FORMAT_R10G10B10A2_UINT] = unpack_R10G10B10A2_UINT;
table[MESA_FORMAT_S8_UINT_Z24_UNORM] = unpack_Z24_S8;
table[MESA_FORMAT_Z24_UNORM_S8_UINT] = unpack_S8_Z24;
table[MESA_FORMAT_Z_UNORM16] = unpack_Z16;
@@ -2398,12 +2398,12 @@ get_unpack_rgba_function(mesa_format format)
table[MESA_FORMAT_X8_UINT_Z24_UNORM] = unpack_Z24_X8;
table[MESA_FORMAT_Z_UNORM32] = unpack_Z32;
table[MESA_FORMAT_S_UINT8] = unpack_S8;
- table[MESA_FORMAT_BGR_SRGB8] = unpack_SRGB8;
- table[MESA_FORMAT_A8B8G8R8_SRGB] = unpack_SRGBA8;
- table[MESA_FORMAT_B8G8R8A8_SRGB] = unpack_SARGB8;
- table[MESA_FORMAT_R8G8B8A8_SRGB] = unpack_SABGR8;
- table[MESA_FORMAT_L_SRGB8] = unpack_SL8;
- table[MESA_FORMAT_L8A8_SRGB] = unpack_SLA8;
+ table[MESA_FORMAT_BGR_SRGB8] = unpack_BGR_SRGB8;
+ table[MESA_FORMAT_A8B8G8R8_SRGB] = unpack_A8B8G8R8_SRGB;
+ table[MESA_FORMAT_B8G8R8A8_SRGB] = unpack_B8G8R8A8_SRGB;
+ table[MESA_FORMAT_R8G8B8A8_SRGB] = unpack_R8G8B8A8_SRGB;
+ table[MESA_FORMAT_L_SRGB8] = unpack_L_SRGB8;
+ table[MESA_FORMAT_L8A8_SRGB] = unpack_L8A8_SRGB;
table[MESA_FORMAT_SRGB_DXT1] = unpack_SRGB_DXT1;
table[MESA_FORMAT_SRGBA_DXT1] = unpack_SRGBA_DXT1;
table[MESA_FORMAT_SRGBA_DXT3] = unpack_SRGBA_DXT3;
@@ -2420,14 +2420,14 @@ get_unpack_rgba_function(mesa_format format)
table[MESA_FORMAT_RGBA_FLOAT16] = unpack_RGBA_FLOAT16;
table[MESA_FORMAT_RGB_FLOAT32] = unpack_RGB_FLOAT32;
table[MESA_FORMAT_RGB_FLOAT16] = unpack_RGB_FLOAT16;
- table[MESA_FORMAT_A_FLOAT32] = unpack_ALPHA_FLOAT32;
- table[MESA_FORMAT_A_FLOAT16] = unpack_ALPHA_FLOAT16;
- table[MESA_FORMAT_L_FLOAT32] = unpack_LUMINANCE_FLOAT32;
- table[MESA_FORMAT_L_FLOAT16] = unpack_LUMINANCE_FLOAT16;
- table[MESA_FORMAT_LA_FLOAT32] = unpack_LUMINANCE_ALPHA_FLOAT32;
- table[MESA_FORMAT_LA_FLOAT16] = unpack_LUMINANCE_ALPHA_FLOAT16;
- table[MESA_FORMAT_I_FLOAT32] = unpack_INTENSITY_FLOAT32;
- table[MESA_FORMAT_I_FLOAT16] = unpack_INTENSITY_FLOAT16;
+ table[MESA_FORMAT_A_FLOAT32] = unpack_A_FLOAT32;
+ table[MESA_FORMAT_A_FLOAT16] = unpack_A_FLOAT16;
+ table[MESA_FORMAT_L_FLOAT32] = unpack_L_FLOAT32;
+ table[MESA_FORMAT_L_FLOAT16] = unpack_L_FLOAT16;
+ table[MESA_FORMAT_LA_FLOAT32] = unpack_LA_FLOAT32;
+ table[MESA_FORMAT_LA_FLOAT16] = unpack_LA_FLOAT16;
+ table[MESA_FORMAT_I_FLOAT32] = unpack_I_FLOAT32;
+ table[MESA_FORMAT_I_FLOAT16] = unpack_I_FLOAT16;
table[MESA_FORMAT_R_FLOAT32] = unpack_R_FLOAT32;
table[MESA_FORMAT_R_FLOAT16] = unpack_R_FLOAT16;
table[MESA_FORMAT_RG_FLOAT32] = unpack_RG_FLOAT32;
@@ -2487,15 +2487,15 @@ get_unpack_rgba_function(mesa_format format)
table[MESA_FORMAT_RGBA_UINT32] = unpack_RGBA_UINT32;
table[MESA_FORMAT_DUDV8] = unpack_DUDV8;
- table[MESA_FORMAT_R_SNORM8] = unpack_SIGNED_R8;
- table[MESA_FORMAT_R8G8_SNORM] = unpack_SIGNED_RG88_REV;
- table[MESA_FORMAT_X8B8G8R8_SNORM] = unpack_SIGNED_RGBX8888;
- table[MESA_FORMAT_A8B8G8R8_SNORM] = unpack_SIGNED_RGBA8888;
- table[MESA_FORMAT_R8G8B8A8_SNORM] = unpack_SIGNED_RGBA8888_REV;
- table[MESA_FORMAT_R_SNORM16] = unpack_SIGNED_R16;
- table[MESA_FORMAT_R16G16_SNORM] = unpack_SIGNED_GR1616;
- table[MESA_FORMAT_RGB_SNORM16] = unpack_SIGNED_RGB_16;
- table[MESA_FORMAT_RGBA_SNORM16] = unpack_SIGNED_RGBA_16;
+ table[MESA_FORMAT_R_SNORM8] = unpack_R_SNORM8;
+ table[MESA_FORMAT_R8G8_SNORM] = unpack_R8G8_SNORM;
+ table[MESA_FORMAT_X8B8G8R8_SNORM] = unpack_X8B8G8R8_SNORM;
+ table[MESA_FORMAT_A8B8G8R8_SNORM] = unpack_A8B8G8R8_SNORM;
+ table[MESA_FORMAT_R8G8B8A8_SNORM] = unpack_R8G8B8A8_SNORM;
+ table[MESA_FORMAT_R_SNORM16] = unpack_R_SNORM16;
+ table[MESA_FORMAT_R16G16_SNORM] = unpack_R16G16_SNORM;
+ table[MESA_FORMAT_RGB_SNORM16] = unpack_RGB_SNORM16;
+ table[MESA_FORMAT_RGBA_SNORM16] = unpack_RGBA_SNORM16;
table[MESA_FORMAT_RGBA_UNORM16] = unpack_RGBA_16;
table[MESA_FORMAT_R_RGTC1_UNORM] = unpack_RED_RGTC1;
@@ -2521,17 +2521,17 @@ get_unpack_rgba_function(mesa_format format)
unpack_ETC2_RGB8_PUNCHTHROUGH_ALPHA1;
table[MESA_FORMAT_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1] =
unpack_ETC2_SRGB8_PUNCHTHROUGH_ALPHA1;
- table[MESA_FORMAT_A_SNORM8] = unpack_SIGNED_A8;
- table[MESA_FORMAT_L_SNORM8] = unpack_SIGNED_L8;
- table[MESA_FORMAT_L8A8_SNORM] = unpack_SIGNED_AL88;
- table[MESA_FORMAT_I_SNORM8] = unpack_SIGNED_I8;
- table[MESA_FORMAT_A_SNORM16] = unpack_SIGNED_A16;
- table[MESA_FORMAT_L_SNORM16] = unpack_SIGNED_L16;
- table[MESA_FORMAT_LA_SNORM16] = unpack_SIGNED_AL1616;
- table[MESA_FORMAT_I_SNORM16] = unpack_SIGNED_I16;
-
- table[MESA_FORMAT_R9G9B9E5_FLOAT] = unpack_RGB9_E5_FLOAT;
- table[MESA_FORMAT_R11G11B10_FLOAT] = unpack_R11_G11_B10_FLOAT;
+ table[MESA_FORMAT_A_SNORM8] = unpack_A_SNORM8;
+ table[MESA_FORMAT_L_SNORM8] = unpack_L_SNORM8;
+ table[MESA_FORMAT_L8A8_SNORM] = unpack_L8A8_SNORM;
+ table[MESA_FORMAT_I_SNORM8] = unpack_I_SNORM8;
+ table[MESA_FORMAT_A_SNORM16] = unpack_A_SNORM16;
+ table[MESA_FORMAT_L_SNORM16] = unpack_L_SNORM16;
+ table[MESA_FORMAT_LA_SNORM16] = unpack_LA_SNORM16;
+ table[MESA_FORMAT_I_SNORM16] = unpack_I_SNORM16;
+
+ table[MESA_FORMAT_R9G9B9E5_FLOAT] = unpack_R9G9B9E5_FLOAT;
+ table[MESA_FORMAT_R11G11B10_FLOAT] = unpack_R11G11B10_FLOAT;
table[MESA_FORMAT_Z_FLOAT32] = unpack_Z32_FLOAT;
table[MESA_FORMAT_Z32_FLOAT_S8X24_UINT] = unpack_Z32_FLOAT_X24S8;
@@ -2539,25 +2539,25 @@ get_unpack_rgba_function(mesa_format format)
table[MESA_FORMAT_B4G4R4X4_UNORM] = unpack_XRGB4444_UNORM;
table[MESA_FORMAT_B5G5R5X1_UNORM] = unpack_XRGB1555_UNORM;
table[MESA_FORMAT_R8G8B8X8_SNORM] = unpack_XBGR8888_SNORM;
- table[MESA_FORMAT_R8G8B8X8_SRGB] = unpack_XBGR8888_SRGB;
+ table[MESA_FORMAT_R8G8B8X8_SRGB] = unpack_R8G8B8X8_SRGB;
table[MESA_FORMAT_RGBX_UINT8] = unpack_XBGR8888_UINT;
table[MESA_FORMAT_RGBX_SINT8] = unpack_XBGR8888_SINT;
- table[MESA_FORMAT_B10G10R10X2_UNORM] = unpack_XRGB2101010_UNORM;
- table[MESA_FORMAT_RGBX_UNORM16] = unpack_XBGR16161616_UNORM;
- table[MESA_FORMAT_RGBX_SNORM16] = unpack_XBGR16161616_SNORM;
+ table[MESA_FORMAT_B10G10R10X2_UNORM] = unpack_B10G10R10X2_UNORM;
+ table[MESA_FORMAT_RGBX_UNORM16] = unpack_RGBX_UNORM16;
+ table[MESA_FORMAT_RGBX_SNORM16] = unpack_RGBX_SNORM16;
table[MESA_FORMAT_RGBX_FLOAT16] = unpack_XBGR16161616_FLOAT;
table[MESA_FORMAT_RGBX_UINT16] = unpack_XBGR16161616_UINT;
table[MESA_FORMAT_RGBX_SINT16] = unpack_XBGR16161616_SINT;
- table[MESA_FORMAT_RGBX_FLOAT32] = unpack_XBGR32323232_FLOAT;
+ table[MESA_FORMAT_RGBX_FLOAT32] = unpack_RGBX_FLOAT32;
table[MESA_FORMAT_RGBX_UINT32] = unpack_XBGR32323232_UINT;
table[MESA_FORMAT_RGBX_SINT32] = unpack_XBGR32323232_SINT;
- table[MESA_FORMAT_R10G10B10A2_UNORM] = unpack_ABGR2101010;
+ table[MESA_FORMAT_R10G10B10A2_UNORM] = unpack_R10G10B10A2_UNORM;
- table[MESA_FORMAT_G8R8_SNORM] = unpack_SIGNED_RG88;
- table[MESA_FORMAT_G16R16_SNORM] = unpack_SIGNED_RG1616;
+ table[MESA_FORMAT_G8R8_SNORM] = unpack_G8R8_SNORM;
+ table[MESA_FORMAT_G16R16_SNORM] = unpack_G16R16_SNORM;
- table[MESA_FORMAT_B8G8R8X8_SRGB] = unpack_XRGB8888_SRGB;
+ table[MESA_FORMAT_B8G8R8X8_SRGB] = unpack_B8G8R8X8_SRGB;
initialized = GL_TRUE;
}
@@ -2589,7 +2589,7 @@ _mesa_unpack_rgba_row(mesa_format format, GLuint n,
static void
-unpack_ubyte_RGBA8888(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_A8B8G8R8_UNORM(const void *src, GLubyte dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -2602,7 +2602,7 @@ unpack_ubyte_RGBA8888(const void *src, GLubyte dst[][4], GLuint n)
}
static void
-unpack_ubyte_RGBA8888_REV(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_R8G8B8A8_UNORM(const void *src, GLubyte dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -2615,7 +2615,7 @@ unpack_ubyte_RGBA8888_REV(const void *src, GLubyte dst[][4], GLuint n)
}
static void
-unpack_ubyte_ARGB8888(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_B8G8R8A8_UNORM(const void *src, GLubyte dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -2628,7 +2628,7 @@ unpack_ubyte_ARGB8888(const void *src, GLubyte dst[][4], GLuint n)
}
static void
-unpack_ubyte_ARGB8888_REV(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_A8R8G8B8_UNORM(const void *src, GLubyte dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -2667,7 +2667,7 @@ unpack_ubyte_RGBX8888_REV(const void *src, GLubyte dst[][4], GLuint n)
}
static void
-unpack_ubyte_XRGB8888(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_B8G8R8X8_UNORM(const void *src, GLubyte dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -2680,7 +2680,7 @@ unpack_ubyte_XRGB8888(const void *src, GLubyte dst[][4], GLuint n)
}
static void
-unpack_ubyte_XRGB8888_REV(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_X8R8G8B8_UNORM(const void *src, GLubyte dst[][4], GLuint n)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -2693,7 +2693,7 @@ unpack_ubyte_XRGB8888_REV(const void *src, GLubyte dst[][4], GLuint n)
}
static void
-unpack_ubyte_RGB888(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_BGR_UNORM8(const void *src, GLubyte dst[][4], GLuint n)
{
const GLubyte *s = (const GLubyte *) src;
GLuint i;
@@ -2706,7 +2706,7 @@ unpack_ubyte_RGB888(const void *src, GLubyte dst[][4], GLuint n)
}
static void
-unpack_ubyte_BGR888(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_RGB_UNORM8(const void *src, GLubyte dst[][4], GLuint n)
{
const GLubyte *s = (const GLubyte *) src;
GLuint i;
@@ -2719,7 +2719,7 @@ unpack_ubyte_BGR888(const void *src, GLubyte dst[][4], GLuint n)
}
static void
-unpack_ubyte_RGB565(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_B5G6R5_UNORM(const void *src, GLubyte dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -2732,7 +2732,7 @@ unpack_ubyte_RGB565(const void *src, GLubyte dst[][4], GLuint n)
}
static void
-unpack_ubyte_RGB565_REV(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_R5G6B5_UNORM(const void *src, GLubyte dst[][4], GLuint n)
{
/* Warning: this function does not match the current Mesa definition
* of MESA_FORMAT_R5G6B5_UNORM.
@@ -2749,7 +2749,7 @@ unpack_ubyte_RGB565_REV(const void *src, GLubyte dst[][4], GLuint n)
}
static void
-unpack_ubyte_ARGB4444(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_B4G4R4A4_UNORM(const void *src, GLubyte dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -2762,7 +2762,7 @@ unpack_ubyte_ARGB4444(const void *src, GLubyte dst[][4], GLuint n)
}
static void
-unpack_ubyte_ARGB4444_REV(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_A4R4G4B4_UNORM(const void *src, GLubyte dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -2775,7 +2775,7 @@ unpack_ubyte_ARGB4444_REV(const void *src, GLubyte dst[][4], GLuint n)
}
static void
-unpack_ubyte_RGBA5551(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_A1B5G5R5_UNORM(const void *src, GLubyte dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -2788,7 +2788,7 @@ unpack_ubyte_RGBA5551(const void *src, GLubyte dst[][4], GLuint n)
}
static void
-unpack_ubyte_ARGB1555(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_B5G5R5A1_UNORM(const void *src, GLubyte dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -2801,7 +2801,7 @@ unpack_ubyte_ARGB1555(const void *src, GLubyte dst[][4], GLuint n)
}
static void
-unpack_ubyte_ARGB1555_REV(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_A1R5G5B5_UNORM(const void *src, GLubyte dst[][4], GLuint n)
{
/* Warning: this function does not match the current Mesa definition
* of MESA_FORMAT_A1R5G5B5_UNORM.
@@ -2818,7 +2818,7 @@ unpack_ubyte_ARGB1555_REV(const void *src, GLubyte dst[][4], GLuint n)
}
static void
-unpack_ubyte_AL44(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_L4A4_UNORM(const void *src, GLubyte dst[][4], GLuint n)
{
const GLubyte *s = ((const GLubyte *) src);
GLuint i;
@@ -2831,7 +2831,7 @@ unpack_ubyte_AL44(const void *src, GLubyte dst[][4], GLuint n)
}
static void
-unpack_ubyte_AL88(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_L8A8_UNORM(const void *src, GLubyte dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -2844,7 +2844,7 @@ unpack_ubyte_AL88(const void *src, GLubyte dst[][4], GLuint n)
}
static void
-unpack_ubyte_AL88_REV(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_A8L8_UNORM(const void *src, GLubyte dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -2857,7 +2857,7 @@ unpack_ubyte_AL88_REV(const void *src, GLubyte dst[][4], GLuint n)
}
static void
-unpack_ubyte_RGB332(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_B2G3R3_UNORM(const void *src, GLubyte dst[][4], GLuint n)
{
const GLubyte *s = ((const GLubyte *) src);
GLuint i;
@@ -2870,7 +2870,7 @@ unpack_ubyte_RGB332(const void *src, GLubyte dst[][4], GLuint n)
}
static void
-unpack_ubyte_A8(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_A_UNORM8(const void *src, GLubyte dst[][4], GLuint n)
{
const GLubyte *s = ((const GLubyte *) src);
GLuint i;
@@ -2883,7 +2883,7 @@ unpack_ubyte_A8(const void *src, GLubyte dst[][4], GLuint n)
}
static void
-unpack_ubyte_L8(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_L_UNORM8(const void *src, GLubyte dst[][4], GLuint n)
{
const GLubyte *s = ((const GLubyte *) src);
GLuint i;
@@ -2897,7 +2897,7 @@ unpack_ubyte_L8(const void *src, GLubyte dst[][4], GLuint n)
static void
-unpack_ubyte_I8(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_I_UNORM8(const void *src, GLubyte dst[][4], GLuint n)
{
const GLubyte *s = ((const GLubyte *) src);
GLuint i;
@@ -2910,7 +2910,7 @@ unpack_ubyte_I8(const void *src, GLubyte dst[][4], GLuint n)
}
static void
-unpack_ubyte_R8(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_R_UNORM8(const void *src, GLubyte dst[][4], GLuint n)
{
const GLubyte *s = ((const GLubyte *) src);
GLuint i;
@@ -2923,7 +2923,7 @@ unpack_ubyte_R8(const void *src, GLubyte dst[][4], GLuint n)
}
static void
-unpack_ubyte_GR88(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_R8G8_UNORM(const void *src, GLubyte dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -2936,7 +2936,7 @@ unpack_ubyte_GR88(const void *src, GLubyte dst[][4], GLuint n)
}
static void
-unpack_ubyte_RG88(const void *src, GLubyte dst[][4], GLuint n)
+unpack_ubyte_G8R8_UNORM(const void *src, GLubyte dst[][4], GLuint n)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -2959,16 +2959,16 @@ _mesa_unpack_ubyte_rgba_row(mesa_format format, GLuint n,
{
switch (format) {
case MESA_FORMAT_A8B8G8R8_UNORM:
- unpack_ubyte_RGBA8888(src, dst, n);
+ unpack_ubyte_A8B8G8R8_UNORM(src, dst, n);
break;
case MESA_FORMAT_R8G8B8A8_UNORM:
- unpack_ubyte_RGBA8888_REV(src, dst, n);
+ unpack_ubyte_R8G8B8A8_UNORM(src, dst, n);
break;
case MESA_FORMAT_B8G8R8A8_UNORM:
- unpack_ubyte_ARGB8888(src, dst, n);
+ unpack_ubyte_B8G8R8A8_UNORM(src, dst, n);
break;
case MESA_FORMAT_A8R8G8B8_UNORM:
- unpack_ubyte_ARGB8888_REV(src, dst, n);
+ unpack_ubyte_A8R8G8B8_UNORM(src, dst, n);
break;
case MESA_FORMAT_X8B8G8R8_UNORM:
unpack_ubyte_RGBX8888(src, dst, n);
@@ -2977,67 +2977,67 @@ _mesa_unpack_ubyte_rgba_row(mesa_format format, GLuint n,
unpack_ubyte_RGBX8888_REV(src, dst, n);
break;
case MESA_FORMAT_B8G8R8X8_UNORM:
- unpack_ubyte_XRGB8888(src, dst, n);
+ unpack_ubyte_B8G8R8X8_UNORM(src, dst, n);
break;
case MESA_FORMAT_X8R8G8B8_UNORM:
- unpack_ubyte_XRGB8888_REV(src, dst, n);
+ unpack_ubyte_X8R8G8B8_UNORM(src, dst, n);
break;
case MESA_FORMAT_BGR_UNORM8:
- unpack_ubyte_RGB888(src, dst, n);
+ unpack_ubyte_BGR_UNORM8(src, dst, n);
break;
case MESA_FORMAT_RGB_UNORM8:
- unpack_ubyte_BGR888(src, dst, n);
+ unpack_ubyte_RGB_UNORM8(src, dst, n);
break;
case MESA_FORMAT_B5G6R5_UNORM:
- unpack_ubyte_RGB565(src, dst, n);
+ unpack_ubyte_B5G6R5_UNORM(src, dst, n);
break;
case MESA_FORMAT_R5G6B5_UNORM:
- unpack_ubyte_RGB565_REV(src, dst, n);
+ unpack_ubyte_R5G6B5_UNORM(src, dst, n);
break;
case MESA_FORMAT_B4G4R4A4_UNORM:
- unpack_ubyte_ARGB4444(src, dst, n);
+ unpack_ubyte_B4G4R4A4_UNORM(src, dst, n);
break;
case MESA_FORMAT_A4R4G4B4_UNORM:
- unpack_ubyte_ARGB4444_REV(src, dst, n);
+ unpack_ubyte_A4R4G4B4_UNORM(src, dst, n);
break;
case MESA_FORMAT_A1B5G5R5_UNORM:
- unpack_ubyte_RGBA5551(src, dst, n);
+ unpack_ubyte_A1B5G5R5_UNORM(src, dst, n);
break;
case MESA_FORMAT_B5G5R5A1_UNORM:
- unpack_ubyte_ARGB1555(src, dst, n);
+ unpack_ubyte_B5G5R5A1_UNORM(src, dst, n);
break;
case MESA_FORMAT_A1R5G5B5_UNORM:
- unpack_ubyte_ARGB1555_REV(src, dst, n);
+ unpack_ubyte_A1R5G5B5_UNORM(src, dst, n);
break;
case MESA_FORMAT_L4A4_UNORM:
- unpack_ubyte_AL44(src, dst, n);
+ unpack_ubyte_L4A4_UNORM(src, dst, n);
break;
case MESA_FORMAT_L8A8_UNORM:
- unpack_ubyte_AL88(src, dst, n);
+ unpack_ubyte_L8A8_UNORM(src, dst, n);
break;
case MESA_FORMAT_A8L8_UNORM:
- unpack_ubyte_AL88_REV(src, dst, n);
+ unpack_ubyte_A8L8_UNORM(src, dst, n);
break;
case MESA_FORMAT_B2G3R3_UNORM:
- unpack_ubyte_RGB332(src, dst, n);
+ unpack_ubyte_B2G3R3_UNORM(src, dst, n);
break;
case MESA_FORMAT_A_UNORM8:
- unpack_ubyte_A8(src, dst, n);
+ unpack_ubyte_A_UNORM8(src, dst, n);
break;
case MESA_FORMAT_L_UNORM8:
- unpack_ubyte_L8(src, dst, n);
+ unpack_ubyte_L_UNORM8(src, dst, n);
break;
case MESA_FORMAT_I_UNORM8:
- unpack_ubyte_I8(src, dst, n);
+ unpack_ubyte_I_UNORM8(src, dst, n);
break;
case MESA_FORMAT_R_UNORM8:
- unpack_ubyte_R8(src, dst, n);
+ unpack_ubyte_R_UNORM8(src, dst, n);
break;
case MESA_FORMAT_R8G8_UNORM:
- unpack_ubyte_GR88(src, dst, n);
+ unpack_ubyte_R8G8_UNORM(src, dst, n);
break;
case MESA_FORMAT_G8R8_UNORM:
- unpack_ubyte_RG88(src, dst, n);
+ unpack_ubyte_G8R8_UNORM(src, dst, n);
break;
default:
/* get float values, convert to ubyte */
@@ -3123,7 +3123,7 @@ unpack_int_rgba_RGBA_INT8(const GLbyte *src, GLuint dst[][4], GLuint n)
}
static void
-unpack_int_rgba_ARGB8888(const GLbyte *src, GLuint dst[][4], GLuint n)
+unpack_int_rgba_B8G8R8A8_UNORM(const GLbyte *src, GLuint dst[][4], GLuint n)
{
unsigned int i;
@@ -3136,7 +3136,7 @@ unpack_int_rgba_ARGB8888(const GLbyte *src, GLuint dst[][4], GLuint n)
}
static void
-unpack_int_rgba_XRGB8888(const GLbyte *src, GLuint dst[][4], GLuint n)
+unpack_int_rgba_B8G8R8X8_UNORM(const GLbyte *src, GLuint dst[][4], GLuint n)
{
unsigned int i;
@@ -3560,7 +3560,7 @@ unpack_int_rgba_INTENSITY_INT8(const GLbyte *src, GLuint dst[][4], GLuint n)
}
static void
-unpack_int_rgba_ARGB2101010_UINT(const GLuint *src, GLuint dst[][4], GLuint n)
+unpack_int_rgba_B10G10R10A2_UINT(const GLuint *src, GLuint dst[][4], GLuint n)
{
unsigned int i;
@@ -3574,7 +3574,7 @@ unpack_int_rgba_ARGB2101010_UINT(const GLuint *src, GLuint dst[][4], GLuint n)
}
static void
-unpack_int_rgba_ABGR2101010_UINT(const GLuint *src, GLuint dst[][4], GLuint n)
+unpack_int_rgba_R10G10B10A2_UINT(const GLuint *src, GLuint dst[][4], GLuint n)
{
unsigned int i;
@@ -3588,7 +3588,7 @@ unpack_int_rgba_ABGR2101010_UINT(const GLuint *src, GLuint dst[][4], GLuint n)
}
static void
-unpack_int_rgba_ARGB2101010(const GLuint *src, GLuint dst[][4], GLuint n)
+unpack_int_rgba_B10G10R10A2_UNORM(const GLuint *src, GLuint dst[][4], GLuint n)
{
unsigned int i;
@@ -3667,7 +3667,7 @@ unpack_int_rgba_XBGR32323232_UINT(const GLuint *src, GLuint dst[][4], GLuint n)
}
static void
-unpack_int_rgba_ABGR2101010(const GLuint *src, GLuint dst[][4], GLuint n)
+unpack_int_rgba_R10G10B10A2_UNORM(const GLuint *src, GLuint dst[][4], GLuint n)
{
unsigned int i;
@@ -3708,11 +3708,11 @@ _mesa_unpack_uint_rgba_row(mesa_format format, GLuint n,
break;
case MESA_FORMAT_B8G8R8A8_UNORM:
- unpack_int_rgba_ARGB8888(src, dst, n);
+ unpack_int_rgba_B8G8R8A8_UNORM(src, dst, n);
break;
case MESA_FORMAT_B8G8R8X8_UNORM:
- unpack_int_rgba_XRGB8888(src, dst, n);
+ unpack_int_rgba_B8G8R8X8_UNORM(src, dst, n);
break;
case MESA_FORMAT_RGB_UINT32:
@@ -3848,15 +3848,15 @@ _mesa_unpack_uint_rgba_row(mesa_format format, GLuint n,
break;
case MESA_FORMAT_B10G10R10A2_UINT:
- unpack_int_rgba_ARGB2101010_UINT(src, dst, n);
+ unpack_int_rgba_B10G10R10A2_UINT(src, dst, n);
break;
case MESA_FORMAT_R10G10B10A2_UINT:
- unpack_int_rgba_ABGR2101010_UINT(src, dst, n);
+ unpack_int_rgba_R10G10B10A2_UINT(src, dst, n);
break;
case MESA_FORMAT_B10G10R10A2_UNORM:
- unpack_int_rgba_ARGB2101010(src, dst, n);
+ unpack_int_rgba_B10G10R10A2_UNORM(src, dst, n);
break;
case MESA_FORMAT_RGBX_UINT8:
@@ -3881,7 +3881,7 @@ _mesa_unpack_uint_rgba_row(mesa_format format, GLuint n,
break;
case MESA_FORMAT_R10G10B10A2_UNORM:
- unpack_int_rgba_ABGR2101010(src, dst, n);
+ unpack_int_rgba_R10G10B10A2_UNORM(src, dst, n);
break;
default:
@@ -3963,7 +3963,7 @@ unpack_float_z_X8_Z24(GLuint n, const void *src, GLfloat *dst)
}
static void
-unpack_float_z_Z16(GLuint n, const void *src, GLfloat *dst)
+unpack_float_Z_UNORM16(GLuint n, const void *src, GLfloat *dst)
{
const GLushort *s = ((const GLushort *) src);
GLuint i;
@@ -3973,7 +3973,7 @@ unpack_float_z_Z16(GLuint n, const void *src, GLfloat *dst)
}
static void
-unpack_float_z_Z32(GLuint n, const void *src, GLfloat *dst)
+unpack_float_Z_UNORM32(GLuint n, const void *src, GLfloat *dst)
{
const GLuint *s = ((const GLuint *) src);
GLuint i;
@@ -4020,10 +4020,10 @@ _mesa_unpack_float_z_row(mesa_format format, GLuint n,
unpack = unpack_float_z_X8_Z24;
break;
case MESA_FORMAT_Z_UNORM16:
- unpack = unpack_float_z_Z16;
+ unpack = unpack_float_Z_UNORM16;
break;
case MESA_FORMAT_Z_UNORM32:
- unpack = unpack_float_z_Z32;
+ unpack = unpack_float_Z_UNORM32;
break;
case MESA_FORMAT_Z_FLOAT32:
unpack = unpack_float_z_Z32F;
@@ -4067,7 +4067,7 @@ unpack_uint_z_X8_Z24(const void *src, GLuint *dst, GLuint n)
}
static void
-unpack_uint_z_Z16(const void *src, GLuint *dst, GLuint n)
+unpack_uint_Z_UNORM16(const void *src, GLuint *dst, GLuint n)
{
const GLushort *s = ((const GLushort *)src);
GLuint i;
@@ -4077,13 +4077,13 @@ unpack_uint_z_Z16(const void *src, GLuint *dst, GLuint n)
}
static void
-unpack_uint_z_Z32(const void *src, GLuint *dst, GLuint n)
+unpack_uint_Z_UNORM32(const void *src, GLuint *dst, GLuint n)
{
memcpy(dst, src, n * sizeof(GLuint));
}
static void
-unpack_uint_z_Z32_FLOAT(const void *src, GLuint *dst, GLuint n)
+unpack_uint_Z_FLOAT32(const void *src, GLuint *dst, GLuint n)
{
const float *s = (const float *)src;
GLuint i;
@@ -4093,7 +4093,7 @@ unpack_uint_z_Z32_FLOAT(const void *src, GLuint *dst, GLuint n)
}
static void
-unpack_uint_z_Z32_FLOAT_X24S8(const void *src, GLuint *dst, GLuint n)
+unpack_uint_Z_FLOAT32_X24S8(const void *src, GLuint *dst, GLuint n)
{
const struct z32f_x24s8 *s = (const struct z32f_x24s8 *) src;
GLuint i;
@@ -4125,16 +4125,16 @@ _mesa_unpack_uint_z_row(mesa_format format, GLuint n,
unpack = unpack_uint_z_X8_Z24;
break;
case MESA_FORMAT_Z_UNORM16:
- unpack = unpack_uint_z_Z16;
+ unpack = unpack_uint_Z_UNORM16;
break;
case MESA_FORMAT_Z_UNORM32:
- unpack = unpack_uint_z_Z32;
+ unpack = unpack_uint_Z_UNORM32;
break;
case MESA_FORMAT_Z_FLOAT32:
- unpack = unpack_uint_z_Z32_FLOAT;
+ unpack = unpack_uint_Z_FLOAT32;
break;
case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
- unpack = unpack_uint_z_Z32_FLOAT_X24S8;
+ unpack = unpack_uint_Z_FLOAT32_X24S8;
break;
default:
_mesa_problem(NULL, "bad format %s in _mesa_unpack_uint_z_row",
diff --git a/mesalib/src/mesa/main/formats.c b/mesalib/src/mesa/main/formats.c
index fb2501c69..4fb1f116b 100644
--- a/mesalib/src/mesa/main/formats.c
+++ b/mesalib/src/mesa/main/formats.c
@@ -3153,9 +3153,9 @@ _mesa_format_matches_format_and_type(mesa_format mesa_format,
case MESA_FORMAT_L_UNORM16:
return format == GL_LUMINANCE && type == GL_UNSIGNED_SHORT && !swapBytes;
case MESA_FORMAT_I_UNORM8:
- return format == GL_RED && type == GL_UNSIGNED_BYTE;
+ return format == GL_INTENSITY && type == GL_UNSIGNED_BYTE;
case MESA_FORMAT_I_UNORM16:
- return format == GL_RED && type == GL_UNSIGNED_SHORT && !swapBytes;
+ return format == GL_INTENSITY && type == GL_UNSIGNED_SHORT && !swapBytes;
case MESA_FORMAT_YCBCR:
return format == GL_YCBCR_MESA &&
@@ -3247,9 +3247,9 @@ _mesa_format_matches_format_and_type(mesa_format mesa_format,
return format == GL_LUMINANCE_ALPHA && type == GL_HALF_FLOAT && !swapBytes;
case MESA_FORMAT_I_FLOAT32:
- return format == GL_RED && type == GL_FLOAT && !swapBytes;
+ return format == GL_INTENSITY && type == GL_FLOAT && !swapBytes;
case MESA_FORMAT_I_FLOAT16:
- return format == GL_RED && type == GL_HALF_FLOAT && !swapBytes;
+ return format == GL_INTENSITY && type == GL_HALF_FLOAT && !swapBytes;
case MESA_FORMAT_R_FLOAT32:
return format == GL_RED && type == GL_FLOAT && !swapBytes;
@@ -3277,17 +3277,13 @@ _mesa_format_matches_format_and_type(mesa_format mesa_format,
return format == GL_ALPHA_INTEGER && type == GL_INT && !swapBytes;
case MESA_FORMAT_I_UINT8:
- return format == GL_RED_INTEGER && type == GL_UNSIGNED_BYTE;
case MESA_FORMAT_I_UINT16:
- return format == GL_RED_INTEGER && type == GL_UNSIGNED_SHORT && !swapBytes;
case MESA_FORMAT_I_UINT32:
- return format == GL_RED_INTEGER && type == GL_UNSIGNED_INT && !swapBytes;
case MESA_FORMAT_I_SINT8:
- return format == GL_RED_INTEGER && type == GL_BYTE;
case MESA_FORMAT_I_SINT16:
- return format == GL_RED_INTEGER && type == GL_SHORT && !swapBytes;
case MESA_FORMAT_I_SINT32:
- return format == GL_RED_INTEGER && type == GL_INT && !swapBytes;
+ /* GL_INTENSITY_INTEGER_EXT doesn't exist. */
+ return GL_FALSE;
case MESA_FORMAT_L_UINT8:
return format == GL_LUMINANCE_INTEGER_EXT && type == GL_UNSIGNED_BYTE;
@@ -3454,7 +3450,7 @@ _mesa_format_matches_format_and_type(mesa_format mesa_format,
return format == GL_LUMINANCE_ALPHA && type == GL_BYTE &&
littleEndian && !swapBytes;
case MESA_FORMAT_I_SNORM8:
- return format == GL_RED && type == GL_BYTE;
+ return format == GL_INTENSITY && type == GL_BYTE;
case MESA_FORMAT_A_SNORM16:
return format == GL_ALPHA && type == GL_SHORT && !swapBytes;
case MESA_FORMAT_L_SNORM16:
@@ -3463,7 +3459,7 @@ _mesa_format_matches_format_and_type(mesa_format mesa_format,
return format == GL_LUMINANCE_ALPHA && type == GL_SHORT &&
littleEndian && !swapBytes;
case MESA_FORMAT_I_SNORM16:
- return format == GL_RED && type == GL_SHORT && littleEndian &&
+ return format == GL_INTENSITY && type == GL_SHORT && littleEndian &&
!swapBytes;
case MESA_FORMAT_B10G10R10A2_UINT:
diff --git a/mesalib/src/mesa/main/get.c b/mesalib/src/mesa/main/get.c
index 88cf202df..6d9579008 100644
--- a/mesalib/src/mesa/main/get.c
+++ b/mesalib/src/mesa/main/get.c
@@ -387,6 +387,7 @@ EXTRA_EXT(ARB_texture_cube_map_array);
EXTRA_EXT(ARB_texture_buffer_range);
EXTRA_EXT(ARB_texture_multisample);
EXTRA_EXT(ARB_texture_gather);
+EXTRA_EXT(ARB_separate_shader_objects);
EXTRA_EXT(ARB_shader_atomic_counters);
EXTRA_EXT(ARB_draw_indirect);
EXTRA_EXT(ARB_shader_image_load_store);
@@ -873,6 +874,18 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
v->value_int = ctx->TransformFeedback.CurrentObject->Name;
break;
case GL_CURRENT_PROGRAM:
+ /* The Changelog of the ARB_separate_shader_objects spec says:
+ *
+ * 24 25 Jul 2011 pbrown Remove the language erroneously deleting
+ * CURRENT_PROGRAM. In the EXT extension, this
+ * token was aliased to ACTIVE_PROGRAM_EXT, and
+ * was used to indicate the last program set by
+ * either ActiveProgramEXT or UseProgram. In
+ * the ARB extension, the SSO active programs
+ * are now program pipeline object state and
+ * CURRENT_PROGRAM should still be used to query
+ * the last program set by UseProgram (bug 7822).
+ */
v->value_int =
ctx->Shader.ActiveProgram ? ctx->Shader.ActiveProgram->Name : 0;
break;
@@ -1002,6 +1015,14 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
case GL_DRAW_INDIRECT_BUFFER_BINDING:
v->value_int = ctx->DrawIndirectBuffer->Name;
break;
+ /* GL_ARB_separate_shader_objects */
+ case GL_PROGRAM_PIPELINE_BINDING:
+ if (ctx->Pipeline.Current) {
+ v->value_int = ctx->Pipeline.Current->Name;
+ } else {
+ v->value_int = 0;
+ }
+ break;
}
}
diff --git a/mesalib/src/mesa/main/get_hash_params.py b/mesalib/src/mesa/main/get_hash_params.py
index 674d0032a..06d0bbacc 100644
--- a/mesalib/src/mesa/main/get_hash_params.py
+++ b/mesalib/src/mesa/main/get_hash_params.py
@@ -726,6 +726,9 @@ descriptor=[
[ "MAX_PROGRAM_TEXTURE_GATHER_OFFSET", "CONTEXT_INT(Const.MaxProgramTextureGatherOffset), extra_ARB_texture_gather"],
[ "MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB", "CONTEXT_INT(Const.MaxProgramTextureGatherComponents), extra_ARB_texture_gather"],
+# GL_ARB_separate_shader_objects
+ [ "PROGRAM_PIPELINE_BINDING", "LOC_CUSTOM, TYPE_INT, GL_PROGRAM_PIPELINE_BINDING, extra_ARB_separate_shader_objects" ],
+
# GL_ARB_shader_atomic_counters
[ "ATOMIC_COUNTER_BUFFER_BINDING", "LOC_CUSTOM, TYPE_INT, 0, extra_ARB_shader_atomic_counters" ],
[ "MAX_ATOMIC_COUNTER_BUFFER_BINDINGS", "CONTEXT_INT(Const.MaxAtomicBufferBindings), extra_ARB_shader_atomic_counters" ],
diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h
index c6d90c579..33cb88881 100644
--- a/mesalib/src/mesa/main/mtypes.h
+++ b/mesalib/src/mesa/main/mtypes.h
@@ -2807,6 +2807,10 @@ struct gl_pipeline_object
GLbitfield Flags; /**< Mask of GLSL_x flags */
GLboolean EverBound; /**< Has the pipeline object been created */
+
+ GLboolean Validated; /**< Pipeline Validation status */
+
+ GLchar *InfoLog;
};
/**
@@ -2817,6 +2821,9 @@ struct gl_pipeline_shader_state
/** Currently bound pipeline object. See _mesa_BindProgramPipeline() */
struct gl_pipeline_object *Current;
+ /* Default Object to ensure that _Shader is never NULL */
+ struct gl_pipeline_object *Default;
+
/** Pipeline objects */
struct _mesa_HashTable *Objects;
};
@@ -4123,6 +4130,26 @@ struct gl_context
struct gl_pipeline_shader_state Pipeline; /**< GLSL pipeline shader object state */
struct gl_pipeline_object Shader; /**< GLSL shader object state */
+
+ /**
+ * Current active shader pipeline state
+ *
+ * Almost all internal users want ::_Shader instead of ::Shader. The
+ * exceptions are bits of legacy GLSL API that do not know about separate
+ * shader objects.
+ *
+ * If a program is active via \c glUseProgram, this will point to
+ * \c ::Shader.
+ *
+ * If a program pipeline is active via \c glBindProgramPipeline, this will
+ * point to \c ::Pipeline.Current.
+ *
+ * If neither a program nor a program pipeline is active, this will point to
+ * \c ::Pipeline.Default. This ensures that \c ::_Shader will never be
+ * \c NULL.
+ */
+ struct gl_pipeline_object *_Shader;
+
struct gl_shader_compiler_options ShaderCompilerOptions[MESA_SHADER_STAGES];
struct gl_query_state Query; /**< occlusion, timer queries */
diff --git a/mesalib/src/mesa/main/pipelineobj.c b/mesalib/src/mesa/main/pipelineobj.c
index 27012df72..f55251e06 100644
--- a/mesalib/src/mesa/main/pipelineobj.c
+++ b/mesalib/src/mesa/main/pipelineobj.c
@@ -80,6 +80,7 @@ _mesa_new_pipeline_object(struct gl_context *ctx, GLuint name)
mtx_init(&obj->Mutex, mtx_plain);
obj->RefCount = 1;
obj->Flags = _mesa_get_shader_flags();
+ obj->InfoLog = NULL;
}
return obj;
@@ -94,6 +95,10 @@ _mesa_init_pipeline(struct gl_context *ctx)
ctx->Pipeline.Objects = _mesa_NewHashTable();
ctx->Pipeline.Current = NULL;
+
+ /* Install a default Pipeline */
+ ctx->Pipeline.Default = _mesa_new_pipeline_object(ctx, 0);
+ _mesa_reference_pipeline_object(ctx, &ctx->_Shader, ctx->Pipeline.Default);
}
@@ -117,6 +122,10 @@ _mesa_free_pipeline_data(struct gl_context *ctx)
{
_mesa_HashDeleteAll(ctx->Pipeline.Objects, delete_pipelineobj_cb, ctx);
_mesa_DeleteHashTable(ctx->Pipeline.Objects);
+
+ _mesa_reference_pipeline_object(ctx, &ctx->_Shader, NULL);
+ _mesa_delete_pipeline_object(ctx, ctx->Pipeline.Default);
+
}
/**
@@ -214,6 +223,109 @@ _mesa_reference_pipeline_object_(struct gl_context *ctx,
void GLAPIENTRY
_mesa_UseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program)
{
+ GET_CURRENT_CONTEXT(ctx);
+
+ struct gl_pipeline_object *pipe = lookup_pipeline_object(ctx, pipeline);
+ struct gl_shader_program *shProg = NULL;
+ GLbitfield any_valid_stages;
+
+ if (!pipe) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glUseProgramStages(pipeline)");
+ return;
+ }
+
+ /* Object is created by any Pipeline call but glGenProgramPipelines,
+ * glIsProgramPipeline and GetProgramPipelineInfoLog
+ */
+ pipe->EverBound = GL_TRUE;
+
+ /* Section 2.11.4 (Program Pipeline Objects) of the OpenGL 4.1 spec says:
+ *
+ * "If stages is not the special value ALL_SHADER_BITS, and has a bit
+ * set that is not recognized, the error INVALID_VALUE is generated."
+ *
+ * NOT YET SUPPORTED:
+ * GL_TESS_CONTROL_SHADER_BIT
+ * GL_TESS_EVALUATION_SHADER_BIT
+ */
+ any_valid_stages = GL_VERTEX_SHADER_BIT | GL_FRAGMENT_SHADER_BIT;
+ if (_mesa_has_geometry_shaders(ctx))
+ any_valid_stages |= GL_GEOMETRY_SHADER_BIT;
+
+ if (stages != GL_ALL_SHADER_BITS && (stages & ~any_valid_stages) != 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glUseProgramStages(Stages)");
+ return;
+ }
+
+ /* Section 2.17.2 (Transform Feedback Primitive Capture) of the OpenGL 4.1
+ * spec says:
+ *
+ * "The error INVALID_OPERATION is generated:
+ *
+ * ...
+ *
+ * - by UseProgramStages if the program pipeline object it refers
+ * to is current and the current transform feedback object is
+ * active and not paused;
+ */
+ if (ctx->_Shader == pipe) {
+ if (_mesa_is_xfb_active_and_unpaused(ctx)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glUseProgramStages(transform feedback active)");
+ return;
+ }
+ }
+
+ if (program) {
+ shProg = _mesa_lookup_shader_program_err(ctx, program,
+ "glUseProgramStages");
+ if (shProg == NULL)
+ return;
+
+ /* Section 2.11.4 (Program Pipeline Objects) of the OpenGL 4.1 spec
+ * says:
+ *
+ * "If the program object named by program was linked without the
+ * PROGRAM_SEPARABLE parameter set, or was not linked successfully,
+ * the error INVALID_OPERATION is generated and the corresponding
+ * shader stages in the pipeline program pipeline object are not
+ * modified."
+ */
+ if (!shProg->LinkStatus) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glUseProgramStages(program not linked)");
+ return;
+ }
+
+ if (!shProg->SeparateShader) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glUseProgramStages(program wasn't linked with the "
+ "PROGRAM_SEPARABLE flag)");
+ return;
+ }
+ }
+
+ /* Enable individual stages from the program as requested by the
+ * application. If there is no shader for a requested stage in the
+ * program, _mesa_use_shader_program will enable fixed-function processing
+ * as dictated by the spec.
+ *
+ * Section 2.11.4 (Program Pipeline Objects) of the OpenGL 4.1 spec
+ * says:
+ *
+ * "If UseProgramStages is called with program set to zero or with a
+ * program object that contains no executable code for the given
+ * stages, it is as if the pipeline object has no programmable stage
+ * configured for the indicated shader stages."
+ */
+ if ((stages & GL_VERTEX_SHADER_BIT) != 0)
+ _mesa_use_shader_program(ctx, GL_VERTEX_SHADER, shProg, pipe);
+
+ if ((stages & GL_FRAGMENT_SHADER_BIT) != 0)
+ _mesa_use_shader_program(ctx, GL_FRAGMENT_SHADER, shProg, pipe);
+
+ if ((stages & GL_GEOMETRY_SHADER_BIT) != 0)
+ _mesa_use_shader_program(ctx, GL_GEOMETRY_SHADER, shProg, pipe);
}
/**
@@ -259,6 +371,75 @@ _mesa_ActiveShaderProgram(GLuint pipeline, GLuint program)
void GLAPIENTRY
_mesa_BindProgramPipeline(GLuint pipeline)
{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_pipeline_object *newObj = NULL;
+
+ /* Rebinding the same pipeline object: no change.
+ */
+ if (ctx->_Shader->Name == pipeline)
+ return;
+
+ /* Section 2.17.2 (Transform Feedback Primitive Capture) of the OpenGL 4.1
+ * spec says:
+ *
+ * "The error INVALID_OPERATION is generated:
+ *
+ * ...
+ *
+ * - by BindProgramPipeline if the current transform feedback
+ * object is active and not paused;
+ */
+ if (_mesa_is_xfb_active_and_unpaused(ctx)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBindProgramPipeline(transform feedback active)");
+ return;
+ }
+
+ /* Get pointer to new pipeline object (newObj)
+ */
+ if (pipeline) {
+ /* non-default pipeline object */
+ newObj = lookup_pipeline_object(ctx, pipeline);
+ if (!newObj) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glBindProgramPipeline(non-gen name)");
+ return;
+ }
+
+ /* Object is created by any Pipeline call but glGenProgramPipelines,
+ * glIsProgramPipeline and GetProgramPipelineInfoLog
+ */
+ newObj->EverBound = GL_TRUE;
+ }
+
+ /* First bind the Pipeline to pipeline binding point */
+ _mesa_reference_pipeline_object(ctx, &ctx->Pipeline.Current, newObj);
+
+ /* Section 2.11.3 (Program Objects) of the OpenGL 4.1 spec says:
+ *
+ * "If there is a current program object established by UseProgram,
+ * that program is considered current for all stages. Otherwise, if
+ * there is a bound program pipeline object (see section 2.11.4), the
+ * program bound to the appropriate stage of the pipeline object is
+ * considered current."
+ */
+ if (&ctx->Shader != ctx->_Shader) {
+ if (pipeline) {
+ /* Bound the pipeline to the current program and
+ * restore the pipeline state
+ */
+ _mesa_reference_pipeline_object(ctx, &ctx->_Shader, newObj);
+ } else {
+ /* Unbind the pipeline */
+ _mesa_reference_pipeline_object(ctx, &ctx->_Shader,
+ ctx->Pipeline.Default);
+ }
+
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS);
+
+ if (ctx->Driver.UseProgram)
+ ctx->Driver.UseProgram(ctx, NULL);
+ }
}
/**
@@ -393,14 +574,10 @@ _mesa_GetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params)
*params = pipe->ActiveProgram ? pipe->ActiveProgram->Name : 0;
return;
case GL_INFO_LOG_LENGTH:
- /* FINISHME: Implement the info log.
- */
- *params = 0;
+ *params = pipe->InfoLog ? strlen(pipe->InfoLog) + 1 : 0;
return;
case GL_VALIDATE_STATUS:
- /* FINISHME: Implement validation status.
- */
- *params = 0;
+ *params = pipe->Validated;
return;
case GL_VERTEX_SHADER:
*params = pipe->CurrentProgram[MESA_SHADER_VERTEX]
@@ -431,15 +608,222 @@ _mesa_GetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params)
}
/**
+ * Determines whether every stage in a linked program is active in the
+ * specified pipeline.
+ */
+static bool
+program_stages_all_active(struct gl_pipeline_object *pipe,
+ const struct gl_shader_program *prog)
+{
+ unsigned i;
+ bool status = true;
+
+ if (!prog)
+ return true;
+
+ for (i = 0; i < MESA_SHADER_STAGES; i++) {
+ if (prog->_LinkedShaders[i]) {
+ if (pipe->CurrentProgram[i]) {
+ if (prog->Name != pipe->CurrentProgram[i]->Name) {
+ status = false;
+ }
+ } else {
+ status = false;
+ }
+ }
+ }
+
+ if (!status) {
+ pipe->InfoLog = ralloc_asprintf(pipe,
+ "Program %d is not active for all "
+ "shaders that was linked",
+ prog->Name);
+ }
+
+ return status;
+}
+
+extern GLboolean
+_mesa_validate_program_pipeline(struct gl_context* ctx,
+ struct gl_pipeline_object *pipe,
+ GLboolean IsBound)
+{
+ unsigned i;
+
+ pipe->Validated = GL_FALSE;
+
+ /* Release and reset the info log.
+ */
+ if (pipe->InfoLog != NULL)
+ ralloc_free(pipe->InfoLog);
+
+ pipe->InfoLog = NULL;
+
+ /* Section 2.11.11 (Shader Execution), subheading "Validation," of the
+ * OpenGL 4.1 spec says:
+ *
+ * "[INVALID_OPERATION] is generated by any command that transfers
+ * vertices to the GL if:
+ *
+ * - A program object is active for at least one, but not all of
+ * the shader stages that were present when the program was
+ * linked."
+ *
+ * For each possible program stage, verify that the program bound to that
+ * stage has all of its stages active. In other words, if the program
+ * bound to the vertex stage also has a fragment shader, the fragment
+ * shader must also be bound to the fragment stage.
+ */
+ for (i = 0; i < MESA_SHADER_STAGES; i++) {
+ if (!program_stages_all_active(pipe, pipe->CurrentProgram[i])) {
+ goto err;
+ }
+ }
+
+ /* Section 2.11.11 (Shader Execution), subheading "Validation," of the
+ * OpenGL 4.1 spec says:
+ *
+ * "[INVALID_OPERATION] is generated by any command that transfers
+ * vertices to the GL if:
+ *
+ * ...
+ *
+ * - One program object is active for at least two shader stages
+ * and a second program is active for a shader stage between two
+ * stages for which the first program was active."
+ *
+ * Without Tesselation, the only case where this can occur is the geometry
+ * shader between the fragment shader and vertex shader.
+ */
+ if (pipe->CurrentProgram[MESA_SHADER_GEOMETRY]
+ && pipe->CurrentProgram[MESA_SHADER_FRAGMENT]
+ && pipe->CurrentProgram[MESA_SHADER_VERTEX]) {
+ if (pipe->CurrentProgram[MESA_SHADER_VERTEX]->Name == pipe->CurrentProgram[MESA_SHADER_FRAGMENT]->Name &&
+ pipe->CurrentProgram[MESA_SHADER_GEOMETRY]->Name != pipe->CurrentProgram[MESA_SHADER_VERTEX]->Name) {
+ pipe->InfoLog =
+ ralloc_asprintf(pipe,
+ "Program %d is active for geometry stage between "
+ "two stages for which another program %d is "
+ "active",
+ pipe->CurrentProgram[MESA_SHADER_GEOMETRY]->Name,
+ pipe->CurrentProgram[MESA_SHADER_VERTEX]->Name);
+ goto err;
+ }
+ }
+
+ /* Section 2.11.11 (Shader Execution), subheading "Validation," of the
+ * OpenGL 4.1 spec says:
+ *
+ * "[INVALID_OPERATION] is generated by any command that transfers
+ * vertices to the GL if:
+ *
+ * ...
+ *
+ * - There is an active program for tessellation control,
+ * tessellation evaluation, or geometry stages with corresponding
+ * executable shader, but there is no active program with
+ * executable vertex shader."
+ */
+ if (!pipe->CurrentProgram[MESA_SHADER_VERTEX]
+ && pipe->CurrentProgram[MESA_SHADER_GEOMETRY]) {
+ pipe->InfoLog = ralloc_strdup(pipe, "Program lacks a vertex shader");
+ goto err;
+ }
+
+ /* Section 2.11.11 (Shader Execution), subheading "Validation," of the
+ * OpenGL 4.1 spec says:
+ *
+ * "[INVALID_OPERATION] is generated by any command that transfers
+ * vertices to the GL if:
+ *
+ * ...
+ *
+ * - There is no current program object specified by UseProgram,
+ * there is a current program pipeline object, and the current
+ * program for any shader stage has been relinked since being
+ * applied to the pipeline object via UseProgramStages with the
+ * PROGRAM_SEPARABLE parameter set to FALSE.
+ */
+ for (i = 0; i < MESA_SHADER_STAGES; i++) {
+ if (pipe->CurrentProgram[i] && !pipe->CurrentProgram[i]->SeparateShader) {
+ pipe->InfoLog = ralloc_asprintf(pipe,
+ "Program %d was relinked without "
+ "PROGRAM_SEPARABLE state",
+ pipe->CurrentProgram[i]->Name);
+ goto err;
+ }
+ }
+
+ /* Section 2.11.11 (Shader Execution), subheading "Validation," of the
+ * OpenGL 4.1 spec says:
+ *
+ * "[INVALID_OPERATION] is generated by any command that transfers
+ * vertices to the GL if:
+ *
+ * ...
+ *
+ * - Any two active samplers in the current program object are of
+ * different types, but refer to the same texture image unit.
+ *
+ * - The number of active samplers in the program exceeds the
+ * maximum number of texture image units allowed."
+ */
+ if (!_mesa_sampler_uniforms_pipeline_are_valid(pipe))
+ goto err;
+
+ pipe->Validated = GL_TRUE;
+ return GL_TRUE;
+
+err:
+ if (IsBound)
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glValidateProgramPipeline failed to validate the pipeline");
+
+ return GL_FALSE;
+}
+
+/**
* Check compatibility of pipeline's program
*/
void GLAPIENTRY
_mesa_ValidateProgramPipeline(GLuint pipeline)
{
+ GET_CURRENT_CONTEXT(ctx);
+
+ struct gl_pipeline_object *pipe = lookup_pipeline_object(ctx, pipeline);
+
+ if (!pipe) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glValidateProgramPipeline(pipeline)");
+ return;
+ }
+
+ _mesa_validate_program_pipeline(ctx, pipe,
+ (ctx->_Shader->Name == pipe->Name));
}
void GLAPIENTRY
_mesa_GetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize,
GLsizei *length, GLchar *infoLog)
{
+ GET_CURRENT_CONTEXT(ctx);
+
+ struct gl_pipeline_object *pipe = lookup_pipeline_object(ctx, pipeline);
+
+ if (!pipe) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glGetProgramPipelineInfoLog(pipeline)");
+ return;
+ }
+
+ if (bufSize < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE,
+ "glGetProgramPipelineInfoLog(bufSize)");
+ return;
+ }
+
+ if (pipe->InfoLog)
+ _mesa_copy_string(infoLog, bufSize, length, pipe->InfoLog);
+ else
+ *length = 0;
}
diff --git a/mesalib/src/mesa/main/pipelineobj.h b/mesalib/src/mesa/main/pipelineobj.h
index 46d5fab42..ceaf4f14c 100644
--- a/mesalib/src/mesa/main/pipelineobj.h
+++ b/mesalib/src/mesa/main/pipelineobj.h
@@ -59,6 +59,9 @@ _mesa_reference_pipeline_object(struct gl_context *ctx,
_mesa_reference_pipeline_object_(ctx, ptr, obj);
}
+extern GLboolean
+_mesa_validate_program_pipeline(struct gl_context * ctx, struct gl_pipeline_object *pipe, GLboolean IsBound);
+
extern void GLAPIENTRY
_mesa_UseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program);
diff --git a/mesalib/src/mesa/main/shaderapi.c b/mesalib/src/mesa/main/shaderapi.c
index 5060cbb0b..1c8e6b4cf 100644
--- a/mesalib/src/mesa/main/shaderapi.c
+++ b/mesalib/src/mesa/main/shaderapi.c
@@ -44,6 +44,7 @@
#include "main/hash.h"
#include "main/hash_table.h"
#include "main/mtypes.h"
+#include "main/pipelineobj.h"
#include "main/shaderapi.h"
#include "main/shaderobj.h"
#include "main/transformfeedback.h"
@@ -144,6 +145,8 @@ _mesa_free_shader_state(struct gl_context *ctx)
_mesa_reference_shader_program(ctx, &ctx->Shader.ActiveProgram, NULL);
/* Extended for ARB_separate_shader_objects */
+ _mesa_reference_pipeline_object(ctx, &ctx->_Shader, NULL);
+
assert(ctx->Shader.RefCount == 1);
mtx_destroy(&ctx->Shader.Mutex);
}
@@ -465,8 +468,8 @@ static GLuint
get_handle(struct gl_context *ctx, GLenum pname)
{
if (pname == GL_PROGRAM_OBJECT_ARB) {
- if (ctx->Shader.ActiveProgram)
- return ctx->Shader.ActiveProgram->Name;
+ if (ctx->_Shader->ActiveProgram)
+ return ctx->_Shader->ActiveProgram->Name;
else
return 0;
}
@@ -837,7 +840,7 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj)
*/
sh->CompileStatus = GL_FALSE;
} else {
- if (ctx->Shader.Flags & GLSL_DUMP) {
+ if (ctx->_Shader->Flags & GLSL_DUMP) {
fprintf(stderr, "GLSL source for %s shader %d:\n",
_mesa_shader_stage_to_string(sh->Stage), sh->Name);
fprintf(stderr, "%s\n", sh->Source);
@@ -849,11 +852,11 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj)
*/
_mesa_glsl_compile_shader(ctx, sh, false, false);
- if (ctx->Shader.Flags & GLSL_LOG) {
+ if (ctx->_Shader->Flags & GLSL_LOG) {
_mesa_write_shader_to_file(sh);
}
- if (ctx->Shader.Flags & GLSL_DUMP) {
+ if (ctx->_Shader->Flags & GLSL_DUMP) {
if (sh->CompileStatus) {
fprintf(stderr, "GLSL IR for shader %d:\n", sh->Name);
_mesa_print_ir(stderr, sh->ir, NULL);
@@ -871,7 +874,7 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj)
}
if (!sh->CompileStatus) {
- if (ctx->Shader.Flags & GLSL_DUMP_ON_ERROR) {
+ if (ctx->_Shader->Flags & GLSL_DUMP_ON_ERROR) {
fprintf(stderr, "GLSL source for %s shader %d:\n",
_mesa_shader_stage_to_string(sh->Stage), sh->Name);
fprintf(stderr, "%s\n", sh->Source);
@@ -879,7 +882,7 @@ compile_shader(struct gl_context *ctx, GLuint shaderObj)
fflush(stderr);
}
- if (ctx->Shader.Flags & GLSL_REPORT_ERRORS) {
+ if (ctx->_Shader->Flags & GLSL_REPORT_ERRORS) {
_mesa_debug(ctx, "Error compiling shader %u:\n%s\n",
sh->Name, sh->InfoLog);
}
@@ -915,7 +918,7 @@ link_program(struct gl_context *ctx, GLuint program)
_mesa_glsl_link_shader(ctx, shProg);
if (shProg->LinkStatus == GL_FALSE &&
- (ctx->Shader.Flags & GLSL_REPORT_ERRORS)) {
+ (ctx->_Shader->Flags & GLSL_REPORT_ERRORS)) {
_mesa_debug(ctx, "Error linking program %u:\n%s\n",
shProg->Name, shProg->InfoLog);
}
@@ -986,17 +989,21 @@ _mesa_active_program(struct gl_context *ctx, struct gl_shader_program *shProg,
*/
static void
use_shader_program(struct gl_context *ctx, GLenum type,
- struct gl_shader_program *shProg)
+ struct gl_shader_program *shProg,
+ struct gl_pipeline_object *shTarget)
{
struct gl_shader_program **target;
gl_shader_stage stage = _mesa_shader_enum_to_shader_stage(type);
- target = &ctx->Shader.CurrentProgram[stage];
+ target = &shTarget->CurrentProgram[stage];
if ((shProg == NULL) || (shProg->_LinkedShaders[stage] == NULL))
shProg = NULL;
if (*target != shProg) {
- FLUSH_VERTICES(ctx, _NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS);
+ /* Program is current, flush it */
+ if (shTarget == ctx->_Shader) {
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS);
+ }
/* If the shader is also bound as the current rendering shader, unbind
* it from that binding point as well. This ensures that the correct
@@ -1013,9 +1020,9 @@ use_shader_program(struct gl_context *ctx, GLenum type,
/* Empty for now. */
break;
case GL_FRAGMENT_SHADER:
- if (*target == ctx->Shader._CurrentFragmentProgram) {
+ if (*target == ctx->_Shader->_CurrentFragmentProgram) {
_mesa_reference_shader_program(ctx,
- &ctx->Shader._CurrentFragmentProgram,
+ &ctx->_Shader->_CurrentFragmentProgram,
NULL);
}
break;
@@ -1032,10 +1039,10 @@ use_shader_program(struct gl_context *ctx, GLenum type,
void
_mesa_use_program(struct gl_context *ctx, struct gl_shader_program *shProg)
{
- use_shader_program(ctx, GL_VERTEX_SHADER, shProg);
- use_shader_program(ctx, GL_GEOMETRY_SHADER_ARB, shProg);
- use_shader_program(ctx, GL_FRAGMENT_SHADER, shProg);
- use_shader_program(ctx, GL_COMPUTE_SHADER, shProg);
+ use_shader_program(ctx, GL_VERTEX_SHADER, shProg, &ctx->Shader);
+ use_shader_program(ctx, GL_GEOMETRY_SHADER_ARB, shProg, &ctx->Shader);
+ use_shader_program(ctx, GL_FRAGMENT_SHADER, shProg, &ctx->Shader);
+ use_shader_program(ctx, GL_COMPUTE_SHADER, shProg, &ctx->Shader);
_mesa_active_program(ctx, shProg, "glUseProgram");
if (ctx->Driver.UseProgram)
@@ -1533,7 +1540,7 @@ _mesa_UseProgram(GLhandleARB program)
}
/* debug code */
- if (ctx->Shader.Flags & GLSL_USE_PROG) {
+ if (ctx->_Shader->Flags & GLSL_USE_PROG) {
print_shader_info(shProg);
}
}
@@ -1541,7 +1548,31 @@ _mesa_UseProgram(GLhandleARB program)
shProg = NULL;
}
- _mesa_use_program(ctx, shProg);
+ /* The "Dependencies on EXT_separate_shader_objects" section of the
+ * ARB_separate_shader_object spec says:
+ *
+ * "The executable code for an individual shader stage is taken from
+ * the current program for that stage. If there is a current program
+ * object for any shader stage or for uniform updates established by
+ * UseProgram, UseShaderProgramEXT, or ActiveProgramEXT, the current
+ * program for that stage (if any) is considered current. Otherwise,
+ * if there is a bound program pipeline object ..."
+ */
+ if (program) {
+ /* Attach shader state to the binding point */
+ _mesa_reference_pipeline_object(ctx, &ctx->_Shader, &ctx->Shader);
+ /* Update the program */
+ _mesa_use_program(ctx, shProg);
+ } else {
+ /* Must be done first: detach the progam */
+ _mesa_use_program(ctx, shProg);
+ /* Unattach shader_state binding point */
+ _mesa_reference_pipeline_object(ctx, &ctx->_Shader, ctx->Pipeline.Default);
+ /* If a pipeline was bound, rebind it */
+ if (ctx->Pipeline.Current) {
+ _mesa_BindProgramPipeline(ctx->Pipeline.Current->Name);
+ }
+ }
}
@@ -1773,9 +1804,10 @@ _mesa_ProgramParameteri(GLuint program, GLenum pname, GLint value)
void
_mesa_use_shader_program(struct gl_context *ctx, GLenum type,
- struct gl_shader_program *shProg)
+ struct gl_shader_program *shProg,
+ struct gl_pipeline_object *shTarget)
{
- use_shader_program(ctx, type, shProg);
+ use_shader_program(ctx, type, shProg, shTarget);
if (ctx->Driver.UseProgram)
ctx->Driver.UseProgram(ctx, shProg);
@@ -1815,7 +1847,41 @@ _mesa_UseShaderProgramEXT(GLenum type, GLuint program)
}
}
- _mesa_use_shader_program(ctx, type, shProg);
+ /* The "Dependencies on EXT_separate_shader_objects" section of the
+ * ARB_separate_shader_object spec says:
+ *
+ * "The executable code for an individual shader stage is taken from
+ * the current program for that stage. If there is a current program
+ * object for any shader stage or for uniform updates established by
+ * UseProgram, UseShaderProgramEXT, or ActiveProgramEXT, the current
+ * program for that stage (if any) is considered current. Otherwise,
+ * if there is a bound program pipeline object ..."
+ */
+ if (program) {
+ /* Attach shader state to the binding point */
+ _mesa_reference_pipeline_object(ctx, &ctx->_Shader, &ctx->Shader);
+ /* Update the program */
+ _mesa_use_shader_program(ctx, type, shProg, ctx->_Shader);
+ } else {
+ /* Must be done first: detach the progam */
+ _mesa_use_shader_program(ctx, type, shProg, ctx->_Shader);
+
+ /* Nothing remains current */
+ if (!ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX] &&
+ !ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY] &&
+ !ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT] &&
+ !ctx->Shader.ActiveProgram) {
+
+ /* Unattach shader_state binding point */
+ _mesa_reference_pipeline_object(ctx, &ctx->_Shader,
+ ctx->Pipeline.Default);
+
+ /* If a pipeline was bound, rebind it */
+ if (ctx->Pipeline.Current) {
+ _mesa_BindProgramPipeline(ctx->Pipeline.Current->Name);
+ }
+ }
+ }
}
@@ -1830,7 +1896,39 @@ _mesa_ActiveProgramEXT(GLuint program)
? _mesa_lookup_shader_program_err(ctx, program, "glActiveProgramEXT")
: NULL;
- _mesa_active_program(ctx, shProg, "glActiveProgramEXT");
+ /* The "Dependencies on EXT_separate_shader_objects" section of the
+ * ARB_separate_shader_object spec says:
+ *
+ * "The executable code for an individual shader stage is taken from
+ * the current program for that stage. If there is a current program
+ * object for any shader stage or for uniform updates established by
+ * UseProgram, UseShaderProgramEXT, or ActiveProgramEXT, the current
+ * program for that stage (if any) is considered current. Otherwise,
+ * if there is a bound program pipeline object ..."
+ */
+ if (shProg != NULL) {
+ /* Attach shader state to the binding point */
+ _mesa_reference_pipeline_object(ctx, &ctx->_Shader, &ctx->Shader);
+ _mesa_active_program(ctx, shProg, "glActiveProgramEXT");
+ } else {
+ /* Must be done first: unset the current active progam */
+ _mesa_active_program(ctx, shProg, "glActiveProgramEXT");
+
+ /* Nothing remains current */
+ if (!ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX] &&
+ !ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY] &&
+ !ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT] &&
+ !ctx->Shader.ActiveProgram) {
+
+ /* Unattach shader_state binding point */
+ _mesa_reference_pipeline_object(ctx, &ctx->_Shader, ctx->Pipeline.Default);
+ /* If a pipeline was bound, rebind it */
+ if (ctx->Pipeline.Current) {
+ _mesa_BindProgramPipeline(ctx->Pipeline.Current->Name);
+ }
+ }
+ }
+
return;
}
diff --git a/mesalib/src/mesa/main/shaderapi.h b/mesalib/src/mesa/main/shaderapi.h
index 44426cc65..17b05b313 100644
--- a/mesalib/src/mesa/main/shaderapi.h
+++ b/mesalib/src/mesa/main/shaderapi.h
@@ -202,7 +202,8 @@ _mesa_ProgramParameteri(GLuint program, GLenum pname, GLint value);
void
_mesa_use_shader_program(struct gl_context *ctx, GLenum type,
- struct gl_shader_program *shProg);
+ struct gl_shader_program *shProg,
+ struct gl_pipeline_object *shTarget);
extern void GLAPIENTRY
_mesa_UseShaderProgramEXT(GLenum type, GLuint program);
diff --git a/mesalib/src/mesa/main/state.c b/mesalib/src/mesa/main/state.c
index 0866a140f..c122c16aa 100644
--- a/mesalib/src/mesa/main/state.c
+++ b/mesalib/src/mesa/main/state.c
@@ -95,11 +95,11 @@ static GLbitfield
update_program(struct gl_context *ctx)
{
const struct gl_shader_program *vsProg =
- ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX];
+ ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX];
const struct gl_shader_program *gsProg =
- ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY];
+ ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY];
struct gl_shader_program *fsProg =
- ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT];
+ ctx->_Shader->CurrentProgram[MESA_SHADER_FRAGMENT];
const struct gl_vertex_program *prevVP = ctx->VertexProgram._Current;
const struct gl_fragment_program *prevFP = ctx->FragmentProgram._Current;
const struct gl_geometry_program *prevGP = ctx->GeometryProgram._Current;
@@ -125,7 +125,7 @@ update_program(struct gl_context *ctx)
&& fsProg->_LinkedShaders[MESA_SHADER_FRAGMENT]) {
/* Use GLSL fragment shader */
_mesa_reference_shader_program(ctx,
- &ctx->Shader._CurrentFragmentProgram,
+ &ctx->_Shader->_CurrentFragmentProgram,
fsProg);
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current,
gl_fragment_program(fsProg->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program));
@@ -135,7 +135,7 @@ update_program(struct gl_context *ctx)
else if (ctx->FragmentProgram._Enabled) {
/* Use user-defined fragment program */
_mesa_reference_shader_program(ctx,
- &ctx->Shader._CurrentFragmentProgram,
+ &ctx->_Shader->_CurrentFragmentProgram,
NULL);
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current,
ctx->FragmentProgram.Current);
@@ -147,7 +147,7 @@ update_program(struct gl_context *ctx)
struct gl_shader_program *f = _mesa_get_fixed_func_fragment_program(ctx);
_mesa_reference_shader_program(ctx,
- &ctx->Shader._CurrentFragmentProgram,
+ &ctx->_Shader->_CurrentFragmentProgram,
f);
_mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current,
gl_fragment_program(f->_LinkedShaders[MESA_SHADER_FRAGMENT]->Program));
@@ -310,7 +310,7 @@ update_multisample(struct gl_context *ctx)
static void
update_twoside(struct gl_context *ctx)
{
- if (ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX] ||
+ if (ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX] ||
ctx->VertexProgram._Enabled) {
ctx->VertexProgram._TwoSideEnabled = ctx->VertexProgram.TwoSideEnabled;
} else {
diff --git a/mesalib/src/mesa/main/texstate.c b/mesalib/src/mesa/main/texstate.c
index 08725f601..fcae878cf 100644
--- a/mesalib/src/mesa/main/texstate.c
+++ b/mesalib/src/mesa/main/texstate.c
@@ -532,9 +532,9 @@ update_texture_state( struct gl_context *ctx )
int i;
for (i = 0; i < MESA_SHADER_STAGES; i++) {
- if (ctx->Shader.CurrentProgram[i] &&
- ctx->Shader.CurrentProgram[i]->LinkStatus) {
- prog[i] = ctx->Shader.CurrentProgram[i]->_LinkedShaders[i]->Program;
+ if (ctx->_Shader->CurrentProgram[i] &&
+ ctx->_Shader->CurrentProgram[i]->LinkStatus) {
+ prog[i] = ctx->_Shader->CurrentProgram[i]->_LinkedShaders[i]->Program;
} else {
if (i == MESA_SHADER_FRAGMENT && ctx->FragmentProgram._Enabled)
prog[i] = &ctx->FragmentProgram.Current->Base;
diff --git a/mesalib/src/mesa/main/transformfeedback.c b/mesalib/src/mesa/main/transformfeedback.c
index 6b9565ca3..abeb25e87 100644
--- a/mesalib/src/mesa/main/transformfeedback.c
+++ b/mesalib/src/mesa/main/transformfeedback.c
@@ -388,8 +388,8 @@ get_xfb_source(struct gl_context *ctx)
{
int i;
for (i = MESA_SHADER_GEOMETRY; i >= MESA_SHADER_VERTEX; i--) {
- if (ctx->Shader.CurrentProgram[i] != NULL)
- return ctx->Shader.CurrentProgram[i];
+ if (ctx->_Shader->CurrentProgram[i] != NULL)
+ return ctx->_Shader->CurrentProgram[i];
}
return NULL;
}
diff --git a/mesalib/src/mesa/main/uniform_query.cpp b/mesalib/src/mesa/main/uniform_query.cpp
index fa13ef9fe..5f1af0873 100644
--- a/mesalib/src/mesa/main/uniform_query.cpp
+++ b/mesalib/src/mesa/main/uniform_query.cpp
@@ -698,7 +698,7 @@ _mesa_uniform(struct gl_context *ctx, struct gl_shader_program *shProg,
return;
}
- if (ctx->Shader.Flags & GLSL_UNIFORMS) {
+ if (ctx->_Shader->Flags & GLSL_UNIFORMS) {
log_uniform(values, basicType, components, 1, count,
false, shProg, location, uni);
}
@@ -920,7 +920,7 @@ _mesa_uniform_matrix(struct gl_context *ctx, struct gl_shader_program *shProg,
}
}
- if (ctx->Shader.Flags & GLSL_UNIFORMS) {
+ if (ctx->_Shader->Flags & GLSL_UNIFORMS) {
log_uniform(values, GLSL_TYPE_FLOAT, components, vectors, count,
bool(transpose), shProg, location, uni);
}
@@ -1089,3 +1089,80 @@ _mesa_sampler_uniforms_are_valid(const struct gl_shader_program *shProg,
return true;
}
+
+extern "C" bool
+_mesa_sampler_uniforms_pipeline_are_valid(struct gl_pipeline_object *pipeline)
+{
+ /* Section 2.11.11 (Shader Execution), subheading "Validation," of the
+ * OpenGL 4.1 spec says:
+ *
+ * "[INVALID_OPERATION] is generated by any command that transfers
+ * vertices to the GL if:
+ *
+ * ...
+ *
+ * - Any two active samplers in the current program object are of
+ * different types, but refer to the same texture image unit.
+ *
+ * - The number of active samplers in the program exceeds the
+ * maximum number of texture image units allowed."
+ */
+ unsigned active_samplers = 0;
+ const struct gl_shader_program **shProg =
+ (const struct gl_shader_program **) pipeline->CurrentProgram;
+
+ const glsl_type *unit_types[MAX_COMBINED_TEXTURE_IMAGE_UNITS];
+ memset(unit_types, 0, sizeof(unit_types));
+
+ for (unsigned idx = 0; idx < ARRAY_SIZE(pipeline->CurrentProgram); idx++) {
+ if (!shProg[idx])
+ continue;
+
+ for (unsigned i = 0; i < shProg[idx]->NumUserUniformStorage; i++) {
+ const struct gl_uniform_storage *const storage =
+ &shProg[idx]->UniformStorage[i];
+ const glsl_type *const t = (storage->type->is_array())
+ ? storage->type->fields.array : storage->type;
+
+ if (!t->is_sampler())
+ continue;
+
+ active_samplers++;
+
+ const unsigned count = MAX2(1, storage->type->array_size());
+ for (unsigned j = 0; j < count; j++) {
+ const unsigned unit = storage->storage[j].i;
+
+ /* The types of the samplers associated with a particular texture
+ * unit must be an exact match. Page 74 (page 89 of the PDF) of
+ * the OpenGL 3.3 core spec says:
+ *
+ * "It is not allowed to have variables of different sampler
+ * types pointing to the same texture image unit within a
+ * program object."
+ */
+ if (unit_types[unit] == NULL) {
+ unit_types[unit] = t;
+ } else if (unit_types[unit] != t) {
+ pipeline->InfoLog =
+ ralloc_asprintf(pipeline,
+ "Texture unit %d is accessed both as %s "
+ "and %s",
+ unit, unit_types[unit]->name, t->name);
+ return false;
+ }
+ }
+ }
+ }
+
+ if (active_samplers > MAX_COMBINED_TEXTURE_IMAGE_UNITS) {
+ pipeline->InfoLog =
+ ralloc_asprintf(pipeline,
+ "the number of active samplers %d exceed the "
+ "maximum %d",
+ active_samplers, MAX_COMBINED_TEXTURE_IMAGE_UNITS);
+ return false;
+ }
+
+ return true;
+}
diff --git a/mesalib/src/mesa/main/uniforms.c b/mesalib/src/mesa/main/uniforms.c
index e9b374b0d..1daade428 100644
--- a/mesalib/src/mesa/main/uniforms.c
+++ b/mesalib/src/mesa/main/uniforms.c
@@ -137,7 +137,7 @@ void GLAPIENTRY
_mesa_Uniform1f(GLint location, GLfloat v0)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, &v0, GL_FLOAT);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, &v0, GL_FLOAT);
}
void GLAPIENTRY
@@ -147,7 +147,7 @@ _mesa_Uniform2f(GLint location, GLfloat v0, GLfloat v1)
GLfloat v[2];
v[0] = v0;
v[1] = v1;
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_FLOAT_VEC2);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_FLOAT_VEC2);
}
void GLAPIENTRY
@@ -158,7 +158,7 @@ _mesa_Uniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
v[0] = v0;
v[1] = v1;
v[2] = v2;
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_FLOAT_VEC3);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_FLOAT_VEC3);
}
void GLAPIENTRY
@@ -171,14 +171,14 @@ _mesa_Uniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2,
v[1] = v1;
v[2] = v2;
v[3] = v3;
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_FLOAT_VEC4);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_FLOAT_VEC4);
}
void GLAPIENTRY
_mesa_Uniform1i(GLint location, GLint v0)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, &v0, GL_INT);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, &v0, GL_INT);
}
void GLAPIENTRY
@@ -188,7 +188,7 @@ _mesa_Uniform2i(GLint location, GLint v0, GLint v1)
GLint v[2];
v[0] = v0;
v[1] = v1;
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_INT_VEC2);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_INT_VEC2);
}
void GLAPIENTRY
@@ -199,7 +199,7 @@ _mesa_Uniform3i(GLint location, GLint v0, GLint v1, GLint v2)
v[0] = v0;
v[1] = v1;
v[2] = v2;
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_INT_VEC3);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_INT_VEC3);
}
void GLAPIENTRY
@@ -211,63 +211,63 @@ _mesa_Uniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
v[1] = v1;
v[2] = v2;
v[3] = v3;
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_INT_VEC4);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_INT_VEC4);
}
void GLAPIENTRY
_mesa_Uniform1fv(GLint location, GLsizei count, const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_FLOAT);
}
void GLAPIENTRY
_mesa_Uniform2fv(GLint location, GLsizei count, const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT_VEC2);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_FLOAT_VEC2);
}
void GLAPIENTRY
_mesa_Uniform3fv(GLint location, GLsizei count, const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT_VEC3);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_FLOAT_VEC3);
}
void GLAPIENTRY
_mesa_Uniform4fv(GLint location, GLsizei count, const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_FLOAT_VEC4);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_FLOAT_VEC4);
}
void GLAPIENTRY
_mesa_Uniform1iv(GLint location, GLsizei count, const GLint * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_INT);
}
void GLAPIENTRY
_mesa_Uniform2iv(GLint location, GLsizei count, const GLint * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT_VEC2);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_INT_VEC2);
}
void GLAPIENTRY
_mesa_Uniform3iv(GLint location, GLsizei count, const GLint * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT_VEC3);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_INT_VEC3);
}
void GLAPIENTRY
_mesa_Uniform4iv(GLint location, GLsizei count, const GLint * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_INT_VEC4);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_INT_VEC4);
}
/** Same as above with direct state access **/
@@ -467,7 +467,7 @@ void GLAPIENTRY
_mesa_Uniform1ui(GLint location, GLuint v0)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, &v0, GL_UNSIGNED_INT);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, &v0, GL_UNSIGNED_INT);
}
void GLAPIENTRY
@@ -477,7 +477,7 @@ _mesa_Uniform2ui(GLint location, GLuint v0, GLuint v1)
GLuint v[2];
v[0] = v0;
v[1] = v1;
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC2);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC2);
}
void GLAPIENTRY
@@ -488,7 +488,7 @@ _mesa_Uniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2)
v[0] = v0;
v[1] = v1;
v[2] = v2;
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC3);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC3);
}
void GLAPIENTRY
@@ -500,35 +500,35 @@ _mesa_Uniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
v[1] = v1;
v[2] = v2;
v[3] = v3;
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC4);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, 1, v, GL_UNSIGNED_INT_VEC4);
}
void GLAPIENTRY
_mesa_Uniform1uiv(GLint location, GLsizei count, const GLuint *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_UNSIGNED_INT);
}
void GLAPIENTRY
_mesa_Uniform2uiv(GLint location, GLsizei count, const GLuint *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC2);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC2);
}
void GLAPIENTRY
_mesa_Uniform3uiv(GLint location, GLsizei count, const GLuint *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC3);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC3);
}
void GLAPIENTRY
_mesa_Uniform4uiv(GLint location, GLsizei count, const GLuint *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform(ctx, ctx->Shader.ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC4);
+ _mesa_uniform(ctx, ctx->_Shader->ActiveProgram, location, count, value, GL_UNSIGNED_INT_VEC4);
}
@@ -538,7 +538,7 @@ _mesa_UniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+ _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
2, 2, location, count, transpose, value);
}
@@ -547,7 +547,7 @@ _mesa_UniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+ _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
3, 3, location, count, transpose, value);
}
@@ -556,7 +556,7 @@ _mesa_UniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat * value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+ _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
4, 4, location, count, transpose, value);
}
@@ -703,7 +703,7 @@ _mesa_UniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+ _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
2, 3, location, count, transpose, value);
}
@@ -712,7 +712,7 @@ _mesa_UniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+ _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
3, 2, location, count, transpose, value);
}
@@ -721,7 +721,7 @@ _mesa_UniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+ _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
2, 4, location, count, transpose, value);
}
@@ -730,7 +730,7 @@ _mesa_UniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+ _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
4, 2, location, count, transpose, value);
}
@@ -739,7 +739,7 @@ _mesa_UniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+ _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
3, 4, location, count, transpose, value);
}
@@ -748,7 +748,7 @@ _mesa_UniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose,
const GLfloat *value)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_uniform_matrix(ctx, ctx->Shader.ActiveProgram,
+ _mesa_uniform_matrix(ctx, ctx->_Shader->ActiveProgram,
4, 3, location, count, transpose, value);
}
diff --git a/mesalib/src/mesa/main/uniforms.h b/mesalib/src/mesa/main/uniforms.h
index d7afdc106..c8b555cbe 100644
--- a/mesalib/src/mesa/main/uniforms.h
+++ b/mesalib/src/mesa/main/uniforms.h
@@ -300,6 +300,8 @@ _mesa_update_shader_textures_used(struct gl_shader_program *shProg,
extern bool
_mesa_sampler_uniforms_are_valid(const struct gl_shader_program *shProg,
char *errMsg, size_t errMsgLength);
+extern bool
+_mesa_sampler_uniforms_pipeline_are_valid(struct gl_pipeline_object *);
extern const struct gl_program_parameter *
get_uniform_parameter(struct gl_shader_program *shProg, GLint index);
diff --git a/mesalib/src/mesa/main/varray.c b/mesalib/src/mesa/main/varray.c
index b4b6fa9be..b88d70018 100644
--- a/mesalib/src/mesa/main/varray.c
+++ b/mesalib/src/mesa/main/varray.c
@@ -1223,7 +1223,7 @@ _mesa_MultiDrawArrays( GLenum mode, const GLint *first,
for (i = 0; i < primcount; i++) {
if (count[i] > 0) {
- CALL_DrawArrays(ctx->Exec, (mode, first[i], count[i]));
+ CALL_DrawArrays(ctx->CurrentDispatch, (mode, first[i], count[i]));
}
}
}
@@ -1243,7 +1243,7 @@ _mesa_MultiModeDrawArraysIBM( const GLenum * mode, const GLint * first,
for ( i = 0 ; i < primcount ; i++ ) {
if ( count[i] > 0 ) {
GLenum m = *((GLenum *) ((GLubyte *) mode + i * modestride));
- CALL_DrawArrays(ctx->Exec, ( m, first[i], count[i] ));
+ CALL_DrawArrays(ctx->CurrentDispatch, ( m, first[i], count[i] ));
}
}
}
@@ -1265,7 +1265,8 @@ _mesa_MultiModeDrawElementsIBM( const GLenum * mode, const GLsizei * count,
for ( i = 0 ; i < primcount ; i++ ) {
if ( count[i] > 0 ) {
GLenum m = *((GLenum *) ((GLubyte *) mode + i * modestride));
- CALL_DrawElements(ctx->Exec, ( m, count[i], type, indices[i] ));
+ CALL_DrawElements(ctx->CurrentDispatch, ( m, count[i], type,
+ indices[i] ));
}
}
}
diff --git a/mesalib/src/mesa/program/ir_to_mesa.cpp b/mesalib/src/mesa/program/ir_to_mesa.cpp
index 9919874a6..95987107f 100644
--- a/mesalib/src/mesa/program/ir_to_mesa.cpp
+++ b/mesalib/src/mesa/program/ir_to_mesa.cpp
@@ -2917,7 +2917,7 @@ get_mesa_program(struct gl_context *ctx,
set_branchtargets(&v, mesa_instructions, num_instructions);
- if (ctx->Shader.Flags & GLSL_DUMP) {
+ if (ctx->_Shader->Flags & GLSL_DUMP) {
fprintf(stderr, "\n");
fprintf(stderr, "GLSL IR for linked %s program %d:\n", target_string,
shader_program->Name);
@@ -2953,7 +2953,7 @@ get_mesa_program(struct gl_context *ctx,
_mesa_reference_program(ctx, &shader->Program, prog);
- if ((ctx->Shader.Flags & GLSL_NO_OPT) == 0) {
+ if ((ctx->_Shader->Flags & GLSL_NO_OPT) == 0) {
_mesa_optimize_program(ctx, prog);
}
@@ -3096,7 +3096,7 @@ _mesa_glsl_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
}
}
- if (ctx->Shader.Flags & GLSL_DUMP) {
+ if (ctx->_Shader->Flags & GLSL_DUMP) {
if (!prog->LinkStatus) {
fprintf(stderr, "GLSL shader program %d failed to link\n", prog->Name);
}
diff --git a/mesalib/src/mesa/state_tracker/st_atom_clip.c b/mesalib/src/mesa/state_tracker/st_atom_clip.c
index 274b36a62..f82c1332a 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_clip.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_clip.c
@@ -52,7 +52,7 @@ static void update_clip( struct st_context *st )
/* if we have a vertex shader that writes clip vertex we need to pass
the pre-projection transformed coordinates into the driver. */
if (st->vp) {
- if (ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX])
+ if (ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX])
use_eye = TRUE;
}
diff --git a/mesalib/src/mesa/state_tracker/st_atom_constbuf.c b/mesalib/src/mesa/state_tracker/st_atom_constbuf.c
index a5013ed2c..7984bf742 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_constbuf.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_constbuf.c
@@ -219,7 +219,7 @@ static void st_bind_ubos(struct st_context *st,
static void bind_vs_ubos(struct st_context *st)
{
struct gl_shader_program *prog =
- st->ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX];
+ st->ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX];
if (!prog)
return;
@@ -239,7 +239,7 @@ const struct st_tracked_state st_bind_vs_ubos = {
static void bind_fs_ubos(struct st_context *st)
{
struct gl_shader_program *prog =
- st->ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT];
+ st->ctx->_Shader->CurrentProgram[MESA_SHADER_FRAGMENT];
if (!prog)
return;
@@ -259,7 +259,7 @@ const struct st_tracked_state st_bind_fs_ubos = {
static void bind_gs_ubos(struct st_context *st)
{
struct gl_shader_program *prog =
- st->ctx->Shader.CurrentProgram[MESA_SHADER_GEOMETRY];
+ st->ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY];
if (!prog)
return;
diff --git a/mesalib/src/mesa/state_tracker/st_atom_texture.c b/mesalib/src/mesa/state_tracker/st_atom_texture.c
index 75e6face4..c9bffce4f 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_texture.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_texture.c
@@ -50,91 +50,165 @@
/**
- * Combine depth texture mode with "swizzle" so that depth mode swizzling
- * takes place before texture swizzling, and return the resulting swizzle.
- * If the format is not a depth format, return "swizzle" unchanged.
- *
- * \param format PIPE_FORMAT_*.
- * \param swizzle Texture swizzle, a bitmask computed using MAKE_SWIZZLE4.
- * \param depthmode One of GL_LUMINANCE, GL_INTENSITY, GL_ALPHA, GL_RED.
+ * Return swizzle1(swizzle2)
*/
-static GLuint
-apply_depthmode(enum pipe_format format, GLuint swizzle, GLenum depthmode)
+static unsigned
+swizzle_swizzle(unsigned swizzle1, unsigned swizzle2)
{
- const struct util_format_description *desc =
- util_format_description(format);
- unsigned char swiz[4];
- unsigned i;
-
- if (desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS ||
- desc->swizzle[0] == UTIL_FORMAT_SWIZZLE_NONE) {
- /* Not a depth format. */
- return swizzle;
+ unsigned i, swz[4];
+
+ for (i = 0; i < 4; i++) {
+ unsigned s = GET_SWZ(swizzle1, i);
+ switch (s) {
+ case SWIZZLE_X:
+ case SWIZZLE_Y:
+ case SWIZZLE_Z:
+ case SWIZZLE_W:
+ swz[i] = GET_SWZ(swizzle2, s);
+ break;
+ case SWIZZLE_ZERO:
+ swz[i] = SWIZZLE_ZERO;
+ break;
+ case SWIZZLE_ONE:
+ swz[i] = SWIZZLE_ONE;
+ break;
+ default:
+ assert(!"Bad swizzle term");
+ swz[i] = SWIZZLE_X;
+ }
}
- for (i = 0; i < 4; i++)
- swiz[i] = GET_SWZ(swizzle, i);
+ return MAKE_SWIZZLE4(swz[0], swz[1], swz[2], swz[3]);
+}
- switch (depthmode) {
- case GL_LUMINANCE:
- /* Rewrite reads from W to ONE, and reads from XYZ to XXX. */
- for (i = 0; i < 4; i++)
- if (swiz[i] == SWIZZLE_W)
- swiz[i] = SWIZZLE_ONE;
- else if (swiz[i] < SWIZZLE_W)
- swiz[i] = SWIZZLE_X;
- break;
+/**
+ * Given a user-specified texture base format, the actual gallium texture
+ * format and the current GL_DEPTH_MODE, return a texture swizzle.
+ *
+ * Consider the case where the user requests a GL_RGB internal texture
+ * format the driver actually uses an RGBA format. The A component should
+ * be ignored and sampling from the texture should always return (r,g,b,1).
+ * But if we rendered to the texture we might have written A values != 1.
+ * By sampling the texture with a ".xyz1" swizzle we'll get the expected A=1.
+ * This function computes the texture swizzle needed to get the expected
+ * values.
+ *
+ * In the case of depth textures, the GL_DEPTH_MODE state determines the
+ * texture swizzle.
+ *
+ * This result must be composed with the user-specified swizzle to get
+ * the final swizzle.
+ */
+static unsigned
+compute_texture_format_swizzle(GLenum baseFormat, GLenum depthMode,
+ enum pipe_format actualFormat)
+{
+ switch (baseFormat) {
+ case GL_RGBA:
+ return SWIZZLE_XYZW;
+ case GL_RGB:
+ if (util_format_has_alpha(actualFormat))
+ return MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_Z, SWIZZLE_ONE);
+ else
+ return SWIZZLE_XYZW;
+ case GL_RG:
+ if (util_format_get_nr_components(actualFormat) > 2)
+ return MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_Y, SWIZZLE_ZERO, SWIZZLE_ONE);
+ else
+ return SWIZZLE_XYZW;
+ case GL_RED:
+ if (util_format_get_nr_components(actualFormat) > 1)
+ return MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_ZERO,
+ SWIZZLE_ZERO, SWIZZLE_ONE);
+ else
+ return SWIZZLE_XYZW;
+ case GL_ALPHA:
+ if (util_format_get_nr_components(actualFormat) > 1)
+ return MAKE_SWIZZLE4(SWIZZLE_ZERO, SWIZZLE_ZERO,
+ SWIZZLE_ZERO, SWIZZLE_W);
+ else
+ return SWIZZLE_XYZW;
+ case GL_LUMINANCE:
+ if (util_format_get_nr_components(actualFormat) > 1)
+ return MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_X, SWIZZLE_X, SWIZZLE_ONE);
+ else
+ return SWIZZLE_XYZW;
+ case GL_LUMINANCE_ALPHA:
+ if (util_format_get_nr_components(actualFormat) > 2)
+ return MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_X, SWIZZLE_X, SWIZZLE_W);
+ else
+ return SWIZZLE_XYZW;
+ case GL_INTENSITY:
+ if (util_format_get_nr_components(actualFormat) > 1)
+ return SWIZZLE_XXXX;
+ else
+ return SWIZZLE_XYZW;
+ case GL_STENCIL_INDEX:
+ return SWIZZLE_XYZW;
+ case GL_DEPTH_STENCIL:
+ /* fall-through */
+ case GL_DEPTH_COMPONENT:
+ /* Now examine the depth mode */
+ switch (depthMode) {
+ case GL_LUMINANCE:
+ return MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_X, SWIZZLE_X, SWIZZLE_ONE);
case GL_INTENSITY:
- /* Rewrite reads from XYZW to XXXX. */
- for (i = 0; i < 4; i++)
- if (swiz[i] <= SWIZZLE_W)
- swiz[i] = SWIZZLE_X;
- break;
-
+ return MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_X, SWIZZLE_X, SWIZZLE_X);
case GL_ALPHA:
- /* Rewrite reads from W to X, and reads from XYZ to 000. */
- for (i = 0; i < 4; i++)
- if (swiz[i] == SWIZZLE_W)
- swiz[i] = SWIZZLE_X;
- else if (swiz[i] < SWIZZLE_W)
- swiz[i] = SWIZZLE_ZERO;
- break;
+ return MAKE_SWIZZLE4(SWIZZLE_ZERO, SWIZZLE_ZERO,
+ SWIZZLE_ZERO, SWIZZLE_X);
case GL_RED:
- /* Rewrite reads W to 1, XYZ to X00 */
- for (i = 0; i < 4; i++)
- if (swiz[i] == SWIZZLE_W)
- swiz[i] = SWIZZLE_ONE;
- else if (swiz[i] == SWIZZLE_Y || swiz[i] == SWIZZLE_Z)
- swiz[i] = SWIZZLE_ZERO;
- break;
+ return MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_ZERO,
+ SWIZZLE_ZERO, SWIZZLE_ONE);
+ default:
+ assert(!"Unexpected depthMode");
+ return SWIZZLE_XYZW;
+ }
+ default:
+ assert(!"Unexpected baseFormat");
+ return SWIZZLE_XYZW;
}
-
- return MAKE_SWIZZLE4(swiz[0], swiz[1], swiz[2], swiz[3]);
}
+static unsigned
+get_texture_format_swizzle(const struct st_texture_object *stObj)
+{
+ const struct gl_texture_image *texImage =
+ stObj->base.Image[0][stObj->base.BaseLevel];
+ unsigned tex_swizzle;
+
+ if (texImage) {
+ tex_swizzle = compute_texture_format_swizzle(texImage->_BaseFormat,
+ stObj->base.DepthMode,
+ stObj->pt->format);
+ }
+ else {
+ tex_swizzle = SWIZZLE_XYZW;
+ }
+
+ /* Combine the texture format swizzle with user's swizzle */
+ return swizzle_swizzle(stObj->base._Swizzle, tex_swizzle);
+}
+
+
/**
- * Return TRUE if the swizzling described by "swizzle" and
- * "depthmode" (for depth textures only) is different from the swizzling
- * set in the given sampler view.
+ * Return TRUE if the texture's sampler view swizzle is equal to
+ * the texture's swizzle.
*
- * \param sv A sampler view.
- * \param swizzle Texture swizzle, a bitmask computed using MAKE_SWIZZLE4.
- * \param depthmode One of GL_LUMINANCE, GL_INTENSITY, GL_ALPHA.
+ * \param stObj the st texture object,
*/
static boolean
-check_sampler_swizzle(struct pipe_sampler_view *sv,
- GLuint swizzle, GLenum depthmode)
+check_sampler_swizzle(const struct st_texture_object *stObj)
{
- swizzle = apply_depthmode(sv->texture->format, swizzle, depthmode);
-
- if ((sv->swizzle_r != GET_SWZ(swizzle, 0)) ||
- (sv->swizzle_g != GET_SWZ(swizzle, 1)) ||
- (sv->swizzle_b != GET_SWZ(swizzle, 2)) ||
- (sv->swizzle_a != GET_SWZ(swizzle, 3)))
- return TRUE;
- return FALSE;
+ const struct pipe_sampler_view *sv = stObj->sampler_view;
+ unsigned swizzle = get_texture_format_swizzle(stObj);
+
+ return ((sv->swizzle_r != GET_SWZ(swizzle, 0)) ||
+ (sv->swizzle_g != GET_SWZ(swizzle, 1)) ||
+ (sv->swizzle_b != GET_SWZ(swizzle, 2)) ||
+ (sv->swizzle_a != GET_SWZ(swizzle, 3)));
}
@@ -145,9 +219,7 @@ st_create_texture_sampler_view_from_stobj(struct pipe_context *pipe,
enum pipe_format format)
{
struct pipe_sampler_view templ;
- GLuint swizzle = apply_depthmode(stObj->pt->format,
- stObj->base._Swizzle,
- stObj->base.DepthMode);
+ unsigned swizzle = get_texture_format_swizzle(stObj);
u_sampler_view_default_template(&templ,
stObj->pt,
@@ -260,9 +332,7 @@ update_single_texture(struct st_context *st,
/* if sampler view has changed dereference it */
if (stObj->sampler_view) {
- if (check_sampler_swizzle(stObj->sampler_view,
- stObj->base._Swizzle,
- stObj->base.DepthMode) ||
+ if (check_sampler_swizzle(stObj) ||
(view_format != stObj->sampler_view->format) ||
stObj->base.BaseLevel != stObj->sampler_view->u.tex.first_level) {
pipe_sampler_view_release(pipe, &stObj->sampler_view);
diff --git a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
index 2b3636151..6119cc275 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -1364,7 +1364,7 @@ blit_copy_pixels(struct gl_context *ctx, GLint srcx, GLint srcy,
!ctx->Stencil.Enabled &&
!ctx->FragmentProgram.Enabled &&
!ctx->VertexProgram.Enabled &&
- !ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT] &&
+ !ctx->_Shader->CurrentProgram[MESA_SHADER_FRAGMENT] &&
ctx->DrawBuffer->_NumColorDrawBuffers == 1 &&
!ctx->Query.CondRenderQuery &&
!ctx->Query.CurrentOcclusionObject) {
diff --git a/mesalib/src/mesa/state_tracker/st_cb_queryobj.c b/mesalib/src/mesa/state_tracker/st_cb_queryobj.c
index 5186a5157..78a737094 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_queryobj.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_queryobj.c
@@ -141,7 +141,13 @@ st_BeginQuery(struct gl_context *ctx, struct gl_query_object *q)
stq->pq = pipe->create_query(pipe, type);
stq->type = type;
}
- pipe->begin_query(pipe, stq->pq);
+ if (stq->pq) {
+ pipe->begin_query(pipe, stq->pq);
+ }
+ else {
+ _mesa_error(ctx, GL_OUT_OF_MEMORY, "glBeginQuery");
+ return;
+ }
}
assert(stq->type == type);
}
@@ -162,7 +168,8 @@ st_EndQuery(struct gl_context *ctx, struct gl_query_object *q)
stq->type = PIPE_QUERY_TIMESTAMP;
}
- pipe->end_query(pipe, stq->pq);
+ if (stq->pq)
+ pipe->end_query(pipe, stq->pq);
}
@@ -171,6 +178,13 @@ get_query_result(struct pipe_context *pipe,
struct st_query_object *stq,
boolean wait)
{
+ if (!stq->pq) {
+ /* Only needed in case we failed to allocate the gallium query earlier.
+ * Return TRUE so we don't spin on this forever.
+ */
+ return TRUE;
+ }
+
if (!pipe->get_query_result(pipe,
stq->pq,
wait,
diff --git a/mesalib/src/mesa/state_tracker/st_context.c b/mesalib/src/mesa/state_tracker/st_context.c
index 0ffc76263..807a86fdf 100644
--- a/mesalib/src/mesa/state_tracker/st_context.c
+++ b/mesalib/src/mesa/state_tracker/st_context.c
@@ -33,6 +33,7 @@
#include "main/shaderobj.h"
#include "main/version.h"
#include "main/vtxfmt.h"
+#include "main/hash.h"
#include "program/prog_cache.h"
#include "vbo/vbo.h"
#include "glapi/glapi.h"
@@ -66,6 +67,7 @@
#include "st_gen_mipmap.h"
#include "st_program.h"
#include "st_vdpau.h"
+#include "st_texture.h"
#include "pipe/p_context.h"
#include "util/u_inlines.h"
#include "util/u_upload_mgr.h"
@@ -280,6 +282,19 @@ static void st_destroy_context_priv( struct st_context *st )
free( st );
}
+
+/**
+ * Callback to release the sampler view attached to a texture object.
+ * Called by _mesa_HashWalk().
+ */
+static void
+destroy_tex_sampler_cb(GLuint id, void *data, void *userData)
+{
+ struct gl_texture_object *texObj = (struct gl_texture_object *) data;
+ struct st_context *st = (struct st_context *) userData;
+
+ st_texture_release_sampler_view(st, st_texture_object(texObj));
+}
void st_destroy_context( struct st_context *st )
{
@@ -288,6 +303,8 @@ void st_destroy_context( struct st_context *st )
struct gl_context *ctx = st->ctx;
GLuint i;
+ _mesa_HashWalk(ctx->Shared->TexObjects, destroy_tex_sampler_cb, st);
+
/* need to unbind and destroy CSO objects before anything else */
cso_release_all(st->cso_context);
diff --git a/mesalib/src/mesa/state_tracker/st_draw.c b/mesalib/src/mesa/state_tracker/st_draw.c
index dba5870a0..c8189faad 100644
--- a/mesalib/src/mesa/state_tracker/st_draw.c
+++ b/mesalib/src/mesa/state_tracker/st_draw.c
@@ -131,7 +131,7 @@ setup_index_buffer(struct st_context *st,
static void
check_uniforms(struct gl_context *ctx)
{
- struct gl_shader_program **shProg = ctx->Shader.CurrentProgram;
+ struct gl_shader_program **shProg = ctx->_Shader->CurrentProgram;
unsigned j;
for (j = 0; j < 3; j++) {
diff --git a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index a9e75d8a6..f019a55c2 100644
--- a/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/mesalib/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -5198,7 +5198,7 @@ get_mesa_program(struct gl_context *ctx,
/* Write the END instruction. */
v->emit(NULL, TGSI_OPCODE_END);
- if (ctx->Shader.Flags & GLSL_DUMP) {
+ if (ctx->_Shader->Flags & GLSL_DUMP) {
printf("\n");
printf("GLSL IR for linked %s program %d:\n",
_mesa_shader_stage_to_string(shader->Stage),
diff --git a/mesalib/src/mesa/state_tracker/st_program.c b/mesalib/src/mesa/state_tracker/st_program.c
index 692a57008..2f0ec32f5 100644
--- a/mesalib/src/mesa/state_tracker/st_program.c
+++ b/mesalib/src/mesa/state_tracker/st_program.c
@@ -1204,7 +1204,7 @@ st_get_gp_variant(struct st_context *st,
void
st_print_shaders(struct gl_context *ctx)
{
- struct gl_shader_program **shProg = ctx->Shader.CurrentProgram;
+ struct gl_shader_program **shProg = ctx->_Shader->CurrentProgram;
unsigned j;
for (j = 0; j < 3; j++) {
diff --git a/mesalib/src/mesa/state_tracker/st_texture.c b/mesalib/src/mesa/state_tracker/st_texture.c
index b5ccc76d4..a3b345356 100644
--- a/mesalib/src/mesa/state_tracker/st_texture.c
+++ b/mesalib/src/mesa/state_tracker/st_texture.c
@@ -412,3 +412,10 @@ st_create_color_map_texture(struct gl_context *ctx)
return pt;
}
+void
+st_texture_release_sampler_view(struct st_context *st,
+ struct st_texture_object *stObj)
+{
+ if (stObj->sampler_view && stObj->sampler_view->context == st->pipe)
+ pipe_sampler_view_reference(&stObj->sampler_view, NULL);
+}
diff --git a/mesalib/src/mesa/state_tracker/st_texture.h b/mesalib/src/mesa/state_tracker/st_texture.h
index bce2a0934..b4a27a00a 100644
--- a/mesalib/src/mesa/state_tracker/st_texture.h
+++ b/mesalib/src/mesa/state_tracker/st_texture.h
@@ -227,4 +227,8 @@ st_texture_image_copy(struct pipe_context *pipe,
extern struct pipe_resource *
st_create_color_map_texture(struct gl_context *ctx);
+extern void
+st_texture_release_sampler_view(struct st_context *st,
+ struct st_texture_object *stObj);
+
#endif
diff --git a/mesalib/src/mesa/swrast/s_fragprog.c b/mesalib/src/mesa/swrast/s_fragprog.c
index fa45fa97a..21699f3ea 100644
--- a/mesalib/src/mesa/swrast/s_fragprog.c
+++ b/mesalib/src/mesa/swrast/s_fragprog.c
@@ -182,7 +182,7 @@ init_machine(struct gl_context *ctx, struct gl_program_machine *machine,
machine->Samplers = program->Base.SamplerUnits;
/* if running a GLSL program (not ARB_fragment_program) */
- if (ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT]) {
+ if (ctx->_Shader->CurrentProgram[MESA_SHADER_FRAGMENT]) {
/* Store front/back facing value */
machine->Attribs[VARYING_SLOT_FACE][col][0] = 1.0F - span->facing;
}
diff --git a/packages.txt b/packages.txt
index 56a8e44ca..c5e5d8657 100644
--- a/packages.txt
+++ b/packages.txt
@@ -54,7 +54,7 @@ libXau git version
libXaw-1.0.12
libXdmcp git version
libXext git version
-libXfont-1.4.6
+libXfont-1.4.7
libXft git version
libXinerama git version
libXmu git version
@@ -90,7 +90,7 @@ xineramaproto-1.2.1
xkbcomp git version
xkeyboard-config git version
xrdb git version
-xproto-7.0.24
+xproto-7.0.25
xserver git version
xtrans git version
xwininfo git version
diff --git a/xorg-server/dix/gc.c b/xorg-server/dix/gc.c
index 1fb577e53..d7657c210 100644
--- a/xorg-server/dix/gc.c
+++ b/xorg-server/dix/gc.c
@@ -261,12 +261,14 @@ ChangeGC(ClientPtr client, GC * pGC, BITS32 mask, ChangeGCValPtr pUnion)
case GCStipple:
NEXT_PTR(PixmapPtr, pPixmap);
- if ((pPixmap->drawable.depth != 1) ||
- (pPixmap->drawable.pScreen != pGC->pScreen)) {
+ if (pPixmap && ((pPixmap->drawable.depth != 1) ||
+ (pPixmap->drawable.pScreen != pGC->pScreen)))
+ {
error = BadMatch;
}
else {
- pPixmap->refcnt++;
+ if (pPixmap)
+ pPixmap->refcnt++;
if (pGC->stipple)
(*pGC->pScreen->DestroyPixmap) (pGC->stipple);
pGC->stipple = pPixmap;
diff --git a/xorg-server/fb/fbblt.c b/xorg-server/fb/fbblt.c
index 72a05f61a..c615106d1 100644
--- a/xorg-server/fb/fbblt.c
+++ b/xorg-server/fb/fbblt.c
@@ -56,42 +56,48 @@ fbBlt(FbBits * srcLine,
int n, nmiddle;
Bool destInvarient;
int startbyte, endbyte;
- int careful;
FbDeclareMergeRop();
+ if (alu == GXcopy && pm == FB_ALLONES &&
+ !(srcX & 7) && !(dstX & 7) && !(width & 7))
+ {
+ CARD8 *src_byte = (CARD8 *) srcLine + (srcX >> 3);
+ CARD8 *dst_byte = (CARD8 *) dstLine + (dstX >> 3);
+ FbStride src_byte_stride = srcStride << (FB_SHIFT - 3);
+ FbStride dst_byte_stride = dstStride << (FB_SHIFT - 3);
+ int width_byte = (width >> 3);
+
+ /* Make sure there's no overlap; we can't use memcpy in that
+ * case as it's not well defined, so fall through to the
+ * general code
+ */
+ if (src_byte + width_byte <= dst_byte ||
+ dst_byte + width_byte <= src_byte)
+ {
+ int i;
+
+ if (!upsidedown)
+ for (i = 0; i < height; i++)
+ MEMCPY_WRAPPED(dst_byte + i * dst_byte_stride,
+ src_byte + i * src_byte_stride,
+ width_byte);
+ else
+ for (i = height - 1; i >= 0; i--)
+ MEMCPY_WRAPPED(dst_byte + i * dst_byte_stride,
+ src_byte + i * src_byte_stride,
+ width_byte);
+
+ return;
+ }
+ }
+
if (bpp == 24 && !FbCheck24Pix(pm)) {
fbBlt24(srcLine, srcStride, srcX, dstLine, dstStride, dstX,
width, height, alu, pm, reverse, upsidedown);
return;
}
- careful = !((srcLine < dstLine && srcLine + width * (bpp >> 3) > dstLine) ||
- (dstLine < srcLine && dstLine + width * (bpp >> 3) > srcLine))
- || (bpp & 7);
-
- if (alu == GXcopy && pm == FB_ALLONES && !careful &&
- !(srcX & 7) && !(dstX & 7) && !(width & 7)) {
- int i;
- CARD8 *tmpsrc = (CARD8 *) srcLine;
- CARD8 *tmpdst = (CARD8 *) dstLine;
-
- srcStride *= sizeof(FbBits);
- dstStride *= sizeof(FbBits);
- width >>= 3;
- tmpsrc += (srcX >> 3);
- tmpdst += (dstX >> 3);
-
- if (!upsidedown)
- for (i = 0; i < height; i++)
- MEMCPY_WRAPPED(tmpdst + i * dstStride, tmpsrc + i * srcStride, width);
- else
- for (i = height - 1; i >= 0; i--)
- MEMCPY_WRAPPED(tmpdst + i * dstStride, tmpsrc + i * srcStride, width);
-
- return;
- }
-
FbInitializeMergeRop(alu, pm);
destInvarient = FbDestInvarientMergeRop();
if (upsidedown) {
diff --git a/xorg-server/glamor/Makefile.am b/xorg-server/glamor/Makefile.am
index ffc8c23d8..8555e4087 100644
--- a/xorg-server/glamor/Makefile.am
+++ b/xorg-server/glamor/Makefile.am
@@ -20,8 +20,11 @@ libglamor_la_SOURCES = \
glamor_polylines.c \
glamor_putimage.c \
glamor_setspans.c \
+ glamor_segment.c \
glamor_render.c \
glamor_gradient.c \
+ glamor_program.c \
+ glamor_transform.c \
glamor_trapezoid.c \
glamor_tile.c \
glamor_triangles.c\
@@ -29,7 +32,7 @@ libglamor_la_SOURCES = \
glamor_getimage.c\
glamor_copyplane.c\
glamor_glyphblt.c\
- glamor_polyops.c\
+ glamor_points.c\
glamor_priv.h\
glamor_pixmap.c\
glamor_largepixmap.c\
diff --git a/xorg-server/glamor/glamor.c b/xorg-server/glamor/glamor.c
index 0f7d68b70..30944326b 100644
--- a/xorg-server/glamor/glamor.c
+++ b/xorg-server/glamor/glamor.c
@@ -76,6 +76,10 @@ glamor_set_pixmap_type(PixmapPtr pixmap, glamor_pixmap_type_t type)
pixmap_priv->base.glamor_priv = glamor_priv;
}
pixmap_priv->type = type;
+ pixmap_priv->base.box.x1 = 0;
+ pixmap_priv->base.box.x2 = pixmap->drawable.width;
+ pixmap_priv->base.box.y1 = 0;
+ pixmap_priv->base.box.y2 = pixmap->drawable.height;
}
_X_EXPORT void
@@ -178,8 +182,14 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
pitch = (((w * pixmap->drawable.bitsPerPixel + 7) / 8) + 3) & ~3;
screen->ModifyPixmapHeader(pixmap, w, h, 0, 0, pitch, NULL);
- if (type == GLAMOR_MEMORY_MAP || glamor_check_fbo_size(glamor_priv, w, h)) {
+ if (type == GLAMOR_MEMORY_MAP || usage == GLAMOR_CREATE_NO_LARGE ||
+ glamor_check_fbo_size(glamor_priv, w, h))
+ {
pixmap_priv->type = type;
+ pixmap_priv->base.box.x1 = 0;
+ pixmap_priv->base.box.y1 = 0;
+ pixmap_priv->base.box.x2 = w;
+ pixmap_priv->base.box.y2 = h;
fbo = glamor_create_fbo(glamor_priv, w, h, format, usage);
}
else {
@@ -341,7 +351,7 @@ glamor_init(ScreenPtr screen, unsigned int flags)
else
glamor_priv->gl_flavor = GLAMOR_GL_ES2;
- gl_version = glamor_gl_get_version();
+ gl_version = epoxy_gl_version();
/* We'd like to require GL_ARB_map_buffer_range or
* GL_OES_map_buffer_range, since it offers more information to
@@ -357,29 +367,31 @@ glamor_init(ScreenPtr screen, unsigned int flags)
* Windows with Intel 4-series (G45) graphics or older.
*/
if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) {
- if (gl_version < GLAMOR_GL_VERSION_ENCODE(1, 3)) {
- ErrorF("Require OpenGL version 1.3 or later.\n");
+ if (gl_version < 21) {
+ ErrorF("Require OpenGL version 2.1 or later.\n");
goto fail;
}
} else {
- if (gl_version < GLAMOR_GL_VERSION_ENCODE(2, 0)) {
+ if (gl_version < 20) {
ErrorF("Require Open GLES2.0 or later.\n");
goto fail;
}
- if (!glamor_gl_has_extension("GL_EXT_texture_format_BGRA8888")) {
+ if (!epoxy_has_gl_extension("GL_EXT_texture_format_BGRA8888")) {
ErrorF("GL_EXT_texture_format_BGRA8888 required\n");
goto fail;
}
}
- glamor_priv->has_khr_debug = glamor_gl_has_extension("GL_KHR_debug");
+ glamor_priv->has_khr_debug = epoxy_has_gl_extension("GL_KHR_debug");
glamor_priv->has_pack_invert =
- glamor_gl_has_extension("GL_MESA_pack_invert");
+ epoxy_has_gl_extension("GL_MESA_pack_invert");
glamor_priv->has_fbo_blit =
- glamor_gl_has_extension("GL_EXT_framebuffer_blit");
+ epoxy_has_gl_extension("GL_EXT_framebuffer_blit");
+ glamor_priv->has_map_buffer_range =
+ epoxy_has_gl_extension("GL_ARB_map_buffer_range");
glamor_priv->has_buffer_storage =
- glamor_gl_has_extension("GL_ARB_buffer_storage");
+ epoxy_has_gl_extension("GL_ARB_buffer_storage");
glGetIntegerv(GL_MAX_RENDERBUFFER_SIZE, &glamor_priv->max_fbo_size);
#ifdef MAX_FBO_SIZE
glamor_priv->max_fbo_size = MAX_FBO_SIZE;
diff --git a/xorg-server/glamor/glamor.h b/xorg-server/glamor/glamor.h
index d05d2f4ea..11ec49361 100644
--- a/xorg-server/glamor/glamor.h
+++ b/xorg-server/glamor/glamor.h
@@ -140,9 +140,16 @@ extern _X_EXPORT void glamor_set_pixmap_type(PixmapPtr pixmap,
glamor_pixmap_type_t type);
extern _X_EXPORT void glamor_destroy_textured_pixmap(PixmapPtr pixmap);
extern _X_EXPORT void glamor_block_handler(ScreenPtr screen);
+
extern _X_EXPORT PixmapPtr glamor_create_pixmap(ScreenPtr screen, int w, int h,
int depth, unsigned int usage);
+#define GLAMOR_CREATE_PIXMAP_CPU 0x100
+#define GLAMOR_CREATE_PIXMAP_FIXUP 0x101
+#define GLAMOR_CREATE_FBO_NO_FBO 0x103
+#define GLAMOR_CREATE_PIXMAP_MAP 0x104
+#define GLAMOR_CREATE_NO_LARGE 0x105
+
/* @glamor_egl_exchange_buffers: Exchange the underlying buffers(KHR image,fbo).
*
* @front: front pixmap.
diff --git a/xorg-server/glamor/glamor_core.c b/xorg-server/glamor/glamor_core.c
index 6c0b3c834..5711be72f 100644
--- a/xorg-server/glamor/glamor_core.c
+++ b/xorg-server/glamor/glamor_core.c
@@ -559,48 +559,3 @@ glamor_bitmap_to_region(PixmapPtr pixmap)
return ret;
}
-/* Borrow from cairo. */
-Bool
-glamor_gl_has_extension(const char *extension)
-{
- const char *pext;
- int ext_len;
-
- ext_len = strlen(extension);
-
- pext = (const char *) glGetString(GL_EXTENSIONS);
-
- if (pext == NULL || extension == NULL)
- return FALSE;
-
- while ((pext = strstr(pext, extension)) != NULL) {
- if (pext[ext_len] == ' ' || pext[ext_len] == '\0')
- return TRUE;
- pext += ext_len;
- }
- return FALSE;
-}
-
-int
-glamor_gl_get_version(void)
-{
- int major, minor;
- const char *version = (const char *) glGetString(GL_VERSION);
- const char *dot = version == NULL ? NULL : strchr(version, '.');
- const char *major_start = dot;
-
- /* Sanity check */
- if (dot == NULL || dot == version || *(dot + 1) == '\0') {
- major = 0;
- minor = 0;
- }
- else {
- /* Find the start of the major version in the string */
- while (major_start > version && *major_start != ' ')
- --major_start;
- major = strtol(major_start, NULL, 10);
- minor = strtol(dot + 1, NULL, 10);
- }
-
- return GLAMOR_GL_VERSION_ENCODE(major, minor);
-}
diff --git a/xorg-server/glamor/glamor_fbo.c b/xorg-server/glamor/glamor_fbo.c
index 640b6fd81..4f6da67fb 100644
--- a/xorg-server/glamor/glamor_fbo.c
+++ b/xorg-server/glamor/glamor_fbo.c
@@ -361,9 +361,6 @@ glamor_create_fbo(glamor_screen_private *glamor_priv,
GLint tex = 0;
int cache_flag;
- if (!glamor_check_fbo_size(glamor_priv, w, h))
- return NULL;
-
if (flag == GLAMOR_CREATE_FBO_NO_FBO)
goto new_fbo;
diff --git a/xorg-server/glamor/glamor_fill.c b/xorg-server/glamor/glamor_fill.c
index 7461b62fa..2fa726e72 100644
--- a/xorg-server/glamor/glamor_fill.c
+++ b/xorg-server/glamor/glamor_fill.c
@@ -218,9 +218,6 @@ _glamor_solid_boxes(PixmapPtr pixmap, BoxPtr box, int nbox, float *color)
}
}
- if (_X_UNLIKELY(nbox > 1))
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, glamor_priv->ebo);
-
glVertexAttribPointer(GLAMOR_VERTEX_POS, 2, GL_FLOAT,
GL_FALSE, 2 * sizeof(float), vertices);
glEnableVertexAttribArray(GLAMOR_VERTEX_POS);
diff --git a/xorg-server/glamor/glamor_glyphs.c b/xorg-server/glamor/glamor_glyphs.c
index 2b2c735d4..a04ae8261 100644
--- a/xorg-server/glamor/glamor_glyphs.c
+++ b/xorg-server/glamor/glamor_glyphs.c
@@ -332,7 +332,7 @@ glamor_realize_glyph_caches(ScreenPtr pScreen)
pixmap = pScreen->CreatePixmap(pScreen,
CACHE_PICTURE_SIZE,
CACHE_PICTURE_SIZE + MASK_CACHE_MAX_SIZE,
- depth, 0);
+ depth, GLAMOR_CREATE_NO_LARGE);
if (!pixmap)
goto bail;
diff --git a/xorg-server/glamor/glamor_gradient.c b/xorg-server/glamor/glamor_gradient.c
index f77d6a8e3..c24f3427f 100644
--- a/xorg-server/glamor/glamor_gradient.c
+++ b/xorg-server/glamor/glamor_gradient.c
@@ -247,7 +247,6 @@ _glamor_create_radial_gradient_program(ScreenPtr screen, int stops_count,
"{\n"\
" float t = 0.0;\n"\
" float sqrt_value;\n"\
- " int revserse = 0;\n"\
" t_invalid = 0;\n"\
" \n"\
" vec3 tmp = vec3(source_texture.x, source_texture.y, 1.0);\n"\
@@ -295,30 +294,11 @@ _glamor_create_radial_gradient_program(ScreenPtr screen, int stops_count,
" }\n"\
" \n"\
" if(repeat_type == %d){\n" /* repeat normal*/\
- " while(t > 1.0) \n"\
- " t = t - 1.0; \n"\
- " while(t < 0.0) \n"\
- " t = t + 1.0; \n"\
+ " t = fract(t);\n"\
" }\n"\
" \n"\
" if(repeat_type == %d) {\n" /* repeat reflect*/\
- " while(t > 1.0) {\n"\
- " t = t - 1.0; \n"\
- " if(revserse == 0)\n"\
- " revserse = 1;\n"\
- " else\n"\
- " revserse = 0;\n"\
- " }\n"\
- " while(t < 0.0) {\n"\
- " t = t + 1.0; \n"\
- " if(revserse == 0)\n"\
- " revserse = 1;\n"\
- " else\n"\
- " revserse = 0;\n"\
- " }\n"\
- " if(revserse == 1) {\n"\
- " t = 1.0 - t; \n"\
- " }\n"\
+ " t = abs(fract(t * 0.5 + 0.5) * 2.0 - 1.0);\n"\
" }\n"\
" \n"\
" return t;\n"\
@@ -492,7 +472,6 @@ _glamor_create_linear_gradient_program(ScreenPtr screen, int stops_count,
" vec4 stop_color_before;\n"\
" vec4 stop_color_after;\n"\
" float new_alpha; \n"\
- " int revserse = 0;\n"\
" vec4 gradient_color;\n"\
" float percentage; \n"\
" vec3 source_texture_trans = transform_mat * tmp;\n"\
@@ -512,30 +491,11 @@ _glamor_create_linear_gradient_program(ScreenPtr screen, int stops_count,
" distance = distance - _p1_distance; \n"\
" \n"\
" if(repeat_type == %d){\n" /* repeat normal*/\
- " while(distance > _pt_distance) \n"\
- " distance = distance - (_pt_distance); \n"\
- " while(distance < 0.0) \n"\
- " distance = distance + (_pt_distance); \n"\
+ " distance = mod(distance, _pt_distance);\n"\
" }\n"\
" \n"\
" if(repeat_type == %d) {\n" /* repeat reflect*/\
- " while(distance > _pt_distance) {\n"\
- " distance = distance - (_pt_distance); \n"\
- " if(revserse == 0)\n"\
- " revserse = 1;\n"\
- " else\n"\
- " revserse = 0;\n"\
- " }\n"\
- " while(distance < 0.0) {\n"\
- " distance = distance + (_pt_distance); \n"\
- " if(revserse == 0)\n"\
- " revserse = 1;\n"\
- " else\n"\
- " revserse = 0;\n"\
- " }\n"\
- " if(revserse == 1) {\n"\
- " distance = (_pt_distance) - distance; \n"\
- " }\n"\
+ " distance = abs(mod(distance + _pt_distance, 2.0 * _pt_distance) - _pt_distance);\n"\
" }\n"\
" \n"\
" len_percentage = distance/(_pt_distance);\n"\
@@ -1160,9 +1120,6 @@ glamor_generate_radial_gradient_picture(ScreenPtr screen,
free(stop_colors);
}
- glBindBuffer(GL_ARRAY_BUFFER, 0);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
-
glDisableVertexAttribArray(GLAMOR_VERTEX_POS);
glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE);
@@ -1181,9 +1138,6 @@ glamor_generate_radial_gradient_picture(ScreenPtr screen,
free(stop_colors);
}
- glBindBuffer(GL_ARRAY_BUFFER, 0);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
-
glDisableVertexAttribArray(GLAMOR_VERTEX_POS);
glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE);
glamor_put_context(glamor_priv);
@@ -1511,9 +1465,6 @@ glamor_generate_linear_gradient_picture(ScreenPtr screen,
free(stop_colors);
}
- glBindBuffer(GL_ARRAY_BUFFER, 0);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
-
glDisableVertexAttribArray(GLAMOR_VERTEX_POS);
glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE);
@@ -1532,9 +1483,6 @@ glamor_generate_linear_gradient_picture(ScreenPtr screen,
free(stop_colors);
}
- glBindBuffer(GL_ARRAY_BUFFER, 0);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
-
glDisableVertexAttribArray(GLAMOR_VERTEX_POS);
glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE);
glamor_put_context(glamor_priv);
diff --git a/xorg-server/glamor/glamor_largepixmap.c b/xorg-server/glamor/glamor_largepixmap.c
index b8c064038..b3a8d5d20 100644
--- a/xorg-server/glamor/glamor_largepixmap.c
+++ b/xorg-server/glamor/glamor_largepixmap.c
@@ -1015,7 +1015,6 @@ glamor_composite_largepixmap_region(CARD8 op,
INT16 x_dest, INT16 y_dest,
CARD16 width, CARD16 height)
{
- glamor_screen_private *glamor_priv;
glamor_pixmap_clipped_regions *clipped_dest_regions;
glamor_pixmap_clipped_regions *clipped_source_regions;
glamor_pixmap_clipped_regions *clipped_mask_regions;
@@ -1044,9 +1043,8 @@ glamor_composite_largepixmap_region(CARD8 op,
else
mask_repeat_type = RepeatNone;
- glamor_priv = dest_pixmap_priv->base.glamor_priv;
- fixed_block_width = glamor_priv->max_fbo_size;
- fixed_block_height = glamor_priv->max_fbo_size;
+ fixed_block_width = dest_pixmap_priv->large.block_w;
+ fixed_block_height = dest_pixmap_priv->large.block_h;
/* If we got an totally out-of-box region for a source or mask
* region without repeat, we need to set it as null_source and
* give it a solid color (0,0,0,0). */
@@ -1112,8 +1110,8 @@ glamor_composite_largepixmap_region(CARD8 op,
/*compute the correct block width and height whose transformed source/mask
*region can fit into one texture.*/
- if (force_clip || fixed_block_width < glamor_priv->max_fbo_size
- || fixed_block_height < glamor_priv->max_fbo_size)
+ if (force_clip || fixed_block_width < dest_pixmap_priv->large.block_w
+ || fixed_block_height < dest_pixmap_priv->large.block_h)
clipped_dest_regions =
glamor_compute_clipped_regions_ext(dest_pixmap_priv, region,
&n_dest_regions,
diff --git a/xorg-server/glamor/glamor_pixmap.c b/xorg-server/glamor/glamor_pixmap.c
index 615faad33..891ecdd37 100644
--- a/xorg-server/glamor/glamor_pixmap.c
+++ b/xorg-server/glamor/glamor_pixmap.c
@@ -1013,10 +1013,9 @@ glamor_upload_sub_pixmap_to_texture(PixmapPtr pixmap, int x, int y, int w,
clipped_regions =
glamor_compute_clipped_regions_ext(pixmap_priv, &region,
&n_region,
- pixmap_priv->base.
- glamor_priv->max_fbo_size,
- pixmap_priv->base.
- glamor_priv->max_fbo_size, 0,
+ pixmap_priv->large.block_w,
+ pixmap_priv->large.block_h,
+ 0,
0);
DEBUGF("prepare upload %dx%d to a large pixmap %p\n", w, h, pixmap);
for (i = 0; i < n_region; i++) {
@@ -1374,10 +1373,9 @@ glamor_download_sub_pixmap_to_cpu(PixmapPtr pixmap, int x, int y, int w, int h,
clipped_regions =
glamor_compute_clipped_regions_ext(pixmap_priv, &region,
&n_region,
- pixmap_priv->base.
- glamor_priv->max_fbo_size,
- pixmap_priv->base.
- glamor_priv->max_fbo_size, 0,
+ pixmap_priv->large.block_w,
+ pixmap_priv->large.block_h,
+ 0,
0);
DEBUGF("start download large pixmap %p %dx%d \n", pixmap, w, h);
diff --git a/xorg-server/glamor/glamor_points.c b/xorg-server/glamor/glamor_points.c
new file mode 100644
index 000000000..5399f96e8
--- /dev/null
+++ b/xorg-server/glamor/glamor_points.c
@@ -0,0 +1,129 @@
+/*
+ * Copyright © 2009 Intel Corporation
+ * Copyright © 1998 Keith Packard
+ *
+ * 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:
+ * Zhigang Gong <zhigang.gong@linux.intel.com>
+ *
+ */
+
+#include "glamor_priv.h"
+#include "glamor_transform.h"
+
+static const glamor_facet glamor_facet_point = {
+ .name = "poly_point",
+ .vs_vars = "attribute vec2 primitive;\n",
+ .vs_exec = GLAMOR_POS(gl_Position, primitive),
+};
+
+Bool
+glamor_poly_point_nf(DrawablePtr drawable, GCPtr gc, int mode, int npt, DDXPointPtr ppt)
+{
+ ScreenPtr screen = drawable->pScreen;
+ glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
+ PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable);
+ glamor_program *prog = &glamor_priv->point_prog;
+ glamor_pixmap_private *pixmap_priv;
+ int off_x, off_y;
+ GLshort *vbo_ppt;
+ char *vbo_offset;
+ int box_x, box_y;
+
+ pixmap_priv = glamor_get_pixmap_private(pixmap);
+ if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv))
+ goto bail;
+
+ glamor_get_context(glamor_priv);
+
+ if (prog->failed)
+ goto bail_ctx;
+
+ if (!prog->prog) {
+ if (!glamor_build_program(screen, prog,
+ &glamor_facet_point,
+ &glamor_fill_solid))
+ goto bail_ctx;
+ }
+
+ if (!glamor_use_program(pixmap, gc, prog, NULL))
+ goto bail_ctx;
+
+ vbo_ppt = glamor_get_vbo_space(screen, npt * (2 * sizeof (INT16)), &vbo_offset);
+ glEnableVertexAttribArray(GLAMOR_VERTEX_POS);
+ glVertexAttribPointer(GLAMOR_VERTEX_POS, 2, GL_SHORT, GL_FALSE, 0, vbo_offset);
+ if (mode == CoordModePrevious) {
+ int n = npt;
+ INT16 x = 0, y = 0;
+ while (n--) {
+ vbo_ppt[0] = (x += ppt->x);
+ vbo_ppt[1] = (y += ppt->y);
+ vbo_ppt += 2;
+ ppt++;
+ }
+ } else
+ memcpy(vbo_ppt, ppt, npt * (2 * sizeof (INT16)));
+ glamor_put_vbo_space(screen);
+
+ glEnable(GL_SCISSOR_TEST);
+
+ glamor_pixmap_loop(pixmap_priv, box_x, box_y) {
+ int nbox = RegionNumRects(gc->pCompositeClip);
+ BoxPtr box = RegionRects(gc->pCompositeClip);
+
+ glamor_set_destination_drawable(drawable, box_x, box_y, TRUE, TRUE, prog->matrix_uniform, &off_x, &off_y);
+
+ while (nbox--) {
+ glScissor(box->x1 + off_x,
+ box->y1 + off_y,
+ box->x2 - box->x1,
+ box->y2 - box->y1);
+ box++;
+ glDrawArrays(GL_POINTS, 0, npt);
+ }
+ }
+
+ glDisable(GL_SCISSOR_TEST);
+ glDisable(GL_COLOR_LOGIC_OP);
+ glDisableVertexAttribArray(GLAMOR_VERTEX_POS);
+
+ glamor_put_context(glamor_priv);
+
+ glamor_priv->state = RENDER_STATE;
+ glamor_priv->render_idle_cnt = 0;
+
+ return TRUE;
+
+bail_ctx:
+ glDisable(GL_COLOR_LOGIC_OP);
+ glamor_put_context(glamor_priv);
+bail:
+ return FALSE;
+}
+
+void
+glamor_poly_point(DrawablePtr drawable, GCPtr gc, int mode, int npt,
+ DDXPointPtr ppt)
+{
+ if (glamor_poly_point_nf(drawable, gc, mode, npt, ppt))
+ return;
+ miPolyPoint(drawable, gc, mode, npt, ppt);
+}
diff --git a/xorg-server/glamor/glamor_polyops.c b/xorg-server/glamor/glamor_polyops.c
deleted file mode 100644
index 1484d80f1..000000000
--- a/xorg-server/glamor/glamor_polyops.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright © 2009 Intel Corporation
- * Copyright © 1998 Keith Packard
- *
- * 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:
- * Zhigang Gong <zhigang.gong@linux.intel.com>
- *
- */
-
-#include "glamor_priv.h"
-
-static Bool
-_glamor_poly_point(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
- DDXPointPtr ppt, Bool fallback)
-{
- if (!fallback && glamor_ddx_fallback_check_gc(pGC)
- && glamor_ddx_fallback_check_pixmap(pDrawable))
- return FALSE;
-
- miPolyPoint(pDrawable, pGC, mode, npt, ppt);
-
- return TRUE;
-}
-
-void
-glamor_poly_point(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
- DDXPointPtr ppt)
-{
- _glamor_poly_point(pDrawable, pGC, mode, npt, ppt, TRUE);
-}
-
-Bool
-glamor_poly_point_nf(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
- DDXPointPtr ppt)
-{
- return _glamor_poly_point(pDrawable, pGC, mode, npt, ppt, FALSE);
-}
-
-static Bool
-_glamor_poly_segment(DrawablePtr pDrawable, GCPtr pGC, int nseg,
- xSegment *pSeg, Bool fallback)
-{
- if (!fallback && glamor_ddx_fallback_check_gc(pGC)
- && glamor_ddx_fallback_check_pixmap(pDrawable))
- return FALSE;
-
- miPolySegment(pDrawable, pGC, nseg, pSeg);
-
- return TRUE;
-}
-
-void
-glamor_poly_segment(DrawablePtr pDrawable, GCPtr pGC, int nseg, xSegment *pSeg)
-{
- _glamor_poly_segment(pDrawable, pGC, nseg, pSeg, TRUE);
-}
-
-Bool
-glamor_poly_segment_nf(DrawablePtr pDrawable, GCPtr pGC, int nseg,
- xSegment *pSeg)
-{
- return _glamor_poly_segment(pDrawable, pGC, nseg, pSeg, FALSE);
-}
diff --git a/xorg-server/glamor/glamor_priv.h b/xorg-server/glamor/glamor_priv.h
index bc7d3f827..4c305abfc 100644
--- a/xorg-server/glamor/glamor_priv.h
+++ b/xorg-server/glamor/glamor_priv.h
@@ -52,6 +52,7 @@
#include "glamor_debug.h"
#include "glamor_context.h"
+#include "glamor_program.h"
#include <list.h>
@@ -153,13 +154,6 @@ enum glamor_gl_flavor {
GLAMOR_GL_ES2 // OPENGL ES2.0 API
};
-#define GLAMOR_CREATE_PIXMAP_CPU 0x100
-#define GLAMOR_CREATE_PIXMAP_FIXUP 0x101
-#define GLAMOR_CREATE_FBO_NO_FBO 0x103
-#define GLAMOR_CREATE_PIXMAP_MAP 0x104
-
-#define GLAMOR_CREATE_TEXTURE_EXACT_SIZE 0x104
-
#define GLAMOR_NUM_GLYPH_CACHE_FORMATS 2
#define GLAMOR_COMPOSITE_VBO_VERT_CNT (64*1024)
@@ -213,6 +207,7 @@ typedef struct glamor_screen_private {
enum glamor_gl_flavor gl_flavor;
int has_pack_invert;
int has_fbo_blit;
+ int has_map_buffer_range;
int has_buffer_storage;
int has_khr_debug;
int max_fbo_size;
@@ -225,6 +220,9 @@ typedef struct glamor_screen_private {
GLint solid_prog;
GLint solid_color_uniform_location;
+ /* glamor point shader */
+ glamor_program point_prog;
+
/* vertext/elment_index buffer object for render */
GLuint vbo, ebo;
/** Next offset within the VBO that glamor_get_vbo_space() will use. */
@@ -421,6 +419,7 @@ typedef struct glamor_pixmap_private_base {
unsigned char gl_tex:1;
glamor_pixmap_fbo *fbo;
PixmapPtr pixmap;
+ BoxRec box;
int drm_stride;
glamor_screen_private *glamor_priv;
PicturePtr picture;
@@ -476,6 +475,52 @@ typedef struct glamor_pixmap_private {
};
} glamor_pixmap_private;
+static inline glamor_pixmap_fbo *
+glamor_pixmap_fbo_at(glamor_pixmap_private *priv, int x, int y)
+{
+ if (priv->type == GLAMOR_TEXTURE_LARGE) {
+ assert(x < priv->large.block_wcnt);
+ assert(y < priv->large.block_hcnt);
+ return priv->large.fbo_array[y * priv->large.block_wcnt + x];
+ }
+ assert (x == 0);
+ assert (y == 0);
+ return priv->base.fbo;
+}
+
+static inline BoxPtr
+glamor_pixmap_box_at(glamor_pixmap_private *priv, int x, int y)
+{
+ if (priv->type == GLAMOR_TEXTURE_LARGE) {
+ assert(x < priv->large.block_wcnt);
+ assert(y < priv->large.block_hcnt);
+ return &priv->large.box_array[y * priv->large.block_wcnt + x];
+ }
+ assert (x == 0);
+ assert (y == 0);
+ return &priv->base.box;
+}
+
+static inline int
+glamor_pixmap_wcnt(glamor_pixmap_private *priv)
+{
+ if (priv->type == GLAMOR_TEXTURE_LARGE)
+ return priv->large.block_wcnt;
+ return 1;
+}
+
+static inline int
+glamor_pixmap_hcnt(glamor_pixmap_private *priv)
+{
+ if (priv->type == GLAMOR_TEXTURE_LARGE)
+ return priv->large.block_hcnt;
+ return 1;
+}
+
+#define glamor_pixmap_loop(priv, x, y) \
+ for (y = 0; y < glamor_pixmap_hcnt(priv); y++) \
+ for (x = 0; x < glamor_pixmap_wcnt(priv); x++)
+
/*
* Pixmap dynamic status, used by dynamic upload feature.
*
@@ -619,12 +664,6 @@ Bool glamor_set_alu(ScreenPtr screen, unsigned char alu);
Bool glamor_set_planemask(PixmapPtr pixmap, unsigned long planemask);
Bool glamor_change_window_attributes(WindowPtr pWin, unsigned long mask);
RegionPtr glamor_bitmap_to_region(PixmapPtr pixmap);
-Bool glamor_gl_has_extension(const char *extension);
-int glamor_gl_get_version(void);
-
-#define GLAMOR_GL_VERSION_ENCODE(major, minor) ( \
- ((major) * 256) \
- + ((minor) * 1))
/* glamor_fill.c */
Bool glamor_fill(DrawablePtr drawable,
diff --git a/xorg-server/glamor/glamor_program.c b/xorg-server/glamor/glamor_program.c
new file mode 100644
index 000000000..e2e1434ee
--- /dev/null
+++ b/xorg-server/glamor/glamor_program.c
@@ -0,0 +1,394 @@
+/*
+ * Copyright © 2014 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.
+ */
+
+#include "glamor_priv.h"
+#include "glamor_transform.h"
+#include "glamor_program.h"
+
+static Bool
+use_solid(PixmapPtr pixmap, GCPtr gc, glamor_program *prog, void *arg)
+{
+ return glamor_set_solid(pixmap, gc, TRUE, prog->fg_uniform);
+}
+
+const glamor_facet glamor_fill_solid = {
+ .name = "solid",
+ .fs_exec = " gl_FragColor = fg;\n",
+ .locations = glamor_program_location_fg,
+ .use = use_solid,
+};
+
+static Bool
+use_tile(PixmapPtr pixmap, GCPtr gc, glamor_program *prog, void *arg)
+{
+ return glamor_set_tiled(pixmap, gc, prog->fill_offset_uniform, prog->fill_size_uniform);
+}
+
+static const glamor_facet glamor_fill_tile = {
+ .name = "tile",
+ .version = 130,
+ .vs_exec = " fill_pos = fill_offset + primitive.xy + pos;\n",
+ .fs_exec = " gl_FragColor = texelFetch(sampler, ivec2(mod(fill_pos,fill_size)), 0);\n",
+ .locations = glamor_program_location_fill,
+ .use = use_tile,
+};
+
+#if 0
+static Bool
+use_stipple(PixmapPtr pixmap, GCPtr gc, glamor_program *prog)
+{
+ return glamor_set_stippled(pixmap, gc, prog->fg_uniform, prog->fill_offset_uniform, prog->fill_size_uniform);
+}
+
+static const glamor_facet glamor_fill_stipple = {
+ .name = "stipple",
+ .version = 130,
+ .vs_exec = " fill_pos = fill_offset + primitive.xy + pos;\n";
+ .fs_exec = (" if (texelFetch(sampler, ivec2(mod(fill_pos,fill_size)), 0).x == 0)\n"
+ " discard;\n"
+ " gl_FragColor = fg;\n")
+ .locations = glamor_program_location_fg | glamor_program_location_fill
+ .use = use_stipple,
+};
+
+static const glamor_facet glamor_fill_opaque_stipple = {
+ .name = "opaque_stipple",
+ .version = 130,
+ .vs_exec = " fill_pos = fill_offset + primitive.xy + pos;\n";
+ .fs_exec = (" if (texelFetch(sampler, ivec2(mod(fill_pos,fill_size)), 0).x == 0)\n"
+ " gl_FragColor = bg;\n"
+ " else\n"
+ " gl_FragColor = fg;\n"),
+ .locations = glamor_program_location_fg | glamor_program_location_bg | glamor_program_location_fill
+ .use = use_opaque_stipple
+};
+#endif
+
+static const glamor_facet *glamor_facet_fill[4] = {
+ &glamor_fill_solid,
+ &glamor_fill_tile,
+ NULL,
+ NULL,
+};
+
+typedef struct {
+ glamor_program_location location;
+ const char *vs_vars;
+ const char *fs_vars;
+} glamor_location_var;
+
+static glamor_location_var location_vars[] = {
+ {
+ .location = glamor_program_location_fg,
+ .fs_vars = "uniform vec4 fg;\n"
+ },
+ {
+ .location = glamor_program_location_bg,
+ .fs_vars = "uniform vec4 bg;\n"
+ },
+ {
+ .location = glamor_program_location_fill,
+ .vs_vars = ("uniform vec2 fill_offset;\n"
+ "varying vec2 fill_pos;\n"),
+ .fs_vars = ("uniform sampler2D sampler;\n"
+ "uniform vec2 fill_size;\n"
+ "varying vec2 fill_pos;\n")
+ },
+ {
+ .location = glamor_program_location_font,
+ .fs_vars = "uniform usampler2D font;\n",
+ },
+};
+
+#define NUM_LOCATION_VARS (sizeof location_vars / sizeof location_vars[0])
+
+static char *
+add_var(char *cur, const char *add)
+{
+ char *new;
+
+ if (!add)
+ return cur;
+
+ new = realloc(cur, strlen(cur) + strlen(add) + 1);
+ if (!new) {
+ free(cur);
+ return NULL;
+ }
+ strcat(new, add);
+ return new;
+}
+
+static char *
+vs_location_vars(glamor_program_location locations)
+{
+ int l;
+ char *vars = strdup("");
+
+ for (l = 0; vars && l < NUM_LOCATION_VARS; l++)
+ if (locations & location_vars[l].location)
+ vars = add_var(vars, location_vars[l].vs_vars);
+ return vars;
+}
+
+static char *
+fs_location_vars(glamor_program_location locations)
+{
+ int l;
+ char *vars = strdup("");
+
+ for (l = 0; vars && l < NUM_LOCATION_VARS; l++)
+ if (locations & location_vars[l].location)
+ vars = add_var(vars, location_vars[l].fs_vars);
+ return vars;
+}
+
+static const char vs_template[] =
+ "%s" /* version */
+ "%s" /* prim vs_vars */
+ "%s" /* fill vs_vars */
+ "%s" /* location vs_vars */
+ GLAMOR_DECLARE_MATRIX
+ "void main() {\n"
+ "%s" /* prim vs_exec, outputs 'pos' and gl_Position */
+ "%s" /* fill vs_exec */
+ "}\n";
+
+static const char fs_template[] =
+ "%s" /* version */
+ GLAMOR_DEFAULT_PRECISION
+ "%s" /* prim fs_vars */
+ "%s" /* fill fs_vars */
+ "%s" /* location fs_vars */
+ "void main() {\n"
+ "%s" /* prim fs_exec */
+ "%s" /* fill fs_exec */
+ "}\n";
+
+static const char *
+str(const char *s)
+{
+ if (!s)
+ return "";
+ return s;
+}
+
+static const glamor_facet facet_null_fill = {
+ .name = ""
+};
+
+static GLint
+glamor_get_uniform(glamor_program *prog,
+ glamor_program_location location,
+ const char *name)
+{
+ GLint uniform;
+ if (location && (prog->locations & location) == 0)
+ return -2;
+ uniform = glGetUniformLocation(prog->prog, name);
+#if DBG
+ ErrorF("%s uniform %d\n", name, uniform);
+#endif
+ return uniform;
+}
+
+Bool
+glamor_build_program(ScreenPtr screen,
+ glamor_program *prog,
+ const glamor_facet *prim,
+ const glamor_facet *fill)
+{
+ glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
+
+ glamor_program_location locations = prim->locations;
+ glamor_program_flag flags = prim->flags;
+
+ int version = prim->version;
+ char *version_string = NULL;
+
+ char *fs_vars = NULL;
+ char *vs_vars = NULL;
+
+ char *vs_prog_string;
+ char *fs_prog_string;
+
+ GLint fs_prog, vs_prog;
+
+ if (!fill)
+ fill = &facet_null_fill;
+
+ locations |= fill->locations;
+ flags |= fill->flags;
+ version = MAX(version, fill->version);
+
+ if (version >= 130) {
+
+ /* Would be nice to have a cleaner test for GLSL 1.30 support,
+ * but for now this should suffice
+ */
+ if (glamor_priv->gl_flavor != GLAMOR_GL_DESKTOP ||
+ epoxy_gl_version() < 30) {
+ goto fail;
+ }
+ }
+
+ vs_vars = vs_location_vars(locations);
+ fs_vars = fs_location_vars(locations);
+
+ if (!vs_vars)
+ goto fail;
+ if (!fs_vars)
+ goto fail;
+
+ if (version) {
+ if (asprintf(&version_string, "#version %d\n", version) < 0)
+ version_string = NULL;
+ if (!version_string)
+ goto fail;
+ }
+
+ if (asprintf(&vs_prog_string,
+ vs_template,
+ str(version_string),
+ str(prim->vs_vars),
+ str(fill->vs_vars),
+ vs_vars,
+ str(prim->vs_exec),
+ str(fill->vs_exec)) < 0)
+ vs_prog_string = NULL;
+
+ if (asprintf(&fs_prog_string,
+ fs_template,
+ str(version_string),
+ str(prim->fs_vars),
+ str(fill->fs_vars),
+ fs_vars,
+ str(prim->fs_exec),
+ str(fill->fs_exec)) < 0)
+ fs_prog_string = NULL;
+
+ if (!vs_prog_string || !fs_prog_string)
+ goto fail;
+
+#define DBG 0
+#if DBG
+ ErrorF("\nPrograms for %s %s\nVertex shader:\n\n%s\n\nFragment Shader:\n\n%s",
+ prim->name, fill->name, vs_prog_string, fs_prog_string);
+#endif
+
+ prog->prog = glCreateProgram();
+ prog->flags = flags;
+ prog->locations = locations;
+ prog->prim_use = prim->use;
+ prog->fill_use = fill->use;
+
+ vs_prog = glamor_compile_glsl_prog(GL_VERTEX_SHADER, vs_prog_string);
+ fs_prog = glamor_compile_glsl_prog(GL_FRAGMENT_SHADER, fs_prog_string);
+ free(vs_prog_string);
+ free(fs_prog_string);
+ glAttachShader(prog->prog, vs_prog);
+ glDeleteShader(vs_prog);
+ glAttachShader(prog->prog, fs_prog);
+ glDeleteShader(fs_prog);
+ glBindAttribLocation(prog->prog, GLAMOR_VERTEX_POS, "primitive");
+
+ if (prim->source_name) {
+#if DBG
+ ErrorF("Bind GLAMOR_VERTEX_SOURCE to %s\n", prim->source_name);
+#endif
+ glBindAttribLocation(prog->prog, GLAMOR_VERTEX_SOURCE, prim->source_name);
+ }
+
+ glamor_link_glsl_prog(screen, prog->prog, "%s_%s", prim->name, fill->name);
+
+ prog->matrix_uniform = glamor_get_uniform(prog, glamor_program_location_none, "v_matrix");
+ prog->fg_uniform = glamor_get_uniform(prog, glamor_program_location_fg, "fg");
+ prog->bg_uniform = glamor_get_uniform(prog, glamor_program_location_bg, "bg");
+ prog->fill_offset_uniform = glamor_get_uniform(prog, glamor_program_location_fill, "fill_offset");
+ prog->fill_size_uniform = glamor_get_uniform(prog, glamor_program_location_fill, "fill_size");
+ prog->font_uniform = glamor_get_uniform(prog, glamor_program_location_font, "font");
+
+ if (glGetError() != GL_NO_ERROR)
+ goto fail;
+
+ free(version_string);
+ free(fs_vars);
+ free(vs_vars);
+ return TRUE;
+fail:
+ prog->failed = 1;
+ if (prog->prog) {
+ glDeleteProgram(prog->prog);
+ prog->prog = 0;
+ }
+ free(version_string);
+ free(fs_vars);
+ free(vs_vars);
+ return FALSE;
+}
+
+Bool
+glamor_use_program(PixmapPtr pixmap,
+ GCPtr gc,
+ glamor_program *prog,
+ void *arg)
+{
+ glUseProgram(prog->prog);
+
+ if (prog->prim_use && !prog->prim_use(pixmap, gc, prog, arg))
+ return FALSE;
+
+ if (prog->fill_use && !prog->fill_use(pixmap, gc, prog, arg))
+ return FALSE;
+
+ return TRUE;
+}
+
+glamor_program *
+glamor_use_program_fill(PixmapPtr pixmap,
+ GCPtr gc,
+ glamor_program_fill *program_fill,
+ const glamor_facet *prim)
+{
+ ScreenPtr screen = pixmap->drawable.pScreen;
+ glamor_program *prog = &program_fill->progs[gc->fillStyle];
+
+ int fill_style = gc->fillStyle;
+ const glamor_facet *fill;
+
+ if (prog->failed)
+ return FALSE;
+
+ if (!prog->prog) {
+ fill = glamor_facet_fill[fill_style];
+ if (!fill)
+ return NULL;
+
+ if (!glamor_build_program(screen, prog, prim, fill))
+ return NULL;
+ }
+
+ if (!glamor_use_program(pixmap, gc, prog, NULL))
+ return NULL;
+
+ return prog;
+}
diff --git a/xorg-server/glamor/glamor_program.h b/xorg-server/glamor/glamor_program.h
new file mode 100644
index 000000000..88efc3593
--- /dev/null
+++ b/xorg-server/glamor/glamor_program.h
@@ -0,0 +1,94 @@
+/*
+ * Copyright © 2014 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.
+ */
+
+#ifndef _GLAMOR_PROGRAM_H_
+#define _GLAMOR_PROGRAM_H_
+
+typedef enum {
+ glamor_program_location_none = 0,
+ glamor_program_location_fg = 1,
+ glamor_program_location_bg = 2,
+ glamor_program_location_fill = 4,
+ glamor_program_location_font = 8,
+} glamor_program_location;
+
+typedef enum {
+ glamor_program_flag_none = 0,
+} glamor_program_flag;
+
+typedef struct _glamor_program glamor_program;
+
+typedef Bool (*glamor_use) (PixmapPtr pixmap, GCPtr gc, glamor_program *prog, void *arg);
+
+typedef struct {
+ const char *name;
+ const int version;
+ const char *vs_vars;
+ const char *vs_exec;
+ const char *fs_vars;
+ const char *fs_exec;
+ const glamor_program_location locations;
+ const glamor_program_flag flags;
+ const char *source_name;
+ glamor_use use;
+} glamor_facet;
+
+struct _glamor_program {
+ GLint prog;
+ GLint failed;
+ GLint matrix_uniform;
+ GLint fg_uniform;
+ GLint bg_uniform;
+ GLint fill_size_uniform;
+ GLint fill_offset_uniform;
+ GLint font_uniform;
+ glamor_program_location locations;
+ glamor_program_flag flags;
+ glamor_use prim_use;
+ glamor_use fill_use;
+};
+
+typedef struct {
+ glamor_program progs[4];
+} glamor_program_fill;
+
+extern const glamor_facet glamor_fill_solid;
+
+Bool
+glamor_build_program(ScreenPtr screen,
+ glamor_program *prog,
+ const glamor_facet *prim,
+ const glamor_facet *fill);
+
+Bool
+glamor_use_program(PixmapPtr pixmap,
+ GCPtr gc,
+ glamor_program *prog,
+ void *arg);
+
+glamor_program *
+glamor_use_program_fill(PixmapPtr pixmap,
+ GCPtr gc,
+ glamor_program_fill *program_fill,
+ const glamor_facet *prim);
+
+#endif /* _GLAMOR_PROGRAM_H_ */
diff --git a/xorg-server/glamor/glamor_render.c b/xorg-server/glamor/glamor_render.c
index c0ee22c2f..cdf8effdc 100644
--- a/xorg-server/glamor/glamor_render.c
+++ b/xorg-server/glamor/glamor_render.c
@@ -412,29 +412,10 @@ glamor_init_composite_shaders(ScreenPtr screen)
eb_size = GLAMOR_COMPOSITE_VBO_VERT_CNT * sizeof(short) * 2;
- if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) {
- glBufferData(GL_ELEMENT_ARRAY_BUFFER, eb_size, NULL, GL_STATIC_DRAW);
- eb = glMapBuffer(GL_ELEMENT_ARRAY_BUFFER, GL_WRITE_ONLY);
- }
- else {
- eb = malloc(eb_size);
- }
-
- if (eb == NULL)
- FatalError
- ("fatal error, fail to get element buffer. GL context may be not created correctly.\n");
+ eb = XNFalloc(eb_size);
glamor_init_eb(eb, GLAMOR_COMPOSITE_VBO_VERT_CNT);
-
- if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) {
- glUnmapBuffer(GL_ELEMENT_ARRAY_BUFFER);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
- }
- else {
- glBufferData(GL_ELEMENT_ARRAY_BUFFER, eb_size, eb, GL_STATIC_DRAW);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
-
- free(eb);
- }
+ glBufferData(GL_ELEMENT_ARRAY_BUFFER, eb_size, eb, GL_STATIC_DRAW);
+ free(eb);
glamor_put_context(glamor_priv);
}
@@ -448,6 +429,7 @@ glamor_fini_composite_shaders(ScreenPtr screen)
glamor_priv = glamor_get_screen_private(screen);
glamor_get_context(glamor_priv);
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
glDeleteBuffers(1, &glamor_priv->ebo);
for (i = 0; i < SHADER_SOURCE_COUNT; i++)
@@ -706,8 +688,6 @@ glamor_setup_composite_vbo(ScreenPtr screen, int n_verts)
glamor_get_context(glamor_priv);
vb = glamor_get_vbo_space(screen, vert_size, &vbo_offset);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, glamor_priv->ebo);
-
glVertexAttribPointer(GLAMOR_VERTEX_POS, 2, GL_FLOAT, GL_FALSE,
glamor_priv->vb_stride, vbo_offset);
glEnableVertexAttribArray(GLAMOR_VERTEX_POS);
@@ -1329,7 +1309,6 @@ glamor_composite_with_shader(CARD8 op,
}
}
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
glDisableVertexAttribArray(GLAMOR_VERTEX_POS);
glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE);
glDisableVertexAttribArray(GLAMOR_VERTEX_MASK);
diff --git a/xorg-server/glamor/glamor_segment.c b/xorg-server/glamor/glamor_segment.c
new file mode 100644
index 000000000..84b27acce
--- /dev/null
+++ b/xorg-server/glamor/glamor_segment.c
@@ -0,0 +1,39 @@
+/*
+ * Copyright © 2014 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.
+ */
+
+#include "glamor_priv.h"
+
+Bool
+glamor_poly_segment_nf(DrawablePtr drawable, GCPtr gc, int nseg,
+ xSegment *seg)
+{
+ return FALSE;
+}
+
+void
+glamor_poly_segment(DrawablePtr drawable, GCPtr gc, int nseg,
+ xSegment *seg)
+{
+ if (glamor_poly_segment_nf(drawable, gc, nseg, seg))
+ return;
+ miPolySegment(drawable, gc, nseg, seg);
+}
diff --git a/xorg-server/glamor/glamor_transform.c b/xorg-server/glamor/glamor_transform.c
new file mode 100644
index 000000000..d6ba56421
--- /dev/null
+++ b/xorg-server/glamor/glamor_transform.c
@@ -0,0 +1,215 @@
+/*
+ * Copyright © 2014 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.
+ */
+
+#include "glamor_priv.h"
+#include "glamor_transform.h"
+
+
+/*
+ * Set up rendering to target the specified drawable, computing an
+ * appropriate transform for the vertex shader to convert
+ * drawable-relative coordinates into pixmap-relative coordinates. If
+ * requested, the offset from pixmap origin coordinates back to window
+ * system coordinates will be returned in *p_off_x, *p_off_y so that
+ * clipping computations can be adjusted as appropriate
+ */
+
+void
+glamor_set_destination_drawable(DrawablePtr drawable,
+ int box_x,
+ int box_y,
+ Bool do_drawable_translate,
+ Bool center_offset,
+ GLint matrix_uniform_location,
+ int *p_off_x,
+ int *p_off_y)
+{
+ PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable);
+ glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap);
+ int off_x, off_y;
+ BoxPtr box = glamor_pixmap_box_at(pixmap_priv, box_x, box_y);
+ int w = box->x2 - box->x1;
+ int h = box->y2 - box->y1;
+ float scale_x = 2.0f / (float) w;
+ float scale_y = 2.0f / (float) h;
+ float center_adjust = 0.0f;
+
+ glamor_get_drawable_deltas(drawable, pixmap, &off_x, &off_y);
+
+ off_x -= box->x1;
+ off_y -= box->y1;
+
+ if (p_off_x) {
+ *p_off_x = off_x;
+ *p_off_y = off_y;
+ }
+
+ /* A tricky computation to find the right value for the two linear functions
+ * that transform rendering coordinates to pixmap coordinates
+ *
+ * pixmap_x = render_x + drawable->x + off_x
+ * pixmap_y = render_y + drawable->y + off_y
+ *
+ * gl_x = pixmap_x * 2 / width - 1
+ * gl_y = pixmap_y * 2 / height - 1
+ *
+ * gl_x = (render_x + drawable->x + off_x) * 2 / width - 1
+ *
+ * gl_x = (render_x) * 2 / width + (drawable->x + off_x) * 2 / width - 1
+ *
+ * I'll think about yInverted later, when I have some way to test
+ */
+
+ if (do_drawable_translate) {
+ off_x += drawable->x;
+ off_y += drawable->y;
+ }
+
+ /*
+ * To get GL_POINTS drawn in the right spot, we need to adjust the
+ * coordinates by 1/2 a pixel.
+ */
+ if (center_offset)
+ center_adjust = 0.5f;
+
+ glUniform4f(matrix_uniform_location,
+ scale_x, (off_x + center_adjust) * scale_x - 1.0f,
+ scale_y, (off_y + center_adjust) * scale_y - 1.0f);
+
+ glamor_set_destination_pixmap_fbo(glamor_pixmap_fbo_at(pixmap_priv, box_x, box_y),
+ 0, 0, w, h);
+}
+
+/*
+ * Set up for solid rendering to the specified pixmap using alu, fg and planemask
+ * from the specified GC. Load the target color into the specified uniform
+ */
+
+void
+glamor_set_color(PixmapPtr pixmap,
+ CARD32 pixel,
+ GLint uniform)
+{
+ float color[4];
+
+ glamor_get_rgba_from_pixel(pixel,
+ &color[0], &color[1], &color[2], &color[3],
+ format_for_pixmap(pixmap));
+
+ glUniform4fv(uniform, 1, color);
+}
+
+Bool
+glamor_set_solid(PixmapPtr pixmap,
+ GCPtr gc,
+ Bool use_alu,
+ GLint uniform)
+{
+ CARD32 pixel;
+ int alu = use_alu ? gc->alu : GXcopy;
+
+ if (!glamor_set_planemask(pixmap, gc->planemask))
+ return FALSE;
+
+ pixel = gc->fgPixel;
+
+ if (!glamor_set_alu(pixmap->drawable.pScreen, alu)) {
+ switch (gc->alu) {
+ case GXclear:
+ pixel = 0;
+ break;
+ case GXcopyInverted:
+ pixel = ~pixel;
+ break;
+ case GXset:
+ pixel = ~0 & gc->planemask;
+ break;
+ default:
+ return FALSE;
+ }
+ }
+ glamor_set_color(pixmap, gc->fgPixel, uniform);
+
+ return TRUE;
+}
+
+Bool
+glamor_set_texture(PixmapPtr pixmap,
+ PixmapPtr texture,
+ int off_x,
+ int off_y,
+ GLint offset_uniform,
+ GLint size_uniform)
+{
+ glamor_pixmap_private *texture_priv;
+
+ texture_priv = glamor_get_pixmap_private(texture);
+
+ if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(texture_priv))
+ return FALSE;
+
+ if (texture_priv->type == GLAMOR_TEXTURE_LARGE)
+ return FALSE;
+
+ glActiveTexture(GL_TEXTURE0);
+ glBindTexture(GL_TEXTURE_2D, texture_priv->base.fbo->tex);
+
+ glUniform2f(offset_uniform, off_x, off_y);
+ glUniform2f(size_uniform, texture->drawable.width, texture->drawable.height);
+ return TRUE;
+}
+
+Bool
+glamor_set_tiled(PixmapPtr pixmap,
+ GCPtr gc,
+ GLint offset_uniform,
+ GLint size_uniform)
+{
+ if (!glamor_set_alu(pixmap->drawable.pScreen, gc->alu))
+ return FALSE;
+
+ if (!glamor_set_planemask(pixmap, gc->planemask))
+ return FALSE;
+
+ return glamor_set_texture(pixmap,
+ gc->tile.pixmap,
+ -gc->patOrg.x,
+ -gc->patOrg.y,
+ offset_uniform,
+ size_uniform);
+}
+
+Bool
+glamor_set_stippled(PixmapPtr pixmap,
+ GCPtr gc,
+ GLint fg_uniform,
+ GLint offset_uniform,
+ GLint size_uniform)
+{
+ if (!glamor_set_solid(pixmap, gc, TRUE, fg_uniform))
+ return FALSE;
+
+ if (!glamor_set_texture(pixmap, gc->stipple, gc->patOrg.x, gc->patOrg.y, offset_uniform, size_uniform))
+ return FALSE;
+
+ return TRUE;
+}
diff --git a/xorg-server/glamor/glamor_transform.h b/xorg-server/glamor/glamor_transform.h
new file mode 100644
index 000000000..36b789af8
--- /dev/null
+++ b/xorg-server/glamor/glamor_transform.h
@@ -0,0 +1,87 @@
+/*
+ * Copyright © 2014 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.
+ */
+
+#ifndef _GLAMOR_TRANSFORM_H_
+#define _GLAMOR_TRANSFORM_H_
+
+void
+glamor_set_destination_drawable(DrawablePtr drawable,
+ int box_x,
+ int box_y,
+ Bool do_drawable_translate,
+ Bool center_offset,
+ GLint matrix_uniform_location,
+ int *p_off_x,
+ int *p_off_y);
+
+void
+glamor_set_color(PixmapPtr pixmap,
+ CARD32 pixel,
+ GLint uniform);
+
+Bool
+glamor_set_texture(PixmapPtr pixmap,
+ PixmapPtr texture,
+ int off_x,
+ int off_y,
+ GLint offset_uniform,
+ GLint size_uniform);
+
+Bool
+glamor_set_solid(PixmapPtr pixmap,
+ GCPtr gc,
+ Bool use_alu,
+ GLint uniform);
+
+Bool
+glamor_set_tiled(PixmapPtr pixmap,
+ GCPtr gc,
+ GLint offset_uniform,
+ GLint size_uniform);
+
+Bool
+glamor_set_stippled(PixmapPtr pixmap,
+ GCPtr gc,
+ GLint fg_uniform,
+ GLint offset_uniform,
+ GLint size_uniform);
+
+/*
+ * Vertex shader bits that transform X coordinates to pixmap
+ * coordinates using the matrix computed above
+ */
+
+#define GLAMOR_DECLARE_MATRIX "uniform vec4 v_matrix;\n"
+#define GLAMOR_X_POS(x) #x " *v_matrix.x + v_matrix.y"
+#define GLAMOR_Y_POS(y) #y " *v_matrix.z + v_matrix.w"
+#if 0
+#define GLAMOR_POS(dst,src) \
+ " " #dst ".x = " #src ".x * v_matrix.x + v_matrix.y;\n" \
+ " " #dst ".y = " #src ".y * v_matrix.z + v_matrix.w;\n" \
+ " " #dst ".z = 0.0;\n" \
+ " " #dst ".w = 1.0;\n"
+#endif
+#define GLAMOR_POS(dst,src) \
+ " " #dst ".xy = " #src ".xy * v_matrix.xz + v_matrix.yw;\n" \
+ " " #dst ".zw = vec2(0.0,1.0);\n"
+
+#endif /* _GLAMOR_TRANSFORM_H_ */
diff --git a/xorg-server/glamor/glamor_trapezoid.c b/xorg-server/glamor/glamor_trapezoid.c
index 969ab68bc..c76b8bb2a 100644
--- a/xorg-server/glamor/glamor_trapezoid.c
+++ b/xorg-server/glamor/glamor_trapezoid.c
@@ -637,8 +637,6 @@ glamor_setup_composite_vbo_for_trapezoid(ScreenPtr screen, int n_verts)
vb = glamor_get_vbo_space(screen, vert_size, &vbo_offset);
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, glamor_priv->ebo);
-
/* Set the vertex pointer. */
glVertexAttribPointer(GLAMOR_VERTEX_POS, 2, GL_FLOAT,
GL_FALSE, glamor_priv->vb_stride,
@@ -977,7 +975,6 @@ _glamor_trapezoids_with_shader(CARD8 op,
ret = TRUE;
TRAPEZOID_RESET_GL:
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
glDisableVertexAttribArray(GLAMOR_VERTEX_POS);
glDisableVertexAttribArray(GLAMOR_VERTEX_SOURCE);
glDisableVertexAttribArray(GLAMOR_VERTEX_MASK);
@@ -1415,8 +1412,6 @@ _glamor_generate_trapezoid_with_shader(ScreenPtr screen, PicturePtr picture,
pixmap_priv_get_dest_scale(pixmap_priv, (&xscale), (&yscale));
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
-
/* Now draw the Trapezoid mask. */
glUseProgram(trapezoid_prog);
@@ -1562,7 +1557,6 @@ _glamor_generate_trapezoid_with_shader(ScreenPtr screen, PicturePtr picture,
}
}
- glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
glBlendFunc(GL_ONE, GL_ZERO);
glDisable(GL_BLEND);
glDisableVertexAttribArray(GLAMOR_VERTEX_POS);
diff --git a/xorg-server/glamor/glamor_vbo.c b/xorg-server/glamor/glamor_vbo.c
index 5e98bfe47..2731692d6 100644
--- a/xorg-server/glamor/glamor_vbo.c
+++ b/xorg-server/glamor/glamor_vbo.c
@@ -96,7 +96,7 @@ glamor_get_vbo_space(ScreenPtr screen, unsigned size, char **vbo_offset)
*vbo_offset = (void *)(uintptr_t)glamor_priv->vbo_offset;
data = glamor_priv->vb + glamor_priv->vbo_offset;
glamor_priv->vbo_offset += size;
- } else if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) {
+ } else if (glamor_priv->has_map_buffer_range) {
if (glamor_priv->vbo_size < glamor_priv->vbo_offset + size) {
glamor_priv->vbo_size = MAX(GLAMOR_VBO_SIZE, size);
glamor_priv->vbo_offset = 0;
@@ -147,7 +147,7 @@ glamor_put_vbo_space(ScreenPtr screen)
* persistent mapping, so we can leave it around until we
* reach the end of the buffer.
*/
- } else if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) {
+ } else if (glamor_priv->has_map_buffer_range) {
glUnmapBuffer(GL_ARRAY_BUFFER);
} else {
glBufferData(GL_ARRAY_BUFFER, glamor_priv->vbo_offset,
@@ -179,7 +179,7 @@ glamor_fini_vbo(ScreenPtr screen)
glamor_get_context(glamor_priv);
glDeleteBuffers(1, &glamor_priv->vbo);
- if (glamor_priv->gl_flavor != GLAMOR_GL_DESKTOP)
+ if (!glamor_priv->has_map_buffer_range)
free(glamor_priv->vb);
glamor_put_context(glamor_priv);
diff --git a/xorg-server/hw/dmx/dmxinit.c b/xorg-server/hw/dmx/dmxinit.c
index 3fd439300..c782a9bff 100644
--- a/xorg-server/hw/dmx/dmxinit.c
+++ b/xorg-server/hw/dmx/dmxinit.c
@@ -597,10 +597,8 @@ static void dmxAddExtensions(Bool glxSupported)
{ GlxExtensionInit, "GLX", &glxSupported },
#endif
};
- int i;
- for (i = 0; i < ARRAY_SIZE(dmxExtensions); i++)
- LoadExtension(&dmxExtensions[i], TRUE);
+ LoadExtensionList(dmxExtensions, ARRAY_SIZE(dmxExtensions), TRUE);
}
/** This routine is called in Xserver/dix/main.c from \a main(). */
diff --git a/xorg-server/hw/kdrive/ephyr/Makefile.am b/xorg-server/hw/kdrive/ephyr/Makefile.am
index 040993ce0..00a53d0df 100644
--- a/xorg-server/hw/kdrive/ephyr/Makefile.am
+++ b/xorg-server/hw/kdrive/ephyr/Makefile.am
@@ -38,7 +38,7 @@ if GLAMOR
GLAMOR_SRCS = \
ephyr_glamor_glx.c \
ephyr_glamor_glx.h \
- ()
+ $()
endif
if DRI
diff --git a/xorg-server/hw/kdrive/ephyr/ephyrinit.c b/xorg-server/hw/kdrive/ephyr/ephyrinit.c
index 5b8d09ff0..5861da67f 100644
--- a/xorg-server/hw/kdrive/ephyr/ephyrinit.c
+++ b/xorg-server/hw/kdrive/ephyr/ephyrinit.c
@@ -66,10 +66,7 @@ static const ExtensionModule ephyrExtensions[] = {
static
void ephyrExtensionInit(void)
{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(ephyrExtensions); i++)
- LoadExtension(&ephyrExtensions[i], TRUE);
+ LoadExtensionList(ephyrExtensions, ARRAY_SIZE(ephyrExtensions), TRUE);
}
diff --git a/xorg-server/hw/kdrive/ephyr/hostx.c b/xorg-server/hw/kdrive/ephyr/hostx.c
index 01ea6c756..8aadb2aab 100755
--- a/xorg-server/hw/kdrive/ephyr/hostx.c
+++ b/xorg-server/hw/kdrive/ephyr/hostx.c
@@ -728,6 +728,12 @@ __asm int 3;
malloc(scrpriv->ximg->stride * buffer_height);
}
+ {
+ uint32_t mask = XCB_CONFIG_WINDOW_WIDTH | XCB_CONFIG_WINDOW_HEIGHT;
+ uint32_t values[2] = {width, height};
+ xcb_configure_window(HostX.conn, scrpriv->win, mask, values);
+ }
+
if (scrpriv->win_pre_existing == None && !EphyrWantResize) {
/* Ask the WM to keep our size static */
xcb_size_hints_t size_hints = {0};
@@ -1286,7 +1292,9 @@ ephyr_glamor_create_screen_resources(ScreenPtr pScreen)
screen_pixmap = pScreen->CreatePixmap(pScreen,
pScreen->width,
pScreen->height,
- pScreen->rootDepth, 0);
+ pScreen->rootDepth,
+ GLAMOR_CREATE_NO_LARGE);
+
pScreen->SetScreenPixmap(screen_pixmap);
/* Tell the GLX code what to GL texture to read from. */
diff --git a/xorg-server/hw/kdrive/src/kxv.c b/xorg-server/hw/kdrive/src/kxv.c
index 445eb605b..9cc0edd8a 100644
--- a/xorg-server/hw/kdrive/src/kxv.c
+++ b/xorg-server/hw/kdrive/src/kxv.c
@@ -385,28 +385,7 @@ KdXVInitAdaptors(ScreenPtr pScreen, KdVideoAdaptorPtr * infoPtr, int number)
for (i = 0, pi = pImage, imagePtr = adaptorPtr->pImages;
i < adaptorPtr->nImages; i++, pi++, imagePtr++) {
- pi->id = imagePtr->id;
- pi->type = imagePtr->type;
- pi->byte_order = imagePtr->byte_order;
- memcpy(pi->guid, imagePtr->guid, 16);
- pi->bits_per_pixel = imagePtr->bits_per_pixel;
- pi->format = imagePtr->format;
- pi->num_planes = imagePtr->num_planes;
- pi->depth = imagePtr->depth;
- pi->red_mask = imagePtr->red_mask;
- pi->green_mask = imagePtr->green_mask;
- pi->blue_mask = imagePtr->blue_mask;
- pi->y_sample_bits = imagePtr->y_sample_bits;
- pi->u_sample_bits = imagePtr->u_sample_bits;
- pi->v_sample_bits = imagePtr->v_sample_bits;
- pi->horz_y_period = imagePtr->horz_y_period;
- pi->horz_u_period = imagePtr->horz_u_period;
- pi->horz_v_period = imagePtr->horz_v_period;
- pi->vert_y_period = imagePtr->vert_y_period;
- pi->vert_u_period = imagePtr->vert_u_period;
- pi->vert_v_period = imagePtr->vert_v_period;
- memcpy(pi->component_order, imagePtr->component_order, 32);
- pi->scanline_order = imagePtr->scanline_order;
+ memcpy(pi, imagePtr, sizeof(*pi));
}
pa->nImages = adaptorPtr->nImages;
pa->pImages = pImage;
@@ -417,9 +396,7 @@ KdXVInitAdaptors(ScreenPtr pScreen, KdVideoAdaptorPtr * infoPtr, int number)
calloc(adaptorPtr->nAttributes, sizeof(XvAttributeRec)))) {
for (pat = pAttribute, attributePtr = adaptorPtr->pAttributes, i =
0; i < adaptorPtr->nAttributes; pat++, i++, attributePtr++) {
- pat->flags = attributePtr->flags;
- pat->min_value = attributePtr->min_value;
- pat->max_value = attributePtr->max_value;
+ memcpy(pat, attributePtr, sizeof(*pat));
pat->name = strdup(attributePtr->name);
}
pa->nAttributes = adaptorPtr->nAttributes;
diff --git a/xorg-server/hw/kdrive/src/kxv.h b/xorg-server/hw/kdrive/src/kxv.h
index 4f644c246..85a030ee9 100644
--- a/xorg-server/hw/kdrive/src/kxv.h
+++ b/xorg-server/hw/kdrive/src/kxv.h
@@ -56,34 +56,7 @@ of the copyright holder.
#define VIDEO_OVERLAID_STILLS 0x00000008
#define VIDEO_CLIP_TO_VIEWPORT 0x00000010
-typedef struct {
- int id;
- int type;
- int byte_order;
- unsigned char guid[16];
- int bits_per_pixel;
- int format;
- int num_planes;
-
- /* for RGB formats only */
- int depth;
- unsigned int red_mask;
- unsigned int green_mask;
- unsigned int blue_mask;
-
- /* for YUV formats only */
- unsigned int y_sample_bits;
- unsigned int u_sample_bits;
- unsigned int v_sample_bits;
- unsigned int horz_y_period;
- unsigned int horz_u_period;
- unsigned int horz_v_period;
- unsigned int vert_y_period;
- unsigned int vert_u_period;
- unsigned int vert_v_period;
- char component_order[32];
- int scanline_order;
-} KdImageRec, *KdImagePtr;
+typedef XvImageRec KdImageRec, *KdImagePtr;
typedef struct {
KdScreenInfo *screen;
@@ -158,12 +131,7 @@ typedef struct {
short class;
} KdVideoFormatRec, *KdVideoFormatPtr;
-typedef struct {
- int flags;
- int min_value;
- int max_value;
- char *name;
-} KdAttributeRec, *KdAttributePtr;
+typedef XvAttributeRec KdAttributeRec, *KdAttributePtr;
typedef struct {
unsigned int type;
diff --git a/xorg-server/hw/vfb/InitOutput.c b/xorg-server/hw/vfb/InitOutput.c
index 2175ac685..9c4926462 100644
--- a/xorg-server/hw/vfb/InitOutput.c
+++ b/xorg-server/hw/vfb/InitOutput.c
@@ -892,10 +892,7 @@ static const ExtensionModule vfbExtensions[] = {
static
void vfbExtensionInit(void)
{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(vfbExtensions); i++)
- LoadExtension(&vfbExtensions[i], TRUE);
+ LoadExtensionList(vfbExtensions, ARRAY_SIZE(vfbExtensions), TRUE);
}
void
diff --git a/xorg-server/hw/xfree86/Makefile.am b/xorg-server/hw/xfree86/Makefile.am
index a315bbc17..18fa99b08 100644
--- a/xorg-server/hw/xfree86/Makefile.am
+++ b/xorg-server/hw/xfree86/Makefile.am
@@ -43,7 +43,7 @@ SUBDIRS = common ddc x86emu $(INT10_SUBDIR) os-support parser \
DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \
parser ramdac shadowfb vbe vgahw \
loader dixmods dri dri2 exa modes \
- utils doc man
+ utils doc man glamor_egl
bin_PROGRAMS = Xorg
nodist_Xorg_SOURCES = sdksyms.c
diff --git a/xorg-server/hw/xfree86/common/xf86Extensions.c b/xorg-server/hw/xfree86/common/xf86Extensions.c
index c80de34e6..25b2bc3d0 100644
--- a/xorg-server/hw/xfree86/common/xf86Extensions.c
+++ b/xorg-server/hw/xfree86/common/xf86Extensions.c
@@ -132,10 +132,7 @@ load_extension_config(void)
void
xf86ExtensionInit(void)
{
- int i;
-
load_extension_config();
- for (i = 0; i < ARRAY_SIZE(extensionModules); i++)
- LoadExtension(&extensionModules[i], TRUE);
+ LoadExtensionList(extensionModules, ARRAY_SIZE(extensionModules), TRUE);
}
diff --git a/xorg-server/hw/xfree86/dixmods/glxmodule.c b/xorg-server/hw/xfree86/dixmods/glxmodule.c
index bf7d182a2..d53c6652d 100644
--- a/xorg-server/hw/xfree86/dixmods/glxmodule.c
+++ b/xorg-server/hw/xfree86/dixmods/glxmodule.c
@@ -47,10 +47,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
static MODULESETUPPROTO(glxSetup);
-static const ExtensionModule GLXExt = {
- GlxExtensionInit,
- "GLX",
- &noGlxExtension
+static const ExtensionModule GLXExt[] = {
+ { GlxExtensionInit, "GLX", &noGlxExtension },
};
static XF86ModuleVersionInfo VersRec = {
@@ -90,7 +88,7 @@ glxSetup(void *module, void *opts, int *errmaj, int *errmin)
GlxPushProvider(provider);
}
- LoadExtension(&GLXExt, FALSE);
+ LoadExtensionList(GLXExt, ARRAY_SIZE(GLXExt), FALSE);
return module;
}
diff --git a/xorg-server/hw/xfree86/doc/ddxDesign.xml b/xorg-server/hw/xfree86/doc/ddxDesign.xml
index 7c2c20ff3..d1fd9af7b 100644
--- a/xorg-server/hw/xfree86/doc/ddxDesign.xml
+++ b/xorg-server/hw/xfree86/doc/ddxDesign.xml
@@ -5920,10 +5920,10 @@ These may be moved out of the loader at some point.
<blockquote><para>
<programlisting>
- void LoadExtension(ExtensionModule *ext);
+ void LoadExtensionList(const ExtensionModule ext[]);
</programlisting>
<blockquote><para>
- This registers the entry points for the extension identified by
+ This registers the entry points for the extension array identified by
<parameter>ext</parameter>. The <structname>ExtensionModule</structname> struct is
defined as:
diff --git a/xorg-server/hw/xquartz/quartz.c b/xorg-server/hw/xquartz/quartz.c
index bc6c8d048..d7229cecb 100644
--- a/xorg-server/hw/xquartz/quartz.c
+++ b/xorg-server/hw/xquartz/quartz.c
@@ -164,10 +164,7 @@ static const ExtensionModule quartzExtensions[] = {
*/
static void QuartzExtensionInit(void)
{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(quartzExtensions); i++)
- LoadExtension(&quartzExtensions[i], TRUE);
+ LoadExtensionList(quartzExtensions, ARRAY_SIZE(quartzExtensions), TRUE);
}
/*
diff --git a/xorg-server/hw/xwin/InitOutput.c b/xorg-server/hw/xwin/InitOutput.c
index df670ff0e..640195993 100644
--- a/xorg-server/hw/xwin/InitOutput.c
+++ b/xorg-server/hw/xwin/InitOutput.c
@@ -156,8 +156,6 @@ static const ExtensionModule xwinExtensions[] = {
static
void XwinExtensionInit(void)
{
- int i;
-
#ifdef XWIN_GLX_WINDOWS
if (g_fNativeGl) {
/* install the native GL provider */
@@ -165,8 +163,7 @@ void XwinExtensionInit(void)
}
#endif
- for (i = 0; i < ARRAY_SIZE(xwinExtensions); i++)
- LoadExtension(&xwinExtensions[i], TRUE);
+ LoadExtensionList(xwinExtensions, ARRAY_SIZE(xwinExtensions), TRUE);
}
#if defined(DDXBEFORERESET)
diff --git a/xorg-server/include/extension.h b/xorg-server/include/extension.h
index acc6addb7..7c09af150 100644
--- a/xorg-server/include/extension.h
+++ b/xorg-server/include/extension.h
@@ -97,6 +97,7 @@ extern _X_EXPORT void InitExtensions(int argc, char **argv);
extern _X_EXPORT void CloseDownExtensions(void);
-extern _X_EXPORT void LoadExtension(const ExtensionModule *ext, Bool external);
+extern _X_EXPORT void LoadExtensionList(const ExtensionModule ext[],
+ int listSize, Bool external);
#endif /* EXTENSION_H */
diff --git a/xorg-server/include/opaque.h b/xorg-server/include/opaque.h
index 73d40c345..7ec1d850f 100644
--- a/xorg-server/include/opaque.h
+++ b/xorg-server/include/opaque.h
@@ -74,5 +74,6 @@ extern _X_EXPORT Bool whiteRoot;
extern _X_EXPORT Bool bgNoneRoot;
extern _X_EXPORT Bool CoreDump;
+extern _X_EXPORT Bool NoListenAll;
#endif /* OPAQUE_H */
diff --git a/xorg-server/include/os.h b/xorg-server/include/os.h
index eac227475..ed7e8806a 100644
--- a/xorg-server/include/os.h
+++ b/xorg-server/include/os.h
@@ -168,9 +168,9 @@ extern _X_EXPORT void MakeClientGrabImpervious(ClientPtr /*client */ );
extern _X_EXPORT void MakeClientGrabPervious(ClientPtr /*client */ );
-#ifdef XQUARTZ
-extern void ListenOnOpenFD(int /* fd */ , int /* noxauth */ );
-#endif
+extern _X_EXPORT void ListenOnOpenFD(int /* fd */ , int /* noxauth */ );
+
+extern _X_EXPORT Bool AddClientOnOpenFD(int /* fd */ );
extern _X_EXPORT CARD32 GetTimeInMillis(void);
extern _X_EXPORT CARD64 GetTimeInMicros(void);
diff --git a/xorg-server/include/xkbsrv.h b/xorg-server/include/xkbsrv.h
index ae43889e7..a1bb62110 100644
--- a/xorg-server/include/xkbsrv.h
+++ b/xorg-server/include/xkbsrv.h
@@ -824,6 +824,9 @@ extern _X_EXPORT void XkbSendNewKeyboardNotify(DeviceIntPtr /* kbd */ ,
extern Bool XkbCopyKeymap(XkbDescPtr /* dst */ ,
XkbDescPtr /* src */ );
+extern _X_EXPORT Bool XkbCopyDeviceKeymap(DeviceIntPtr /* dst */,
+ DeviceIntPtr /* src */);
+
extern _X_EXPORT Bool XkbDeviceApplyKeymap(DeviceIntPtr /* dst */ ,
XkbDescPtr /* src */ );
diff --git a/xorg-server/mi/mibitblt.c b/xorg-server/mi/mibitblt.c
index b0d14ae55..3ed4ed1cc 100644
--- a/xorg-server/mi/mibitblt.c
+++ b/xorg-server/mi/mibitblt.c
@@ -730,7 +730,7 @@ miPutImage(DrawablePtr pDraw, GCPtr pGC, int depth,
ChangeGC(NullClient, pGC, GCForeground | GCBackground, gcv);
bytesPer = (long) h *BitmapBytePad(w + leftPad);
- for (i = 1 << (depth - 1); i != 0; i >>= 1, pImage += bytesPer) {
+ for (i = (unsigned long) 1 << (depth - 1); i != 0; i >>= 1, pImage += bytesPer) {
if (i & oldPlanemask) {
gcv[0].val = (XID) i;
ChangeGC(NullClient, pGC, GCPlaneMask, gcv);
diff --git a/xorg-server/mi/miinitext.c b/xorg-server/mi/miinitext.c
index e5648724c..5b45ab4c2 100644
--- a/xorg-server/mi/miinitext.c
+++ b/xorg-server/mi/miinitext.c
@@ -312,15 +312,13 @@ static void
AddStaticExtensions(void)
{
static Bool listInitialised = FALSE;
- int i;
if (listInitialised)
return;
listInitialised = TRUE;
/* Add built-in extensions to the list. */
- for (i = 0; i < ARRAY_SIZE(staticExtensions); i++)
- LoadExtension(&staticExtensions[i], TRUE);
+ LoadExtensionList(staticExtensions, ARRAY_SIZE(staticExtensions), TRUE);
}
void
@@ -331,7 +329,7 @@ InitExtensions(int argc, char *argv[])
AddStaticExtensions();
- for (i = 0; ExtensionModuleList[i].name != NULL; i++) {
+ for (i = 0; i < numExtensionModules; i++) {
ext = &ExtensionModuleList[i];
if (ext->initFunc != NULL &&
(ext->disablePtr == NULL || !*ext->disablePtr)) {
@@ -341,50 +339,52 @@ InitExtensions(int argc, char *argv[])
}
static ExtensionModule *
-NewExtensionModule(void)
+NewExtensionModuleList(int size)
{
ExtensionModule *save = ExtensionModuleList;
int n;
- /* Make sure built-in extensions get added to the list before those
- * in modules. */
- AddStaticExtensions();
-
/* Sanity check */
if (!ExtensionModuleList)
numExtensionModules = 0;
- n = numExtensionModules + 1;
+ n = numExtensionModules + size;
ExtensionModuleList = realloc(ExtensionModuleList,
- (n + 1) * sizeof(ExtensionModule));
+ n * sizeof(ExtensionModule));
if (ExtensionModuleList == NULL) {
ExtensionModuleList = save;
return NULL;
}
else {
- numExtensionModules++;
- ExtensionModuleList[numExtensionModules].name = NULL;
- return ExtensionModuleList + (numExtensionModules - 1);
+ numExtensionModules += size;
+ return ExtensionModuleList + (numExtensionModules - size);
}
}
void
-LoadExtension(const ExtensionModule * e, Bool builtin)
+LoadExtensionList(const ExtensionModule ext[], int size, Bool builtin)
{
ExtensionModule *newext;
+ const char *msg;
+ int i;
- if (e == NULL || e->name == NULL)
- return;
+ /* Make sure built-in extensions get added to the list before those
+ * in modules. */
+ AddStaticExtensions();
- if (!(newext = NewExtensionModule()))
+ if (!(newext = NewExtensionModuleList(size)))
return;
if (builtin)
- ErrorF("Initializing built-in extension %s\n", e->name);
+ msg = "Initializing built-in";
else
- ErrorF("Loading extension %s\n", e->name);
+ msg = "Loading";
+
+ for (i = 0; i < size; i++, newext++) {
+ ErrorF("%s extension %s\n", msg, ext[i].name);
- newext->name = e->name;
- newext->initFunc = e->initFunc;
- newext->disablePtr = e->disablePtr;
+ newext->name = ext[i].name;
+ newext->initFunc = ext[i].initFunc;
+ newext->disablePtr = ext[i].disablePtr;
+ }
}
diff --git a/xorg-server/os/connection.c b/xorg-server/os/connection.c
index 7c48d46b0..80489f0e2 100644
--- a/xorg-server/os/connection.c
+++ b/xorg-server/os/connection.c
@@ -145,6 +145,7 @@ fd_set OutputPending; /* clients with reply/event data ready to go */
int MaxClients = 0;
Bool NewOutputPending; /* not yet attempted to write some new output */
Bool AnyClientsWriteBlocked; /* true if some client blocked on write */
+Bool NoListenAll; /* Don't establish any listening sockets */
#if !defined(_MSC_VER)
static Bool RunFromSmartParent; /* send SIGUSR1 to parent process */
@@ -438,7 +439,10 @@ CreateWellKnownSockets(void)
/* display is initialized to "0" by main(). It is then set to the display
* number if specified on the command line, or to NULL when the -displayfd
* option is used. */
- if (display) {
+ if (NoListenAll) {
+ ListenTransCount = 0;
+ }
+ else if (display) {
if (TryCreateSocket(atoi(display), &partial) &&
ListenTransCount >= 1)
if (!PartialNetwork && partial)
@@ -477,9 +481,10 @@ CreateWellKnownSockets(void)
}
}
- if (!XFD_ANYSET(&WellKnownConnections))
+ if (!XFD_ANYSET(&WellKnownConnections) && !NoListenAll)
FatalError
("Cannot establish any listening sockets - Make sure an X server isn't already running");
+
#if !defined(WIN32)
OsSignal(SIGPIPE, SIG_IGN);
OsSignal(SIGHUP, AutoResetServer);
@@ -1300,8 +1305,7 @@ MakeClientGrabPervious(ClientPtr client)
}
}
-#ifdef XQUARTZ
-/* Add a fd (from launchd) to our listeners */
+/* Add a fd (from launchd or similar) to our listeners */
void
ListenOnOpenFD(int fd, int noxauth)
{
@@ -1323,7 +1327,7 @@ ListenOnOpenFD(int fd, int noxauth)
*/
ciptr = _XSERVTransReopenCOTSServer(5, fd, port);
if (ciptr == NULL) {
- ErrorF("Got NULL while trying to Reopen launchd port.\n");
+ ErrorF("Got NULL while trying to Reopen listen port.\n");
return;
}
@@ -1356,4 +1360,29 @@ ListenOnOpenFD(int fd, int noxauth)
#endif
}
-#endif
+/* based on TRANS(SocketUNIXAccept) (XtransConnInfo ciptr, int *status) */
+Bool
+AddClientOnOpenFD(int fd)
+{
+ XtransConnInfo ciptr;
+ CARD32 connect_time;
+ char port[20];
+
+ snprintf(port, sizeof(port), ":%d", atoi(display));
+ ciptr = _XSERVTransReopenCOTSServer(5, fd, port);
+ if (ciptr == NULL)
+ return FALSE;
+
+ _XSERVTransSetOption(ciptr, TRANS_NONBLOCKING, 1);
+ ciptr->flags |= TRANS_NOXAUTH;
+
+ connect_time = GetTimeInMillis();
+
+ if (!AllocNewConnection(ciptr, fd, connect_time)) {
+ ErrorConnMax(ciptr);
+ _XSERVTransClose(ciptr);
+ return FALSE;
+ }
+
+ return TRUE;
+}
diff --git a/xorg-server/os/utils.c b/xorg-server/os/utils.c
index cbd5c7ad5..c514ae11a 100644
--- a/xorg-server/os/utils.c
+++ b/xorg-server/os/utils.c
@@ -290,7 +290,7 @@ LockServer(void)
int len;
char port[20];
- if (nolock)
+ if (nolock || NoListenAll)
return;
/*
* Path names
@@ -411,7 +411,7 @@ LockServer(void)
void
UnlockServer(void)
{
- if (nolock)
+ if (nolock || NoListenAll)
return;
if (!StillLocking) {
diff --git a/xorg-server/test/Makefile.am b/xorg-server/test/Makefile.am
index f8aa65950..88fb6aa96 100644
--- a/xorg-server/test/Makefile.am
+++ b/xorg-server/test/Makefile.am
@@ -30,7 +30,6 @@ endif
xkb_LDADD=$(TEST_LDADD)
input_LDADD=$(TEST_LDADD)
xtest_LDADD=$(TEST_LDADD)
-list_LDADD=$(TEST_LDADD)
misc_LDADD=$(TEST_LDADD)
fixes_LDADD=$(TEST_LDADD)
xfree86_LDADD=$(TEST_LDADD)
diff --git a/xorg-server/xkb/xkbUtils.c b/xorg-server/xkb/xkbUtils.c
index 6cf6e79df..c14a790df 100644
--- a/xorg-server/xkb/xkbUtils.c
+++ b/xorg-server/xkb/xkbUtils.c
@@ -2027,6 +2027,12 @@ XkbDeviceApplyKeymap(DeviceIntPtr dst, XkbDescPtr desc)
return ret;
}
+Bool
+XkbCopyDeviceKeymap(DeviceIntPtr dst, DeviceIntPtr src)
+{
+ return XkbDeviceApplyKeymap(dst, src->key->xkbInfo->desc);
+}
+
int
XkbGetEffectiveGroup(XkbSrvInfoPtr xkbi, XkbStatePtr xkbState, CARD8 keycode)
{